<?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: ImportError: No module named splunk.entity in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115505#M97655</link>
    <description>&lt;P&gt;Based on your envvars, you are trying to run on a Universal Forwarder (UF). You need to run on a Lightweight Forwarder (LWF) or Heavy Forwarder (HF), or else add the Splunk python SDK libraries to the system python on the machine where the UF is running. (The SDK is available &lt;A href="http://dev.splunk.com/view/splunk-sdk-python/SP-CAAAEBB"&gt;here&lt;/A&gt;.)&lt;/P&gt;

&lt;P&gt;The main difference between a UF and a LWF is that the UF does &lt;EM&gt;not&lt;/EM&gt; come with a Splunk python implementation (and the attendant Splunk python libraries), which is the difference you're seeing. It relies on the system python, but the system python doesn't have the Splunk libraries needed.&lt;/P&gt;

&lt;P&gt;It's certainly possible to make it run on a UF, simply by either:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Installing the Splunk python SDK into the system python on the UF machine. &lt;/LI&gt;
&lt;LI&gt;Putting the Splunk python SDK libraries into the app&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Really the right solution would be for the app developer to simply include the Splunk python SDK libraries into the app itself so it comes with everything needed to run on a plain system python. This is fundamentally simple, it's simply a matter of sticking the SDK "splunk" folder into the "bin" directory where the main script that needs it is located.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2013 17:07:11 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2013-10-30T17:07:11Z</dc:date>
    <item>
      <title>ImportError: No module named splunk.entity</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115502#M97652</link>
      <description>&lt;P&gt;I'm running Splunk ver 6 on my current server. There is a known bug with CiscoIPS so I was recommended I create a new VM and load splunkforwarder ver 5.0.5 and push IPS data to my &lt;BR /&gt;
Splunk 6 server.   After MANY attempts in my config's, the log file is throwing connection errors.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;/opt/splunkforwarder/var/log/splunk&lt;BR /&gt;
10-24-2013 13:05:42.808 -0700 ERROR ExecProcessor - message from "python&lt;BR /&gt;
/opt/splunkforwarder/etc/apps/Splunk_CiscoIPS/bin/get_ips_feed.py splunk&lt;BR /&gt;
PASSWORDREMOVED ips.olcc.state.or.us" ImportError: No module named&lt;BR /&gt;
splunk.entity&lt;BR /&gt;
10-24-2013 13:05:42.832 -0700 INFO  ExecProcessor - Ran script: python&lt;BR /&gt;
/opt/splunkforwarder/etc/apps/Splunk_CiscoIPS/bin/get_ips_feed.py splunk&lt;BR /&gt;
PASSWORDREMOVED ips.olcc.state.or.us, took 147.5 milliseconds to run, 0&lt;BR /&gt;
bytes read, exited with code 1&lt;/P&gt;

&lt;P&gt;/opt/splunkforwarder/etc/apps/Splunk_CiscoIPS/local/inputs.conf&lt;BR /&gt;
[script://$SPLUNK_HOME/etc/apps/Splunk_CiscoIPS/bin/get_ips_feed.py&lt;BR /&gt;
"splunk" "PASSREMOVED" "ips.olcc.state.or.us" ""]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
index = main&lt;BR /&gt;
interval = 1&lt;BR /&gt;
source = SDEE&lt;BR /&gt;
sourcetype = cisco_ips_syslog&lt;/P&gt;

&lt;P&gt;/opt/splunkforwarder/etc/apps/Splunk_CiscoIPS/var/log&lt;BR /&gt;
no data.&lt;/P&gt;

&lt;P&gt;/opt/splunkforwarder/etc/system/local&lt;BR /&gt;
[root@splunkips local]# cat outputs.conf&lt;BR /&gt;
[tcpout:group1]&lt;BR /&gt;
server=cave:9997&lt;/P&gt;

&lt;P&gt;[root@splunkips local]# pwd&lt;BR /&gt;
/opt/splunkforwarder/etc/system/local&lt;BR /&gt;
[root@splunkips local]# cat inputs.conf&lt;BR /&gt;
[default]&lt;BR /&gt;
host = splunkips&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:05:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115502#M97652</guid>
      <dc:creator>fraijof</dc:creator>
      <dc:date>2020-09-28T15:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: ImportError: No module named splunk.entity</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115503#M97653</link>
      <description>&lt;P&gt;How exactly did you install and configure the forwarder and the app. It seems to me that the environment that normally Splunk would use has been modified and so the normal Splunk python files (which is located in the site-packages for both 5 and 6) is not found. What does "/opt/splunk/bin/splunk envvars" return?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2013 02:23:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115503#M97653</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2013-10-30T02:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: ImportError: No module named splunk.entity</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115504#M97654</link>
      <description>&lt;P&gt;./splunk envvars&lt;BR /&gt;
PATH=/opt/splunkforwarder/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin ; export PATH ; SPLUNK_HOME=/opt/splunkforwarder ; export SPLUNK_HOME ; SPLUNK_DB=/opt/splunkforwarder/var/lib/splunk ; export SPLUNK_DB ; SPLUNK_SERVER_NAME=splunkforwarder ; export SPLUNK_SERVER_NAME ; SPLUNK_WEB_NAME=splunkweb ; export SPLUNK_WEB_NAME ; LD_LIBRARY_PATH=/opt/splunkforwarder/lib ; export LD_LIBRARY_PATH ; LDAPCONF=/opt/splunkforwarder/etc/openldap/ldap.conf ; export LDAPCONF&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:08:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115504#M97654</guid>
      <dc:creator>fraijof</dc:creator>
      <dc:date>2020-09-28T15:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: ImportError: No module named splunk.entity</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115505#M97655</link>
      <description>&lt;P&gt;Based on your envvars, you are trying to run on a Universal Forwarder (UF). You need to run on a Lightweight Forwarder (LWF) or Heavy Forwarder (HF), or else add the Splunk python SDK libraries to the system python on the machine where the UF is running. (The SDK is available &lt;A href="http://dev.splunk.com/view/splunk-sdk-python/SP-CAAAEBB"&gt;here&lt;/A&gt;.)&lt;/P&gt;

&lt;P&gt;The main difference between a UF and a LWF is that the UF does &lt;EM&gt;not&lt;/EM&gt; come with a Splunk python implementation (and the attendant Splunk python libraries), which is the difference you're seeing. It relies on the system python, but the system python doesn't have the Splunk libraries needed.&lt;/P&gt;

&lt;P&gt;It's certainly possible to make it run on a UF, simply by either:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Installing the Splunk python SDK into the system python on the UF machine. &lt;/LI&gt;
&lt;LI&gt;Putting the Splunk python SDK libraries into the app&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Really the right solution would be for the app developer to simply include the Splunk python SDK libraries into the app itself so it comes with everything needed to run on a plain system python. This is fundamentally simple, it's simply a matter of sticking the SDK "splunk" folder into the "bin" directory where the main script that needs it is located.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2013 17:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ImportError-No-module-named-splunk-entity/m-p/115505#M97655</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2013-10-30T17:07:11Z</dc:date>
    </item>
  </channel>
</rss>

