<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: data from csv file and working on that with splunk query in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111719#M23409</link>
    <description>&lt;P&gt;ya i have access to raw events&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2015 05:33:39 GMT</pubDate>
    <dc:creator>ektasiwani</dc:creator>
    <dc:date>2015-05-18T05:33:39Z</dc:date>
    <item>
      <title>data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111715#M23405</link>
      <description>&lt;P&gt;I have a csv file created by splunk search:&lt;BR /&gt;
It contain ip count for last 7 days.&lt;BR /&gt;
it looks like this:&lt;/P&gt;

&lt;P&gt;_time                            192.168.10.20                      192.168.30.46&lt;BR /&gt;
2015-05-08                   145                                        45&lt;BR /&gt;
2015-05-09                   200                                        200&lt;BR /&gt;
2015-05-10                   300                                       34&lt;/P&gt;

&lt;P&gt;Now i want to subtract  each day count from sum of total count  of that ip&lt;/P&gt;

&lt;P&gt;for example:&lt;BR /&gt;
for ip 192.168.30.46 i want out put for date 2015-05-08 as (45+200+34)-45&lt;BR /&gt;
how can i achieve this with splunk query?&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 10:12:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111715#M23405</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-05-15T10:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111716#M23406</link>
      <description>&lt;P&gt;Do you have control over the csv creation? The number of IP addresses will change over the time and hence building a dynamic query will be a challenge. If you have access to raw events, then you can use eventStats sum(count) by ipAddress and then substract the current count.&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 10:47:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111716#M23406</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-05-15T10:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111717#M23407</link>
      <description>&lt;P&gt;no i dont have control over ip address. i need dynamic query.&lt;BR /&gt;
ip address number will keep on changing.&lt;BR /&gt;
is there any way to create dynamic query for this?&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2015 11:56:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111717#M23407</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-05-15T11:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111718#M23408</link>
      <description>&lt;P&gt;Do you have access to raw events?&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 04:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111718#M23408</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-05-18T04:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111719#M23409</link>
      <description>&lt;P&gt;ya i have access to raw events&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 05:33:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111719#M23409</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-05-18T05:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111720#M23410</link>
      <description>&lt;P&gt;If you have access to raw events, you can try following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...select the raw events.. | table _time ipAddress | eval date = strftime(_time, "%Y-%m-%d") | stats count as countByDate by date,ipAddress | eventstats count as totalcount by ipAddress | eval customCount = totalcount - countByDate 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 06:33:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111720#M23410</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-05-18T06:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111721#M23411</link>
      <description>&lt;P&gt;the query is working but the result is not what i want.&lt;BR /&gt;
can you explain me above query?&lt;BR /&gt;
totalcount here is not the sum of day wise counts of an ip address.&lt;BR /&gt;
my requirement is:&lt;BR /&gt;
if 192.168.10.3 count  for 2nd of may is 340 and 3rd of feb is 45 and fourth of feb is 10&lt;/P&gt;

&lt;P&gt;i want to show on 2nd of feb deviation is (340+45+10)-340 , so customCount should show result of this  (340+45+10)-340.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 07:42:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111721#M23411</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-05-18T07:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111722#M23412</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My bad. Change the eventstats block to following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eventstats sum(countByDate) as totalcount by ipAddress
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should fix the problem. Can you please verify and confirm?&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 08:00:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111722#M23412</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-05-18T08:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: data from csv file and working on that with splunk query</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111723#M23413</link>
      <description>&lt;P&gt;Thanks vganjare , this is working for me.&lt;BR /&gt;
thnku for your time and help...:)&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 08:45:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/data-from-csv-file-and-working-on-that-with-splunk-query/m-p/111723#M23413</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-05-18T08:45:17Z</dc:date>
    </item>
  </channel>
</rss>

