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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...