Page 1 of 1
Service check not shown in Status window
Posted: Mon Jan 06, 2014 8:31 am
by Narie
Hi,
I am adding host via NRPE proxy, which works. It gives a proper status of al the services. However, when I add a (http) service manual via the Core Config manager, Services => Add new => with a working test (also when I do a test via the command line on the Xi server) => Save => Apply Configuration => it doesn't give an problem but I don't see the service in Home / Service Detail. When I check the /usr/local/nagios/etc/services map there i a [servername].cfg file with all the other services. For the last, not shown service, it has only added:
define service {
service_description Check http
check_command check_nrpe!check_http[command]!!!!!!!
register 1
}
Regards,
Matthew
Re: Service check not shown in Status window
Posted: Mon Jan 06, 2014 9:42 am
by lmiltchev
It seems like you forgot to add the service to a host. You should have a "host_name" defined in the config - this is required.
http://nagios.sourceforge.net/docs/3_0/ ... ml#service
Go to: CCM->Services->Check http->Modify->Manage Hosts->select a host->Add Selected->Close->Save->Apply Configuration
Hope this helps.
Re: Service check not shown in Status window
Posted: Mon Jan 06, 2014 10:01 am
by Narie
Hi,
Thanks, that's what I also tried before, but after applying I receive the following error:
Error: Could not register service (config file '/usr/local/nagios/etc/services/[hostname].cfg', starting on line 14)
Error processing object config files!
When I check the config we see exact the same line as before.
Matthew
Re: Service check not shown in Status window
Posted: Mon Jan 06, 2014 10:45 am
by abrist
Go to configure --> core config manager --> tools --> write config files. Click "write" and then "verify". Post the output of the verification here in code wraps.
Re: Service check not shown in Status window
Posted: Mon Jan 06, 2014 10:50 am
by Narie
Hi,
Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'Check http' on host '[hostname]'
Error: Could not register service (config file '/usr/local/nagios/etc/services/[hostname].cfg', starting on line 14)
Regards,
Re: Service check not shown in Status window
Posted: Mon Jan 06, 2014 10:53 am
by slansing
That should be your answer then! Take a look at the CCM > Services > "servicename" > Check Settings / Alert Settings tabs. You must have these values defined before Nagios will be able to monitor the object.
Re: Service check not shown in Status window
Posted: Mon Jan 06, 2014 10:54 am
by abrist
Looks like you need to configure a few more settings on the object. Open up the service check in the ccm and set the following values:
Code: Select all
max_attempts
check_interval
retry_interval
Re: Service check not shown in Status window
Posted: Mon Jan 06, 2014 10:58 am
by lmiltchev
Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'Check http' on host '[hostname]'
Go to CCM->Services->Check http->Modify->Check Settings tab and enter the required values (max_attempts, check_interval, retry_interval). Save and Apply Configuration. If it errors again, run the Write Config Tool again to see the new errors.
Note: Instead of entering these values manually, you can accept defaults by clicking on "Manage Templates" under the "Common Settings" tab, and selecting "xiwizard_generic_service".
Re: Service check not shown in Status window
Posted: Mon Jan 06, 2014 11:09 am
by Narie
Hi,
Thanks, it works,
Matthew