Splunk Dev

indexing batch file (Using to run java JAR file) output

marellasunil
Communicator

Hi,

I have a jar file, has to run using batch file. I want the output of the batch file (After executing jar file) to index the output data and wanted to see the data using sourcetyp=******

or any other suggestion to use jar file's output?

Can anybody help on this.

Tags (4)
0 Karma

Damien_Dallimor
Ultra Champion

I would suggest creating a Splunk Modular Input in Java.This modular input could classload the jar and invoke the main method as defined in the jar manifests "MAIN-CLASS" and output the data to STD OUT which Splunk will read in and index.

Your Modular Input would then be configurable in Splunk Web (execution interval , sourcetype , index, any other custom propertys you define etc..) , just like how you configure TCP/UDP/File inputs.

Follow this link to get started.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...