Page 1 of 2

Passive check listed as Disabled

Posted: Wed Jun 24, 2015 8:39 am
by Hildebart
I have been using Nagios for a while, but only with active checks.
Today I started testing passive checks. I have installed nsca and everything is working as expected.

However, the passive check is listed as Disabled in the Nagios webui. Is there a way to fix this?
Webui
Webui
Version: Nagios Core 4.0.8.
OS: Linux.

Re: Passive check listed as Disabled

Posted: Wed Jun 24, 2015 8:48 am
by tgriep
You will need to add the following to the service check in question to enable passive checks.

Code: Select all

passive_checks_enabled                   1

Re: Passive check listed as Disabled

Posted: Wed Jun 24, 2015 9:08 am
by Hildebart
I already have "passive_checks_enabled 1".

Here's the service definition:

Code: Select all

define service {
  service_description           Passive Check
  check_command                 check_null
  passive_checks_enabled        1
  active_checks_enabled         0
  host_name                     radon
  use                           lgq-service-nosms
}
lgq-service-nosms:

Code: Select all

define service {
  name                          lgq-service-nosms
  register                      0
  max_check_attempts            3
  check_interval                5
  retry_interval                1
  first_notification_delay      0
  notification_interval         240
  notification_options          w,u,c,r
  active_checks_enabled         1
  passive_checks_enabled        1
  notifications_enabled         1
  check_freshness               0
  check_period                  24x7
  notification_period           24x7
  contact_groups                adminsNOSMS
}
check_null

Code: Select all

define command {
                command_name                    check_null
                command_line                    /bin/true
}

Re: Passive check listed as Disabled

Posted: Wed Jun 24, 2015 12:15 pm
by jolson
Let's see some excerpts from your nagios configuration:

Code: Select all

grep passive /usr/local/nagios/etc/nagios.cfg

Re: Passive check listed as Disabled

Posted: Thu Jun 25, 2015 2:05 am
by Hildebart
No settings was commented out so I removed the comments from the output.

Code: Select all

# grep passive /usr/local/nagios/etc/nagios.cfg|grep -v "^#"
log_passive_checks=0
accept_passive_service_checks=1
accept_passive_host_checks=1
translate_passive_host_checks=0
passive_host_checks_are_soft=0

Re: Passive check listed as Disabled

Posted: Thu Jun 25, 2015 10:23 am
by tgriep
Can you go to that service in the GUI and enable passive checks?
Does it stay enabled when you do that?

Re: Passive check listed as Disabled

Posted: Fri Jun 26, 2015 3:45 am
by Hildebart
The service already had passive checks enabled in the GUI:
Service in GUI
Service in GUI
I tried "Stop accepting passive checks for this service" and then "Start accepting passive checks for this service" again.
Didn't help.

I also tried "Enable active checks for this service" and then "Disable active checks of this service".
No change. The service is still marked as Disabled.

Re: Passive check listed as Disabled

Posted: Fri Jun 26, 2015 9:12 am
by tgriep
The Tactical screen is showing that the Active Check is disabled, not the passive check, so it seems to be correct if the active check is disabled for that service.

Re: Passive check listed as Disabled

Posted: Tue Jun 30, 2015 7:09 am
by Hildebart
But this service will never have an active check. Just a passive one.

As long as the definition is

Code: Select all

  ..
  passive_checks_enabled        1
  active_checks_enabled         0
  ..
the service should not be listed as if the active check is disabled.

I thought active check disabled meant "there is an active check defined for this service, but at the moment it's disabled for some reason"?

Re: Passive check listed as Disabled

Posted: Tue Jun 30, 2015 9:36 am
by tgriep
The Tactical Overview is suppose to show if an active check is disabled, it is there to get a quick overview of whats enabled, disabled, up, down, etc...
Here is the description of Active Checks.
http://nagios.sourceforge.net/docs/3_0/ ... hecks.html