|
1 | 1 | [ |
2 | 2 | { |
3 | | - "id": "simple-latency-check-for-gaming", |
| 3 | + "groupId": "simple-latency-check-for-gaming", |
4 | 4 | "name": "Simple Latency Check for Gaming Servers", |
5 | 5 | "description": "A RTT around 60ms is considered acceptable for most online gaming servers\n", |
6 | 6 | "variants": [ |
7 | 7 | { |
8 | | - "id": "simple-latency-check-for-gaming:alerting-all", |
| 8 | + "variantId": "simple-latency-check-for-gaming:alerting-all", |
9 | 9 | "name": "Alert to all channels if exceeds 60ms RTT", |
10 | 10 | "script": "if context.error == null \u0026\u0026 context.metadata.rttMs \u003e 60 {\r\n alerting.send({\r\n header: \"Monitor [%s] notices high RTT from %s\"\r\n .format(context.monitor.name, context.location),\r\n message: \"Measured a RTT of %.2fms\\nCheck ID: %s\"\r\n .format(context.metadata.rttMs, context.check.id),\r\n footer: \"%s • Monitored by Crystade\"\r\n .format(context.team.name),\r\n deduplication: {\r\n key: context.monitor.id + \":simple-uptime-check\",\r\n ttl: \"1m\"\r\n }\r\n });\r\n}\r\n", |
11 | 11 | "checksum": "aa1104d3f966ea15d513b527fa67f06245109c796b8b825bdfc3fa9974674c7c" |
12 | 12 | }, |
13 | 13 | { |
14 | | - "id": "simple-latency-check-for-gaming:minor-incident", |
| 14 | + "variantId": "simple-latency-check-for-gaming:minor-incident", |
15 | 15 | "name": "Report minor incident if exceeds 60ms RTT", |
16 | 16 | "script": "if context.error == null {\r\n if context.metadata.rttMs \u003c= 60 {\r\n incident.recover();\r\n } else {\r\n incident.signal({\r\n severity: \"minor\",\r\n title: \"Monitor [%s] notices high RTT from %s\".format(context.monitor.name, context.location),\r\n content: \"Measured a RTT of %.2fms\\nCheck ID: %s\".format(context.metadata.rttMs, context.check.id)\r\n });\r\n }\r\n}", |
17 | 17 | "checksum": "35331d5cec89fbfd83d14898fb34201542ef0055f9129f670ad0ef2ca1e97d88" |
18 | 18 | }, |
19 | 19 | { |
20 | | - "id": "simple-latency-check-for-gaming:major-incident", |
| 20 | + "variantId": "simple-latency-check-for-gaming:major-incident", |
21 | 21 | "name": "Report major incident if exceeds 60ms RTT", |
22 | 22 | "script": "if context.error == null {\r\n if context.metadata.rttMs \u003c= 60 {\r\n incident.recover();\r\n } else {\r\n incident.signal({\r\n severity: \"major\",\r\n title: \"Monitor [%s] notices high RTT from %s\".format(context.monitor.name, context.location),\r\n content: \"Measured a RTT of %.2fms\\nCheck ID: %s\".format(context.metadata.rttMs, context.check.id)\r\n });\r\n }\r\n}", |
23 | 23 | "checksum": "d088ad7f4f6a8f3db421cca9a2b84bf14756552426a5541c47079bd1257388d6" |
24 | 24 | }, |
25 | 25 | { |
26 | | - "id": "simple-latency-check-for-gaming:critical-incident", |
| 26 | + "variantId": "simple-latency-check-for-gaming:critical-incident", |
27 | 27 | "name": "Report critical incident if exceeds 60ms RTT", |
28 | 28 | "script": "if context.error == null {\r\n if context.metadata.rttMs \u003c= 60 {\r\n incident.recover();\r\n } else {\r\n incident.signal({\r\n severity: \"critical\",\r\n title: \"Monitor [%s] notices high RTT from %s\".format(context.monitor.name, context.location),\r\n content: \"Measured a RTT of %.2fms\\nCheck ID: %s\".format(context.metadata.rttMs, context.check.id)\r\n });\r\n }\r\n}", |
29 | 29 | "checksum": "4d3e255ad717d1aad108d6cdb6c45645b1987867cc84c4ec5c4644b1eebb3cab" |
30 | 30 | } |
31 | 31 | ] |
32 | 32 | }, |
33 | 33 | { |
34 | | - "id": "simple-latency-check-for-website", |
| 34 | + "groupId": "simple-latency-check-for-website", |
35 | 35 | "name": "Simple Latency Check for Websites", |
36 | 36 | "description": "A RTT around 100ms is considered acceptable for most websites per https://aws.amazon.com/what-is/rtt-in-networking/\n", |
37 | 37 | "variants": [ |
38 | 38 | { |
39 | | - "id": "simple-latency-check-for-website:alerting-all", |
| 39 | + "variantId": "simple-latency-check-for-website:alerting-all", |
40 | 40 | "name": "Alert to all channels if exceeds 100ms RTT", |
41 | 41 | "script": "if context.error == null \u0026\u0026 context.metadata.rttMs \u003e 100 {\r\n alerting.send({\r\n header: \"Monitor [%s] notices high RTT from %s\"\r\n .format(context.monitor.name, context.location),\r\n message: \"Measured a RTT of %.2fms\\nCheck ID: %s\"\r\n .format(context.metadata.rttMs, context.check.id),\r\n footer: \"%s • Monitored by Crystade\"\r\n .format(context.team.name),\r\n deduplication: {\r\n key: context.monitor.id + \":simple-uptime-check\",\r\n ttl: \"1m\"\r\n }\r\n });\r\n}\r\n", |
42 | 42 | "checksum": "4e398d008c9c49c30fae55019ac1688512aaca57119fb203cf6fe558a368a969" |
43 | 43 | }, |
44 | 44 | { |
45 | | - "id": "simple-latency-check-for-website:minor-incident", |
| 45 | + "variantId": "simple-latency-check-for-website:minor-incident", |
46 | 46 | "name": "Report minor incident if exceeds 100ms RTT", |
47 | 47 | "script": "if context.error == null {\r\n if context.metadata.rttMs \u003c= 100 {\r\n incident.recover();\r\n } else {\r\n incident.signal({\r\n severity: \"minor\",\r\n title: \"Monitor [%s] notices high RTT from %s\".format(context.monitor.name, context.location),\r\n content: \"Measured a RTT of %.2fms\\nCheck ID: %s\".format(context.metadata.rttMs, context.check.id)\r\n });\r\n }\r\n}", |
48 | 48 | "checksum": "0cf81bda06f5b14a18118d5c5ae0db95ac1f900bded34b244e6333774e555a86" |
49 | 49 | }, |
50 | 50 | { |
51 | | - "id": "simple-latency-check-for-website:major-incident", |
| 51 | + "variantId": "simple-latency-check-for-website:major-incident", |
52 | 52 | "name": "Report major incident if exceeds 100ms RTT", |
53 | 53 | "script": "if context.error == null {\r\n if context.metadata.rttMs \u003c= 100 {\r\n incident.recover();\r\n } else {\r\n incident.signal({\r\n severity: \"major\",\r\n title: \"Monitor [%s] notices high RTT from %s\".format(context.monitor.name, context.location),\r\n content: \"Measured a RTT of %.2fms\\nCheck ID: %s\".format(context.metadata.rttMs, context.check.id)\r\n });\r\n }\r\n}", |
54 | 54 | "checksum": "3be24e3bd1df370a4131cee474d2798a1252308410624234791d0b6eee2f7729" |
55 | 55 | }, |
56 | 56 | { |
57 | | - "id": "simple-latency-check-for-website:critical-incident", |
| 57 | + "variantId": "simple-latency-check-for-website:critical-incident", |
58 | 58 | "name": "Report critical incident if exceeds 100ms RTT", |
59 | 59 | "script": "if context.error == null {\r\n if context.metadata.rttMs \u003c= 100 {\r\n incident.recover();\r\n } else {\r\n incident.signal({\r\n severity: \"critical\",\r\n title: \"Monitor [%s] notices high RTT from %s\".format(context.monitor.name, context.location),\r\n content: \"Measured a RTT of %.2fms\\nCheck ID: %s\".format(context.metadata.rttMs, context.check.id)\r\n });\r\n }\r\n}", |
60 | 60 | "checksum": "09fc01306e3a112aa9c41a923479e825c6e9ae54f6017cb2bd115cdbc1d5f64d" |
61 | 61 | } |
62 | 62 | ] |
63 | 63 | }, |
64 | 64 | { |
65 | | - "id": "simple-monitor-check", |
| 65 | + "groupId": "simple-monitor-check", |
66 | 66 | "name": "Simple Monitor Check", |
67 | 67 | "description": "A simple script to check for monitor status\n", |
68 | 68 | "variants": [ |
69 | 69 | { |
70 | | - "id": "simple-monitor-check:alerting-all", |
| 70 | + "variantId": "simple-monitor-check:alerting-all", |
71 | 71 | "name": "Alert to all channels on error", |
72 | 72 | "script": "if context.error != null {\r\n alerting.send({\r\n header: \"Monitor [%s] is down from %s\"\r\n .format(context.monitor.name, context.location),\r\n message: \"Got error: %s (code: %s)\\nCheck ID: %s\"\r\n .format(context.error.message, context.error.code, context.check.id),\r\n footer: \"%s • Monitored by Crystade\"\r\n .format(context.team.name),\r\n deduplication: {\r\n key: context.monitor.id + \":simple-uptime-check\",\r\n ttl: \"1m\"\r\n }\r\n });\r\n}\r\n", |
73 | 73 | "checksum": "59ae4b072553ac418b4c1c6fa26824fc9980636a3eaae55e7766b237f7eda5df" |
74 | 74 | }, |
75 | 75 | { |
76 | | - "id": "simple-monitor-check:minor-incident", |
| 76 | + "variantId": "simple-monitor-check:minor-incident", |
77 | 77 | "name": "Report minor incident on error", |
78 | 78 | "script": "if context.error == null {\r\n incident.recover();\r\n} else {\r\n incident.signal({\r\n severity: \"minor\",\r\n title: \"Monitor [%s] is down from %s\".format(context.monitor.name, context.location),\r\n content: \"Got error: %s (code: %s)\\nCheck ID: %s\".format(context.error.message, context.error.code, context.check.id)\r\n });\r\n}\r\n", |
79 | 79 | "checksum": "70c2b674bc2d2e4e82091123ce8466ac4e9f86c551b3fc8fc1976a86c9bc0c75" |
80 | 80 | }, |
81 | 81 | { |
82 | | - "id": "simple-monitor-check:major-incident", |
| 82 | + "variantId": "simple-monitor-check:major-incident", |
83 | 83 | "name": "Report major incident on error", |
84 | 84 | "script": "if context.error == null {\r\n incident.recover();\r\n} else {\r\n incident.signal({\r\n severity: \"major\",\r\n title: \"Monitor [%s] is down from %s\".format(context.monitor.name, context.location),\r\n content: \"Got error: %s (code: %s)\\nCheck ID: %s\".format(context.error.message, context.error.code, context.check.id)\r\n });\r\n}\r\n", |
85 | 85 | "checksum": "6945ffc3ac15ccf591b3eb3b6f7c91894e85c3d2a4c0357c252e00d30744627b" |
86 | 86 | }, |
87 | 87 | { |
88 | | - "id": "simple-monitor-check:critical-incident", |
| 88 | + "variantId": "simple-monitor-check:critical-incident", |
89 | 89 | "name": "Report critical incident on error", |
90 | 90 | "script": "if context.error == null {\r\n incident.recover();\r\n} else {\r\n incident.signal({\r\n severity: \"critical\",\r\n title: \"Monitor [%s] is down from %s\".format(context.monitor.name, context.location),\r\n content: \"Got error: %s (code: %s)\\nCheck ID: %s\".format(context.error.message, context.error.code, context.check.id)\r\n });\r\n}\r\n", |
91 | 91 | "checksum": "3b071196134898091b69796c88744a315fdb297cf8205b635fc75d48a3cb6991" |
|
0 commit comments