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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...