Not able to Check_cluster services

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.
Locked
bhadre
Posts: 16
Joined: Mon May 26, 2014 10:07 pm

Not able to Check_cluster services

Post by bhadre »

Hi I have defined individual services like below and check_cluster. But My individual services are working fine with out any issue. But cluster services getting below error

Error: Service check command 'check_cluster!1:2!2:3!$SERVICESTATEID:host1:GEAADF_WLS_ADF1_1$,$SERVICESTATEID:host2:GEAADF_WLS_ADF1_1$,$SERVICESTATEID:host3:GEAADF_WLS_ADF1_1,$SERVICESTATEID:host4:GEAADF_WLS_ADF1_1$' specified in service 'Cluster Check - HTTP Service' for host 'localhost' not defined anywhere!
Warning: Service 'Cluster Check - HTTP Service' on host 'localhost' has no check time period defined!
Error: Service check command 'check_cluster!1:2!2:3!$SERVICESTATEID:host1:GEAADF_WLS_ADF1_1$,$SERVICESTATEID:host2:GEAADF_WLS_ADF1_1$,$SERVICESTATEID:host3:GEAADF_WLS_ADF1_1,$SERVICESTATEID:host4:GEAADF_WLS_ADF1_1$' specified in service 'Cluster Check - HTTP Service' for host localhost' not defined anywhere!
Warning: Service 'Cluster Check - HTTP Service' on host 'localhost' has no check time period defined!



define service {
host_name localhost
service_description GEAADF_WLS_ADF1_1
use cluster-service
check_command check_xi_service_http!-s "RUNNING" -f ok -I localhost -p 8130 -u /management/tenant-monitoring/servers/WLS_ADF1_1
max_check_attempts 5
check_interval 5
retry_interval 1
notification_interval 10
notifications_enabled 1
contacts nagiosadmin
contact_groups admins
register 1
}

define service {
host_name localhost
service_description GEAADF_WLS_ADF1_2
use cluster-service
check_command check_xi_service_http!-s "RUNNING" -f ok -I localhost -p 8130 -u /management/tenant-monitoring/servers/WLS_ADF1_2
max_check_attempts 5
check_interval 5
retry_interval 1
notification_interval 10
notifications_enabled 1
contacts nagiosadmin
contact_groups admins
register 1
}

define hostgroup{
hostgroup_name cluster-servers ; The name of the hostgroup
alias Linux Servers ; Long name of the group
members localhost ; Comma separated list of hosts that belong to this group
}

define service{
hostgroup_name cluster-servers
service_description Cluster Check - HTTP Service
check_command check_cluster!1:2!2:3!$SERVICESTATEID:host1:GEAADF_WLS_ADF1_1$,$SERVICESTATEID:host2:GEAADF_WLS_ADF1_1$,$SERVICESTATEID:host3:GEAADF_WLS_ADF1_1,$SERVICESTATEID:host4:GEAADF_WLS_ADF1_1$
#check_command check_cluster
#contacts noc, sysad
max_check_attempts 5
check_interval 5
retry_interval 1
notification_interval 10
notifications_enabled 1
contacts nagiosadmin
contact_groups admins

}

Thanks,
Bhadregowda
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to Check_cluster services

Post by rkennedy »

The first two services you posted are using a template which probably has a time period specified -

Code: Select all

define service {
host_name localhost
service_description GEAADF_WLS_ADF1_1
use cluster-service
Where as this one does not -

Code: Select all

define service{
hostgroup_name cluster-servers
service_description Cluster Check - HTTP Service
check_command check_cluster!1:2!2:3!$SERVICESTATEID:host1:GEAADF_WLS_ADF1_1$,$SERVICESTATEID:host2:GEAADF_WLS_ADF1_1$,$SERVICESTATEID:host3:GEAADF_WLS_ADF1_1,$SERVICESTATEID:host4:GEAADF_WLS_ADF1_1$
#check_command check_cluster
#contacts noc, sysad
max_check_attempts 5
check_interval 5
retry_interval 1
notification_interval 10
notifications_enabled 1
contacts nagiosadmin
contact_groups admins

}
Try adding a time period, and the error should go away -

Code: Select all

Warning: Service 'Cluster Check - HTTP Service' on host 'localhost' has no check time period defined!
Former Nagios Employee
bhadre
Posts: 16
Joined: Mon May 26, 2014 10:07 pm

Re: Not able to Check_cluster services

Post by bhadre »

Im sorry. I didn't understand what does it mean "Where as this one does not -"

Thanks
Bhadregowda
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to Check_cluster services

Post by rkennedy »

The first service is using a template, use cluster-service, and the second service you posted is not. I'm guessing that a time period is assigned on this template, which is why one is working and not the other.

You need to assign a time period (or the template) to the first service.
Former Nagios Employee
Locked