update examples
This commit is contained in:
@@ -2,21 +2,58 @@
|
|||||||
"api": {
|
"api": {
|
||||||
"url": "https://demo.cachethq.io/api/v1",
|
"url": "https://demo.cachethq.io/api/v1",
|
||||||
"token": "9yMHsdioQosnyVK4iCVR",
|
"token": "9yMHsdioQosnyVK4iCVR",
|
||||||
"insecure": true
|
"insecure": false
|
||||||
},
|
},
|
||||||
|
"date_format": "02/01/2006 15:04:05 MST",
|
||||||
"monitors": [
|
"monitors": [
|
||||||
{
|
{
|
||||||
"name": "google",
|
"name": "google",
|
||||||
"url": "https://google.com",
|
"target": "https://google.com",
|
||||||
"threshold": 80,
|
"strict": true,
|
||||||
|
"method": "POST",
|
||||||
"component_id": 1,
|
"component_id": 1,
|
||||||
"interval": 10,
|
"metric_id": 4,
|
||||||
"timeout": 5,
|
"template": {
|
||||||
|
"investigating": {
|
||||||
|
"subject": "{{ .Monitor.Name }} - {{ .SystemName }}",
|
||||||
|
"message": "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}"
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"subject": "I HAVE BEEN FIXED"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"interval": 1,
|
||||||
|
"timeout": 1,
|
||||||
|
"threshold": 80,
|
||||||
"headers": {
|
"headers": {
|
||||||
"Authorization": "Basic <hash>"
|
"Authorization": "Basic <hash>"
|
||||||
},
|
},
|
||||||
"expected_status_code": 200,
|
"expected_status_code": 200,
|
||||||
"strict_tls": true
|
"expected_body": "P.*NG"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dns",
|
||||||
|
"target": "matej.me.",
|
||||||
|
"question": "mx",
|
||||||
|
"type": "dns",
|
||||||
|
"component_id": 2,
|
||||||
|
"interval": 1,
|
||||||
|
"timeout": 1,
|
||||||
|
"dns": "8.8.4.4:53",
|
||||||
|
"answers": [
|
||||||
|
{
|
||||||
|
"regex": "[1-9] alt[1-9].aspmx.l.google.com."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"exact": "10 aspmx2.googlemail.com."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"exact": "1 aspmx.l.google.com."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"exact": "10 aspmx3.googlemail.com."
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ monitors:
|
|||||||
# http monitor example
|
# http monitor example
|
||||||
- name: google
|
- name: google
|
||||||
# test url
|
# test url
|
||||||
target: http://localhost:2000/ping
|
target: https://google.com
|
||||||
# strict certificate checking for https
|
# strict certificate checking for https
|
||||||
strict: true
|
strict: true
|
||||||
# HTTP method
|
# HTTP method
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
## Example Configuration
|
## Example Configuration
|
||||||
|
|
||||||
|
**Note:** configuration can be in json or yaml format. See `example.config.*` files.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
api:
|
api:
|
||||||
# cachet url
|
# cachet url
|
||||||
@@ -25,7 +27,7 @@ monitors:
|
|||||||
# http monitor example
|
# http monitor example
|
||||||
- name: google
|
- name: google
|
||||||
# test url
|
# test url
|
||||||
target: http://localhost:2000/ping
|
target: https://google.com
|
||||||
# strict certificate checking for https
|
# strict certificate checking for https
|
||||||
strict: true
|
strict: true
|
||||||
# HTTP method
|
# HTTP method
|
||||||
|
|||||||
Reference in New Issue
Block a user