Passive checks but active checks still happen ?

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.
Post Reply
kyleseton
Posts: 3
Joined: Wed Aug 30, 2023 12:23 am

Passive checks but active checks still happen ?

Post by kyleseton »

Afternoon,

So I have a service that is passive but appears to be triggering active checks every 10 minutes... My guess is it the issue is either inheritance or a lack of understanding on my side.

Version:Nagios core 4.4.6
Service from the objects.cache # with specific data replaced with <tags>
define service {
host_name <hostname>
service_description <service description>
check_period 24x7
check_command <command name>
contact_groups <contact group>
notification_period 24x7
initial_state o
importance 0
check_interval 10.000000
retry_interval 2.000000
max_check_attempts 1
is_volatile 0
parallelize_check 1
active_checks_enabled 0
passive_checks_enabled 1
obsess 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 0
flap_detection_options a
freshness_threshold 2400
check_freshness 1
notification_options r,w,u,c
notifications_enabled 1
notification_interval 1440.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
}

Despite the "active_checks_enabled 0" and "passive_checks_enabled 1" it still runs the "check_command" every 10 minutes despite receiving a nsca message before that 10 minute check?

The service is connected to a host object and a service template.
Should the "check_interval" interval still be listed in the service object when active checks have been disabled ?

Any suggestion on how to troubleshoot my issue or theories as why I'm stuck ?
kyleseton
Posts: 3
Joined: Wed Aug 30, 2023 12:23 am

Re: Passive checks but active checks still happen ?

Post by kyleseton »

[Thu Aug 31 15:59:13 2023.519484] [016.0] [pid=1875729] ** Handling ACTIVE async check result for service '<Service name>' on host '<Host name>' from 'Core Worker 1875737'... current state 2 last_hard_state 2
[Thu Aug 31 15:59:13 2023.519490] [016.1] [pid=1875729] * OPTIONS: 0, SCHEDULED: 1, RESCHEDULE: 1, EXITED OK: 1, RETURN CODE: 2, OUTPUT:
CRITICAL: CRITICAL: No backup results

[Thu Aug 31 15:59:13 2023.519493] [016.1] [pid=1875729] Service is in a non-OK state!
[Thu Aug 31 15:59:13 2023.519495] [016.1] [pid=1875729] Host is currently UP, so we'll recheck its state to make sure...
[Thu Aug 31 15:59:13 2023.519497] [016.1] [pid=1875729] Service was NOT OK at last check (CRITICAL).
[Thu Aug 31 15:59:13 2023.519499] [016.1] [pid=1875729] Service is still in a non-OK state (CRITICAL)!
[Thu Aug 31 15:59:13 2023.519501] [016.1] [pid=1875729] Checking service '<Service name>' on host '<Host name>' for flapping...
[Thu Aug 31 15:59:13 2023.519504] [016.1] [pid=1875729] Checking host '<Host name>' for flapping...
[Thu Aug 31 15:59:13 2023.519506] [016.1] [pid=1875729] Host is not flapping (0.00% state change).
[Thu Aug 31 15:59:13 2023.519512] [016.1] [pid=1875729] Rescheduling next check of service at Thu Aug 31 16:09:13 2023
[Thu Aug 31 15:59:13 2023.519522] [016.0] [pid=1875729] Scheduling a non-forced, active check of service '<Service name>' on host '<Host name>' @ Thu Aug 31 16:09:13 2023
kg2857
Posts: 237
Joined: Wed Apr 12, 2023 5:48 pm

Re: Passive checks but active checks still happen ?

Post by kg2857 »

A service is a single check. It's either active or passive. It seems you're trying to combine the two.
BTW, your life will be simpler if you use templates to remove things unrelated to the service or host from the service or host definition.
kyleseton
Posts: 3
Joined: Wed Aug 30, 2023 12:23 am

Re: Passive checks but active checks still happen ?

Post by kyleseton »

"It's either active or passive. It seems you're trying to combine the two." - I'm trying to only do passive, where are you seeing the misconfig that suggest it is active ? That is my issue, I only want passive but active kept happening. For a poor work around I have set the check_interval to 0 in the service template.
Post Reply