Splunk Search

How to send requests from a JSP page to splunk deamon ?

anushruti
New Member

I want to send search requests from a JSP page to splunk and retrieve the results in the form of a graph , pie chart etc.

The search involves taking Earthquake data and figuring out the recent regions that have been earthquake hit.

Tags (3)
0 Karma

barakreeves
Splunk Employee
Splunk Employee

Interesting. Because JSP executes code on the server side, it may be a bit tricky to retrieve Splunk data/ graphs using JSP unless you did one of the following using the REST API/ SDK:

1- Include the JavaScript SDK into your project to send data to Splunk and render data/ visualizations. Back in my classic ASP days, I would sometimes write JavaScript code using ASP using various string building techniques. The JavaScript SDK is my recommended way. The reason I recommend this way without knowing how much data you will be marshaling back and forth is that JavaScript is executed on the client side versus the server side; however, when it comes node.js, the lines can become blurry

2- Include the Java SDK into your JSP project so that your code is executed on the server. Added benefit is that you hide your secret sauce.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...