Nagios core configuration files

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
spideyz29
Posts: 6
Joined: Fri Nov 09, 2012 2:15 pm

Nagios core configuration files

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

Re: Nagios core configuration files

Post by slansing »

Were you following our documentation and source files? Or an external source's.
spideyz29
Posts: 6
Joined: Fri Nov 09, 2012 2:15 pm

Re: Nagios core configuration files

Post 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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Nagios core configuration files

Post 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.
spideyz29
Posts: 6
Joined: Fri Nov 09, 2012 2:15 pm

Re: Nagios core configuration files

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