Skip to content

Commit

Permalink
Merge pull request #285 from snebel29/docs/explain-new-wipe-endpoint
Browse files Browse the repository at this point in the history
Document new Wipe admin-api-endpoint
  • Loading branch information
beorn7 authored Sep 11, 2019
2 parents a108b6f + 4bd8803 commit 16ec84f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ Examples:
even if those metrics have the same job label):

curl -X DELETE http://pushgateway.example.org:9091/metrics/job/some_job
* Delete all metrics in all groups (requires to enable the admin api`--web.enable-admin-api`):

curl -X PUT http://pushgateway.example.org:9091/api/v1/admin/wipe

### About the job and instance labels

Expand Down Expand Up @@ -320,6 +324,28 @@ guaranteed that the `DELETE` will be processed first (and vice versa).
Deleting a grouping key without metrics is a no-op and will not result
in an error.

## Admin API

The Admin API provides administrative access to the Pushgateway, and must be
explicitly enabled by setting `--web.enable-admin-api` flag.

### URL

The default port the Pushgateway is listening to is 9091. The path looks like:

/api/<API_VERSION>/admin/<HANDLER>

* Available endpoints:

| HTTP_METHOD| API_VERSION | HANDLER | DESCRIPTION |
| :-------: |:-------------:| :-----:| :----- |
| PUT | v1 | wipe | Safely deletes all metrics from the Pushgateway. |


* For example to wipe all metrics from the Pushgateway:

curl -X PUT http://pushgateway.example.org:9091/api/v1/admin/wipe
## Exposed metrics

The Pushgateway exposes the following metrics via the configured
Expand Down

0 comments on commit 16ec84f

Please sign in to comment.