<?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 How to chart the 5 most recent events? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-chart-the-5-most-recent-events/m-p/526333#M35712</link>
    <description>&lt;P&gt;How can I chart/graph out the 5 most recent events?&lt;/P&gt;&lt;P&gt;When an event occurs, the data/time is stored in whenCreated.&amp;nbsp; whenCreated has the format of 00:00.00 AM, Weekday DD/MM/YYYY.&amp;nbsp; Can I use this format?&lt;/P&gt;&lt;P&gt;I want to print the eventName and whenCreated.&amp;nbsp; But dedup eventName so that it only shows different values.&lt;/P&gt;&lt;P&gt;Here is my normal query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main admonEventType=* | sort - whenCreated | dedup eventName | table eventName whenCreated | head 5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like I can possibly do this with a statistics table using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart values(*) by eventName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could I put this in a bar chart?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Oct 2020 14:28:32 GMT</pubDate>
    <dc:creator>merdenoms</dc:creator>
    <dc:date>2020-10-24T14:28:32Z</dc:date>
    <item>
      <title>How to chart the 5 most recent events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-chart-the-5-most-recent-events/m-p/526333#M35712</link>
      <description>&lt;P&gt;How can I chart/graph out the 5 most recent events?&lt;/P&gt;&lt;P&gt;When an event occurs, the data/time is stored in whenCreated.&amp;nbsp; whenCreated has the format of 00:00.00 AM, Weekday DD/MM/YYYY.&amp;nbsp; Can I use this format?&lt;/P&gt;&lt;P&gt;I want to print the eventName and whenCreated.&amp;nbsp; But dedup eventName so that it only shows different values.&lt;/P&gt;&lt;P&gt;Here is my normal query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main admonEventType=* | sort - whenCreated | dedup eventName | table eventName whenCreated | head 5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like I can possibly do this with a statistics table using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart values(*) by eventName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could I put this in a bar chart?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 14:28:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-chart-the-5-most-recent-events/m-p/526333#M35712</guid>
      <dc:creator>merdenoms</dc:creator>
      <dc:date>2020-10-24T14:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart the 5 most recent events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-chart-the-5-most-recent-events/m-p/526338#M35714</link>
      <description>&lt;P&gt;Times in string form will not sort as you might expect so they should be converted into epoch (integer) form before sorting.&amp;nbsp; Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main admonEventType=* 
| eval sortTime = strptime(whenCreated, "%H:%M.%S %p, %A %d/%m/%Y")
| sort - sortTime
| dedup eventName 
| table eventName whenCreated 
| head 5&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 24 Oct 2020 18:13:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-chart-the-5-most-recent-events/m-p/526338#M35714</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-10-24T18:13:04Z</dc:date>
    </item>
  </channel>
</rss>

