Warning: Duplicate definition found for command

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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Warning: Duplicate definition found for command

Post by mcapra »

Can you share the actual file rather than the output of more? That command is adding lines to the output and throwing off the line count. Stuff like this:

Code: Select all

...

--Plus--(73%)

...
Do you know if cgi.cfg was modified using a Windows based text editor of some sort? Or has it not been touched at all? I copy+pasted your cgi.cfg into my environment and couldn't reproduce the issues, which leads me to believe there may be some encoding problems.
Former Nagios employee
https://www.mcapra.com/
FabienA
Posts: 16
Joined: Thu Jan 12, 2017 8:17 am

Re: Warning: Duplicate definition found for command

Post by FabienA »

Ha... I'm sorry i have capture the configuration file with putty..
I will retry the capture without the adding lines.
FabienA
Posts: 16
Joined: Thu Jan 12, 2017 8:17 am

Re: Warning: Duplicate definition found for command

Post by FabienA »

This is the cgi configuration without adding lines

Thanks !!
Attachments
cfig.cfg
(12.82 KiB) Downloaded 235 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Warning: Duplicate definition found for command

Post by tgriep »

The error may be in the nagios.cfg file so could you post that file here so we can view it?

Code: Select all

/usr/local/nagios/etc/nagios.cfg
Also, can you run the following commands on the Nagios system and post the output?

Code: Select all

dos2unix /usr/local/nagios/etc/cgi.cfg
/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked