GithubHelp home page GithubHelp logo

dodemansknop's Introduction

Dodemansknop

Rust Build & Test

"Dodemansknop" is ๐Ÿ‡ณ๐Ÿ‡ฑ Dutch ๐Ÿ‡ณ๐Ÿ‡ฑ for "dead man's switch". It is a simple tool to implement such a dead man's switch in your infrastructure with common tools like Prometheus and Alertmanager.

Supported alerting targets

Currently, this supports the following alerting targets:

  • Generic Webhooks
  • Slack

Support for other targets is planned:

  • OpsGenie
  • PRs for other targets are welcome

Usage

  1. Provide a configuration file. See config.example.yaml for an example.

  2. Run Dodemansknop with the configuration file as argument: dodemansknop -config config.yaml:

    $ docker run \
        -p 3030:3030 \
        -v $PWD/config.yaml:/config.yaml \
        ghcr.io/mittwald/dodemansknop:latest --config /config.yaml --listen-addr=0.0.0.0:3030
    
  3. Create a Prometheus Alert that continuously fires:

    name: Dodemansknop
    expr: vector(1)
    labels:
      severity: none
  4. Configure your Prometheus Alertmanager to route this alert to Dodemansknop:

    route:
      ...
      routes:
      - match:
        alertname: Dodemansknop
        receiver: 'dodemansknop'
        group_wait: 0s
        group_interval: 1m
        repeat_interval: 50s
    receivers:
    - name: 'dodemansknop'
      webhook_configs:
      - url: 'http://dodemansknop/ping/service-id'
        send_resolved: false

How it works

Dodemansknop is a simple HTTP server that listens for HTTP requests on a given port. It expects a request to be made to the path /ping/<service-id>, with <service-id> being a unique identifier for the service that is being monitored.

When a request is received, Dodemansknop will expect to receive continuous requests with the same <service-id> within a given time frame. If no request is received within this time frame (configurable via config file), Dodemansknop will trigger an alert by notifying the configured alerting targets.

dodemansknop's People

Contributors

martin-helmich avatar

Watchers

 avatar  avatar  avatar

Forkers

dirk007

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.