Skip to content

Commit a96f85c

Browse files
olivierlambertdanielnelson
authored andcommitted
Add documentation for fetching metrics on Caddy HTTP and Prometheus (influxdata#2853)
1 parent 9148871 commit a96f85c

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ configuration options.
156156
* [postgresql_extensible](./plugins/inputs/postgresql_extensible)
157157
* [powerdns](./plugins/inputs/powerdns)
158158
* [procstat](./plugins/inputs/procstat)
159-
* [prometheus](./plugins/inputs/prometheus)
159+
* [prometheus](./plugins/inputs/prometheus) (can be used for [Caddy server](./plugins/inputs/prometheus/README.md#usage-for-caddy-http-server))
160160
* [puppetagent](./plugins/inputs/puppetagent)
161161
* [rabbitmq](./plugins/inputs/rabbitmq)
162162
* [raindrops](./plugins/inputs/raindrops)

plugins/inputs/prometheus/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,24 @@ to filter and some tags
6161
ssl_key = '/path/to/keyfile'
6262
```
6363

64+
### Usage for Caddy HTTP server
65+
66+
If you want to monitor Caddy, you need to use Caddy with its Prometheus plugin:
67+
68+
* Download Caddy+Prometheus plugin [here](https://caddyserver.com/download/linux/amd64?plugins=http.prometheus)
69+
* Add the `prometheus` directive in your `CaddyFile`
70+
* Restart Caddy
71+
* Configure Telegraf to fetch metrics on it:
72+
73+
```
74+
[[inputs.prometheus]]
75+
# ## An array of urls to scrape metrics from.
76+
urls = ["http://localhost:9180/metrics"]
77+
```
78+
79+
> This is the default URL where Caddy Prometheus plugin will send data.
80+
> For more details, please read the [Caddy Prometheus documentation](https://github.com/miekg/caddy-prometheus/blob/master/README.md).
81+
6482
### Measurements & Fields & Tags:
6583

6684
Measurements and fields could be any thing.

0 commit comments

Comments
 (0)