Getting Data In

Stream not logging as separate events

kamal87
Observer

Trying to send data to Splunk using 'services/receivers/stream', but data is not logged as separated event; instead its getting logged as one event.

Code:

HttpURLConnection huc = (HttpURLConnection)url.openConnection();

huc.setRequestProperty ("x-splunk-input-mode", "streaming");

huc.setRequestMethod("POST");
huc.setDoOutput(true);

String content = "abc";

huc.getOutputStream().write(content.getBytes());
huc.getOutputStream().flush();

content = "xyz";

huc.getOutputStream().write(content.getBytes());
huc.getOutputStream().flush();
huc.getOutputStream().close();

0 Karma
Get Updates on the Splunk Community!

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...