Create gh-pages branch via GitHub

This commit is contained in:
Matej Kramny
2016-05-19 19:27:52 +01:00
parent b30c46546d
commit 184625088b
12 changed files with 1221 additions and 334 deletions

View File

@@ -1 +1,7 @@
{"name":"Cachet-monitor","tagline":"Monitors a URL and posts data points to cachet","body":"Cachet Monitor plugin\r\n=====================\r\n\r\nThis is a monitoring plugin for CachetHQ.\r\n\r\n![](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 every second\r\n- [x] Updates Component to Partial Outage\r\n- [x] Updates Component to Major Outage if in Partial Outage\r\n- [x] Can be run on multiple servers and geo regions\r\n\r\nDocker Quickstart\r\n-----------------\r\n\r\n1. Create a configuration json\r\n2. \r\n```\r\ndocker run -d \\\r\n --name cachet-monitor \\\r\n -h cachet-monitor \\\r\n -v `pwd`/config.json:/etc/cachet-monitor.config.json \\\r\n castawaylabs/cachet-monitor\r\n```\r\n\r\nConfiguration\r\n-------------\r\n\r\n```\r\n{\r\n \"api_url\": \"https://demo.cachethq.io/api\",\r\n \"api_token\": \"9yMHsdioQosnyVK4iCVR\",\r\n \"monitors\": [\r\n {\r\n \"name\": \"nodegear frontend\",\r\n \"url\": \"https://nodegear.io/ping\",\r\n \"metric_id\": 0,\r\n \"component_id\": 0,\r\n \"threshold\": 80,\r\n \"component_id\": null,\r\n \"expected_status_code\": 200,\r\n \"strict_tls\": true\r\n }\r\n ],\r\n \"insecure_api\": false\r\n}\r\n```\r\n\r\n*Notes:*\r\n\r\n- `metric_id` is optional\r\n- `insecure_api` if true it will ignore HTTPS certificate errors (eg if self-signed)\r\n- `strict_tls` if false (true is default) it will ignore HTTPS certificate errors (eg if monitor uses self-signed certificate)\r\n- `component_id` is optional\r\n- `threshold` is a percentage\r\n- `expected_status_code` is a http response code\r\n- GET request will be performed on the `url`\r\n\r\nHow to run\r\n----------\r\n\r\nExample:\r\n\r\n1. Set up [Go](https://golang.org)\r\n2. `go install github.com/castawaylabs/cachet-monitor`\r\n3. `cachet-monitor -c https://raw.githubusercontent.com/CastawayLabs/cachet-monitor/master/example.config.json`\r\n\r\nProduction:\r\n\r\n1. Download the example config and save to `/etc/cachet-monitor.config.json`\r\n2. Run in background: `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 | URL endpoint for cachet api |\r\n| CACHET_TOKEN | randomvalue | API Authentication token |","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
{
"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."
}