<?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: Add Date to report in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Add-Date-to-report/m-p/507936#M8188</link>
    <description>&lt;P&gt;If you just want to add the current date/time to the report you can just add the following line after the stats, which will set the _time column to the current time.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval _time=now()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Note that your existing search is a little wrong in that the stats count doesn't give the aggregation the name you are using in the sort command. I suspect you meant&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* Level=ERROR
| stats count as Total by index 
| sort index Total desc
| eval _time=now()&lt;/LI-CODE&gt;&lt;P&gt;Couple of points&lt;/P&gt;&lt;P&gt;1. Do you want to sort first by index then by total - could be that your largest count of errors would be at the bottom. Maybe this, which would give you descending total but ascending index order&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| sort - Total, + index&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Also not that using wildcard on index will not always give you ALL indexes, as that will depend on your permissions, but it will also not return any of the internal indexes, prefixed with _&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jul 2020 22:59:21 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-07-07T22:59:21Z</dc:date>
    <item>
      <title>Add Date to report</title>
      <link>https://community.splunk.com/t5/Reporting/Add-Date-to-report/m-p/507933#M8187</link>
      <description>&lt;P&gt;Hi There.&lt;/P&gt;&lt;P&gt;I'm fairly new to Splunk reporting.&amp;nbsp; I have inherited this fairly simple report.&lt;/P&gt;&lt;P&gt;index=* Level=ERROR | stats count(index) by index | sort indexTotal desc&lt;/P&gt;&lt;P&gt;That just shows a count of errors by index.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to add another column to the report that just shows the current date.&lt;/P&gt;&lt;P&gt;Thanks in advance for any help!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 22:32:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Add-Date-to-report/m-p/507933#M8187</guid>
      <dc:creator>gjsmarsh</dc:creator>
      <dc:date>2020-07-07T22:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to report</title>
      <link>https://community.splunk.com/t5/Reporting/Add-Date-to-report/m-p/507936#M8188</link>
      <description>&lt;P&gt;If you just want to add the current date/time to the report you can just add the following line after the stats, which will set the _time column to the current time.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval _time=now()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Note that your existing search is a little wrong in that the stats count doesn't give the aggregation the name you are using in the sort command. I suspect you meant&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=* Level=ERROR
| stats count as Total by index 
| sort index Total desc
| eval _time=now()&lt;/LI-CODE&gt;&lt;P&gt;Couple of points&lt;/P&gt;&lt;P&gt;1. Do you want to sort first by index then by total - could be that your largest count of errors would be at the bottom. Maybe this, which would give you descending total but ascending index order&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| sort - Total, + index&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Also not that using wildcard on index will not always give you ALL indexes, as that will depend on your permissions, but it will also not return any of the internal indexes, prefixed with _&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 22:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Add-Date-to-report/m-p/507936#M8188</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-07-07T22:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add Date to report</title>
      <link>https://community.splunk.com/t5/Reporting/Add-Date-to-report/m-p/507939#M8189</link>
      <description>&lt;P&gt;Thanks so much!&amp;nbsp; I need to do a tutorial or something on Splunk Queries but this gets me moving out the door.&lt;/P&gt;&lt;P&gt;And yeah I had removed the alias from the actual query and forgot to add it in the sample I shared.&amp;nbsp; Thanks also for pointing that out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 23:10:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Add-Date-to-report/m-p/507939#M8189</guid>
      <dc:creator>gjsmarsh</dc:creator>
      <dc:date>2020-07-07T23:10:15Z</dc:date>
    </item>
  </channel>
</rss>

