Splunk Search

Are there hooks into an ERP app when a job is paused or stopped?

peberhardt
Engager

I basically have a command to start my Java ERP program and that all works fine. I was wondering if any calls are made to an ERP provider in Hunk if a job is stopped or paused. All I have done so far is put in a shut down hook so some cleanup happens if my ERP program is killed early (which I think is what happens when a job is stopped).

Tags (1)
0 Karma
1 Solution

Ledion_Bitincka
Splunk Employee
Splunk Employee

There are no predefined hooks in the interface. However, you should be able to detect when a search process has been paused / finalized / canceled by periodically looking for sentinel files (with the same names) in the search's dispatch dir $SPLUNK_HOME/var/run/splunk/dispatch/<sid>

The search process when:

  • paused: will stop reading from the stdin pipe (and the ERP's stdout writes will block until unpaused)
  • finalized / canceled: will close the stdin pipe (and ERP's stdout writes will fail with broken pipe)

View solution in original post

Ledion_Bitincka
Splunk Employee
Splunk Employee

There are no predefined hooks in the interface. However, you should be able to detect when a search process has been paused / finalized / canceled by periodically looking for sentinel files (with the same names) in the search's dispatch dir $SPLUNK_HOME/var/run/splunk/dispatch/<sid>

The search process when:

  • paused: will stop reading from the stdin pipe (and the ERP's stdout writes will block until unpaused)
  • finalized / canceled: will close the stdin pipe (and ERP's stdout writes will fail with broken pipe)
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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