<?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: Average Daily Unique IPs by Weekday in Web Log Files in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134208#M27587</link>
    <description>&lt;P&gt;Your original query is incorrect because of the way you use &lt;CODE&gt;dedup&lt;/CODE&gt;. If someone visits on two days you're only counting him for one of the days, &lt;CODE&gt;dedup&lt;/CODE&gt; throws out the other visit before it was counted for that day.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Apr 2014 23:06:09 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-04-16T23:06:09Z</dc:date>
    <item>
      <title>Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134196#M27575</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;
I'm having a great time with Splunk and using it to analyze some IIS web logs. I've been successful in creating a search that counts the daily unique IPs. But I am wanting to use that same data and show the average number of unique IPs by weekday over different periods of time (3 months, 6 months, all time).&lt;/P&gt;

&lt;P&gt;My issue is that I have created a successful search for 3 months, but when I try to run it for anything greater than that, the calculations are incorrect. I presume I am hitting some sort of summarization limit and it is grouping the data in an odd way.&lt;/P&gt;

&lt;P&gt;Here is my search string that works at three months or less:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=iis
| bin _time span=1d 
| dedup c_ip
| timechart count(c_ip) as daily_uniques
| eval weekday = strftime(_time, "%w")
| stats avg(daily_uniques) by weekday
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why would this search work correctly for the last three months but not for 6 or 12 month periods?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 20:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134196#M27575</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2014-04-16T20:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134197#M27576</link>
      <description>&lt;P&gt;how do you say it's not working?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=iis
| dedup c_ip,date_wday
|timechart avg(c_ip) by date_wday
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;could you try this and see where do you see the issue?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 20:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134197#M27576</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-16T20:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134198#M27577</link>
      <description>&lt;P&gt;Sorry, I should have clarified that point. &lt;/P&gt;

&lt;P&gt;So the commands above from sourcetype through timechart group the data by day, then dedup by client IP address, then counts the number of daily uniques. From there I organize the unique IP counts by weekday and calculate the average number of unique IPs by weekday. &lt;/P&gt;

&lt;P&gt;When I choose a time slice larger than three months, however, my averages are no longer calculated by day of the week, but calculate to some unknown grouping. &lt;/P&gt;

&lt;P&gt;This has the effect of not showing every single work day or showing hundreds (instead of 10s) of unique IPs as the average.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 20:38:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134198#M27577</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2014-04-16T20:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134199#M27578</link>
      <description>&lt;P&gt;did you try the query which is provided? what was the result?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 20:53:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134199#M27578</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-16T20:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134200#M27579</link>
      <description>&lt;P&gt;huh, the query didn't show when i first looked at your comment. trying now.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 21:00:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134200#M27579</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2014-04-16T21:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134201#M27580</link>
      <description>&lt;P&gt;it was an after thought &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 21:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134201#M27580</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-16T21:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134202#M27581</link>
      <description>&lt;P&gt;when i do that, i get "No results found"&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 21:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134202#M27581</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2014-04-16T21:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134203#M27582</link>
      <description>&lt;P&gt;date_wday is available in splunk or not when you run with sourcetype=iis?&lt;/P&gt;

&lt;P&gt;sourcetype=iis&lt;BR /&gt;
| timechart span=1d dc(c_ip) as daily_uniques&lt;BR /&gt;
| eval weekday = strftime(_time, "%w")&lt;BR /&gt;
| stats avg(daily_uniques) by weekday&lt;/P&gt;

&lt;P&gt;could you try if date_wday is not present?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:24:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134203#M27582</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T16:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134204#M27583</link>
      <description>&lt;P&gt;looks like date_wday is present. I ran the following command on the last 3 months of data and got results as expected:&lt;/P&gt;

&lt;P&gt;sourcetype=iis&lt;BR /&gt;
| timechart count by date_wday&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 21:26:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134204#M27583</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2014-04-16T21:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134205#M27584</link>
      <description>&lt;P&gt;That would give you the redundant count of IP. I was assuming that the c_ip was the IP extracted field. So it should be done as &lt;STRONG&gt;dc(IP) by date_wday&lt;/STRONG&gt; that would be appropriate.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:24:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134205#M27584</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T16:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134206#M27585</link>
      <description>&lt;P&gt;so i ran the command you gave above: &lt;BR /&gt;
sourcetype=iis&lt;BR /&gt;
| timechart span=1d dc(c_ip) as daily_uniques&lt;BR /&gt;
| eval weekday = strftime(_time, "%w")&lt;BR /&gt;
| stats avg(daily_uniques) by weekday&lt;/P&gt;

&lt;P&gt;and i'm getting results, but the counts are different than with my original query. can you tell me how these two command sequences are different?&lt;/P&gt;

&lt;P&gt;timechart span=1d dc(c_ip) as daily_uniques&lt;/P&gt;

&lt;P&gt;vs.&lt;/P&gt;

&lt;P&gt;bin _time span=1d &lt;BR /&gt;
| dedup c_ip&lt;BR /&gt;
| timechart count(c_ip) as daily_uniques&lt;/P&gt;

&lt;P&gt;why would is structure a search as you did versus the way i did?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:24:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134206#M27585</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2020-09-28T16:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134207#M27586</link>
      <description>&lt;P&gt;logically they should work equally, but the timechart aggregation should be faster. Honestly i don't know internally how would splunk process but would only prefer a line of code rather than 3 lines doing the same thing.&lt;/P&gt;

&lt;P&gt;would like to see this running.&lt;/P&gt;

&lt;P&gt;|timechart dc(IP) by date_wday&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 22:16:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134207#M27586</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-04-16T22:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134208#M27587</link>
      <description>&lt;P&gt;Your original query is incorrect because of the way you use &lt;CODE&gt;dedup&lt;/CODE&gt;. If someone visits on two days you're only counting him for one of the days, &lt;CODE&gt;dedup&lt;/CODE&gt; throws out the other visit before it was counted for that day.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2014 23:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134208#M27587</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-16T23:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134209#M27588</link>
      <description>&lt;P&gt;martin, are you saying that dedup is not deduping on the time bucket of 1 day but across the entire dataset?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2014 13:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134209#M27588</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2014-04-21T13:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134210#M27589</link>
      <description>&lt;P&gt;Yeah, &lt;CODE&gt;dedup&lt;/CODE&gt; is not aware of any bucketing but instead operates over the entire dataset.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2014 14:03:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134210#M27589</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-21T14:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134211#M27590</link>
      <description>&lt;P&gt;Brilliant. Just what i needed to know. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2014 15:23:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134211#M27590</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2014-04-21T15:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Average Daily Unique IPs by Weekday in Web Log Files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134212#M27591</link>
      <description>&lt;P&gt;Thanks to both linu1988 and martin_mueller, my question was answered. The correct query for what I am trying to accomplish is:&lt;/P&gt;

&lt;P&gt;sourcetype=iis&lt;BR /&gt;
| timechart span=1d dc(c_ip) as daily_uniques&lt;BR /&gt;
| eval weekday = strftime(_time, "%w")&lt;BR /&gt;
| stats avg(daily_uniques) by weekday&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:25:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Average-Daily-Unique-IPs-by-Weekday-in-Web-Log-Files/m-p/134212#M27591</guid>
      <dc:creator>jason_hunsberge</dc:creator>
      <dc:date>2020-09-28T16:25:43Z</dc:date>
    </item>
  </channel>
</rss>

