Server sending email to itself

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Server sending email to itself

Post 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
You do not have the required permissions to view the files attached to this post.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Server sending email to itself

Post 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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Server sending email to itself

Post 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?
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Server sending email to itself

Post 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?

Code: Select all

ls -l /etc/cron.d
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
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Server sending email to itself

Post 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?

Code: Select all

ls -l /etc/cron.d
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

5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Server sending email to itself

Post by scottwilkerson »

This is from the cron
/root/scripts/autopostgresqlbackup

Which performa a daily backup of the postgresql DB
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Server sending email to itself

Post 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.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
Locked