Passive Host doesnt change to "unreachable"

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Passive Host doesnt change to "unreachable"

Postby SSFFU » Tue Jun 18, 2019 3:21 am

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
SSFFU
 
Posts: 8
Joined: Fri Sep 02, 2011 2:50 am

Re: Passive Host doesnt change to "unreachable"

Postby cdienger » Tue Jun 18, 2019 2:36 pm

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.
User avatar
cdienger
Support Tech
 
Posts: 3580
Joined: Tue Feb 07, 2017 11:26 am

Re: Passive Host doesnt change to "unreachable"

Postby SSFFU » Wed Jun 19, 2019 1:04 am

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.
SSFFU
 
Posts: 8
Joined: Fri Sep 02, 2011 2:50 am

Re: Passive Host doesnt change to "unreachable"

Postby lmiltchev » Wed Jun 19, 2019 2:43 pm

Can you show us the actual host config?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12499
Joined: Mon May 23, 2011 12:15 pm

Re: Passive Host doesnt change to "unreachable"

Postby SSFFU » Thu Jun 20, 2019 1:39 am

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
#
###############################################################################
SSFFU
 
Posts: 8
Joined: Fri Sep 02, 2011 2:50 am

Re: Passive Host doesnt change to "unreachable"

Postby lmiltchev » Thu Jun 20, 2019 10:27 am

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12499
Joined: Mon May 23, 2011 12:15 pm

Re: Passive Host doesnt change to "unreachable"

Postby SSFFU » Thu Jun 20, 2019 10:57 am

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.
SSFFU
 
Posts: 8
Joined: Fri Sep 02, 2011 2:50 am

Re: Passive Host doesnt change to "unreachable"

Postby lmiltchev » Thu Jun 20, 2019 11:00 am

I am glad I was able to help! :)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12499
Joined: Mon May 23, 2011 12:15 pm


Return to Nagios XI

Who is online

Users browsing this forum: MSN [Bot], novisnagios, sergio.romero, tgriep and 19 guests