Sth weird w/ fresh 2.0 installation



I have done a complete installation of Nagios 2.0 b4 as shown in manual… everything, step by step (it’s not my first installation, i know about)…

But something is weird w/ configurations files…

Fresh installation leaves etc/ directory as:

-rw-rw-r-- 1 nagios nagios 29K oct 23 23:59 bigger.cfg-sample
-rw-rw-r-- 1 nagios nagios 9.4K oct 23 23:59 cgi.cfg-sample
-rw-rw-r-- 1 nagios nagios 4.4K oct 23 23:59 checkcommands.cfg-sample
-rw-rw-r-- 1 nagios nagios 13K oct 23 23:59 minimal.cfg-sample
-rw-rw-r-- 1 nagios nagios 4.2K oct 23 23:59 misccommands.cfg-sample
-rw-rw-r-- 1 nagios nagios 30K oct 23 23:59 nagios.cfg-sample
-rw-rw---- 1 nagios nagios 1.3K oct 23 23:59 resource.cfg-sample

How must i rename it ?
I have renamed them without the “-sample” but it does not work… where is hosts.cfg ? contacts.cfg ?

after rename it this is what i see:

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

Nagios 2.0b4
Copyright © 1999-2005 Ethan Galstad (
Last Modified: 08-02-2005
License: GPL

Reading configuration data…

Error: Command ‘check-host-alive’ has already been defined
Error: Could not register command (config file ‘/usr/local/nagios/etc/minimal.cfg’, starting on line 76)


‘/usr/local/nagios/etc/minimal.cfg’ is like a all in one config file. It will contain many of the definitions that you normally would see in seperate files like hosts.cfg services.cfg etc.

So, just use the one file but as your error states, you have a check_command defined more than once, so just remove that definition.


If ‘/usr/local/nagios/etc/minimal.cfg’ is like a all in one config file:

  1. can i just have minimal.cfg in /etc dir ?

  2. can i just remove minimal.cfg and have all config separately in each file ? in this case… where can i get hosts.cfg, contacts.cfg, and sure other files left? I remember nagios1 had a lot of config files like these (i just remember hosts and contacts)… what are the complete official list of 'em ?

what is better? 1) or 2)


you ned to create them
1 or 2 is better depending on how you want to organize your files… you just tel nagios which files to read… (i seem to remember in nagios.cfg can’t check now)

Ciao, Luca


ok, but what are the files needed ?
hosts and contacts are in my mind just because remembering nagios1… but maybe there’s others…

can anyone send me a pack of common cfg files instead of that minimal.cfg ?

there’s no complete cfg files in the fresh installation of 2.0 !!! :frowning:


no, there can’t be. how could the install know what services and hosts to define?
you can define files with any possible name just add them to nagios.cfg so they get read at startup. check the minimal.cfg to see how they are done (and in the docs under host and service definition) and start working out your hosts and services… initially it’s better if you just create one host with one service.



You could download nagios v1.2 and get the files from there, or even install v1.2 since it’s not beta and won’t have the problems you describe. If you have other nagios beta problems, it might be quicker to post in the beta testers group/forum/wherever.


oh and by the way you do have the files already…
The sample files you talk about in your first message.
so i don’t really see the problem… files sent by somebody else wouldn’t work as the sample files don’t…