Passive check listed as Disabled

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Hildebart
Posts: 5
Joined: Wed Jun 24, 2015 8:02 am

Passive check listed as Disabled

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Passive check listed as Disabled

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hildebart
Posts: 5
Joined: Wed Jun 24, 2015 8:02 am

Re: Passive check listed as Disabled

Post 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
}
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Passive check listed as Disabled

Post by jolson »

Let's see some excerpts from your nagios configuration:

Code: Select all

grep passive /usr/local/nagios/etc/nagios.cfg
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Hildebart
Posts: 5
Joined: Wed Jun 24, 2015 8:02 am

Re: Passive check listed as Disabled

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Passive check listed as Disabled

Post by tgriep »

Can you go to that service in the GUI and enable passive checks?
Does it stay enabled when you do that?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hildebart
Posts: 5
Joined: Wed Jun 24, 2015 8:02 am

Re: Passive check listed as Disabled

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Passive check listed as Disabled

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hildebart
Posts: 5
Joined: Wed Jun 24, 2015 8:02 am

Re: Passive check listed as Disabled

Post 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"?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Passive check listed as Disabled

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked