Simple alerting system for Graphite metrics.
Project description
Home-page: http://github.com/klen/graphite-beacon
Author: Kirill Klenov
Author-email: horneds@gmail.com
License: MIT
Description: graphite-beacon
===============

Simple alerting system for [Graphite](http://graphite.wikidot.com/) metrics.
Features:
- Simple installation
- No software dependencies (Databases, AMQP and etc)
- Light and fully asynchronous
- SMTP, HipChat, Slack, PagerDuty, HTTP handlers (PRs for additional handlers are welcome!)
- Easily configurable and supports historical values
[](http://travis-ci.org/klen/graphite-beacon)
[](https://coveralls.io/r/klen/graphite-beacon)
[](https://pypi.python.org/pypi/graphite_beacon)
[](https://pypi.python.org/pypi/graphite_beacon)
[](https://pypi.python.org/pypi/graphite_beacon)
Example:
```js
{
"graphite_url": "http://g.server.org",
"smtp": {
"from": "beacon@server.org",
"to": ["me@gmail.com"]
},
"alerts": [
{ "name": "MEM",
"format": "bytes",
"query": "aliasByNode(sumSeriesWithWildcards(collectd.*.memory.{memory-free,memory-cached}, 3), 1)",
"rules": ["critical: < 200MB", "warning: < 400MB", "warning: < historical / 2"] },
{ "name": "CPU",
"format": "percent",
"query": "aliasByNode(sumSeriesWithWildcards(collectd.*.cpu-*.cpu-user, 2), 1)",
"rules": ["critical: >= 80%", "warning: >= 70%"] }
]}
```
Requirements
------------
- python (2.7, 3.3, 3.4)
- tornado
- funcparserlib
- pyyaml
Installation
------------
### Python package
**graphite-beacon** can be installed using pip:
pip install graphite-beacon
### Debian package
Using the command line, add the following to your /etc/apt/sources.list system config file:
echo "deb http://dl.bintray.com/klen/deb /" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://dl.bintray.com/klen/deb /" | sudo tee -a /etc/apt/sources.list
Install the package using apt-get:
apt-get update
apt-get install graphite-beacon
### Ansible role
There is an ansible role to install the package: https://github.com/Stouts/Stouts.graphite-beacon
## Docker
Build a config.json file and run :
docker run -v /path/to/config.json:/srv/alerting/etc/config.json deliverous/graphite-beacon
Usage
-----
Just run `graphite-beacon`:
graphite-beacon --help
Usage: graphite-beacon [OPTIONS]
Options:
--config Path to an configuration file (JSON/YAML)
(default config.json)
--graphite_url Graphite URL (default http://localhost)
--help show this help information
--pidfile Set pid file
--log_file_max_size max size of log files before rollover
(default 100000000)
--log_file_num_backups number of log files to keep (default 10)
--log_file_prefix=PATH Path prefix for log files. Note that if you
are running multiple tornado processes,
log_file_prefix must be different for each
of them (e.g. include the port number)
--log_to_stderr Send log output to stderr (colorized if
possible). By default use stderr if
--log_file_prefix is not set and no other
logging is configured.
--logging=debug|info|warning|error|none
Set the Python log level. If 'none', tornado
won't touch the logging configuration.
(default info)
```
Bug tracker
-----------
If you have any suggestions, bug reports or annoyances please report them to
the issue tracker at https://github.com/klen/graphite-beacon/issues
Contributors
-------------
* Andrej Kuročenko (https://github.com/kurochenko)
* Cody Soyland (https://github.com/codysoyland)
* Garrett Heel (https://github.com/GarrettHeel)
* George Ionita (https://github.com/georgeionita)
* James Yuzawa (https://github.com/yuzawa-san)
* Kirill Klenov (https://github.com/klen)
* Konstantin Bakulin (https://github.com/kbakulin)
* Lammert Hellinga (https://github.com/Kogelvis)
* Miguel Moll (https://github.com/MiguelMoll)
* Nick Pillitteri (https://github.com/56quarters)
* Niku Toivola (https://github.com/nikut)
* Olli-Pekka Puolitaival (https://github.com/OPpuolitaival)
* Phillip Hagedorn (https://github.com/phagedorn)
* Raine Virta (https://github.com/raine)
* Scott Nonnenberg (https://github.com/scottnonnenberg)
* Sean Johnson (https://github.com/pirogoeth)
* Terry Peng (https://github.com/tpeng)
* Thomas Clavier (https://github.com/tclavier)
* Yuriy Ilyin (https://github.com/YuriyIlyin)
* dugeem (https://github.com/dugeem)
* Joakim (https://github.com/VibyJocke)
License
--------
Licensed under a [MIT license](http://www.linfo.org/mitlicense.html)
If you wish to express your appreciation for the role, you are welcome to send
a postcard to:
Kirill Klenov
pos. Severny 8-3
MO, Istra, 143500
Russia
Keywords: graphite,alerts,monitoring,system
Platform: Any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Natural Language :: Russian
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
Author: Kirill Klenov
Author-email: horneds@gmail.com
License: MIT
Description: graphite-beacon
===============

Simple alerting system for [Graphite](http://graphite.wikidot.com/) metrics.
Features:
- Simple installation
- No software dependencies (Databases, AMQP and etc)
- Light and fully asynchronous
- SMTP, HipChat, Slack, PagerDuty, HTTP handlers (PRs for additional handlers are welcome!)
- Easily configurable and supports historical values
[](http://travis-ci.org/klen/graphite-beacon)
[](https://coveralls.io/r/klen/graphite-beacon)
[](https://pypi.python.org/pypi/graphite_beacon)
[](https://pypi.python.org/pypi/graphite_beacon)
[](https://pypi.python.org/pypi/graphite_beacon)
Example:
```js
{
"graphite_url": "http://g.server.org",
"smtp": {
"from": "beacon@server.org",
"to": ["me@gmail.com"]
},
"alerts": [
{ "name": "MEM",
"format": "bytes",
"query": "aliasByNode(sumSeriesWithWildcards(collectd.*.memory.{memory-free,memory-cached}, 3), 1)",
"rules": ["critical: < 200MB", "warning: < 400MB", "warning: < historical / 2"] },
{ "name": "CPU",
"format": "percent",
"query": "aliasByNode(sumSeriesWithWildcards(collectd.*.cpu-*.cpu-user, 2), 1)",
"rules": ["critical: >= 80%", "warning: >= 70%"] }
]}
```
Requirements
------------
- python (2.7, 3.3, 3.4)
- tornado
- funcparserlib
- pyyaml
Installation
------------
### Python package
**graphite-beacon** can be installed using pip:
pip install graphite-beacon
### Debian package
Using the command line, add the following to your /etc/apt/sources.list system config file:
echo "deb http://dl.bintray.com/klen/deb /" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://dl.bintray.com/klen/deb /" | sudo tee -a /etc/apt/sources.list
Install the package using apt-get:
apt-get update
apt-get install graphite-beacon
### Ansible role
There is an ansible role to install the package: https://github.com/Stouts/Stouts.graphite-beacon
## Docker
Build a config.json file and run :
docker run -v /path/to/config.json:/srv/alerting/etc/config.json deliverous/graphite-beacon
Usage
-----
Just run `graphite-beacon`:
Usage: graphite-beacon [OPTIONS]
Options:
--config Path to an configuration file (JSON/YAML)
(default config.json)
--graphite_url Graphite URL (default http://localhost)
--help show this help information
--pidfile Set pid file
--log_file_max_size max size of log files before rollover
(default 100000000)
--log_file_num_backups number of log files to keep (default 10)
--log_file_prefix=PATH Path prefix for log files. Note that if you
are running multiple tornado processes,
log_file_prefix must be different for each
of them (e.g. include the port number)
--log_to_stderr Send log output to stderr (colorized if
possible). By default use stderr if
--log_file_prefix is not set and no other
logging is configured.
--logging=debug|info|warning|error|none
Set the Python log level. If 'none', tornado
won't touch the logging configuration.
(default info)
```
Bug tracker
-----------
If you have any suggestions, bug reports or annoyances please report them to
the issue tracker at https://github.com/klen/graphite-beacon/issues
Contributors
-------------
* Andrej Kuročenko (https://github.com/kurochenko)
* Cody Soyland (https://github.com/codysoyland)
* Garrett Heel (https://github.com/GarrettHeel)
* George Ionita (https://github.com/georgeionita)
* James Yuzawa (https://github.com/yuzawa-san)
* Kirill Klenov (https://github.com/klen)
* Konstantin Bakulin (https://github.com/kbakulin)
* Lammert Hellinga (https://github.com/Kogelvis)
* Miguel Moll (https://github.com/MiguelMoll)
* Nick Pillitteri (https://github.com/56quarters)
* Niku Toivola (https://github.com/nikut)
* Olli-Pekka Puolitaival (https://github.com/OPpuolitaival)
* Phillip Hagedorn (https://github.com/phagedorn)
* Raine Virta (https://github.com/raine)
* Scott Nonnenberg (https://github.com/scottnonnenberg)
* Sean Johnson (https://github.com/pirogoeth)
* Terry Peng (https://github.com/tpeng)
* Thomas Clavier (https://github.com/tclavier)
* Yuriy Ilyin (https://github.com/YuriyIlyin)
* dugeem (https://github.com/dugeem)
* Joakim (https://github.com/VibyJocke)
License
--------
Licensed under a [MIT license](http://www.linfo.org/mitlicense.html)
If you wish to express your appreciation for the role, you are welcome to send
a postcard to:
Kirill Klenov
pos. Severny 8-3
MO, Istra, 143500
Russia
Keywords: graphite,alerts,monitoring,system
Platform: Any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Natural Language :: Russian
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities