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!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...