want to monitor host restarts
want to monitor host restarts
I need to monitor if a host restarts. I am currenly just checking if explorer.exe is running on my windows hosts. if it isnt I generally know the host has restarted. I think I should be able to use the check_nt!uptime command to do it but I can seem to figure out how I can modify it or what else needs to be modified to allow this to work like I am thinking. thanks for any guidance and I can provide more details if needed.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: want to monitor host restarts
Yes, you should be able to use uptime to show how long the system has been up. Try manually running the following:
As far as I know it can only be used to determine uptime itself, I don't believe it returns any state but OK.
Code: Select all
/dir/path/to/plugins/check_nt -H ip.addr.of.host -s "password if you have one set" -p 12489 -v UPTIMERe: want to monitor host restarts
to clarify I already am successfully returning the uptime. I just would like to be able to be notififed for instance if the uptime is less than 10 or 15 minutes
Re: want to monitor host restarts
Well, you can always write a simple wrapper script that calls that plugin and interprets the output based on the warning and crit levels you specify. Then thr wrapper itself will output a 0, 1 or 2 accordingly.
Former Nagios employee
Re: want to monitor host restarts
please excuse my ignorance but Im not sure how to make a wrapper script. any help or direction would be appreciated
Re: want to monitor host restarts
Actually you might not even need that. Depending on the output you might be able to use the -w and -c switches to specify warning and critical levels respectively. Can you post the output?
Former Nagios employee
Re: want to monitor host restarts
System Uptime - 13 day(s) 4 hour(s) 20 minute(s)
Re: want to monitor host restarts
check_nt -v UPTIME was updated to include thresholds and performance data. I suggest updating your nagios-plugins package to 2.0 (https://nagios-plugins.org/), and then configuring thresholds to warn you if its uptime is less than a certain amount of time.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.