Xymon Mailing List Archive search

Process ID Tracking.

3 messages in this thread

list Paul Moore · Tue, 29 Jan 2008 15:03:23 +0000 ·
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 · Tue, 29 Jan 2008 10:24:45 -0700 ·
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.
quoted from Paul Moore


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 · Tue, 29 Jan 2008 11:57:17 -0600 ·
quoted from Dave Haertig
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