<?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 Input Script as  a Data to Index the same  in Splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Input-Script-as-a-Data-to-Index-the-same-in-Splunk/m-p/367419#M95938</link>
    <description>&lt;P&gt;We got an requirement to input data via script and I am new to it. so how to achieve it.&lt;/P&gt;

&lt;P&gt;So how to achieve it...&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2017 14:00:59 GMT</pubDate>
    <dc:creator>anandhalagarasa</dc:creator>
    <dc:date>2017-06-21T14:00:59Z</dc:date>
    <item>
      <title>Input Script as  a Data to Index the same  in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Script-as-a-Data-to-Index-the-same-in-Splunk/m-p/367419#M95938</link>
      <description>&lt;P&gt;We got an requirement to input data via script and I am new to it. so how to achieve it.&lt;/P&gt;

&lt;P&gt;So how to achieve it...&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 14:00:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Script-as-a-Data-to-Index-the-same-in-Splunk/m-p/367419#M95938</guid>
      <dc:creator>anandhalagarasa</dc:creator>
      <dc:date>2017-06-21T14:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Input Script as  a Data to Index the same  in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Script-as-a-Data-to-Index-the-same-in-Splunk/m-p/367420#M95939</link>
      <description>&lt;P&gt;Create a shell script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;touch ssecls_executer.sh
chmod +x ssecls_executer.sh
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Paste this into the shell script: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/usr/bin/env bash
/opt/SYMCScan/ssecls/ssecls -server 127.0.0.1 /bin/ls
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Copy the shell script to a bin folder in a splunk app of your choice&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;mkdir /opt/splunk/etc/apps/MyAPP
mkdir /opt/splunk/etc/apps/MyAPP/bin
cp ssecls_executer.sh /opt/splunk/etc/apps/MyAPP/bin
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make an inputs.conf that runs the script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;mkdir /opt/splunk/etc/apps/MyAPP/default
touch /opt/splunk/etc/apps/MyAPP/default/inputs.conf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Paste this into the inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script:///opt/splunk/etc/apps/MyApp/bin/ssecls_executer.sh]
interval = 60 # OR whatever interval in seconds / cron schedule you want to execute on (see inputs.conf documentation)
index = indexName
sourcetype = ssecls_executer
source = ssecls_executer.sh
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Restart splunk and profit.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 18:35:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Script-as-a-Data-to-Index-the-same-in-Splunk/m-p/367420#M95939</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-06-21T18:35:16Z</dc:date>
    </item>
  </channel>
</rss>

