<?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: Creating new events via REST receivers endpoint in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96242#M20053</link>
    <description>&lt;P&gt;I wanted to format the log message into key value pairs using logback framework and append the log message to the Splunk rest receivers endpoint. I'm doing these all in java I wanted to append the formatted log message to an outputstream appender and get an outputstream object to be sent to the splunk's rest recievers stream endpoint.&lt;/P&gt;

&lt;P&gt;I'm wanted to format the log message with sample key value pairs like this.&lt;BR /&gt;
logger.debug("wrap = true, setValue = false,")&lt;/P&gt;</description>
    <pubDate>Thu, 22 Mar 2012 08:29:16 GMT</pubDate>
    <dc:creator>misteryuku</dc:creator>
    <dc:date>2012-03-22T08:29:16Z</dc:date>
    <item>
      <title>Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96232#M20043</link>
      <description>&lt;P&gt;Whenever i want to create new events via REST receivers endpoint, can i create new fields and set their values for the fields??&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2012 08:39:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96232#M20043</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-19T08:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96233#M20044</link>
      <description>&lt;P&gt;You can add fields in the data in key=value pairs and they will be extracted automatically.&lt;/P&gt;

&lt;P&gt;See also the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTinput#receivers.2Fsimple"&gt;docs on the receivers endpoint&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2012 14:14:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96233#M20044</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2012-03-19T14:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96234#M20045</link>
      <description>&lt;P&gt;Are you sure? It didn't work.&lt;BR /&gt;
I appended the key value pairs in the REST API endpoint url. I appended the source and sourcetype and they appear during the search, but not the additional fields that i created.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2012 15:10:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96234#M20045</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-19T15:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96235#M20046</link>
      <description>&lt;P&gt;If you format the content of your log message &lt;A href="http://dev.splunk.com/view/logging-best-practices/SP-CAAADP6"&gt;using key=value pairs&lt;/A&gt;, then Splunk will automatically extract these at search time. This log message gets sent in the &lt;STRONG&gt;body&lt;/STRONG&gt; of the REST HTTP Request.&lt;/P&gt;

&lt;P&gt;The url argument key=value pairs are for defining &lt;STRONG&gt;Splunk meta data fields&lt;/STRONG&gt;(index, source, sourcetype, host, host_regex)&lt;/P&gt;

&lt;P&gt;The &lt;A href="http://dev.splunk.com/view/community-projects/SP-CAAAED7"&gt;Splunk Java Logging Framework&lt;/A&gt; provides a useful interface to make it easier to create best practice log messages and integrate with your preferred logging framework ie: there are log4j, logback appenders that will seamlessly handle logging to the SPLUNK RestEndpoint. Download it and look at the examples.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2012 23:11:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96235#M20046</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-03-19T23:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96236#M20047</link>
      <description>&lt;P&gt;Is it necessary to format the log message using the Splunk logging framework?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 06:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96236#M20047</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-22T06:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96237#M20048</link>
      <description>&lt;P&gt;No, it is simply a framework to make it easier for you.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 06:30:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96237#M20048</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-03-22T06:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96238#M20049</link>
      <description>&lt;P&gt;What are the other ways to format the log message?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 06:51:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96238#M20049</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-22T06:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96239#M20050</link>
      <description>&lt;P&gt;You could format it any way you want. Splunk only extracts keys and values automatically if they follow the key=value standard, but if you format it differently it's just a matter of creating field extractions for your specific log format instead.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 06:58:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96239#M20050</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-22T06:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96240#M20051</link>
      <description>&lt;P&gt;I have been looking through logback and i would like to ask  for the log message formatted with key=value pairs, they are sent to the Splunk endpoint by socket appenders. Is that right?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 07:21:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96240#M20051</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-22T07:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96241#M20052</link>
      <description>&lt;P&gt;I don't know what socket appenders you are talking about.&lt;/P&gt;

&lt;P&gt;I still think the best idea for you would be to show as a complete case what you're trying to achieve, with example data and an actual use-case, rather than asking about small details one at a time. But, that's just me.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 07:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96241#M20052</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-22T07:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96242#M20053</link>
      <description>&lt;P&gt;I wanted to format the log message into key value pairs using logback framework and append the log message to the Splunk rest receivers endpoint. I'm doing these all in java I wanted to append the formatted log message to an outputstream appender and get an outputstream object to be sent to the splunk's rest recievers stream endpoint.&lt;/P&gt;

&lt;P&gt;I'm wanted to format the log message with sample key value pairs like this.&lt;BR /&gt;
logger.debug("wrap = true, setValue = false,")&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 08:29:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96242#M20053</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-22T08:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96243#M20054</link>
      <description>&lt;P&gt;Ok, can't help you with how the logback framework works. Sorry.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 08:38:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96243#M20054</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-22T08:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96244#M20055</link>
      <description>&lt;P&gt;Never mind. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 08:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96244#M20055</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-22T08:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96245#M20056</link>
      <description>&lt;P&gt;I mean in the same place the data of the event is sent, not as extra parameters&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 14:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96245#M20056</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2012-03-22T14:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96246#M20057</link>
      <description>&lt;P&gt;I set the key=value pairs into the body of the REST HTTP request directly using Java REST SDK API. Example : &lt;BR /&gt;
RequestMessage reqMsg = new RequestMessage();&lt;BR /&gt;
reqMsg.setMethod("post");&lt;BR /&gt;
reqMsg.getHeader().put("x-splunk-input-mode", "streaming");&lt;BR /&gt;
reqMsg.setContent("hater = yes, nothater = no");&lt;BR /&gt;
Then i send the message to the simple reciever rest endpoint.&lt;BR /&gt;
String path = "/services/receivers/simple?host=localhost&amp;amp;index=main&amp;amp;source=addfields&amp;amp;sourcetype=addedfields";&lt;BR /&gt;
ResponseMessage resMsg = authService.send(path,reqMsg);&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2012 04:04:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96246#M20057</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-23T04:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96247#M20058</link>
      <description>&lt;P&gt;Then, When i opened the search app to see the added data, i saw both the new fields and the raw data which is the key=value pairs that i set directly added.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2012 04:05:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96247#M20058</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-23T04:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new events via REST receivers endpoint</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96248#M20059</link>
      <description>&lt;P&gt;I only want to see the added key=value pairs below the raw data, not together with the raw data. &lt;/P&gt;

&lt;P&gt;When i tried adding the raw data and the key=value pairs to the content body of rest http request like this using java rest sdk api,&lt;BR /&gt;
reqMsg.setContent("rawdata1 - hater = yes, nothater = no");&lt;/P&gt;

&lt;P&gt;i see this added on the search app.&lt;BR /&gt;
rawdata1 - hater = yes, nothater = no&lt;BR /&gt;
(for the added raw data value)&lt;BR /&gt;
the new fields hater and nohater are added below the raw field.&lt;/P&gt;

&lt;P&gt;I just want the rawdata1 as the raw data value. Has it to be done using Java logging framework if i'm using java.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2012 04:13:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-new-events-via-REST-receivers-endpoint/m-p/96248#M20059</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-23T04:13:45Z</dc:date>
    </item>
  </channel>
</rss>

