Passive Host doesnt change to "unreachable"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
SSFFU
Posts: 8
Joined: Fri Sep 02, 2011 2:50 am

Passive Host doesnt change to "unreachable"

Post by SSFFU »

Hi,
I'm using NAGIOS XI with NSCA Server and NSClient++ passive host.

I configured passive host and passive service with:
'check_dummy' - "SERVICE UNREACHABLE" or "HOST UNREACHABLE"
Active check OFF
Passice Check ON
Freshness threshold 300
Check Freshness ON

When I stop the comunication beetwen the Host and the NSCA Server, the Services became "SERVICE UNREACHABLE", but the Host doesn't change the state and remain "green - up".

Does anyone know what the problem may be?
Thanks in advance
Francesco
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Passive Host doesnt change to "unreachable"

Post by cdienger »

The first argument that the check_dummy plugin accepts will determine the state. See page 10 of https://assets.nagios.com/downloads/nag ... ios-XI.pdf for an example(it's of a service config but the same is true for host configs).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
SSFFU
Posts: 8
Joined: Fri Sep 02, 2011 2:50 am

Re: Passive Host doesnt change to "unreachable"

Post by SSFFU »

Thanks cdienger.
I used this document for the configuration of passive hosts/services.
The problem is that the Services correctly became SERVICE UNREACHABLE, while the Hosts doesn't change state.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Passive Host doesnt change to "unreachable"

Post by lmiltchev »

Can you show us the actual host config?
Be sure to check out our Knowledgebase for helpful articles and solutions!
SSFFU
Posts: 8
Joined: Fri Sep 02, 2011 2:50 am

Re: Passive Host doesnt change to "unreachable"

Post by SSFFU »

here you are

[root@mon hosts]# cat CEP_TGSRV01.cfg
###############################################################################
#
# Hosts configuration file
#
# Created by: Nagios CCM 2.7.4
# Date: 2019-06-19 12:31:54
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
host_name CEP_TGSRV01
use xiwizard_passive_host
address CEP_TGSRV01
check_command check_dummy!2!"HOST UNREACHABLE"!!!!!!
max_check_attempts 3
check_interval 5
retry_interval 1
active_checks_enabled 0
passive_checks_enabled 1
check_period 13x5
check_freshness 1
freshness_threshold 60
contact_groups GRP_Alert
notification_interval 0
notification_period 13x5
notification_options d,u,
notifications_enabled 1
stalking_options n,
icon_image passiveobject.png
statusmap_image passiveobject.png
_xi_passive_firstcheck 1560852804
_xi_passive_gen 1560852804
register 1
}

###############################################################################
#
# Hosts configuration file
#
# END OF FILE
#
###############################################################################
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Passive Host doesnt change to "unreachable"

Post by lmiltchev »

I tested a similar config and it worked for me just fine. There are a couple of things that you need to check:

1. Make sure that checking host freshness is actually enabled in the main config. Open /usr/local/nagios/etc/nagios.cfg in a text editor and set:

Code: Select all

check_host_freshness=1
save, exit and restart nagios:

Code: Select all

service nagios restart
Wait for a minute or two, then see if the state/output is going to change in the GUI.

2. Make sure that the "13x5" timeperiod is not the issue. I don't know how it's defined, so cannot test that. I used 24x7, FYI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
SSFFU
Posts: 8
Joined: Fri Sep 02, 2011 2:50 am

Re: Passive Host doesnt change to "unreachable"

Post by SSFFU »

Thanks lmiltchev,
I confirm You that the parameters 'check_host_freshness' was on 0!
Changed it to 1 the hosts became "UNREACHABLE".
Thank you the problem is solved.
Bye
F.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Passive Host doesnt change to "unreachable"

Post by lmiltchev »

I am glad I was able to help! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked