Our nagios software is reporting Error: Could not expand hostgroups and/or hosts specified in service

Posted June 27, 2017 3.5k views

The error is the only info we can find. The directives appear to be correct - they are similar to ones that worked earlier in the run. Is there a way we can tell Nagios to give us more details on what issue it is having?

Most web hits for this error are by users who found additional errors during the processing. There are no additional errors in our run. It just says:
Processing object config directory ’/prodc/nagios/etc/vip’…
Processing object config file ’/prodc/nagios/etc/vip/sybsp012.cfg’…
Error: Could not expand hostgroups and/or hosts specified in service (config file ’/prodc/nagios/etc/services/pingprlong.cfg’, starting on line 3)
Error processing object config files!

***> One or more problems was encountered while processing the config files…

 Check your configuration file(s) to ensure that they contain valid
 directives and data defintions.  If you are upgrading from a previous
 version of Nagios, you should be aware that some variables/definitions
 may have been removed or modified in this version.  Make sure to read
 the HTML documentation regarding the config files, as well as the
 'Whats New' section to find out what has changed.

The file in question says:

Define a service to “ping” a host

define service{
use generic-service ; Name of service template to use
hostgroupname hosts.pingprlong
description PING
servicegroups service.pingprlong
maxcheckattempts 1 ; Re-check the service up to no times in order to determine its final (hard) state
normalcheckinterval 1 ; Check the service every 1 minute under normal conditions
retrycheckinterval 1 ; Re-check the service every minute until a hard state can be determined
eventhandler ping-status-change
command check_ping2!1000.0,50%!10000.0,100%!9

checkcommand checkping!100.0,20%!500.0,60%

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!