From d3241d5fd2c080fae5b950bed84169ca72db2415 Mon Sep 17 00:00:00 2001 From: Olivier Lambert Date: Thu, 25 May 2017 22:07:49 +0200 Subject: [PATCH] Add documentation for fetching metrics on Caddy HTTP and Prometheus (#2853) --- README.md | 2 +- plugins/inputs/prometheus/README.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c7d40b28..6a3027e09 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/plugins/inputs/prometheus/README.md b/plugins/inputs/prometheus/README.md index 1a96f127e..15e61bd65 100644 --- a/plugins/inputs/prometheus/README.md +++ b/plugins/inputs/prometheus/README.md @@ -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.