Page 1 of 2
New service check config is not picking up host IP
Posted: Fri Nov 16, 2018 1:56 pm
by awilson
Hi. I have a host that is configured with its IP address but when it is added as the host for a service check the IP does not appear to register. If I try the run check command option, the localhost address is in the host address window.
Is the answer "delete and recreate the host?" Any ideas on how this happens?
Thanks!
Re: New service check config is not picking up host IP
Posted: Fri Nov 16, 2018 3:02 pm
by npolovenko
Hello,
@awilson. Have you tried saving the service check, applying the config and seeing if the service works properly on the home page?
Re: New service check config is not picking up host IP
Posted: Fri Nov 16, 2018 4:51 pm
by awilson
It still lists 127.0.0.1 in the host address window.
Re: New service check config is not picking up host IP
Posted: Mon Nov 19, 2018 10:32 am
by lmiltchev
Can you show us the host and the service configs?
Go to the CCM > Hosts > <your host>, and click on the View Config actions button
Go to the CCM > Services > <your service>, and click on the View Config actions button
Re: New service check config is not picking up host IP
Posted: Tue Nov 27, 2018 7:20 pm
by awilson
Code: Select all
###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.6.5
# Date: 2018-11-27 18:12:50
# Version: Nagios 3.x config file
#
# --- 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 xxx.xxx.xxx.xxx_Silver_Virtual_NA
use xiwizard_linuxserver_host
address xxx.xxx.xxx.xxx
max_check_attempts 16
check_interval 5
retry_interval 2
check_period xi_timeperiod_24x7
contacts 24x7,snowdev,unixdl
notification_interval 480
notification_period xi_timeperiod_24x7
first_notification_delay 0
notifications_enabled 1
icon_image aix.png
statusmap_image aix.png
_xiwizard aix
register 1
}
###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################
Code: Select all
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.6.5
# Date: 2018-11-27 18:15:26
# Version: Nagios 3.x config file
#
# --- 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 service {
host_name xxx.xxx.xxx.xxx_Silver_Virtual_NA_Silver_Virtual_NA
service_description / Disk Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_disk!-a '-w 20% -c 10% -p /'!!!!!!
max_check_attempts 16
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 480
notification_period xi_timeperiod_24x7
contacts 24x7,snowprod,unixdl
_xiwizard aix
register 1
}
define service {
host_name xxx.xxx.xxx.xxx_Silver_Virtual_NA
service_description CPU Stats
use xiwizard_nrpe_service
check_command check_nrpe!check_cpu_stats!-a '-w 70,40,30 -c 90,60,40'!!!!!!
max_check_attempts 16
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 480
notification_period xi_timeperiod_24x7
contacts 24x7,unixdl
_xiwizard aix
register 1
}
define service {
host_name xxx.xxx.xxx.xxx_Silver_Virtual_NA
service_description Cron Scheduler
use xiwizard_nrpe_service
check_command check_nrpe!check_services!-a 'cron'!!!!!!
max_check_attempts 16
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 480
notification_period xi_timeperiod_24x7
contacts 24x7,unixdl
_xiwizard aix
register 1
}
define service {
host_name xxx.xxx.xxx.xxx_Silver_Virtual_NA
service_description Load
use xiwizard_nrpe_service
check_command check_nrpe!check_load!-a '-w 15,10,5 -c 30,20,10'!!!!!!
max_check_attempts 16
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 480
notification_period xi_timeperiod_24x7
contacts 24x7,unixdl
_xiwizard aix
register 1
}
define service {
host_name xxx.xxx.xxx.xxx_Silver_Virtual_NA
service_description Ping
use xiwizard_linuxserver_ping_service
max_check_attempts 16
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 480
notification_period xi_timeperiod_24x7
contacts 24x7,unixdl
_xiwizard aix
register 1
}
define service {
host_name xxx.xxx.xxx.xxx_Silver_Virtual_NA
service_description Swap Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_swap!-a '-w 50 -c 20'!!!!!!
max_check_attempts 16
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 480
notification_period xi_timeperiod_24x7
contacts 24x7,unixdl
_xiwizard aix
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
Re: New service check config is not picking up host IP
Posted: Wed Nov 28, 2018 9:37 am
by lmiltchev
Are you having an issue with the "/ Disk Usage" service? According to your host config, the hostname is "xxx.xxx.xxx.xxx_Silver_Virtual_NA", however the "/ Disk Usage" service is added to "xxx.xxx.xxx.xxx_Silver_Virtual_NA_Silver_Virtual_NA". Is this a typo?
Re: New service check config is not picking up host IP
Posted: Wed Nov 28, 2018 4:59 pm
by awilson
That was a typo from my attempt to obscure the server name and IP. //

Re: New service check config is not picking up host IP
Posted: Wed Nov 28, 2018 5:09 pm
by lmiltchev
Can you PM me your profile, along with the name of the host & service in question?
Admin > System Config > System Profile > Download Profile
Re: New service check config is not picking up host IP
Posted: Wed Nov 28, 2018 5:49 pm
by lmiltchev
I sent you a PM.
Re: New service check config is not picking up host IP
Posted: Thu Nov 29, 2018 9:47 am
by tgriep
In the original profile you PM'ed to lmiltchev even though it is not the profile from the server in question, I found that there are duplicate Nagios processes running on the server and that needs to be fixed.
Run the following as root to stop the duplicates and restart Nagios.
Code: Select all
service nagios stop
killall -9 nagios
service nagios start
With as many Hosts and Services on that server, you need to increase the wait timer for when Nagios restarts.
The following link has instructions for doing that.
https://support.nagios.com/kb/article/n ... r-172.html