We have an issue on our CentOS servers that has recently reared it’s head. Nagios/NRPE is logging excessively to the root user at the system level via system mail. We use postfix on our servers, not the default sendmail. When sendmail is not enabled we are seeing millions of messages queue in /var/spool/clientmqueue, which is running the server storage out of inodes. Our configuration is to enable postfix to allow our the installed KANA applications to be able to mail. We cannot have both services running because of the mail server binding to port 25. Can you advise us how we can either turn off the excessive chatter generated by Nagios/NRPE or tell it to use postfix? With postfix enabled log rotate will automagically clean up the log files in /var/log. Below are some example emails.
/bin/sh: /usr/local/nagiosxi/var/perfdataproc.log: No such file or directory
---------------------------------------------------
V8
T1427428381
K1427428381
N1
P30551
MDeferred: Connection refused by [127.0.0.1]
Fbs
$_nagios@localhost
${daemon_flags}c u
Sroot
MDeferred: Connection refused by [127.0.0.1]
C:nagios
rRFC822; [email protected]
RPFD:nagios
H?P?Return-Path: <<81>g>
H??Received: (from nagios@localhost)
by localhost.localdomain (8.14.4/8.14.4/Submit) id t2R3r1LT029732;
Fri, 27 Mar 2015 03:53:01 GMT
H?D?Date: Fri, 27 Mar 2015 03:53:01 GMT
H?x?Full-Name: CronDaemon
H?M?Message-Id: <[email protected]>
H??X-Authentication-Warning: localhost.localdomain: nagios set sender to root using -f
H??From: root (Cron Daemon)
H??To: nagios
H??Subject: Cron <nagios@kesureapp06> /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
H??Content-Type: text/plain; charset=UTF-8
H??Auto-Submitted: auto-generated
H??X-Cron-Env: <JAVA_HOME=/opt/java/jdk1.7.0_67>
H??X-Cron-Env: <LANG=en_US.UTF-8>
H??X-Cron-Env: <SHELL=/bin/sh>
H??X-Cron-Env: <HOME=/home/nagios>
H??X-Cron-Env: <PATH=/usr/bin:/bin>
H??X-Cron-Env: <LOGNAME=nagios>
H??X-Cron-Env: <USER=nagios>
NRPE logging system mail
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: NRPE logging system mail
This looks to me like it's just the standard cron job E-mails.
To make them go away replace at the end of your cron job with
To make them go away replace
Code: Select all
2>&1Code: Select all
> /dev/null 2>&1Re: NRPE logging system mail
Thanks,
We got this from support as well
"You can either uninstall sendmail or use the process below:
alternatives --config mta
Type the number 2 and hit enter
That will change the default system MTA to be postfix.
Thank you,
Sean Sax
Nagios Support Team"
We got this from support as well
"You can either uninstall sendmail or use the process below:
alternatives --config mta
Type the number 2 and hit enter
That will change the default system MTA to be postfix.
Thank you,
Sean Sax
Nagios Support Team"
Re: NRPE logging system mail
Are you still having the problem or are we ok to mark this as resolved and lock this topic?
Re: NRPE logging system mail
Its resolved now, thanks