+

+Cachet Monitor plugin

+ +

This is a monitoring plugin for CachetHQ.

+ +

+Features

+ + + +

+Docker Quickstart

+ +
    +
  1. Create a configuration json
  2. +
  3. +
+ +
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",
+  "api_token": "9yMHsdioQosnyVK4iCVR",
+  "monitors": [
+    {
+      "name": "nodegear frontend",
+      "url": "https://nodegear.io/ping",
+      "metric_id": 0,
+      "component_id": 0,
+      "threshold": 80,
+      "component_id": null,
+      "expected_status_code": 200,
+      "strict_tls": true
+    }
+  ],
+  "insecure_api": false
+}
+
+ +

Notes:

+ + + +

+How to run

+ +

Example:

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

Production:

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

+Environment variables

+ + + + + + + + + + + + + + + + + + + + + +
NameExample ValueDescription
CACHET_APIhttp://demo.cachethq.io/apiURL endpoint for cachet api
CACHET_TOKENrandomvalueAPI Authentication token
+ + + +