Giter Club home page Giter Club logo

salmon's Introduction

salmon

This project is unmaintained

My need for simple monitoring quickly became a need for more complex monitoring. I'm no longer using Salmon, as such, I'm no longer maintaining it. If you would like to continue developing Salmon, feel free to fork the repo and we can point this to your fork.


image

image

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.

image

image

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

  1. Setup the salt-stats states on your master or just grab the salmon returner
  2. Add the path to your Salmon install and API key (found in ~/.salmon/conf.py) to your Salt Pillar. (salmon pillar example)
  3. Add a schedule pillar. (schedule pillar example)
  4. 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.

salmon's People

Contributors

ipmb avatar yml avatar nicolaslara avatar supervacuo avatar gaker avatar reinbach avatar torhve avatar

Watchers

alessio avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.