<?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: CURL Script fails to output when called by Splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25026#M4059</link>
    <description>&lt;P&gt;Sorry, please disregard the -O, thats not actually in there!&lt;/P&gt;</description>
    <pubDate>Fri, 03 Aug 2012 04:56:54 GMT</pubDate>
    <dc:creator>aweddell</dc:creator>
    <dc:date>2012-08-03T04:56:54Z</dc:date>
    <item>
      <title>Why does CURL script fails to output when called by Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25025#M4058</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;
&lt;P&gt;I'm pulling m hair out trying to get my CURL script to run.&lt;/P&gt;
&lt;P&gt;I've set up a scripted input in my app, it calls a bash script which has the line&lt;/P&gt;
&lt;P&gt;curl -O -s -H "X-Requested-With: Curl Sample" -b "path=/api; secure" -u "TRUCNATED" "&lt;A href="https://TRUNCATED&amp;amp;id=$id" target="_blank"&gt;https://TRUNCATED&amp;amp;id=$id&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;The script works fine when I call it normally (It dumps XML), however when I try it with &lt;BR /&gt;$SPLUNK_HOME/bin/splunk cmd script.sh, nothing happens.&lt;/P&gt;
&lt;P&gt;I added an echo statement to the script and that prints normally when I execute it through cmd, however it still wont print the xml. I've tried -o -O &amp;gt; 1&amp;gt;&amp;amp; 2&amp;gt;&amp;amp; to files, variables, etc. It seems that when Splunk calls the script which calls CURL, output fails to work!&lt;/P&gt;
&lt;P&gt;Any ideas would be great!&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2022 15:31:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25025#M4058</guid>
      <dc:creator>aweddell</dc:creator>
      <dc:date>2022-11-27T15:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: CURL Script fails to output when called by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25026#M4059</link>
      <description>&lt;P&gt;Sorry, please disregard the -O, thats not actually in there!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2012 04:56:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25026#M4059</guid>
      <dc:creator>aweddell</dc:creator>
      <dc:date>2012-08-03T04:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: CURL Script fails to output when called by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25027#M4060</link>
      <description>&lt;P&gt;I had the same issue getting a curl to fire. Echo out the response code of the curl command ($?) if it is returning (1) then you have an unsupported protocol  and need to add to your script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;unset LD_LIBRARY_PATH
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try this, it worked for me. &lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2014 19:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25027#M4060</guid>
      <dc:creator>griebn</dc:creator>
      <dc:date>2014-02-07T19:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: CURL Script fails to output when called by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25028#M4061</link>
      <description>&lt;P&gt;I am having a similar issue. However when I run $SPLUNK_HOME/splunk cmd /path/to/my_curl_script.sh I am getting the following error:&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;exec(): 0509-036 Cannot load program /usr/bin/curl because of the following errors:&lt;BR /&gt;
              0509-150   Dependent module /opt/splunk/splunkforwarder/lib/libz.a(libz.so.1) could not be loaded.&lt;BR /&gt;
              0509-103   The module has an invalid magic number.&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:04:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25028#M4061</guid>
      <dc:creator>stath002</dc:creator>
      <dc:date>2020-09-29T08:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: CURL Script fails to output when called by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25029#M4062</link>
      <description>&lt;P&gt;Is $id is actually set? My guess would be that splunk is running &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -s -H "X-Requested-With: Curl Sample" -b "path=/api; secure" -u "TRUCNATED"https://TRUNCATED&amp;amp;id="
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which probably gives you no body.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 16:14:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25029#M4062</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-12-03T16:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: CURL Script fails to output when called by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25030#M4063</link>
      <description>&lt;P&gt;My Curl command is different and if i manually run it as the splunk user it returns the desired results. &lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 16:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/25030#M4063</guid>
      <dc:creator>stath002</dc:creator>
      <dc:date>2015-12-03T16:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: CURL Script fails to output when called by Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/621940#M107079</link>
      <description>&lt;P&gt;Same issue encountered when I'm trying to curl Jenkins endpoint to output the Crumb. Does anyone resolved it yet?&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;curl -s -u &amp;lt;user|pass&amp;gt;&amp;nbsp;"https://&amp;lt;url&amp;gt;/crumbIssuer/api/json" -o qrMerchant_jenkinsCrumb&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Nov 2022 05:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-CURL-script-fails-to-output-when-called-by-Splunk/m-p/621940#M107079</guid>
      <dc:creator>rtllaguno</dc:creator>
      <dc:date>2022-11-24T05:20:29Z</dc:date>
    </item>
  </channel>
</rss>

