Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Alerting Module to use with Grafana metrics.

Project Description

grafana-alerts Collects stats from a grafana server based on information available from the Grafana Dashboards. Then compare those values to an alert table and throws alert emails if the case is needed.


sudo pip install grafana-alerts

if you get an error, perhaps it is because the version available is a development version. In this case try with:

sudo pip install --pre grafana-alerts


Create a file /etc/grafana_alerts/grafana_alerts.cfg with:

# Grafana alerts configuration file.

# The URL where grafana server is listening. It must finish with the character '/' (default value: http://localhost:3130)
grafana_url =

# Grafana token with viewer access (default value: empty string)
grafana_token = qwertysDssdsfsfsdfSFsfsfEWrwrwERwrewrwrWeRwRwerWRwERwerWRwerweRwrEWrWErwerWeRwRwrewerr==

# email to use as alert sender (default value: grafana-alert@localhost)
email_from =

# smtp server to use (default value: localhost)
smtp_server = localhost

# smtp server host to use (default value: 25)
# if port is not 25, starts a tls session.
smtp_port = 25

# smtp server username to use if it is needed. Optional. Leave it commented if not used. (default value: no username)
#smtp_username = my_smtp_username

# smtp server password to use if it is needed. Optional. Leave it commented if not used. (default value: no password)
#smtp_password = my_smtp_password

Add a cron task to execute grafana_alerts for example each 3 minutes::

*/3 * * * *     grafana_alerts

Monitoring Dashboards

Dashboards to be monitored for alerts must be marked with the tag “monitored”

In each monitored Dashboard, add a text panel with title ‘alerts’ and a description of your alerts. For example::

50<=x<=100; normal;

35<x<50; warning;

x<=35; critical;,


  • values depend of the graph in that dashboard.
  • x is mandatory.

Here is an example:


Version 1.0.0.dev7:

Version 1.0.0.dev6:

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
grafana_alerts-1.0.0.dev7.tar.gz (12.7 kB) Copy SHA256 Checksum SHA256 Source Jul 27, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting