<?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: unable to execute python script thro inputs.conf in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546109#M9795</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;even after printing output. i dont see ouput indexing into splunk. if i use plain shell script its indexing data&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import commands
output = commands.getstatusoutput('docker ps --format "table {{ .Image }},{{.ID}},{{.Command}},{{.CreatedAt }},{{.Status }},{{.Ports }},{{.Names}}"')
print(output) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Mar 2021 02:25:33 GMT</pubDate>
    <dc:creator>DataOrg</dc:creator>
    <dc:date>2021-03-31T02:25:33Z</dc:date>
    <item>
      <title>unable to execute python script thro inputs.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546011#M9793</link>
      <description>&lt;P&gt;unable to execute python script , below is the inputs.conf and py script.&lt;/P&gt;&lt;P&gt;if i run the script from python interpreter , it gives output but not thro inputs.conf&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script:///$SPLUNK_HOME/etc/apps/search/bin/dockesd.py]
disabled = false
host = host1
index = indx
interval = 30
source = Perform
sourcetype = Memory&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import os
os.system('docker container ls --format="{{json .}}"')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 13:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546011#M9793</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2021-03-30T13:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: unable to execute python script thro inputs.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546045#M9794</link>
      <description>&lt;P&gt;What does "unable to execute mean"?&amp;nbsp; What errors does Splunk log for the input?&lt;/P&gt;&lt;P&gt;Does os.system write to stdout?&amp;nbsp; If not, then Splunk will not index anything.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 16:40:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546045#M9794</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-30T16:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: unable to execute python script thro inputs.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546109#M9795</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;even after printing output. i dont see ouput indexing into splunk. if i use plain shell script its indexing data&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import commands
output = commands.getstatusoutput('docker ps --format "table {{ .Image }},{{.ID}},{{.Command}},{{.CreatedAt }},{{.Status }},{{.Ports }},{{.Names}}"')
print(output) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 02:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546109#M9795</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2021-03-31T02:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: unable to execute python script thro inputs.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546215#M9796</link>
      <description>&lt;P&gt;Again I ask what error(s) is Splunk reporting?&lt;/P&gt;&lt;P&gt;Please tell us how you told Splunk to run this script.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 13:42:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546215#M9796</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-31T13:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: unable to execute python script thro inputs.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546221#M9797</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/45389"&gt;@DataOrg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please check your script by executing below command? Does it gives you expected OP or any error.&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;./splunk cmd python /opt/splunk/etc/apps/search/bin/dockesd.py&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 14:35:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546221#M9797</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-03-31T14:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: unable to execute python script thro inputs.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546243#M9798</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after executing ./splunk cmd.&lt;/P&gt;&lt;P&gt;i am getting below warning message with output.&lt;/P&gt;&lt;P&gt;/usr/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py:47: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.&lt;BR /&gt;from cryptography import x509&lt;BR /&gt;IMAGE,CONTAINER ID,COMMAND,CREATED AT,STATUS,PORTS,NAMES&lt;BR /&gt;thomsch98/kafdrop:latest,8c0e092b6815,"/usr/local/bin/mvn-…",2021-03-26 18:29:56 -0400 EDT,Up 4 days,,PAServices_kafdrop.1.yen4hgju18kkfgq9bvud7e1w8&lt;BR /&gt;143.22.167.109:5000/help-documentation-app:0.1.13,93201914aec5,"httpd-foreground",2021-03-25 15:39:55 -0400 EDT,Up 5 days,80/tcp,PAContainer_helpservice.1.r3b5796b5jm8x5sxu4iec1br6&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 15:24:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/unable-to-execute-python-script-thro-inputs-conf/m-p/546243#M9798</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2021-03-31T15:24:48Z</dc:date>
    </item>
  </channel>
</rss>

