miekg / caddy-prometheus

Prometheus metrics middleware for caddy
Apache License 2.0
65 stars 26 forks source link
caddy go metrics prometheus

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:

With caddyext you'll need to put this module early in the chain, so that the duration histogram actually makes sense. I've put it at number 0.

Metrics

The following metrics are exported:

Each metric has the following labels:

The response_* metrics have an extra label status which holds the status code.