Service has status ok but host has status pending
Posted: Mon Dec 09, 2019 3:23 am
Hello, in nagios core 4.4.5 i have the following definitions:
define hostgroup{
hostgroup_name NAS
alias DRIVE DI RETE
}
define host {
use generic-host ;template
host_name PRIMARYBACKUP ; The name we're giving to this host
alias Sinology su cui salvano i backup ; A longer name associated with the host
address 10.100.0.30 ; IP address of the host
hostgroups NAS ; Host groups this host is associated with
}
define service {
use generic-service
host_name PRIMARYBACKUP
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1
}
define host {
use generic-host ;template
host_name RECSERVER ; The name we're giving to this host
alias Qnap su cui salvano le videocamere ; A longer name associated with the host
address 10.100.0.17 ; IP address of the host
hostgroups NAS ; Host groups this host is associated with
}
define service {
use generic-service
host_name RECSERVER
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1
}
define host {
use generic-host ;template
host_name SECONDARYBACKUP ; The name we're giving to this host
alias Sinology su cui vengono replicati i backup ; A longer name associated with the host
address 10.100.0.32 ; IP address of the host
hostgroups NAS ; Host groups this host is associated with
}
define service {
use generic-service
host_name SECONDARYBACKUP
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1
}
and the generic-host template is defined like this:
define host {
name generic-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 5
check_interval 10
retry_interval 1
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
I don't understand why the three hosts Recserver Primarybackup Secondarybackup are shown as pending but the services are all in ok state.

define hostgroup{
hostgroup_name NAS
alias DRIVE DI RETE
}
define host {
use generic-host ;template
host_name PRIMARYBACKUP ; The name we're giving to this host
alias Sinology su cui salvano i backup ; A longer name associated with the host
address 10.100.0.30 ; IP address of the host
hostgroups NAS ; Host groups this host is associated with
}
define service {
use generic-service
host_name PRIMARYBACKUP
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1
}
define host {
use generic-host ;template
host_name RECSERVER ; The name we're giving to this host
alias Qnap su cui salvano le videocamere ; A longer name associated with the host
address 10.100.0.17 ; IP address of the host
hostgroups NAS ; Host groups this host is associated with
}
define service {
use generic-service
host_name RECSERVER
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1
}
define host {
use generic-host ;template
host_name SECONDARYBACKUP ; The name we're giving to this host
alias Sinology su cui vengono replicati i backup ; A longer name associated with the host
address 10.100.0.32 ; IP address of the host
hostgroups NAS ; Host groups this host is associated with
}
define service {
use generic-service
host_name SECONDARYBACKUP
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1
}
and the generic-host template is defined like this:
define host {
name generic-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 5
check_interval 10
retry_interval 1
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
I don't understand why the three hosts Recserver Primarybackup Secondarybackup are shown as pending but the services are all in ok state.
