Page 1 of 1

Checkup Ok if host is down

Posted: Thu Jun 26, 2014 8:30 am
by enterdavertex
Hi there,

I was wondering if there was any way to have an OK status for an host that is down with all his services. It's a redundancy plan and the machine need to be turned off but monitored when its on.

Let me know of your suggestion have a nice day !

Re: Checkup Ok if host is down

Posted: Thu Jun 26, 2014 9:44 am
by tmcdonald
You'll want to use the "negate" plugin. This documentation is for XI but works equally well for Core:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

Re: Checkup Ok if host is down

Posted: Fri Jun 27, 2014 1:15 am
by chris.fixter
I would disable active check on the host and all service, then submit passive check result OK to them.

Re: Checkup Ok if host is down

Posted: Fri Jun 27, 2014 10:49 am
by slansing
Yep, you could either do that manually, or probably via an event handler. Let us know if you have further questions on this.

Re: Checkup Ok if host is down

Posted: Fri Jun 27, 2014 2:19 pm
by enterdavertex
chris.fixter wrote:I would disable active check on the host and all service, then submit passive check result OK to them.
The problem is , actually the host is a laptop so sometimes the worker goes out with his laptop. There is no way to monitor it with this type of feature. We wanted to keep track of the minimum information we can get on that host when he is into the network, without generating an error when the computer is not powerwed up or there.

Re: Checkup Ok if host is down

Posted: Fri Jun 27, 2014 2:21 pm
by tmcdonald
You could always just use passive checks. That way when the device is off Nagios won't really know or care and will retain the last status that the device reported. Then when it turns on and joins the network it can start sending data to Nagios.

Re: Checkup Ok if host is down

Posted: Fri Jun 27, 2014 2:28 pm
by enterdavertex
tmcdonald wrote:You could always just use passive checks. That way when the device is off Nagios won't really know or care and will retain the last status that the device reported. Then when it turns on and joins the network it can start sending data to Nagios.
The request wont be done by Nagios ? Then how the device will send the data to it ?

Re: Checkup Ok if host is down

Posted: Sun Jun 29, 2014 4:02 pm
by Box293
The agent installed on the client machine is responsible for sending the data.

You could use an agent like NRDP:
http://exchange.nagios.org/directory/Ad ... or/details

Re: Checkup Ok if host is down

Posted: Sun Jun 29, 2014 4:35 pm
by eloyd
You could also do the entire thing with dependencies based on the result of a ping returning OK. If the ping check is OK, then you could run all the other stuff. You could do this in general to make sure that the services are only checked when the host is alive (meaning, a basic service check like a ping check returns positive) but I ask "why bother monitoring it if you don't care if it's up?"

Nagios is generally a monitoring software, not a trending software. Not to say that it can't do both, but I'm just curious what information you want to gather from the laptop and why you don't care if it's not on the network? In other words, perhaps there is a better solution that Nagios to obtain the data you're looking for in the first place? Are you just trending disk space usage or memory usage or CPU usage or something like that, or are there services on the laptop that you want to make sure are running, but only when the laptop is up?

Re: Checkup Ok if host is down

Posted: Mon Jun 30, 2014 11:12 am
by tmcdonald
eloyd wrote:or are there services on the laptop that you want to make sure are running, but only when the laptop is up?
That's how I read it, which is why I recommended the passive checks.

@enterdavertex: Did @Box293's link help at all? We'd be happy to help set up NRDP if you need it.