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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...