cfg_dir means directory, and you have specified the file there. The thing you should do is:
cfg_dir=/opt/local/nagios/etc/objects
if that is the directory where you keep your configuration files.
That will work.
But if you want the check_ping to be checked regularly, you should also create a service fot that host with check_ping, cause host definition and it’s check-host-alive won’t be checked on regular bases. It’s main purpose is to check if host is alive when everything else fails.
In that service definition also put same contact_groups as for host definition.
With that service, testing of host reachability is more precise and it will show you much faster how your configuration and checking works. You will get your results more accurate.
And don’t foget to add your host to some hostgroup, 'cause otherwise you won’t be able to see your host in your web GUI of Nagios
I have one quick question before i do anything more.
I need to do the monitoring of the local Solaris server before start monitoring any other server.
These are the messages i am receiving in the nagios.log file. How can i make it sending this messages as an email.
Assume, i have created contact groups and contact. Where i am wrong.
[1222788071] Warning: The check of service ‘HTTP’ on host ‘localhost’ looks like it was orphaned (results never came back). I’m scheduling an immediate check of the service…
[1222788131] Warning: The check of service ‘Swap Usage’ on host ‘localhost’ looks like it was orphaned (results never came back). I’m scheduling an immediate check of the service…
Maybe you should reinstall your Nagios. Those orphaned services don’t look good to me. Don’t know if these messages are meant to be sent as notifications.
Thank you for sharing the info. My current setup is working now for the local machine and i am able to get notifications properly for the local machine.