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!

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...