Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions caddy/Caddyfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
admin localhost:2019
}

# Enable telemetry module for Prometheus metrics
(telemetry) {
telemetry {
enabled false
}
}

(security) {
# Basic rate limiting - 30 requests per minute per IP
header X-Rate-Limit "30/minute"
Expand All @@ -18,6 +25,14 @@
}
}

# Metrics endpoint - exposed on localhost only for vmagent scraping
:9090 {
import telemetry
respond /metrics 200 {
content_type text/plain
}
}

*.mfilipe.eu {
tls {
dns gandi {env.GANDI_API_TOKEN}
Expand Down
3 changes: 2 additions & 1 deletion caddy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM caddy:2-builder AS builder

RUN xcaddy build \
--with github.com/caddy-dns/gandi
--with github.com/caddy-dns/gandi \
--with github.com/caddyserver/caddy/v2/modules/caddytelemetry

FROM caddy:2

Expand Down
4 changes: 4 additions & 0 deletions monitoring/vmagent/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ scrape_configs:
- job_name: 'victoriametrics'
static_configs:
- targets: ['victoriametrics:8428']
- job_name: 'caddy'
static_configs:
- targets: ['localhost:9090']
metrics_path: /metrics