0

I have recently taken the time to look into munin and fix some of the plugins that wore not working. Among them yum.

Now for the last few days there have been a few updates released for my centos and munin notified me but it kept sending the same email every 5 minutes.

I have been googling into the settings of munin but have not been able to find something that will prevent it from spamming me with emails.

At this point I am presuming that perhaps there is none.

Can anyone provide me with some hints as to how I could achieve this.

My config.

contact.me.command mail -s "Munin notification ${var:host}" root@example.com
contact.me.always_send warning critical

Email sample:

Date: Sat, 21 Jun 2014 15:35:23 +0100
To: root@example.com
Subject: Munin notification server.example.com
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20140621143523.849D72A0EE1@server.example.com>
From: munin@server.example.com (Munin user)

example.com :: server.example.com :: Pending packages
    WARNINGs: pending is 2.00 (outside range [0:0]): tzdata tzdata-java.
transilvlad
  • 173
  • 14
  • 1
    Helping without knowing your conf is like reading the glass sphere. Please provide more info. – deagh Jun 21 '14 at 14:47
  • (not enough reputation for a comment)

    You are sure the Mail is send by Munin ?
    It is possible that the Mail was send by Cron ?
    Have a look at http://www.cyberciti.biz/faq/linux-unix-crontab-change-mailto-settings/
    – CookieCrash Jun 21 '14 at 15:02

1 Answers1

1

You have configured munin to send you an email every time there is a WARNING or CRITICAL state to report, and it is doing so.

Munin is a great tool in many ways, but its notification engine isn't particularly sophisticated. Its only rate-limiting command, contact.contact.max_messages, limits the number of notifications that can be sent through a single invocation of the contact command, and is thus intended for rate-limiting to applications not recipients.

If you don't want to receive one email for each non-continuously-OK condition every five minutes, you need to put some kind of rate-limiting tool in front of munin. We don't do product recommendations here, but I can tell you that I always have my munin report into NAGIOS. That does have a fairly sophisticated notification engine, which implements rate-limiting and the concept of ACKNOWLEDGMENT, both of which can reduce re-notifications of existing conditions. How to configure NAGIOS is way beyond the scope of this (or - because you can write a book about it - any other) SF answer, but perhaps you'll find that a useful pointer.

MadHatter
  • 79,770
  • 20
  • 184
  • 232