Page 1 of 2
difference between, active check, passive check, ping, etc..
Posted: Thu Jan 30, 2014 10:11 am
by linuxnag
I need someone to please clarify for me the difference between
the following actions from the "host management"
screen (for a specific host):
1. Active check
2. Passive check
3. check command: "check-host-alive" (check_icmp)
4. check command: check_ping
5. check command: check_icmp
1. Let's say I have a simple host.
If I check "active checks enabled"
Nagios correctly checks the host.
How does Nagios do this?
Note: When I check this I get
no statistics/graphs.
2. What is a passive check exactly?
When would I use it?
3. On the "Check Command" drop down
I can select:
"check-host-alive" this is "check_icmp" derivative
"check_ping"
"check_icmp"
When should I use "check_icmp" or "check_ping"
instead of "Active checks"
I suspect that I already know the answers
but I just wanted to get a proper response.
Thanks guys and sorry if this is redundant.
GKH
Re: difference between, active check, passive check, ping, e
Posted: Thu Jan 30, 2014 10:49 am
by tmcdonald
Active checks are when nagios checks a host or a service. Passive checks are when the host or service itself sends the check results back to Nagios. Ping, ICMP, and check-host-alive are all basically the same thing and they are active checks to see if the host is alive or not.
Active checks work with a plugin system, where nagios runs something like check_http or check_dns which remotely checks to see if the service is running. Passive checks instead have the remote server send results back, and is useful when there is a one-way firewall in place or when the metrics you want to check are internal, such as CPU or disk space.
Re: difference between, active check, passive check, ping, e
Posted: Fri Jan 31, 2014 10:16 am
by linuxnag
Example: I just added a new host.
I installed NRPE on it and everything works ok.
At this point, do I have to go in and "Enable Active checks"
in order to get alerts?
Also, do I have to add a contact to this host?
What I need is to create a new host and get alerted on everything
and get email/pages based on a contact.
This morning, a host generated a warning but I got
email like 1 hour later. This, I want to avoid (obviously).
Can you provide a check list to do this to all my hosts?
GKH
Re: difference between, active check, passive check, ping, e
Posted: Fri Jan 31, 2014 10:22 am
by tmcdonald
linuxnag wrote:Example: I just added a new host.
I installed NRPE on it and everything works ok.
At this point, do I have to go in and "Enable Active checks"
in order to get alerts?
Yes
linuxnag wrote:Also, do I have to add a contact to this host?
In order to get email alerts, yes.
linuxnag wrote:This morning, a host generated a warning but I got
email like 1 hour later. This, I want to avoid (obviously).
You will want to look at your alert settings, something there is probably set to 60 minutes, possibly first notification delay.
linuxnag wrote:Can you provide a check list to do this to all my hosts?
You might want to look into using templates. If you apply the "generic service" template to a service it will take care of a lot of the defaults for you. You can make your own templates suited to your needs in the CCM.
Re: difference between, active check, passive check, ping, e
Posted: Fri Jan 31, 2014 10:36 am
by linuxnag
Wonderful, I am starting to get it.
Here is my other question, is it better to assign a
contact/first_notificatiion_delay/Active_checks_enabled
to a host or to a service? Then assign specific hosts
to this service?
What happens if both are set ?
It seems to me, by having all hosts as default
then I can specify "*" as the host list for a service
and it should pick up any new host.
Otherwise I have to make changes to each new host I add.
Am I making sense here?
GKH
Re: difference between, active check, passive check, ping, e
Posted: Fri Jan 31, 2014 12:11 pm
by lmiltchev
Otherwise I have to make changes to each new host I add.
You don't have to make changes manually at all. When you run a Wizard, the appropriate template is used. You can modify any host or service template to your liking. Just keep in mind that it will affect all of the hosts/service that use this template. As tmcdonald said:
You might want to look into using templates. If you apply the "generic service" template to a service it will take care of a lot of the defaults for you. You can make your own templates suited to your needs in the CCM.
Then, if you need to "tweak" settings for a particular host/service you can do it on a host/service level (under the CCM). Local settings will override the template. Hope this makes sense.
Re: difference between, active check, passive check, ping, e
Posted: Fri Jan 31, 2014 12:18 pm
by linuxnag
Ok, that's fine but it still does not answer my question.
First of all I have MANY machines already in Nagios.
My options are: Change the host settings or the
service settings ...and which has precedence.
If the host has active checks off and the service
has active checks on and if the service names this
host then who wins?
So, shall I do a bulk change and set all hosts to defaults
and change my services to suit? (active checks on...)
I think this seems a better way to go.
For new hosts, a template will be ok.
Thoughts?
Re: difference between, active check, passive check, ping, e
Posted: Fri Jan 31, 2014 12:28 pm
by sreinhardt
If the host has active checks off and the service
has active checks on and if the service names this
host then who wins?
Technically, I believe they both win in a sense. the host not having active checks enabled should only disable them for host checks, not services and service checks.
To go off lmiltchev's post, if you have been using the wizards, you do not need to modify them all, there should be a generic-host\service template that will contain many of these settings, and apply to just about all hosts and services respectively. Otherwise if you have created them manually or imported them from another system, you are correct you may need to do a bulk mod, although if anything I would suggest just applying the generic-host\service template to them instead of manually modifying them.
Make a bit more sense?
Re: difference between, active check, passive check, ping, e
Posted: Fri Jan 31, 2014 12:52 pm
by linuxnag
Technically, I believe they both win in a sense. the host not having active checks enabled should only disable them for host checks, not services and service checks.
When you say: "Host Checks" as far as I can see this simply means ping check, unless I put another command in place
of check host alive. Correct?
To go off lmiltchev's post, if you have been using the wizards, you do not need to modify them all, there should be a generic-host\service template that will contain many of these settings, and apply to just about all hosts and services respectively. Otherwise if you have created them manually or imported them from another system, you are correct you may need to do a bulk mod, although if anything I would suggest just applying the generic-host\service template to them instead of manually modifying them.
Ok, great, but having looked at the host templates and service templates only a few have "active checks" enabled. The defaults only.
Which is fine but means that checks are disabled.
Which brings me back to my original question and allow me to re-phrase in a much clearer way:
I am running NagiosXI.
I have TON of machines which I imported from a much older nagios (base).
Right now, none of my hosts have active checks enabled, no contacts.
Same for all my services.
For now, I would like to create a contact email(s) and have this email get
alerts on all events 24/7 ... for ALL hosts.
Question:
Should I enable "active checks" for each service and add my contact
and make the notification interval "60", then select the proper host(s)?
Or
Should I do this from the hosts and leave services alone?
Just assign hosts to service. Nothing else.
Sorry for any confusion.
Make a bit more sense?
Getting there

Re: difference between, active check, passive check, ping, e
Posted: Fri Jan 31, 2014 1:19 pm
by sreinhardt
When you say: "Host Checks" as far as I can see this simply means ping check, unless I put another command in place
of check host alive. Correct?
By default for most hosts, yes, although you can use ANY check command that is setup if you wish.
Ok, great, but having looked at the host templates and service templates only a few have "active checks" enabled. The defaults only.
Which is fine but means that checks are disabled.
Not totally true, it may be inherited from another host\service group or template and just not shown in that direct object. This is where inheritance becomes important.
I have TON of machines which I imported from a much older nagios (base).
Right now, none of my hosts have active checks enabled, no contacts.
Same for all my services.
For now, I would like to create a contact email(s) and have this email get
alerts on all events 24/7 ... for ALL hosts.
Are any of these using templates from your past setup? My guess would be yes, as you were likely doing checks there, this information should have been imported, and if it was not, you can run an import again on those files without causing issues for items that were already done.
Should I enable "active checks" for each service and add my contact
and make the notification interval "60", then select the proper host(s)?
Or
Should I do this from the hosts and leave services alone?
Just assign hosts to service. Nothing else.
If they are truely not on, I would honestly go the route of adding the generic template to all of them, enabling active checks on both templates, and adding your email there. This will be by far the fastest and cleanest way to do this. Just a note on the notification interval, I would set it to notify immediately and then yes a 30-60 min interval for any notifications after the initial one is generally suggested.
No worries on the confusion, nagios is a pretty big and diverse system, there's a lot to learn!