Why aren't my comments(#) working?

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
celticpiping
Posts: 9
Joined: Wed Feb 03, 2016 10:04 am
Location: Maine, USA

Why aren't my comments(#) working?

Post by celticpiping »

Howdy, I'm curious to know why the following contact is still activated in the system, with what I assumed were comments, on every line?

Image
Dell R710, UBUNTU 14.04.3 x64 Nagios® Core™ 4.1.1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Why aren't my comments(#) working?

Post by scottwilkerson »

Can you run the following to see if this exists anywhere else in configurations( changing USERNAME and path)?

Code: Select all

grep USERNAME /usr/local/nagios/etc
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
User avatar
celticpiping
Posts: 9
Joined: Wed Feb 03, 2016 10:04 am
Location: Maine, USA

Re: Why aren't my comments(#) working?

Post by celticpiping »

Didn't have luck there, but I did run:
sudo grep -rnw /usr/local/nagios/ -e 'USERNAME'

It came back only the contacts.cfg file, and a notification message

Rich
Dell R710, UBUNTU 14.04.3 x64 Nagios® Core™ 4.1.1
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Why aren't my comments(#) working?

Post by lmiltchev »

Have you restarted nagios service after commenting out all of the lines in the contact's config?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
celticpiping
Posts: 9
Joined: Wed Feb 03, 2016 10:04 am
Location: Maine, USA

Re: Why aren't my comments(#) working?

Post by celticpiping »

yes.
Dell R710, UBUNTU 14.04.3 x64 Nagios® Core™ 4.1.1
User avatar
celticpiping
Posts: 9
Joined: Wed Feb 03, 2016 10:04 am
Location: Maine, USA

Re: Why aren't my comments(#) working?

Post by celticpiping »

ok, I just found out a couple of things:

1) There are multiple "contacts.cfg" files on the machine
2) Several of them contain his contact info NOT commented out...


So, I guess my searching didn't catch it after all..
And I'm assuming that Nagios for whatever reason, is reading in one of those files..
Every one of them is in my home directory: /HOME/RICH/.......
Only one is in the Nagios directory..


hmmmm
Dell R710, UBUNTU 14.04.3 x64 Nagios® Core™ 4.1.1
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Why aren't my comments(#) working?

Post by lmiltchev »

That would do it. You can review the nagios.cfg to see the paths (what directories are included). Also, try running:

Code: Select all

ps -ef | grep [n]agios.cfg
to see what config is being used. Commenting out the lines in the additional configs, and restarting nagios should take of the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
celticpiping
Posts: 9
Joined: Wed Feb 03, 2016 10:04 am
Location: Maine, USA

Re: Why aren't my comments(#) working?

Post by celticpiping »

looked at nagios.cfg, and it points to 'contacts.cfg', so that's good
Ran the command, and it returned two lines: both of which point
to the same contacts.cfg

Image

Maybe I'll try commenting all instances of the code in the other files, restart nagios & see..

Thanks much,
R
Dell R710, UBUNTU 14.04.3 x64 Nagios® Core™ 4.1.1
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Why aren't my comments(#) working?

Post by lmiltchev »

Seeing two lines is normal - as you can see, the PID and PPID are the same - 3095. It's just a parent and a child process.

I would recommend that you get rid of all additional contacts.cfg configs. Place all of your contacts in the "default" contacts.cfg file, comment out that contact that you don't want, then restart nagios.

Let us know if your issue has been resolved.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
celticpiping
Posts: 9
Joined: Wed Feb 03, 2016 10:04 am
Location: Maine, USA

Re: Why aren't my comments(#) working?

Post by celticpiping »

done.

Thanks a bunch.
I'll have to wait till tomorrow to re-test..
R
Dell R710, UBUNTU 14.04.3 x64 Nagios® Core™ 4.1.1
Locked