Please... give a little push



I have experiencie working with some monitoring tools, openview, loriot, whatsup, mrtg & rrd from Tobias, and i´m now so excited trying to get some juice from nagios, this is my first install, i did it over ubuntu, i got no erros on the process so far, but i´m having some problems understanding the templates model that is shipped with nagios, the version i´m using is 3.0.6 compiled from source, i have some easy basic questions…

1.-Can i add a new host with just one cfg_file without making refrerences to other files like templates.cfg, etc?
i understand that this is not so eficient, this is just a question…

2.-Is it posible to show me a working example of the mentioned in the first question?, it could be a ping (icmp check), or an http_check (i already installed the plugins)

3.-if the answer of first questions is NO, please just try to help me adding my default gateway and or my internal web server (checking http service) to my nagios setup.

i have tried but nagios just keep complaining about cfg errors…

thanks in advance for your time fellows


  1. Yes, but you’ll probably want to use templates if you’re monitoring a significant number of similar machines


define service{ name some-service active_checks_enabled 1 passive_checks_enabled 1 parallelize_check 1 obsess_over_service 1 check_freshness 0 notifications_enabled 1 event_handler_enabled 1 flap_detection_enabled 1 failure_prediction_enabled 1 process_perf_data 1 retain_status_information 1 retain_nonstatus_information 1 is_volatile 0 check_period 24x7 max_check_attempts 3 retry_check_interval 1 contact_groups admins notification_options w,u,c,r notification_interval 60 notification_period 24x7 host_name hostname service_description Disk Usage C check_command check_nt_disk!C!80!90 normal_check_interval 60 servicegroups diskgroup }

Also, if you run “/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg” it should give you a better idea of where the problem in your config lies. I usually find it’s something simple like I’ve specified a host or hostgroup that doesn’t exist or I’ve simply made a typo somewhere.