Developing for Splunk Enterprise

Sending data stream to POST receivers/stream endpoint


If i want to send the raw event text to the POST receivers/stream endpoint, the raw data is streamed in as OutputStream data type in Java?

0 Karma

Ultra Champion

Here is a very simple pseudo-code example showing the Object Types :

Service service = Service.connect(...);
Index index = service.getIndexes().get("someindex");
Socket socket = index.attach();
OutputStream ostream = socket.getOutputStream();
Writer writerOut = new OutputStreamWriter(ostream, "UTF8");

//stream 10 events to Splunk
for (int i=0; i<10; i++) {
  writerOut.write("Some data I want to stream to Splunk");


Ultra Champion

If your original question was answered it would be good if you could start "accepting" answers.
It helps out splunkbase.


May i know which Logback appender should i use if i want to create new events using the Splunk's REST receivers endpoint if i'm using logback framework. because i went to make a custom basic appender for that? Is it socket appender?

0 Karma
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!


Or Learn More in Our Blog >>