summaryrefslogtreecommitdiffstats
path: root/web/api/health
diff options
context:
space:
mode:
authorChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-01-18 23:06:51 +0100
committerGitHub <noreply@github.com>2019-01-18 23:06:51 +0100
commit68e5ce8f9a70ceaee9dbe2527ff59bef06786f10 (patch)
tree92472ba94969ee7e1f83a3c761458a95b590c71a /web/api/health
parent67cd486e7ac10113bd428d90ecb438d7c33215ba (diff)
Bug fix for netdata behind authenticated proxies (#5216)
* Was incorrectly updating the headers when the Authorization header was being sent * Use X-Auth-Token instead of Authorization header, to allow the management API to work authenticated behind proxies as well
Diffstat (limited to 'web/api/health')
-rw-r--r--web/api/health/README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/api/health/README.md b/web/api/health/README.md
index cbc8aaac4b..2003a61e04 100644
--- a/web/api/health/README.md
+++ b/web/api/health/README.md
@@ -61,7 +61,7 @@ The API is available by default, but it is protected by an `api authorization to
You can access the API via GET requests, by adding the bearer token to an `Authorization` http header, like this:
```
-curl "http://myserver/api/v1/manage/health?cmd=RESET" -H "Authorization: Bearer Mytoken"
+curl "http://myserver/api/v1/manage/health?cmd=RESET" -H "X-Auth-Token: Mytoken"
```
The command `RESET` just returns netdata to the default operation, with all health checks and notifications enabled.
@@ -71,13 +71,13 @@ If you've configured and entered your token correclty, you should see the plain
If all you need is temporarily disable all health checks, then you issue the following before your maintenance period starts:
```
-curl "http://myserver/api/v1/manage/health?cmd=DISABLE ALL" -H "Authorization: Bearer Mytoken"
+curl "http://myserver/api/v1/manage/health?cmd=DISABLE ALL" -H "X-Auth-Token: Mytoken"
```
The effect of disabling health checks is that the alarm criteria are not evaluated at all and nothing is written in the alarm log.
If you want the health checks to be running but to not receive any notifications during your maintenance period, you can instead use this:
```
-curl "http://myserver/api/v1/manage/health?cmd=SILENCE ALL" -H "Authorization: Bearer Mytoken"
+curl "http://myserver/api/v1/manage/health?cmd=SILENCE ALL" -H "X-Auth-Token: Mytoken"
```
Alarms may then still be raised and logged in netdata, so you'll be able to see them via the UI.
@@ -85,7 +85,7 @@ Alarms may then still be raised and logged in netdata, so you'll be able to see
Regardless of the option you choose, at the end of your maintenance period you revert to the normal state via the RESET command.
```
- curl "http://myserver/api/v1/manage/health?cmd=RESET" -H "Authorization: Bearer Mytoken"
+ curl "http://myserver/api/v1/manage/health?cmd=RESET" -H "X-Auth-Token: Mytoken"
```
### Disable or silence specific alarms
@@ -108,7 +108,7 @@ To clear all selectors and reset the mode to default, use the `RESET` command.
The following example silences notifications for all the alarms with context=load:
```
-curl "http://myserver/api/v1/manage/health?cmd=SILENCE&context=load" -H "Authorization: Bearer Mytoken"
+curl "http://myserver/api/v1/manage/health?cmd=SILENCE&context=load" -H "X-Auth-Token: Mytoken"
```
#### Selection criteria