Page 1 of 1
Postfix mailbox too large
Posted: Tue Nov 06, 2018 8:30 am
by ahoward12
Hey Gents, on my development Nagios XI box I stopped receiving test alerts. This is not a big deal so I want to understand a solution in the event the same thing happens on my Prod box. I stopped receiving alerts because my postfix mailbox went past the default 5mb file size. I realize I can just change the default size which I did just to humor the solution. That being said, why is the is this mailbox so large compared to my prod-xi box, and what is the long term solution because as we all know throwing more space is not it? Look below, at the examples but I have left my prod box at defaults for years with no issues.
Nagios XI - Prod
Code: Select all
[root@NAGIOS mail]# ll
total 3280
-rw-rw---- 1 Administrator mail 0 Jul 13 2017 Administrator
-rw-rw---- 1 nagios mail 3433 Jan 13 2017 nagios
-rw------- 1 root mail 3350052 Nov 6 07:00 root
Nagios XI Dev
Code: Select all
[root@nagios-dev mail]# ll
total 172324
-rw-rw----. 1 administrator mail 0 Jul 10 03:28 administrator
-rw-rw----. 1 nagios mail 21242 Jul 18 12:14 nagios
-rw-------. 1 root mail 176427431 Nov 6 08:10 root
-rw-rw----. 1 rpc mail 0 Jul 9 12:05 rpc
Nagios XI
5.5.1
Dell Poweredge Physical R210 II
Flash Storage
Re: Postfix mailbox too large
Posted: Tue Nov 06, 2018 4:19 pm
by cdienger
First thing I would do is run the "mail" command on both machines and see what kind of messages each machine is receiving. The configs may differ and it could be host or service check or something else configured on the dev machine sending mail to the root account.
Re: Postfix mailbox too large
Posted: Fri Nov 09, 2018 4:01 pm
by ahoward12
I ran the mail command, excuse my ignorance but I don't really know what I am looking at..Would you mind explaining?
Here are some results from Nagios XI Prod:
Code: Select all
Heirloom Mail version 12.4 7/29/08. Type ? for help.
"/var/spool/mail/root": 1065 messages 244 new 1065 unread
U813 Cron Daemon Thu Jul 5 07:00 90/4323 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
U814 Anacron Fri Jul 6 03:07 23/877 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
U815 Cron Daemon Fri Jul 6 07:00 90/4293 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
U816 Anacron Sat Jul 7 03:23 23/877 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
U817 Cron Daemon Sat Jul 7 07:00 90/4318 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
U818 Anacron Mon Jul 9 09:30 23/877 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
U819 Cron Daemon Mon Jul 9 23:53 23/789 "Cron <root@NAGIOS> /usr/lib64/sa/sa2 -A"
U820 Anacron Tue Jul 10 03:40 23/877 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
U821 Cron Daemon Tue Jul 10 07:00 90/4310 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
>N822 Anacron Wed Jul 11 03:36 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N823 Cron Daemon Wed Jul 11 07:00 89/4330 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N824 Anacron Thu Jul 12 03:39 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N825 Cron Daemon Thu Jul 12 07:00 89/4317 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N826 Anacron Fri Jul 13 03:32 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N827 Cron Daemon Fri Jul 13 07:00 89/4287 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N828 Anacron Sat Jul 14 03:16 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N829 Cron Daemon Sat Jul 14 07:00 89/4310 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N830 Anacron Sun Jul 15 03:12 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N831 Cron Daemon Sun Jul 15 07:00 89/4285 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N832 Anacron Mon Jul 16 03:47 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N833 Cron Daemon Mon Jul 16 07:00 89/4285 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N834 Anacron Tue Jul 17 03:32 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N835 Cron Daemon Tue Jul 17 07:00 89/4300 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N836 Anacron Wed Jul 18 03:24 22/869 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N837 Cron Daemon Wed Jul 18 07:00 89/4330 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N838 Anacron Thu Jul 19 03:49 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N839 Cron Daemon Thu Jul 19 07:00 89/4315 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N840 Anacron Fri Jul 20 03:29 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N841 Cron Daemon Fri Jul 20 07:00 89/4285 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N842 Anacron Sat Jul 21 03:20 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N843 Cron Daemon Sat Jul 21 07:00 89/4310 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N844 Anacron Sun Jul 22 03:09 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N845 Cron Daemon Sun Jul 22 07:00 89/4285 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N846 Anacron Mon Jul 23 03:42 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N847 Cron Daemon Mon Jul 23 07:00 89/4285 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N848 Anacron Tue Jul 24 03:26 22/867 "Anacron job 'cron.daily' on NAGIOS.cafaroco.com"
N849 Cron Daemon Tue Jul 24 07:00 89/4300 "Cron <root@NAGIOS> /root/scripts/automysqlbackup"
N850 Cron Daemon Tue Jul 24 16:15 829/93407 "Cron <root@NAGIOS> LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg"
Here are some the results from my Nagios XI Dev:
Code: Select all
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/root": 2542 messages 2542 new
>N 1 Anacron Wed Jul 18 03:24 20/1440 "Anacron job 'cron.daily' on raptor-nagios"
N 2 (Cron Daemon) Wed Jul 18 07:00 82/3849 "Cron <root@raptor-nagios> /root/scripts/automysqlbackup"
N 3 (Cron Daemon) Wed Jul 18 12:15 968/109043 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 4 (Cron Daemon) Wed Jul 18 12:20 968/109043 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 5 (Cron Daemon) Wed Jul 18 12:25 968/109043 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 6 (Cron Daemon) Wed Jul 18 12:30 968/109043 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 7 (Cron Daemon) Wed Jul 18 12:40 968/109047 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 8 (Cron Daemon) Wed Jul 18 12:45 968/109027 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 9 (Cron Daemon) Wed Jul 18 12:50 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 10 (Cron Daemon) Wed Jul 18 12:55 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 11 (Cron Daemon) Wed Jul 18 13:00 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 12 (Cron Daemon) Wed Jul 18 13:05 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 13 (Cron Daemon) Wed Jul 18 13:10 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 14 (Cron Daemon) Wed Jul 18 13:15 968/109028 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 15 (Cron Daemon) Wed Jul 18 13:20 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 16 (Cron Daemon) Wed Jul 18 13:25 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 17 (Cron Daemon) Wed Jul 18 13:30 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 18 (Cron Daemon) Wed Jul 18 13:35 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 19 (Cron Daemon) Wed Jul 18 13:40 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 20 (Cron Daemon) Wed Jul 18 13:45 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 21 (Cron Daemon) Wed Jul 18 13:50 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 22 (Cron Daemon) Wed Jul 18 13:55 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 23 (Cron Daemon) Wed Jul 18 14:00 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 24 (Cron Daemon) Wed Jul 18 14:05 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 25 (Cron Daemon) Wed Jul 18 14:10 968/109048 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 26 (Cron Daemon) Wed Jul 18 14:15 968/109029 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 27 (Cron Daemon) Wed Jul 18 14:20 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 28 (Cron Daemon) Wed Jul 18 14:25 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 29 (Cron Daemon) Wed Jul 18 14:30 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 30 (Cron Daemon) Wed Jul 18 14:35 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 31 (Cron Daemon) Wed Jul 18 14:40 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 32 (Cron Daemon) Wed Jul 18 14:45 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 33 (Cron Daemon) Wed Jul 18 14:50 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 34 (Cron Daemon) Wed Jul 18 14:55 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 35 (Cron Daemon) Wed Jul 18 15:00 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 36 (Cron Daemon) Wed Jul 18 15:05 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 37 (Cron Daemon) Wed Jul 18 15:10 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 38 (Cron Daemon) Wed Jul 18 15:15 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 39 (Cron Daemon) Wed Jul 18 15:20 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 40 (Cron Daemon) Wed Jul 18 15:25 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 41 (Cron Daemon) Wed Jul 18 15:30 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 42 (Cron Daemon) Wed Jul 18 15:35 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 43 (Cron Daemon) Wed Jul 18 15:40 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 44 (Cron Daemon) Wed Jul 18 15:45 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 45 (Cron Daemon) Wed Jul 18 15:50 968/109029 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 46 (Cron Daemon) Wed Jul 18 15:55 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 47 (Cron Daemon) Wed Jul 18 16:00 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 48 (Cron Daemon) Wed Jul 18 16:05 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 49 (Cron Daemon) Wed Jul 18 16:10 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 50 (Cron Daemon) Wed Jul 18 16:15 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 51 (Cron Daemon) Wed Jul 18 16:20 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 52 (Cron Daemon) Wed Jul 18 16:25 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 53 (Cron Daemon) Wed Jul 18 16:30 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 54 (Cron Daemon) Wed Jul 18 16:35 968/109049 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 55 (Cron Daemon) Wed Jul 18 16:40 961/108392 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
N 56 (Cron Daemon) Wed Jul 18 16:45 961/108392 "Cron <root@raptor-nagios> LANG=C LC_ALL=C /usr/bin/mrtg /"
Re: Postfix mailbox too large
Posted: Fri Nov 09, 2018 4:22 pm
by cdienger
We were just looking for the types of emails that each machine is receiving. Based on the output provided, the dev box looks to have problems with the mrtg config. Follow
https://support.nagios.com/forum/viewto ... =6&t=35354 for steps to disable the mails as well as check the mrtg config.
Re: Postfix mailbox too large
Posted: Mon Nov 12, 2018 2:10 pm
by ahoward12
Thanks for that reference. I was doing a quick read through and ran it to the last post about checking the mrtg.cfg and when I check mine I get this output. I cannot find any reference to the 10.10.99.1 address anywhere.
Code: Select all
[root@raptor-nagios ~]# LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
SNMPGET Problem for ifHCInOctets.210 ifHCOutOctets.210 on [email protected]:161::::2:v4only: No response from remote host "10.10.99.1" at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 594.
Net_SNMP_util::snmpget('[email protected]:161::::2:v4only', 'HASH(0x1fed5c8)', 'ifHCInOctets.210', 'ifHCOutOctets.210') called at /usr/bin/mrtg line 2330
main::getsnmparg('HASH(0x15b71e8)', 'HASH(0x1fee1b0)', 'HASH(0x14a0ca8)', 'HASH(0x1944ae8)') called at /usr/bin/mrtg line 2510
main::readtargets('HASH(0x15b71e8)', 'ARRAY(0x1638270)', 'HASH(0x14a0ca8)') called at /usr/bin/mrtg line 403
main::main called at /usr/bin/mrtg line 143
2018-11-12 14:03:00: WARNING: skipping because at least the query for ifHCInOctets.210 on 10.10.99.1 did not succeed
2018-11-12 14:03:00: WARNING: no data for ifHCInOctets&ifHCOutOctets:[email protected]. Skipping further queries for Host 10.10.99.1 in this round.
SNMPGET Problem for ifInOctets.395 ifOutOctets.395 on [email protected]:161::::2:v4only: No response from remote host "10.10.99.1" at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 594.
Net_SNMP_util::snmpget('[email protected]:161::::2:v4only', 'HASH(0x20a0f68)', 'ifInOctets.395', 'ifOutOctets.395') called at /usr/bin/mrtg line 2330
main::getsnmparg('HASH(0x15b71e8)', 'HASH(0x20a4ac8)', 'HASH(0x14a0ca8)', 'HASH(0x1944ae8)') called at /usr/bin/mrtg line 2510
main::readtargets('HASH(0x15b71e8)', 'ARRAY(0x1638270)', 'HASH(0x14a0ca8)') called at /usr/bin/mrtg line 403
main::main called at /usr/bin/mrtg line 143
2018-11-12 14:03:00: WARNING: skipping because at least the query for ifInOctets.395 on 10.10.99.1 did not succeed
2018-11-12 14:03:00: WARNING: no data for ifInOctets&ifOutOctets:[email protected]. Skipping further queries for Host 10.10.99.1 in this round.
SNMPGET Problem for ifHCInOctets.1 ifHCOutOctets.1 on [email protected]:161::::2:v4only: No response from remote host "10.10.99.1" at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 594.
Net_SNMP_util::snmpget('[email protected]:161::::2:v4only', 'HASH(0x1f4b478)', 'ifHCInOctets.1', 'ifHCOutOctets.1') called at /usr/bin/mrtg line 2330
main::getsnmparg('HASH(0x15b71e8)', 'HASH(0x1f4c060)', 'HASH(0x14a0ca8)', 'HASH(0x1944ae8)') called at /usr/bin/mrtg line 2510
main::readtargets('HASH(0x15b71e8)', 'ARRAY(0x1638270)', 'HASH(0x14a0ca8)') called at /usr/bin/mrtg line 403
main::main called at /usr/bin/mrtg line 143
2018-11-12 14:03:00: WARNING: skipping because at least the query for ifHCInOctets.1 on 10.10.99.1 did not succeed
2018-11-12 14:03:00: WARNING: no data for ifHCInOctets&ifHCOutOctets:[email protected]. Skipping further queries for Host 10.10.99.1 in this round.
2018-11-12 14:03:11: ERROR: Target[10.10.99.1_1][_IN_] ' $target->[199]{$mode} ' did not eval into defined data
2018-11-12 14:03:11: ERROR: Target[10.10.99.1_1][_OUT_] ' $target->[199]{$mode} ' did not eval into defined data
Re: Postfix mailbox too large
Posted: Mon Nov 12, 2018 4:07 pm
by tgriep
That IP address would be in one of the MRTG config files and if you go to this folder on the server
And grep for that IP address
grep 10.10.99.1 *
It should show you which file it is in and you can edit it and remove the 10.10.99.1_1 entry.
If that device does not exist on your network, you can delete the config file from the system and the MRTG process will stop checking it.
Re: Postfix mailbox too large
Posted: Fri Nov 16, 2018 8:27 am
by ahoward12
Thank you for the fix. Deleted the corresponding file with the 10.10.99.1 address and all is well. Checked my mail file and it is down to regular size.
Thread can be closed.