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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...