Join us on Discord! We now have an official Discord server for OpenFLIXR: https://discord.gg/PcCErTQ , these forums will continue to operate as normal.

[SOLVED] Noisy cron jobs filling mail spool

There's a few cron jobs that trigger emails as they produce output.
One is a daily logrotate issue with netdata, and the solution is to edit the netdata logrotate entry:
root@openflixr:/etc/logrotate.d# cat netdata
/opt/netdata/var/log/netdata/*.log {
        daily
        missingok
        rotate 14
        compress
        delaycompress
        notifempty
        sharedscripts
        #
        # if you add netdata to your init.d/system.d
        # comment su & copytruncate and uncomment postrotate
        # to have netdata restart when logs are rotated
        #su netdata
        #copytruncate
        #
        postrotate
                if service netdata status > /dev/null ; then \
                        service netdata restart > /dev/null; \
                fi;
        endscript
}
It's just a matter of adding two comments, and removing 5 comments.

Manual testing appears to be successful, I'll update here if it doesn't fix the problem.


Comments

  • edited September 2018
    Another noisy one is the pihole updateGravity entry for around 2am Sundays.
    I'm still trying to figure this one out as some of the github chatter on the pi-hole project indicate that this method is defunct, and it should have auto-updated to use a different script file.

    I'm going to open an issue on github and see if I can get clarity on what should be happening and how best to run it.
    Edit: Ref https://github.com/pi-hole/pi-hole/issues/2424
  • Finally getting somewhere on the PiHole cron job noise.

    Firstly, I was running a really old version of PiHole and it wouldn't update as the repo URL for the FTL component was out of date (v3.0 of FTL).  I used the repair option of pihole to update and fix it - it updated a lot of other components (python 2.7 for instance) so I'm not sure how safe it is - everything that I use is still working but your mileage may vary.
    Drop to an SSH window, and run the following command - then choose repair not reconfigure.
    sudo pihole -r
    Second, the PiHole people say they have had no other comments re cron emails but they can see that it's not ideal.  It still happens with the newer version and in fact it's worse as they use special characters to make fancy ticks and crosses which don't translate well into plain text.
    I'm planning to make some tweaks to their code and submit a fix but I need some time to test it all first.
  • Yes it broke stuff.
    Not too bad - just had to force reinstall of some python3 components:
    apt-get install --reinstall python3-cryptography

  • Fixed in 2.9

Sign In or Register to comment.