Page 1 of 1
Getting new mail in /var/spool/mail/root after deleted host
Posted: Mon May 28, 2018 12:53 am
by cssp
Dear Team,
I am new in both Linux and Nagios/Nagios XI. so please help me.
I configured Nagios XI in CenstOS 7 and its working fine. I added hosts(Window PC, Linux PC and Switch) for the testing purpose through and its added successfully. After that I tested for notification and alert and I got if any think goes down or critical in my mail.
Now I removed/deleted the host(Switch) from Nagios XI through Web console but receiving mail in /var/spool/mail/root every 5 minutes. Hence I show the mails in /var/spool/mail/root, Its showing all the status details about the switch port.
So, Please help me, how to stop all the getting mails if I removed the hosts in Nagios XI ?
Thanks
Somnath Pandey
Re: Getting new mail in /var/spool/mail/root after deleted h
Posted: Tue May 29, 2018 9:55 am
by eloyd
Did you apply the changes after you deleted the host?
Re: Getting new mail in /var/spool/mail/root after deleted h
Posted: Tue May 29, 2018 2:34 pm
by scottwilkerson
Yes, make sure you applies the configuration after removing the host/services
If you have already done that lets run the following the verify you don't have multiple nagios parent processes
Re: Getting new mail in /var/spool/mail/root after deleted h
Posted: Wed May 30, 2018 4:20 am
by cssp
Thank you for reply,
Yes, I did apply configuration after deleted the Switch host.
I ran the command ps -ef | grep nagios.cfg
its showing
nagios 1963 1 0 13:20 ? 00:00:01 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 1963 1 0 13:20 ? 00:00:01 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root 22345 2222 0 14:24 tty1 00:00:00 grep --color=auto nagios.cfg
Regards
Somnath Pandey
Re: Getting new mail in /var/spool/mail/root after deleted h
Posted: Wed May 30, 2018 8:13 am
by scottwilkerson
Can you give us an example of a portion of the message you are getting in /var/spool/mail/root
Are you sure it isn't the result of the mrtg cron job?
Re: Getting new mail in /var/spool/mail/root after deleted h
Posted: Wed May 30, 2018 11:19 pm
by cssp
Please check the example of the mail receiving very 5 min.
Example:
X= Port number of switch from 1 to 26
2018-05-31 09:10:12: ERROR: Target[192.168.0.239_X][_IN_] ' $target->[X-1]{$mode} ' did not eval into defined data
2018-05-31 09:10:12: ERROR: Target[192.168.0.239_X][_OUT_] ' $target->[X-1]{$mode} ' did not eval into defined data
If connecting to LAN (it's mean 192.168.0.239 is able to ping from the Nagios System) then mails are not receiving.
Regards
Somnath Pandey
Re: Getting new mail in /var/spool/mail/root after deleted h
Posted: Thu May 31, 2018 7:25 am
by scottwilkerson
This is not a notification from nagios it is from MRTG.
edit /etc/cron.d/mrtg and add the following to the end of the line
This will stop root from being notified of the output of this cron job
Re: Getting new mail in /var/spool/mail/root after deleted h
Posted: Fri Jun 01, 2018 12:31 am
by cssp
Thank you for helping me.
You can lock/close my case.
I will back to you if get any help regarding Nagios/Nagios XI.
Thanks and Regards
Somnath Pandey
Re: Getting new mail in /var/spool/mail/root after deleted h
Posted: Fri Jun 01, 2018 7:01 am
by scottwilkerson
Excellent glad it is resolved.
Locking