Page 1 of 1

Nagios core configuration files

Posted: Fri Nov 09, 2012 2:26 pm
by spideyz29
Hi everyone,

I am fairly new to linux however, today i tried setting up Nagios Core 3.2.3. It installed properly, however when i try to follow the instructions provided with the documentation, i discovered that some of the .cfg files are missing. For example, i wasn't able to find windows.cfg, and it clearly states in my nagios.cfg file that i can find it @ /etc/nagios3/objects/windows.cfg. I had to manually create the objects directory and also the windows.cfg. Another .cfg file i see missing is the templates.cfg and also hosts.cfg.

Is it something wrong i did with my installation?

now when i run sudo nagios3 -v /etc/nagios3/nagios.cfg, i get the following error message :

Error: Invalid max_check_attempts value for host 'server'
Error: Could not register host (config file '/etc/nagios3/objects/windows.cfg', starting on line 2)
Error processing object config files!

I am following documentation, here is what the hosts.cfg file looks like ( i manually created it)

define host{

host_name server.mydomain.com

alias server

address 192.168.1.55

max_check_attempts 5

check_period 24x7

notification_interval 30

notification_period 24x7

}

Any help on this would be greatly appreciated.

Thanks

Re: Nagios core configuration files

Posted: Fri Nov 09, 2012 3:44 pm
by slansing
Were you following our documentation and source files? Or an external source's.

Re: Nagios core configuration files

Posted: Fri Nov 09, 2012 3:53 pm
by spideyz29
We used the apt-get install and the documentation i follow is the one provided on the left hand side of the nagios start page...

We have it installed on Ubuntu server 12.04 LTS.

Thanks

Re: Nagios core configuration files

Posted: Tue Nov 13, 2012 5:10 pm
by agriffin
The Ubuntu package makes modifications to the default configuration, so when you the documentation you need to be flexible regarding file paths. Otherwise you should installing from source so that the documentation more closely matches your system.

The lines mentioning the objects directory and windows.cfg file in your nagios.cfg are commented out by default for a reason (because they don't exist). They are there to help you make sensible decisions about how to organize your Nagios configuration. You can find example configuration files in /usr/share/doc/nagios3-core/examples.

Re: Nagios core configuration files

Posted: Wed Nov 14, 2012 4:04 pm
by spideyz29
Thanks so much for the info.

i played around with the installation and i was able to make things work.

However i encountered another error, but i will open a separate post for this.

Thanks to all who replied to my question.