Closed ghost closed 3 years ago
So I just setup my system up and notice a couple thing.
I removed a lot of the default settings like "expected_body": "P.*NG"
Also I had to switch this setting "method": "POST"
to GET not Post and it started to work for me.
Also you will need to get the correct componet_id
and metric_id
. To get them you have to curl your server. Here is a page I used to help me find this and i used PostMan and my api key as auth.
Hello. I have a worry I can't get the monitor up, while the site is online.
{ "api": { "url": "https://website.com", "token": "token", "insecure": false }, "date_format": "02/01/2006 15:04:05 MST", "monitors": [ { "name": "Neko-Love", "target": "https://neko-love.xyz", "strict": true, "method": "POST", "component_id": 1, "metric_id": 4, "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": { "Authorization": "Basic <hash>" }, "expected_status_code": 200, "expected_body": "P.*NG" } ] }