Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

can you directly publish data from your java application to splunk web?

$
0
0
hello there, I want to try and catch the spl query submitted on the web interface in my java application, process this query and get the data it wants, and them publish this data from my java application to the web interface. All this should happen in the background so the user can't know that my script got his query and that my script will return his search. is it possible? and one more question, I have splunk on docker and I downloaded the java sdk, if i execute this command : curl -u admin:xxxx -k https://localhost:8089/services/auth/login -d username=admin -d password=xxxx i get a session token reply. if I try to connect from the java application I get an handshake_failure Thanks in advance, I hope someone can help me. PS: this is the java code -------------------------------------------- package hellosplunk; import com.splunk.Service; import com.splunk.ServiceArgs; public class helloSplunk { public static void main(String[] args) { // TODO Auto-generated method stub ServiceArgs loginArgs = new ServiceArgs(); loginArgs.setUsername("admin"); loginArgs.setPassword("xxxx"); loginArgs.setHost("localhost"); loginArgs.setPort(8089); loginArgs.setScheme("https"); Service splunkService = Service.connect(loginArgs); System.out.println(splunkService.getToken()); } }

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>