<?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 show output of script to Splunk without indexing it in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-output-of-script-to-Splunk-without-indexing-it/m-p/21610#M177360</link>
    <description>&lt;P&gt;You could set it up as a custom command, that doesn't actually work like the typical custom command.&lt;/P&gt;

&lt;P&gt;For example you could create a generic search on "&lt;CODE&gt;*&lt;/CODE&gt;" and a small time range. Then pipe to your new custom command which runs your script in the background, but it will display the output as results (i.e. anything written to STDOUT).&lt;/P&gt;

&lt;P&gt;Quite easy to set a command up, just use the following:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Search/AddthecustomcommandtoSplunk"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Search/AddthecustomcommandtoSplunk&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Think that is probably the easiest way to just simply plug your script into Splunk. You could probably do a scripted lookup, but that might require you changing the script. &lt;/P&gt;</description>
    <pubDate>Fri, 02 Nov 2012 15:55:27 GMT</pubDate>
    <dc:creator>MHibbin</dc:creator>
    <dc:date>2012-11-02T15:55:27Z</dc:date>
    <item>
      <title>How to show output of script to Splunk without indexing it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-output-of-script-to-Splunk-without-indexing-it/m-p/21609#M177359</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;

&lt;P&gt;I have a script that outputs data in tabular form to console. &lt;/P&gt;

&lt;P&gt;For exp: &lt;/P&gt;

&lt;P&gt;machine state&lt;/P&gt;

&lt;P&gt;A ON&lt;/P&gt;

&lt;P&gt;B OFF&lt;/P&gt;

&lt;P&gt;After that, i get this ouput via python by using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;output=subprocess.check_output("memory.bat", shell=True)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I wrote a function named showoutput.py like search command.&lt;BR /&gt;
My question is how to show that output above in Splunk without indexing it via a search like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| script python showoutput memory.bat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In my company, there are a lot of machine, the importance is to catch all their current states in real time. The historic data is already resolved with another tool.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2012 15:03:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-output-of-script-to-Splunk-without-indexing-it/m-p/21609#M177359</guid>
      <dc:creator>sieutruc</dc:creator>
      <dc:date>2012-11-02T15:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to show output of script to Splunk without indexing it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-output-of-script-to-Splunk-without-indexing-it/m-p/21610#M177360</link>
      <description>&lt;P&gt;You could set it up as a custom command, that doesn't actually work like the typical custom command.&lt;/P&gt;

&lt;P&gt;For example you could create a generic search on "&lt;CODE&gt;*&lt;/CODE&gt;" and a small time range. Then pipe to your new custom command which runs your script in the background, but it will display the output as results (i.e. anything written to STDOUT).&lt;/P&gt;

&lt;P&gt;Quite easy to set a command up, just use the following:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Search/AddthecustomcommandtoSplunk"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/Search/AddthecustomcommandtoSplunk&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Think that is probably the easiest way to just simply plug your script into Splunk. You could probably do a scripted lookup, but that might require you changing the script. &lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2012 15:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-output-of-script-to-Splunk-without-indexing-it/m-p/21610#M177360</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-11-02T15:55:27Z</dc:date>
    </item>
  </channel>
</rss>

