A simple metric collector with alerts.
Project description
A simple monitoring system built on top of Django.
The intent is to serve both as an alerting system like monit and a monitoring system like munin (using Graphite’s whisper database).
The original release of Salmon was coupled to Salt and designed to monitor servers (Sal t Mon itor). As of v0.2.0, the system has been decoupled from Salt and ingests data via a simple HTTP interface.
Installation
To bootstrap the project:
virtualenv salmon source salmon/bin/activate pip install salmon salmon init salmon upgrade salmon collectstatic
Fire up the web server with:
salmon start
Sending Metrics to Salmon
Metrics are sent in as JSON over HTTP. The format for a single metric:
{ "source": "test.example.com", "name": "load", "value": 0.1 }
Multiple metrics can be sent as an array:
[ {"source": "test.example.com", "name": "load", "value": 0.1}, {"source": "multi.example.com", "name": "cpu", "value": 55.5} ]
The API endpoint is /api/v1/metric/. If your Salmon server lives at http://salmon.example.com, you can POST to http://salmon.example.com/api/v1/metric/. Pass in your API key as found in ~/.salmon/conf.py for authentication. Using Curl, it would look something like this:
curl -i --user "<API_KEY>:" \ -H "Content-Type: application/json" \ -X POST \ -d '{"source": "test.example.com", "name": "load", "value": 0.1}' \ http://salmon.example.com/api/v1/metric/
Using Salt
Setup the salt-stats states on your master or just grab the salmon returner
Add the path to your Salmon install and API key (found in ~/.salmon/conf.py) to your Salt Pillar. (salmon pillar example)
Add a schedule pillar. (schedule pillar example)
Run salt '*' saltutil.sync_all
Note: To use Salt’s ps module, psutil must be installed on the minions. Ubuntu provides a python-psutil package or it can be installed via pip install psutil.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for salmon-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a05441d1bbadcb8c8fe7a187938ade63f8b734e01407d01e3148540d89daf361 |
|
MD5 | 91a48f725a391f6cf3992d510db59769 |
|
BLAKE2b-256 | bcda33ded11ce3f48c2dc8286866b2dd4f8d1fcb218d3fe7570adacddfd1156d |