Giter VIP home page Giter VIP logo

cachet-monitor's Introduction

Cachet Monitor plugin

This is a monitoring plugin for CachetHQ.

screenshot

Features

  • Creates & Resolves Incidents
  • Posts monitor lag every second
  • Updates Component to Partial Outage
  • Updates Component to Major Outage if in Partial Outage
  • Can be run on multiple servers and geo regions

Docker Quickstart

  1. Create a configuration json
docker run -d \
  --name cachet-monitor \
  -h cachet-monitor \
  -v `pwd`/config.json:/etc/cachet-monitor.config.json \
  castawaylabs/cachet-monitor

Configuration

{
  "api_url": "https://demo.cachethq.io/api/v1",
  "api_token": "9yMHsdioQosnyVK4iCVR",
  "monitors": [
    {
      "name": "nodegear frontend",
      "url": "https://nodegear.io/ping",
      "metric_id": 0,
      "component_id": 0,
      "threshold": 80,
      "expected_status_code": 200,
      "strict_tls": true
    }
  ],
  "insecure_api": false
}

Notes:

  • metric_id is optional
  • insecure_api if true it will ignore HTTPS certificate errors (eg if self-signed)
  • strict_tls if false (true is default) it will ignore HTTPS certificate errors (eg if monitor uses self-signed certificate)
  • component_id is optional
  • threshold is a percentage
  • expected_status_code is a http response code
  • GET request will be performed on the url

How to run

Example:

  1. Set up Go
  2. go install github.com/castawaylabs/cachet-monitor
  3. cachet-monitor -c https://raw.githubusercontent.com/CastawayLabs/cachet-monitor/master/example.config.json

Production:

  1. Download the example config and save to /etc/cachet-monitor.config.json
  2. Run in background: nohup cachet-monitor 2>&1 > /var/log/cachet-monitor.log &
Usage of cachet-monitor:
  -c="/etc/cachet-monitor.config.json": Config path
  -log="": Log path
  -name="": System Name

Environment variables

Name Example Value Description
CACHET_API http://demo.cachethq.io/api URL endpoint for cachet api
CACHET_TOKEN randomvalue API Authentication token

cachet-monitor's People

Contributors

jc1738 avatar matejkramny avatar soulou avatar

Watchers

 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.