Weekend Web Traffic Summary in IIS

The following Splunk query will return a summary of weekend activity for a given IIS hosted website.

sourcetype="iis" (date_wday=saturday OR date_wday=sunday) | stats count(JSESSIONID) as Value | eval Metric="Total Hits on Weekends" | append [ search sourcetype="iis" (date_wday=saturday OR date_wday=sunday) | stats dc(JSESSIONID) as Value | eval Metric="Total Visits on Weekends"] | append [ search sourcetype="iis" (date_wday=saturday OR date_wday=sunday) JSESSIONID=* | stats dc(JSESSIONID) as count by date_wday | stats avg(count) as Value by date_wday | eval Value=round(Value) | top limit=1 Value | eval Metric = "Average Number of Visits per day on Weekends"] | append [ search sourcetype="iis" (date_wday=saturday OR date_wday=sunday) JSESSIONID=* | stats count(JSESSIONID) as count by date_wday | stats avg(count) as Value by date_wday | eval Value=round(Value) | top limit=1 Value | eval Metric = "Average Number of Hits per day on Weekends"] | fieldformat Value=tostring(Value,"commas") | fields - count, percent | fields Metric, Value
Share This:

Leave A Comment?