Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API check return 401 HTTP response #90

Open
furqank786 opened this issue Feb 20, 2018 · 1 comment
Open

API check return 401 HTTP response #90

furqank786 opened this issue Feb 20, 2018 · 1 comment

Comments

@furqank786
Copy link

I am using the latest release of cachet monitor for Ubuntu "cachet_monitor_linux_amd64".
I created a configuration file config.json to check the uptime for my API and mentioned the URL as given below in the source code.
The following incident appear: "API check failed (server time: 20/02/2018 16:47:05 PKT) Expected HTTP response status: 200, got: 401"

example source code:
{ "api": { "url": "democachet.io/v1", "token": "xxxxxxxxxxx", "insecure": true }, "date_format": "02/01/2006 15:04:05 MST", "monitors": [ { "name": "API", "target": "https://example.com:443/v1?id=xxxxxxxxxx&signature=xxxxxxxxxxxx", "strict": true, "strict_tls": false, "method": "GET", "component_id": 1, "metric_id": 1, "template": { "investigating": { "subject": "{{ .Monitor.Name }}", "message": "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}" }, "fixed": { "subject": "I HAVE BEEN FIXED" } }, "interval": 1, "timeout": 1, "threshold": 80, "expected_status_code": 200 } ] }

Please help me to fix this issue. Thanks.

@casKd-dev
Copy link

Did you check if your API returns a 200?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants