Process ID Tracking.
list Paul Moore
Is hobbit capable of tracking the PID of a process that it is watching for? I am in need of identifying if a process restarts with a new process id. Several of our applications are self healing but we still need notification that this did indeed restart. Any suggestions would be helpful. Paul Moore
list Dave Haertig
You could write a custom script to do this easily (you'd need to remember state, but that's easy). I'm not aware of any built-in Hobbit check that would do this however. Maybe somebody else knows. Other things to consider trying (using standard Hobbit stuff): When the process restarts, does it do anything in a logfile? i.e., could you have Hobbit search for a restart text message in a logfile? Is the logfile deleted and recreated at restart? You could have Hobbit check the timestamp on the logfile possibly. When the process restarts, does it write it's PID to a file? Check the timestamp of that PID file.
▸
From: Moore, Paul [mailto:user-8c3a430470a0@xymon.invalid]
Sent: Tuesday, January 29, 2008 8:03 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Process ID Tracking.
Is hobbit capable of tracking the PID of a process that it is watching
for? I am in need of identifying if a process restarts with a new
process id. Several of our applications are self healing but we still
need notification that this did indeed restart. Any suggestions would
be helpful.
Paul Moore
list Ralph Mitchell
▸
On Jan 29, 2008 11:24 AM, Haertig, David F (Dave) <user-68874b735d77@xymon.invalid> wrote:
You could write a custom script to do this easily (you'd need to remember state, but that's easy). I'm not aware of any built-in Hobbit check that would do this however. Maybe somebody else knows. Other things to consider trying (using standard Hobbit stuff): When the process restarts, does it do anything in a logfile? i.e., could you have Hobbit search for a restart text message in a logfile? Is the logfile deleted and recreated at restart? You could have Hobbit check the timestamp on the logfile possibly. When the process restarts, does it write it's PID to a file? Check the timestamp of that PID file.
If the process gets rstarted by a script, maybe the script could write a log entry for Hobbit to monitor?? Ralph Mitchell