<?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: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273640#M82516</link>
    <description>&lt;P&gt;You will not be able to do a timechart and display on a piechart. For a piechart, you can do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=* sourcetype=Hostmon site=* state=* | stats count by state
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 09 Sep 2016 22:03:52 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-09-09T22:03:52Z</dc:date>
    <item>
      <title>How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273635#M82511</link>
      <description>&lt;P&gt;I have recently started indexing a private log generated from a Hostmon URL check.  The Hostmon check runs during M-F business hours and returns the following basic log information : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[9/8/2016 10:48:55 AM]      sitename.com    Host is alive   18 ms   URL request 27061
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've added the extracted fields for 'site', 'state' 'response_time', 'test_type' 'bytes' but now I want to build reporting around the data and am not very experienced using charting searches with Splunk.  The 'state' field will return data that is simplistic as 'Host is alive', 'Host is down', or 'Out of schedule'.  &lt;/P&gt;

&lt;P&gt;Can someone help me understand how to pipe in a &lt;CODE&gt;timechart avg&lt;/CODE&gt; of the 'state' field values so I can add it to a scheduled report for how often my site was available?  &lt;/P&gt;

&lt;P&gt;Example of a search that I was trying is: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=* sourcetype=Hostmon site=* state=* | timechart span=1d avg(state) as Site_Availability
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:56:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273635#M82511</guid>
      <dc:creator>jward6004</dc:creator>
      <dc:date>2020-09-29T10:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273636#M82512</link>
      <description>&lt;P&gt;try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=* sourcetype=Hostmon site=* state=* | stats count values(state) by _time|timechart span=1d avg(state) as Site_Availability
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Sep 2016 21:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273636#M82512</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-09-09T21:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273637#M82513</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=* sourcetype=Hostmon site=* state=* | bin span=1h _time | stats count by _time state | timechart span=1d avg(count) as Site_Availability by state
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Sep 2016 21:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273637#M82513</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-09T21:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273638#M82514</link>
      <description>&lt;P&gt;For testing purposes I added a 'host is down' entry in the log but my pie chart is showing three data groups on the virtualization :  &lt;/P&gt;

&lt;P&gt;Host is alive, Host is alive, and other&lt;/P&gt;

&lt;P&gt;I'm looking for the chart to show basically 99% host is alive and for that one entry that is Host is down shouldn't it show a sliver for that 1%?  &lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 21:49:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273638#M82514</guid>
      <dc:creator>jward6004</dc:creator>
      <dc:date>2016-09-09T21:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273639#M82515</link>
      <description>&lt;P&gt;You wouldn't use timechart with a pie chart representation.  Time charts are suited for line charts and the like.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 21:52:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273639#M82515</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-09-09T21:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273640#M82516</link>
      <description>&lt;P&gt;You will not be able to do a timechart and display on a piechart. For a piechart, you can do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main host=* sourcetype=Hostmon site=* state=* | stats count by state
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Sep 2016 22:03:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273640#M82516</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-09T22:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273641#M82517</link>
      <description>&lt;P&gt;if you still need to express the average of the count try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=main host=* sourcetype=Hostmon site=* state=* | stats count by state|stats avg(count) as Average by state
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Sep 2016 22:13:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273641#M82517</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-09-09T22:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273642#M82518</link>
      <description>&lt;P&gt;Awesome! thanks guys.  One last virtualization question, can you help me with the creating a bar graph for showing the hourly/weekly /monthly and yearly performance. &lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 22:40:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273642#M82518</guid>
      <dc:creator>jward6004</dc:creator>
      <dc:date>2016-09-09T22:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273643#M82519</link>
      <description>&lt;P&gt;That goes back to sundareshr's earlier answer&lt;/P&gt;

&lt;P&gt;try this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=main host=* sourcetype=Hostmon site=* state=* | bin span=1h _time | stats count by _time state | timechart span=1d avg(count) as Site_Availability by state
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;change the span=1h to span=1w for 1week or span=1m for 1month or span=1y for 1year&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 22:44:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273643#M82519</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-09-09T22:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273644#M82520</link>
      <description>&lt;P&gt;sorry that should be the timechart span&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 22:45:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273644#M82520</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-09-09T22:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273645#M82521</link>
      <description>&lt;P&gt;Hi @jward6004 - If your original question has been answered, don't forget to resolve the original post by clicking "Accept" below the answer. Also, be sure to upvote any comments by @sundareshr and @dbcase that you found helpful.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2016 00:44:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273645#M82521</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2016-09-10T00:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273646#M82522</link>
      <description>&lt;P&gt;Thank you dbcase!  I'm trying to get a total number of tests or sum.. and then divide total tests by total success (host is alive) and total failures (host is down) using EVAL.&lt;/P&gt;

&lt;P&gt;This the current query I'm using for the past week of test data&lt;/P&gt;

&lt;P&gt;index=main host=* sourcetype=Hostmon site=* state=* | stats count by _time state | timechart span=1w count as Site_Availability by state&lt;/P&gt;

&lt;P&gt;This bar graph is showing total tests of either 'host is alive' or 'host is down' for the past week but I'm trying to display a more granular output of the data.   &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:00:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273646#M82522</guid>
      <dc:creator>jward6004</dc:creator>
      <dc:date>2020-09-29T11:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273647#M82523</link>
      <description>&lt;P&gt;I don't quite understand is there anyway you could send a result (mock up) of what you are looking for?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 22:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273647#M82523</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-09-12T22:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273648#M82524</link>
      <description>&lt;P&gt;Here's a screengrab for my panels now. &lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.dropbox.com/s/p3d5sbc0rcvjaq3/plscreengrab.JPG?dl=0"&gt;https://www.dropbox.com/s/p3d5sbc0rcvjaq3/plscreengrab.JPG?dl=0&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It's showing the number of times that the event showed 'host is alive' and 'host is down' but I don't really care to display the number of tests in my graph.  I'd like to create two new fields using EVAL for the expected values of the field 'state' then use the graph to report on those new fields&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 22:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273648#M82524</guid>
      <dc:creator>jward6004</dc:creator>
      <dc:date>2016-09-12T22:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273649#M82525</link>
      <description>&lt;P&gt;maybe displayed as percentage for each of those fields over the timechart span= 1w&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 23:31:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273649#M82525</guid>
      <dc:creator>jward6004</dc:creator>
      <dc:date>2016-09-12T23:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart average of a field from a simple Hostmon URL Check log file to create visualizations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273650#M82526</link>
      <description>&lt;P&gt;Still not quite understanding but.....&lt;/P&gt;

&lt;P&gt;I think you would need eventstats to get your totals&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/Eventstats"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/Eventstats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://blogs.splunk.com/2014/04/01/search-command-stats-eventstats-and-streamstats-2/"&gt;http://blogs.splunk.com/2014/04/01/search-command-stats-eventstats-and-streamstats-2/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;or possibly accum...&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Accum"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Accum&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;sorry for the vagueness, I'm still not getting quite what you are looking for.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 01:08:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-average-of-a-field-from-a-simple-Hostmon/m-p/273650#M82526</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2016-09-13T01:08:01Z</dc:date>
    </item>
  </channel>
</rss>

