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!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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