feat!: Enable Traefik metrics, rename common label var, README fixes

This commit is contained in:
hatemosphere
2024-03-06 15:25:59 +01:00
parent 41f491a0bd
commit 478c3f7ab9
5 changed files with 46 additions and 51 deletions

View File

@ -16,6 +16,9 @@ services:
- "--certificatesresolvers.en_resolver.acme.storage=/letsencrypt/acme.json"
- "--certificatesresolvers.myresolver.acme.email={{ acme_email }}"
{% endif %}
- "--metrics.prometheus=true"
- "--metrics.prometheus.entryPoint=metrics"
- "--entryPoints.metrics.address=:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
{% if enable_tls %}

View File

@ -9,7 +9,7 @@ services:
command:
{% if prometheus_remote_write %}
- "--remoteWrite.url={{ prometheus_remote_write_url }}"
- "--remoteWrite.label={{ prometheus_remote_write_label }}"
- "--remoteWrite.label={{ prometheus_remote_write_common_label }}"
{% if prometheus_remote_write_auth %}
- "--remoteWrite.basicAuth.username={{ prometheus_remote_write_auth_username }}"
- "--remoteWrite.basicAuth.password={{ prometheus_remote_write_auth_password }}"

View File

@ -38,3 +38,11 @@ scrape_configs:
- source_labels: [instance]
target_label: instance
replacement: '{{ node_name | mandatory }}'
- job_name: traefik
static_configs:
- targets:
- "traefik:8080"
relabel_configs:
- source_labels: [instance]
target_label: instance
replacement: '{{ node_name | mandatory }}'