E-mail alerts from munin for network bandwidth usage
I’m a big fan of munin for monitoring your linux server. It’s quick and easy to install and produces some nice graphs.
I run some OpenVZ servers and wanted to get munin to alert me if there was a sudden spike in my bandwidth throughput.
There are some instructions here for setting up alerts from munin but I couldn’t get it to work for the “if_” plugin that is used to generate the bandwidth graphs.
Turns out that plugin doesn’t produce warnings as standard. Here’s a quick and easy solution that works for me (although there are some pitfalls – such as the fact that you’re setting a generic setting for all interfaces)
On the machine running ‘munin-node’ edit the file /usr/share/munin/plugins/if_ (the location may vary)
and add this line with all the other echo statements -
It’s in bits per second so that should set it to 1MB/s
Now on the machine running ‘munin’ (could be the same machine) edit the file /etc/munin/munin.conf and somewhere near the top add the lines -
contact.me.command mail -s "Munin notification ${var:host}" user@example.com
contact.me.always_send warning
And that should be it. Give it 5 minutes and see if you get an alert (might be worth setting the warning level to less than 1MB/s to test!)
Last updated by .
Related posts:
- Monitoring a VPS with munin
- Calculating bandwidth for Asterisk calls
- Backing up a VPS with duplicity?
Avaialble systems include FreePBX, PBX-in-a-Flash, Elastix, A2Billing and FusionPBX.
More details and prices can be found at sysadminman.net

Leave a comment