Getting Data In

Data indexed via REST API then forwarded on to another Indexer

Damien_Dallimor
Ultra Champion

If data is being indexed via the Rest API "services/receivers/simple" endpoint vs an entry in inputs.conf , can I still then use outputs.conf to forward the data onto another Indexer ?

Tags (2)
1 Solution

Damien_Dallimor
Ultra Champion

The answer is , yes you can 🙂

Just pumped some test data in using the new Java SDK, and outputs.conf routed the event into my Indexer cluster.

Service service = new Service("myhost", 8089);
service.login("admin", "notmyrealpass");       
RequestMessage request = new RequestMessage();
request.setContent("testing java sdk");
ResponseMessage response = service.send("receivers/simple?index=testing&source=sdk&sourcetype=sdk_testing", request);
System.out.println(response.getStatus() == 200?"Success":"Failure");

View solution in original post

Damien_Dallimor
Ultra Champion

The answer is , yes you can 🙂

Just pumped some test data in using the new Java SDK, and outputs.conf routed the event into my Indexer cluster.

Service service = new Service("myhost", 8089);
service.login("admin", "notmyrealpass");       
RequestMessage request = new RequestMessage();
request.setContent("testing java sdk");
ResponseMessage response = service.send("receivers/simple?index=testing&source=sdk&sourcetype=sdk_testing", request);
System.out.println(response.getStatus() == 200?"Success":"Failure");

dmr195
Communicator

It's great to know this is possible, but please could you clarify what you put in outputs.conf. Did you have to rely on the defaultGroup setting in the [tcpout] stanza, or do you know a way to have data added using the REST API forwarded using a specific target group other than the default one in outputs.conf?

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to July Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...