Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miekg/caddy-prometheus
Prometheus metrics middleware for caddy
https://github.com/miekg/caddy-prometheus
caddy go metrics prometheus
Last synced: about 1 month ago
JSON representation
Prometheus metrics middleware for caddy
- Host: GitHub
- URL: https://github.com/miekg/caddy-prometheus
- Owner: miekg
- License: apache-2.0
- Archived: true
- Fork: true (captncraig/caddy-stats)
- Created: 2016-02-28T10:28:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-13T18:59:48.000Z (about 5 years ago)
- Last Synced: 2024-06-18T15:39:17.029Z (3 months ago)
- Topics: caddy, go, metrics, prometheus
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 65
- Watchers: 8
- Forks: 26
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Metrics
This module enables prometheus metrics for Caddy.
## Use
In your `Caddyfile`:
~~~
prometheus
~~~For each virtual host that you want to see metrics for.
These are the (optional) parameters that can be used:
- **use_caddy_addr** - causes metrics to be exposed at the same address:port as Caddy itself. This can not be specified at the same time as **address**.
- **address** - the address where the metrics are exposed, the default is `localhost:9180`
- **path** - the path to serve collected metrics from, the default is `/metrics`
- **hostname** - the `host` parameter that can be found in the exported metrics, this defaults to the label specified for the server block
- **label** - Custom label to add on all metrics.
This directive can be used multiple times.
You should specify a label name and a value.
The value is a [placeholder](https://caddyserver.com/docs/placeholders) and can be used to extract value from response header for instance.
Usage: `label route_name {