<?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: Can I call REST Endpoint of Universal Forwarder to pass log data from code? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55346#M10781</link>
    <description>&lt;P&gt;maybe this is of some use? &lt;A href="https://splunkbase.splunk.com/app/2775/"&gt;https://splunkbase.splunk.com/app/2775/&lt;/A&gt; (soon to be updated in time for .conf 2017 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2017 20:55:16 GMT</pubDate>
    <dc:creator>dominiquevocat</dc:creator>
    <dc:date>2017-08-25T20:55:16Z</dc:date>
    <item>
      <title>Can I call REST Endpoint of Universal Forwarder to pass log data from code?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55343#M10778</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Can I call REST Endpoint of Universal Forwarder to pass log data from code?&lt;BR /&gt;
* not creating new monitor configuration&lt;/P&gt;

&lt;P&gt;I am currently using storm to push the data using API call from code.&lt;BR /&gt;
I am looking for any information how I can do this using universal &lt;BR /&gt;
forwarder to pass the data to my distributed indexer environment.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2013 05:46:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55343#M10778</guid>
      <dc:creator>Splunk_Shinobi</dc:creator>
      <dc:date>2013-06-05T05:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call REST Endpoint of Universal Forwarder to pass log data from code?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55344#M10779</link>
      <description>&lt;P&gt;I did Simple test, and found that if you don't have index definition in UF, the rest call will return error, but if you do, it will eat the data.&lt;/P&gt;

&lt;P&gt;I am not sure if this is supported or not..&lt;/P&gt;

&lt;P&gt;My environment looks like : SH/INDEXER:9997 &amp;lt;- UniversalForwarder:8089&lt;/P&gt;

&lt;P&gt;and used this call:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme "https://localhost:8089/services/receivers/simple?index=myindex&amp;amp;source=www&amp;amp;sourcetype=test" -d "`date '+%s'` from API"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In case without indexes.conf in your UF, the curl command returns:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ curl -k -u admin:changeme "https://localhost:8089/services/receivers/simple?index=myindex&amp;amp;source=www&amp;amp;sourcetype=test" -d "`date '+%s'` from API"

&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;response&amp;gt;
  &amp;lt;messages&amp;gt;
    &amp;lt;msg type="WARN"&amp;gt;supplied index missing or disabled&amp;lt;/msg&amp;gt;
  &amp;lt;/messages&amp;gt;
&amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if you have this entry in indexes.conf in UF,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ cat indexes.conf 
[main]
[myindex]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then, the call went OK.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ curl -k -u admin:changeme "https://localhost:8089/services/receivers/simple?index=myindex&amp;amp;source=www&amp;amp;sourcetype=test" -d "`date '+%s'` from API"
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;response&amp;gt;
  &amp;lt;results&amp;gt;
    &amp;lt;result&amp;gt;
      &amp;lt;field k="_index"&amp;gt;
        &amp;lt;value&amp;gt;
          &amp;lt;text&amp;gt;myindex&amp;lt;/text&amp;gt;
        &amp;lt;/value&amp;gt;
      &amp;lt;/field&amp;gt;
      &amp;lt;field k="bytes"&amp;gt;
        &amp;lt;value&amp;gt;
          &amp;lt;text&amp;gt;19&amp;lt;/text&amp;gt;
        &amp;lt;/value&amp;gt;
      &amp;lt;/field&amp;gt;
      &amp;lt;field k="host"&amp;gt;
        &amp;lt;value&amp;gt;
          &amp;lt;text&amp;gt;127.0.0.1&amp;lt;/text&amp;gt;
        &amp;lt;/value&amp;gt;
      &amp;lt;/field&amp;gt;
      &amp;lt;field k="source"&amp;gt;
        &amp;lt;value&amp;gt;
          &amp;lt;text&amp;gt;www&amp;lt;/text&amp;gt;
        &amp;lt;/value&amp;gt;
      &amp;lt;/field&amp;gt;
      &amp;lt;field k="sourcetype"&amp;gt;
        &amp;lt;value&amp;gt;
          &amp;lt;text&amp;gt;test&amp;lt;/text&amp;gt;
        &amp;lt;/value&amp;gt;
      &amp;lt;/field&amp;gt;
    &amp;lt;/result&amp;gt;
  &amp;lt;/results&amp;gt;
&amp;lt;/response&amp;gt;
$ 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jun 2013 07:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55344#M10779</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2013-06-05T07:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call REST Endpoint of Universal Forwarder to pass log data from code?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55345#M10780</link>
      <description>&lt;P&gt;If you want to send to an index that doesn't exist locally, pass "check-index=false" as a GET parameter to the call.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2013 13:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55345#M10780</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2013-06-06T13:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can I call REST Endpoint of Universal Forwarder to pass log data from code?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55346#M10781</link>
      <description>&lt;P&gt;maybe this is of some use? &lt;A href="https://splunkbase.splunk.com/app/2775/"&gt;https://splunkbase.splunk.com/app/2775/&lt;/A&gt; (soon to be updated in time for .conf 2017 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 20:55:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-call-REST-Endpoint-of-Universal-Forwarder-to-pass-log-data/m-p/55346#M10781</guid>
      <dc:creator>dominiquevocat</dc:creator>
      <dc:date>2017-08-25T20:55:16Z</dc:date>
    </item>
  </channel>
</rss>

