Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'CPU Load' on host 'media' Error: Could not register service (config file '/etc/nagios/hosts.cfg', starting on line 41)
There's no setting you can get correct on this; changing the values doesn't seem to work, and if you remove one of them you get warned that they are required. Reading the version 2.0 documentation tells you that they're required but even if you obey it the above command still gives you the warning. This, by the way, is a hint that the problem lies elsewhere.
A bit of Googling found a few people with this error and not much more; one had someone 'helpfully' pointing out that the retry_interval keyword was only used in version 2 (which, of course, I was using). Our local Nagios expert came over and had a look, tried all the things I'd tried, and declared it unsolvable. After a bit more fiddling, I noticed that the service definitions in the PDF examples use the generic-service template, but the definitions in the localhost.cfg file (supplied by the EPEL nagios package) used local-service. I changed it in my new hosts configuration.
And there it was, a second host in my Nagios display. Things looked even better after working out that, by default, nrpe's configuration doesn't allow commands to be given parameters by the server (as a plug for the obvious security hole), and therefore one had to set up specific command definitions for each command you wanted (rather than the standard Nagios configuration, which is to configure them in the service definition).
So the summary is that Nagios is a powerful tool, and its documentation really needs some tender love and care. I mean, its standard install instructions for Fedora ignore any possibility of packages and install from source, and then disable SELinux. On a server! I shudder to think what the other parts of the source package contain - maybe the CGI is set up to allow all users by default.
All posts licensed under the CC-BY-NC license. Author Paul Wayper.