Nagios -v error


#1

hi have this problem when i exec that command to check my nagios conf

SeLinux:/#/usr/local/nagios/bin/nagios -v
/usr/local/nagios/etc/nagios.cfg

Nagios 2.0b4
Copyright © 1999-2005 Ethan Galstad (nagios.org)
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)

***> One or more problems was encountered while processing the config files…

 Check your configuration file(s) to ensure that they contain valid
 directives and data defintions.  If you are upgrading from a previous
 version of Nagios, you should be aware that some variables/definitions
 may have been removed or modified in this version.  Make sure to read
 the HTML documentation regarding the config files, as well as the
 'Whats New' section to find out what has changed.

i how can i fix it ?
any help thx
: D


#2

I had similar problems today.
Have you configured any of the cfg files yet, or are you just trying to get it to run with the minimal.cfg?
You have to find where ‘check-host-alive’ is defined, other than in minimal.cfg, and comment it out.
If you have configured your cfg files, and don’t need the contents of ‘minimal.cfg’, then in /etc/nagios.cfg, comment out the refference to ‘minimal.cfg’

I don’t know if we are in the same situation or not, it’s hard to tell from what info you have given, but this helped me earlier


#3

but isnt necesary that external command ?
also i search for that file, and i dont found it

but that is not the problem
when i comment that line appear more errors
well the same error but with other commands
like check_ping, check_disc and others but i have these files
so…i dont know what happen T_T

Edited Wed Nov 09 2005, 01:47PM ]


#4

[quote=“NagaKnighT”]but isnt necesary that external command ?
also i search for that file, and i dont found it
maybe that is the problem . . . i dont have it the file
where i can get it ?
i use the nagios-plugin.1.4.2
and dont know where i can get it T_T[/quote]

Not sure what file you cannot find
I’m having a little trouble understanding, sorry :?


#5

re-read the post, i edit it


#6

Which line did you comment out, exactly, and of what file?
basically, what it looks like to me, is that you have these plugins (check_disk,check_ping, ) defined in more than one config file, and apparently Nagios doesn’t like that.
I may not be of much help, as I am new to this, but you may want to post the contents of your nagios.cfg and/or minimal.cfg files


#7

pnetworks is right, you MUST inspect your .cfg files. You can’t just fire up nagios and expect it to work with the STOCK .cfg files. The problem is exactly as pnetworks has stated. You have definitions for commands defined more than once.

For example, if in my nagios.cfg file I state that my cfg files are in minimal.cfg and checkcommands.cfg and then I define a command twice (once in each file) then it’s going to fail.
Edited Thu Nov 10 2005, 08:20AM ]


#8

: O
i understand what you mean

now i already do this, i comment in nagios.cfg
the line 46 that config the minimal.cfg
and work, now i have normal problems : D