Problems with the preflight check


#1

I have managed to start nagios, but it is not monitoring anything due to some problems encountered in the preflight check (which I had commented out to be able to at least start nagios) these problems are:

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)

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

How do I overcome these?

Regards
J


#2

edit nagios.cfg and remove references to files you don’t use.
If it’s your first try you probably ONLY want minimal.cfg.

Luca


#3

Edit your minimal.cfg and comment (#) out all the lines the pre-flight check is complaining about. The reason it does this is because these commands are already defined in one of your other *.cfg files - misccommands.cfg I think.

Pete.


#4

Actually, I agree with Luca here. The best option is to use minimal.cfg, where most all of your configurations are consolidated into one file. It’s usually the easiest way for a newbie to go.

I would go into Nagios.cfg and comment out the cfg_file= entries pertaining to misccommands.cfg, checkcommands.cfg, hosts.cfg, etc. Work with just the minimal.cfg file until you can get it working properly.

NOTE: Look at your minimal.cfg file carefully to see which of the other .cfg files you should comment out. Commenting out resource.cfg in your nagios.cfg file, for example, would be bad, as minimal.cfg does not contain the information specified in resource.cfg, if I remember correctly.


#5

Thanks Everyone :frowning: