Files
cachet-monitor/params.json
2016-05-19 19:27:52 +01:00

7 lines
3.8 KiB
JSON

{
"name": "Cachet-monitor",
"tagline": "Distributed monitoring plugin for CachetHQ",
"body": "![screenshot](https://castawaylabs.github.io/cachet-monitor/screenshot.png)\r\n\r\nFeatures\r\n--------\r\n\r\n- [x] Creates & Resolves Incidents\r\n- [x] Posts monitor lag to cachet graphs\r\n- [x] Updates Component to Partial Outage\r\n- [x] Updates Component to Major Outage if already in Partial Outage (works well with distributed monitoring)\r\n- [x] Can be run on multiple servers and geo regions\r\n\r\nConfiguration\r\n-------------\r\n\r\n```\r\n{\r\n // URL for the API. Note: Must end with /api/v1\r\n \"api_url\": \"https://<cachet domain>/api/v1\",\r\n // Your API token for Cachet\r\n \"api_token\": \"<cachet api token>\",\r\n // optional, false default, set if your certificate is self-signed/untrusted\r\n \"insecure_api\": false,\r\n \"monitors\": [{\r\n // required, friendly name for your monitor\r\n \"name\": \"Name of your monitor\",\r\n // required, url to probe\r\n \"url\": \"Ping URL\",\r\n // optional, http method (defaults GET)\r\n \"method\": \"get\",\r\n // self-signed ssl certificate\r\n \"strict_tls\": true,\r\n // seconds between checks\r\n \"interval\": 10,\r\n // post lag to cachet metric (graph)\r\n // note either metric ID or component ID are required\r\n \"metric_id\": <metric id>,\r\n // post incidents to this component\r\n \"component_id\": <component id>,\r\n // If % of downtime is over this threshold, open an incident\r\n \"threshold\": 80,\r\n // optional, expected status code (either status code or body must be supplied)\r\n \"expected_status_code\": 200,\r\n // optional, regular expression to match body content\r\n \"expected_body\": \"P.*NG\"\r\n }],\r\n // optional, system name to identify bot (uses hostname by default)\r\n \"system_name\": \"\",\r\n // optional, defaults to stdout\r\n \"log_path\": \"\"\r\n}\r\n```\r\n\r\nInstallation\r\n------------\r\n\r\n1. Download binary from [release page](https://github.com/CastawayLabs/cachet-monitor/releases)\r\n2. Create your configuration ([example](https://raw.githubusercontent.com/CastawayLabs/cachet-monitor/master/example.config.json))\r\n3. `cachet-monitor -c /etc/cachet-monitor.config.json`\r\n\r\npro tip: run in background using `nohup cachet-monitor 2>&1 > /var/log/cachet-monitor.log &`\r\n\r\n```\r\nUsage of cachet-monitor:\r\n -c=\"/etc/cachet-monitor.config.json\": Config path\r\n -log=\"\": Log path\r\n -name=\"\": System Name\r\n```\r\n\r\nEnvironment variables\r\n---------------------\r\n\r\n| Name | Example Value | Description |\r\n| ------------ | ------------------------------ | --------------------------- |\r\n| CACHET_API | http://demo.cachethq.io/api/v1 | URL endpoint for cachet api |\r\n| CACHET_TOKEN | APIToken123 | API Authentication token |\r\n| CACHET_DEV | 1 | Strips logging |\r\n\r\nVision and goals\r\n----------------\r\n\r\nWe made this tool because we felt the need to have our own monitoring software (leveraging on Cachet).\r\nThe idea is a stateless program which collects data and pushes it to a central cachet instance.\r\n\r\nThis gives us power to have an army of geographically distributed loggers and reveal issues in both latency & downtime on client websites.\r\n\r\nPackage usage\r\n-------------\r\n\r\nWhen using `cachet-monitor` as a package in another program, you should follow what `cli/main.go` does. It is important to call `ValidateConfiguration` on `CachetMonitor` and all the monitors inside.\r\n\r\n[API Documentation](https://godoc.org/github.com/CastawayLabs/cachet-monitor)\r\n",
"google": "",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}