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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...