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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...