Nagios cfg _file= crashes Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
russellharrower
Posts: 1
Joined: Wed Aug 22, 2012 6:41 pm

Nagios cfg _file= crashes Nagios

Post 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
}
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios cfg _file= crashes Nagios

Post 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
Locked