{ "info": { "author": "Pablo Alcaraz", "author_email": "pabloa98@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Operating System :: POSIX :: AIX", "Operating System :: POSIX :: BSD", "Operating System :: POSIX :: BSD :: BSD/OS", "Operating System :: POSIX :: BSD :: FreeBSD", "Operating System :: POSIX :: BSD :: NetBSD", "Operating System :: POSIX :: BSD :: OpenBSD", "Operating System :: POSIX :: GNU Hurd", "Operating System :: POSIX :: HP-UX", "Operating System :: POSIX :: IRIX", "Operating System :: POSIX :: Linux", "Operating System :: POSIX :: Other", "Operating System :: POSIX :: SunOS/Solaris", "Operating System :: Unix", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: Log Analysis", "Topic :: System :: Clustering", "Topic :: System :: Monitoring" ], "description": "Grafana Alert Module\n====================\n\ngrafana-alerts Collects stats from a grafana server based on information available\nfrom the Grafana Dashboards. Then compare those values to an alert table and\nthrows alert emails if the case is needed.\n\nSites\n-----\n\nInstallation package: https://pypi.python.org/pypi/grafana_alerts\n\nProject Home: https://github.com/pabloa/grafana-alerts\n\nIssues and bugs: https://github.com/pabloa/grafana-alerts/issues\n\n\nInstallation\n------------\n::\n\n sudo pip install grafana-alerts\n\nif you get an error, perhaps it is because the version available is a development\nversion. In this case try with::\n\n sudo pip install --pre grafana-alerts\n\n\n\nConfiguration\n-------------\n\nCreate a file /etc/grafana_alerts/grafana_alerts.cfg\nwith::\n\n #\n # Grafana alerts configuration file.\n #\n\n # The URL where grafana server is listening. It must finish with the character '/' (default value: http://localhost:3130)\n grafana_url = http://yourgrafanaserver.com/grafana/\n\n # Grafana token with viewer access (default value: empty string)\n grafana_token = qwertysDssdsfsfsdfSFsfsfEWrwrwERwrewrwrWeRwRwerWRwERwerWRwerweRwrEWrWErwerWeRwRwrewerr==\n\n # email to use as alert sender (default value: grafana-alert@localhost)\n email_from = alert@example.com\n\n # smtp server to use (default value: localhost)\n smtp_server = localhost\n\n # smtp server host to use (default value: 25)\n # if port is not 25, starts a tls session.\n smtp_port = 25\n\n # smtp server username to use if it is needed. Optional. Leave it commented if not used. (default value: no username)\n #smtp_username = my_smtp_username\n\n # smtp server password to use if it is needed. Optional. Leave it commented if not used. (default value: no password)\n #smtp_password = my_smtp_password\n\n\nAdd a cron task to execute grafana_alerts for example each 3 minutes:::\n\n */3 * * * * grafana_alerts\n\n\nMonitoring Dashboards\n---------------------\n\nDashboards to be monitored for alerts must be marked with the tag \"monitored\"\n\nIn each monitored Dashboard, add a text panel with title 'alerts' and a description of your alerts. For example:::\n\n 50<=x<=100; normal; server@example.com\n\n 35