Page 1 of 1

Nagios cfg _file= crashes Nagios

Posted: Wed Aug 22, 2012 7:09 pm
by russellharrower
Ok I am not sure why, but when I create the following
/etc/nagios/objects/server.cfg

with the following in it. it does not want to allow nagios to run it says there is a config error.
Could someone please advise what i am doing wrong.

Code: Select all

  define host{
    use                     generic-host            ; Name of host template to use
    host_name               bonus
    alias                   bonus
    address                 92.12.35.162
    check_command           check-host-alive
    max_check_attempts      10
    notification_interval   120
    notification_period     24x7
    notification_options    d,u,r}  
    services config

The following should appended to the end of hosts.cfg (located in /etc/nagios or /usr/local/nagios/etc)
# Service definition for bonus
define service{
use             generic-service     ; Name of service template to use
host_name           bonus
service_description     HTTP
is_volatile         0
check_period            24x7
max_check_attempts      3
normal_check_interval       3
retry_check_interval        1
contact_groups          technical,support
notification_interval       120
notification_period     24x7
notification_options        w,u,c,r
check_command           check_http
}

Re: Nagios cfg _file= crashes Nagios

Posted: Thu Aug 23, 2012 10:39 am
by slansing
When you run the following what does it tell you?:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg