Page 1 of 2

Questions about the thermology of checks

Posted: Thu Sep 10, 2015 1:11 pm
by RandomGuy86
Dunno if this is the right forum, but I want to know if I understand the thermology of checks correctly.

https://assets.nagios.com/downloads/nag ... hecks.html
https://assets.nagios.com/downloads/nag ... hecks.html
https://assets.nagios.com/downloads/nag ... hecks.html
https://assets.nagios.com/downloads/nag ... hecks.html

A "host check" describes a check that inquires the status of an internal condition, e.g. CPU usage.
A "service check" describes a check that inquires that status of a "public" service, e.g. HTTP.
An "active check" describes either a host check of a service check that is sent from the server to the client.
A "passive check" describes either a host check of a service check that is sent from the client to the server.

Re: Questions about the thermology of checks

Posted: Thu Sep 10, 2015 3:03 pm
by tmcdonald
RandomGuy86 wrote: An "active check" describes either a host check of a service check that is sent from the server to the client.
A "passive check" describes either a host check of a service check that is sent from the client to the server.
Correct.
RandomGuy86 wrote: A "host check" describes a check that inquires the status of an internal condition, e.g. CPU usage.
A "service check" describes a check that inquires that status of a "public" service, e.g. HTTP.
Not correct.

In essence, any check can be a host or a service check. You can use ping for a host or ping for a service, or you can use CPU for a host or CPU for a service. However, traditionally you stick a ping on the host and every attached services for everything else. The host check has implications when you start dealing with host reachability:

https://assets.nagios.com/downloads/nag ... ility.html

Whereas services don't really place into this. If a host is down, that has bigger ramifications than if a service is Critical. Also note the different state types - a host can be UP, DOWN, or UNKNOWN, while a service is typically OK, Warning, Critical, or Unknown.

Re: Questions about the thermology of checks

Posted: Thu Sep 10, 2015 3:32 pm
by RandomGuy86
tmcdonald wrote:In essence, any check can be a host or a service check. You can use ping for a host or ping for a service, or you can use CPU for a host or CPU for a service. However, traditionally you stick a ping on the host and every attached services for everything else.
Thanks, that made it a lot clearer.

Re: Questions about the thermology of checks

Posted: Thu Sep 10, 2015 3:33 pm
by hsmith
RandomGuy86 wrote:
tmcdonald wrote:In essence, any check can be a host or a service check. You can use ping for a host or ping for a service, or you can use CPU for a host or CPU for a service. However, traditionally you stick a ping on the host and every attached services for everything else.
Thanks, that made it a lot clearer.
Is there anything else we can do to help you out?

Re: Questions about the thermology of checks

Posted: Mon Sep 21, 2015 2:46 pm
by RandomGuy86
Okay, one question arose while setting up services:
How is the "host check" determined? From what I've understood so far an explicit "host check" is never performed, rather the "host check" is based on the results of the "service checks" on the same machine.

Re: Questions about the thermology of checks

Posted: Mon Sep 21, 2015 3:53 pm
by hsmith
It works kind of like that. By default for most hosts Nagios will just use a ping command to the host address. Sometimes, in special cases you have to check a non pingable host (ICMP off, etc...). This document is for our commercial product, Nagios XI, but it should help clear up what's going on for you.

Re: Questions about the thermology of checks

Posted: Mon Sep 21, 2015 4:59 pm
by tmcdonald
To clarify, an explicit host check absolutely is performed for hosts - they do not simply rely on a service check.

Re: Questions about the thermology of checks

Posted: Tue Sep 22, 2015 2:51 pm
by RandomGuy86
So, whenever I define a host Nagios automatically monitors it via a PING check?

Re: Questions about the thermology of checks

Posted: Tue Sep 22, 2015 3:05 pm
by jdalrymple
That is the default behavior yes, to be defined by the host's check_command:
Object Definitions wrote:check_command: This directive is used to specify the short name of the command that should be used to check if the host is up or down. Typically, this command would try and ping the host to see if it is "alive". The command must return a status of OK (0) or Nagios will assume the host is down. If you leave this argument blank, the host will not be actively checked. Thus, Nagios will likely always assume the host is up (it may show up as being in a "PENDING" state in the web interface). This is useful if you are monitoring printers or other devices that are frequently turned off. The maximum amount of time that the notification command can run is controlled by the host_check_timeout option.

Re: Questions about the thermology of checks

Posted: Thu Sep 24, 2015 11:36 am
by RandomGuy86
I'm a little confused now. You tell me that a pinging is the default behavior, yet the description says that "If you leave this argument blank, the host will not be actively checked." What exactly means "leave this argument blank"?

Is this blank? (The directive "check_command" is there, but has no argument)

Code: Select all

define host{
	(...)
	check_command			
	(...)
}
Or is this blank? (The directive "check_command" is not included in the host definition)

Code: Select all

define host{
	(...)
#	check_command			check-host-alive
	(...)
}
Btw: Is NCPA able to do a check via PING? I could not find said function in the API.