Page 1 of 1
Server sending email to itself
Posted: Wed Nov 19, 2014 3:51 am
by rajasegar
Nagios XI 2014R1.5
Can you please advice from where is this email triggered and how to disable it.
19-11-2014 04-50-06 PM.png
Thanks
Re: Server sending email to itself
Posted: Wed Nov 19, 2014 3:10 pm
by lmiltchev
This doesn't look like any typical ("default") XI notification, for example:
Code: Select all
***** Nagios XI Alert *****
Nagios has detected a problem with this host.
Notification Type: PROBLEM
Host: CentOS-NCPA
State: DOWN
Address: 192.168.x.x
Info: a
Date/Time: 2014-11-19 08:39:54
Do you have a service named "PostgreSQL Backup Log for PDS1131"? Does this email exist in your configs?
Code: Select all
grep -R root@PDS1131 /usr/local/nagios/etc/
Re: Server sending email to itself
Posted: Wed Nov 19, 2014 8:35 pm
by rajasegar
lmiltchev wrote:This doesn't look like any typical ("default") XI notification, for example:
Code: Select all
***** Nagios XI Alert *****
Nagios has detected a problem with this host.
Notification Type: PROBLEM
Host: CentOS-NCPA
State: DOWN
Address: 192.168.x.x
Info: a
Date/Time: 2014-11-19 08:39:54
Do you have a service named "PostgreSQL Backup Log for PDS1131"? Does this email exist in your configs?
Code: Select all
grep -R root@PDS1131 /usr/local/nagios/etc/
No service named PostgreSQL.
Code: Select all
grep -R root@PDS1131 /usr/local/nagios/etc/
Returned nothing.
Could this be the cron backup job?
Re: Server sending email to itself
Posted: Thu Nov 20, 2014 12:00 pm
by lmiltchev
Could this be the cron backup job?
It is possible. Or it could be a "custom" report... not sure.
What do you have in the cron.d directory?
Check what you have in these files.
You can check the root, apache, and postgres crontabs:
Code: Select all
crontab -l
crontab -u apache -l
crontab -u postgres -l
Re: Server sending email to itself
Posted: Thu Nov 20, 2014 6:04 pm
by rajasegar
lmiltchev wrote:Could this be the cron backup job?
It is possible. Or it could be a "custom" report... not sure.
What do you have in the cron.d directory?
Check what you have in these files.
You can check the root, apache, and postgres crontabs:
Code: Select all
crontab -l
crontab -u apache -l
crontab -u postgres -l
I did not configure any custom report on this server
Code: Select all
[nagios@PDS1131 ~]$ ls -l /etc/cron.d
total 20
-rw-r--r--. 1 root root 113 Sep 12 2013 0hourly
-rw-r--r--. 1 root root 139 Oct 3 2012 mrtg
-rw-r--r-- 1 root root 1488 Oct 16 10:00 nagiosxi
-rw-r--r--. 1 root root 108 Apr 7 2014 raid-check
-rw-r--r--. 1 root root 235 Sep 17 2013 sysstat
[nagios@PDS1131 ~]$ cat /etc/cron.d/nagiosxi
# /etc/cron.d/nagiosxi: crontab fragment for nagiosxi
# Backup MySQL & PostgreSQL Databases
0 7 * * * root /root/scripts/automysqlbackup
0 8 * * * root /root/scripts/autopostgresqlbackup
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php > /usr/local/nagiosxi/var/reportengine.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php > /usr/local/nagiosxi/var/dbmaint.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1
01 * * * * nagios /usr/local/nagiosxi/cron/recurringdowntime.pl > /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php > /usr/local/nagiosxi/var/deadpool.log 2>&1
Code: Select all
[nagios@PDS1131 ~]$ sudo crontab -l
no crontab for root
[nagios@PDS1131 ~]$ sudo crontab -u apache -l
#crontab for apache user
[nagios@PDS1131 ~]$ sudo crontab -u postgres -l
no crontab for postgres
Re: Server sending email to itself
Posted: Thu Nov 20, 2014 6:20 pm
by scottwilkerson
This is from the cron
/root/scripts/autopostgresqlbackup
Which performa a daily backup of the postgresql DB
Re: Server sending email to itself
Posted: Thu Nov 20, 2014 6:48 pm
by rajasegar
scottwilkerson wrote:This is from the cron
/root/scripts/autopostgresqlbackup
Which performa a daily backup of the postgresql DB
Thanks, changed the mail from log to stdout.