Skip to content

othermedia/munin-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Munin-Notify

by Other Media

Overview

Send Munin notifications to email, HipChat and Slack!

Pull requests are welcome for fixes, tweaks or additional targets.!

Usage

  1. Install PyYAML (yum install PyYAML / apt install python-yaml / pip install pyyaml)

  2. Install mutt (yum install mutt / apt install mutt)

  3. Save munin-notify.py to /etc/munin

  4. Chmod munin-notify.py to 0755

  5. Add the following to /etc/munin/munin.conf:

     contact.alerts.text ${var:group} / ${var:host} / ${var:graph_category} / ${var:graph_title}\n\
     ${loop<\n>:wfields  WARNING / ${var:label} / ${var:value} / ${var:wrange} / ${var:extinfo}}\n\
     ${loop<\n>:cfields  CRITICAL / ${var:label} / ${var:value} / ${var:crange} / ${var:extinfo}}\n\
     ${loop<\n>:ufields  UNKNOWN / ${var:label} / ${var:value} / - / ${var:extinfo}}\n\
     ${loop<\n>:fofields  FIXED / ${var:label} / ${var:value} / - / ${var:extinfo}}\n
    
     contact.alerts.command /etc/munin/munin-notify.py --log-file /var/log/munin/munin-notify.log
    
  6. Configure your alert targets in /etc/munin/munin-notify.yml

     targets:
       - type: email
         recipients: [ [email protected] ]
       - type: hipchat
         room: 123456
         token: abcdef0123456789abcdef0123456789
       - type: slack
         channel: '#general'
         webhook_url: http://slack/webhook/url
    

Known Munin Issues

There are several known issues with Munin's alerting. It's recommended that you apply the following patches to your Munin installation if necessary to ensure that alerting is accurate.

  1. 'FIXED' notifications do not work correctly (fixed in future Munin 2.0.26 - patch available at munin-monitoring/munin#334)
  2. Inherited alert thresholds do not produce alerts (fixed in future Munin 2.0.26 - patch available at munin-monitoring/munin#362)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages