All Apps and Add-ons

UDP data post - What Capabaility should be selected for a user to post data via UDP in splunk ?

xbbj3nj
Path Finder

We have a java SDK program to post the data via UDP to index it in splunk.
The connection string (userid,password to connect splunk) right now we have is based on admin role, we don't have any issues in posting data to splunk.

But if I create a native user and role and select custom capabilities like edit_tcp,edit_udp,edit_websettings,input_file,output_file,rest_properties_get,rest_properties_set,use it as connection string the SDK fails and throws fata error like below:
[Fatal Error] :-1:-1: Premature end of file.[Fatal Error] :-1:-1: Premature end of file.
Any thoughts please ? Whether any additional capablity should be added ? How can I avoid cloning a admin role in this case...

0 Karma

Ayn
Legend

UDP inputs do not have any concepts involving authentication at all. You send stuff to port UDP/514 and Splunk will index it, that's it. I'm not sure how you're trying to use the SDK in all this, or connection strings for connecting to Splunk for that matter - these credentials are to be used when you use the SDK for communicating with splunkd over port 8089, not for sending syslog on port 514.

0 Karma

xbbj3nj
Path Finder

That's what the SDK looks like, Im connecting to splunk 8089 ,putting data in a UDP port defined, so that it indexes data in the index created in splunk(mentioned in port definiton)

0 Karma

xbbj3nj
Path Finder

UdpInput myInput = (UdpInput) splunkService.getInputs().get(objSplunkUDPPort.toString());
public static void main (String args[]) {
try {
Service splunkService = connectAndLoginToSplunkServer("splunk.net","8089","user","user123");
UdpInput myInput = (UdpInput) splunkService.getInputs().get("5555");
System.out.println("myInput ==>"+myInput.getHost());
} catch (Exception e) {
e.printStackTrace();
}
}
}

0 Karma

Ayn
Legend

So what does the UDP connection have to do with it? What are you trying to achieve?

0 Karma

xbbj3nj
Path Finder

I use splunkd port :8089 to connect. Thats why I use an authentication

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...