Why aren't my comments(#) working?
- celticpiping
- Posts: 9
- Joined: Wed Feb 03, 2016 10:04 am
- Location: Maine, USA
Why aren't my comments(#) working?
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?
Dell R710, UBUNTU 14.04.3 x64 Nagios® Core™ 4.1.1
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Why aren't my comments(#) working?
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
- celticpiping
- Posts: 9
- Joined: Wed Feb 03, 2016 10:04 am
- Location: Maine, USA
Re: Why aren't my comments(#) working?
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
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
Re: Why aren't my comments(#) working?
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!
- celticpiping
- Posts: 9
- Joined: Wed Feb 03, 2016 10:04 am
- Location: Maine, USA
- celticpiping
- Posts: 9
- Joined: Wed Feb 03, 2016 10:04 am
- Location: Maine, USA
Re: Why aren't my comments(#) working?
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
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
Re: Why aren't my comments(#) working?
That would do it. You can review the nagios.cfg to see the paths (what directories are included). Also, try running:
to see what config is being used. Commenting out the lines in the additional configs, and restarting nagios should take of the issue.
Code: Select all
ps -ef | grep [n]agios.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
- celticpiping
- Posts: 9
- Joined: Wed Feb 03, 2016 10:04 am
- Location: Maine, USA
Re: Why aren't my comments(#) working?
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
Maybe I'll try commenting all instances of the code in the other files, restart nagios & see..
Thanks much,
R
Ran the command, and it returned two lines: both of which point
to the same contacts.cfg
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
Re: Why aren't my comments(#) working?
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.
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!
- celticpiping
- Posts: 9
- Joined: Wed Feb 03, 2016 10:04 am
- Location: Maine, USA
Re: Why aren't my comments(#) working?
done.
Thanks a bunch.
I'll have to wait till tomorrow to re-test..
R
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