windows process hasn't run in x amount of time

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
pkarr
Posts: 58
Joined: Fri Oct 05, 2012 1:01 pm

windows process hasn't run in x amount of time

Post by pkarr »

We've had a request to monitor if a process has not run on a windows server in more than 1 day.

For example, we have an automate process that runs every day at 5 am. A few times in the past, some glitch has caused the process to be hung and not run the following morning at 5 am. Is it possible to interrogate the run status of a process and alert if it is hung or over the limit or otherwise not active for greater than a specified period?

Does anyone know how we could do that or an existing plugin that does this? I've done some looking but have yet to find anything.

thanks!
Penny Karr | IT Infrastructure Monitoring
Harvard Vanguard Medical Associates, an Affiliate of Atrius Health
254 Second Avenue | Needham, MA 02494
P (781) 292-1853 | F (781 292-1980 | http://www.harvardvanguard.org
Email: [email protected]
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: windows process hasn't run in x amount of time

Post by Box293 »

Any approach requires you to track the last time the process was run, usually to log it in a file or something.

The easiest way to do this is to make your automated process create a simple text file in C:\Temp\ with some content like "I ran".

You can then use NSClient++ to check if this file is older than XXX:

Command:

Code: Select all

check_nrpe -H 192.168.142.1 -t 30 -c check_files -a path='C:\\Temp\\test_file.txt'  'filter=written > -24h' 'critical=count<1' 'empty-state=critical'
Output when files matching criteria are found:
OK: All 1 files are ok|'count'=1;0;1

Output when NO files matching criteria are found:
No files found|'count'=0;0;1

I have a bunch of file related checks here:
http://sites.box293.com/nagios/guides/c ... es-folders

Does this help?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked