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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...