Add documentation for fetching metrics on Caddy HTTP and Prometheus (#2853)

This commit is contained in:
Olivier Lambert 2017-05-25 22:07:49 +02:00 committed by Daniel Nelson
parent fba7735d96
commit d3241d5fd2
2 changed files with 19 additions and 1 deletions

View File

@ -156,7 +156,7 @@ configuration options.
* [postgresql_extensible](./plugins/inputs/postgresql_extensible)
* [powerdns](./plugins/inputs/powerdns)
* [procstat](./plugins/inputs/procstat)
* [prometheus](./plugins/inputs/prometheus)
* [prometheus](./plugins/inputs/prometheus) (can be used for [Caddy server](./plugins/inputs/prometheus/README.md#usage-for-caddy-http-server))
* [puppetagent](./plugins/inputs/puppetagent)
* [rabbitmq](./plugins/inputs/rabbitmq)
* [raindrops](./plugins/inputs/raindrops)

View File

@ -61,6 +61,24 @@ to filter and some tags
ssl_key = '/path/to/keyfile'
```
### Usage for Caddy HTTP server
If you want to monitor Caddy, you need to use Caddy with its Prometheus plugin:
* Download Caddy+Prometheus plugin [here](https://caddyserver.com/download/linux/amd64?plugins=http.prometheus)
* Add the `prometheus` directive in your `CaddyFile`
* Restart Caddy
* Configure Telegraf to fetch metrics on it:
```
[[inputs.prometheus]]
# ## An array of urls to scrape metrics from.
urls = ["http://localhost:9180/metrics"]
```
> This is the default URL where Caddy Prometheus plugin will send data.
> For more details, please read the [Caddy Prometheus documentation](https://github.com/miekg/caddy-prometheus/blob/master/README.md).
### Measurements & Fields & Tags:
Measurements and fields could be any thing.