<?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: Splunk report on demand in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556268#M9220</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225125"&gt;@SS1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can be achieved if you have _audit index access to query it using Splunk Rest API and having mail functionality enabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#Step1 - Find the search_id of savedsearch
index=_audit savedsearch_name=&amp;lt;your_search_name&amp;gt; earliest=-20m latest=now | field search_id |  
Rest API POST method -https://docs.splunk.com/Documentation/Splunk/8.2.0/RESTREF/RESTsearch#search.2Fjobs

#Step2 get the results of step1 to retrieve search_id
Rest API GET method -https://docs.splunk.com/Documentation/Splunk/8.2.0/RESTREF/RESTsearch#search.2Fjobs

#Step3 retrieve the search job results of savedsearch
REST API GET Method -
https://docs.splunk.com/Documentation/Splunk/8.2.0/RESTREF/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults
-&amp;gt; output the results to a file

#Step4 use the linux sendmail command to send results to your required email, assuming you have SMTP enabled in linux&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-----&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and accept solution if it helps!&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jun 2021 03:32:58 GMT</pubDate>
    <dc:creator>venkatasri</dc:creator>
    <dc:date>2021-06-18T03:32:58Z</dc:date>
    <item>
      <title>Splunk report on demand</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556245#M9214</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a report which is scheduled to run every day at 8 AM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to generate that report to email address X by executing a command via CLI ?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 22:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556245#M9214</guid>
      <dc:creator>SS1</dc:creator>
      <dc:date>2021-06-17T22:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk report on demand</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556257#M9217</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225125"&gt;@SS1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reports functionality having trigger action Email is one of the action if you want to enable then at 08 AM you will get Email. In UI go to Edit -&amp;gt; schedule -&amp;gt; trigger Actions -&amp;gt; Email and fill in details required and check the additional options like send pdf, results etc.&lt;/P&gt;&lt;P&gt;Just wondering why you want to push it from CLI is this for ad-hoc basis rather than every days 08 AM?&lt;/P&gt;&lt;P&gt;Backed savedsearches.conf looks like this,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;## cron is indicaive
[your_saved_search_report_name]
action.email = 1
action.email.sendpdf = 1
action.email.sendresults = 1
action.email.to = youremails@domain.com
alert.track = 0
cron_schedule = 0 6 * * 1
enableSched = 1&lt;/LI-CODE&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;An upvote would be appreciated if it helps!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 01:20:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556257#M9217</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-06-18T01:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk report on demand</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556260#M9218</link>
      <description>&lt;P&gt;Just wanted to see if i can issue a command via CLI at 8:15 AM and generate that report ?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 01:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556260#M9218</guid>
      <dc:creator>SS1</dc:creator>
      <dc:date>2021-06-18T01:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk report on demand</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556268#M9220</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225125"&gt;@SS1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can be achieved if you have _audit index access to query it using Splunk Rest API and having mail functionality enabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#Step1 - Find the search_id of savedsearch
index=_audit savedsearch_name=&amp;lt;your_search_name&amp;gt; earliest=-20m latest=now | field search_id |  
Rest API POST method -https://docs.splunk.com/Documentation/Splunk/8.2.0/RESTREF/RESTsearch#search.2Fjobs

#Step2 get the results of step1 to retrieve search_id
Rest API GET method -https://docs.splunk.com/Documentation/Splunk/8.2.0/RESTREF/RESTsearch#search.2Fjobs

#Step3 retrieve the search job results of savedsearch
REST API GET Method -
https://docs.splunk.com/Documentation/Splunk/8.2.0/RESTREF/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults
-&amp;gt; output the results to a file

#Step4 use the linux sendmail command to send results to your required email, assuming you have SMTP enabled in linux&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-----&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and accept solution if it helps!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 03:32:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-report-on-demand/m-p/556268#M9220</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-06-18T03:32:58Z</dc:date>
    </item>
  </channel>
</rss>

