Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey, we try to monitor the file age on some of our workstations. Works fine with NSClient++ - but we do not want to get any CRITICALs when the computer is shut down.

For the host, we do have a dummy check, returning OK every check. But when the workstation is offline, the check for the file age fails with a 'connection refused'.

Do you have any hints to avoid those CRITICALs?

share|improve this question
up vote 2 down vote accepted

If the service is associated with the host(name), if the check-host-alive (or whatever you've configured) test fails, the service alerts won't be sent. Remember to add a margin of error in your max_checks to account for a situation where the computer is shutting down, but still responding to pings (or whatever you use for check-host-alive).

Alternately, if your file-age-checker only issues WARNINGs, not CRITICALs, where WARNINGs are file-age-out-of-bounds errors, while CRITICALs are host-unreachable errors, just mask off the CRITICALs:

service_notification_options w,u,r

That said, what you should really do, if that's your goal, is to rewrite the plugin to return UNKNOWN for that circumstance, in which case it'd be:

service_notification_options c,w,r
share|improve this answer
spot on! this is the way to go – HannesFostie Jul 16 '10 at 12:47
Yep, it's the solution. Thanks a lot. – braindump Jul 19 '10 at 11:11

Are the workstations switched off during predictable times? i.e, are they only going to be on from 9am-5pm, or something similar? If so, you can define a time period in Nagios and apply it to the workstations; then they'll only get checked within that time period.

share|improve this answer
Yes and no. Normally, they're switched off from 4pm until 8am. But in the holiday season, some machines are switched off for several weeks. So, the time periods would not help. – braindump Jul 16 '10 at 11:41
I have the same problem with network printers; for holidays, I usually just give them all an appropriately-size period of downtime. – RainyRat Jul 16 '10 at 11:45
Yep, but I do not want to set downtimes for about 300 workstations ;) – braindump Jul 16 '10 at 11:47
In that case, you probably want to investigate "hostgroups". – RainyRat Jul 16 '10 at 12:06

Have you tried with the -u option in check_nrpe?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.