From 2b466913548bf9f4d04e9309b9268f97cafe9ba3 Mon Sep 17 00:00:00 2001 From: cventastic Date: Thu, 13 Jan 2022 23:48:12 +0100 Subject: [PATCH] traefik metrics --- docker-compose-rpc.yml | 2 + docker-compose.pokt-mainnet.yml | 2 + prometheus/prometheus-rpc.yml | 6 ++ traefik/traefik.toml | 161 -------------------------------- 4 files changed, 10 insertions(+), 161 deletions(-) delete mode 100644 traefik/traefik.toml diff --git a/docker-compose-rpc.yml b/docker-compose-rpc.yml index 567067e9..f033a5dc 100644 --- a/docker-compose-rpc.yml +++ b/docker-compose-rpc.yml @@ -17,6 +17,8 @@ services: - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.websecure.address=:443" + - "--entryPoints.metrics.address=:8082" + - "--metrics.prometheus.entryPoint=metrics" - "--certificatesresolvers.myresolver.acme.tlschallenge=true" # TESTING # - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" diff --git a/docker-compose.pokt-mainnet.yml b/docker-compose.pokt-mainnet.yml index 31fbbb61..df4e477c 100644 --- a/docker-compose.pokt-mainnet.yml +++ b/docker-compose.pokt-mainnet.yml @@ -19,6 +19,8 @@ services: - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.websecure.address=:443" + - "--entryPoints.metrics.address=:8082" + - "--metrics.prometheus.entryPoint=metrics" - "--certificatesresolvers.myresolver.acme.tlschallenge=true" # TESTING # - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" diff --git a/prometheus/prometheus-rpc.yml b/prometheus/prometheus-rpc.yml index 0cf821d8..148c9361 100644 --- a/prometheus/prometheus-rpc.yml +++ b/prometheus/prometheus-rpc.yml @@ -34,6 +34,12 @@ scrape_configs: static_configs: - targets: ['pushgateway:9091'] + - job_name: 'traefik' + scrape_interval: 10s + honor_labels: true + static_configs: + - targets: ['traefik:8082'] + - job_name: 'geth-mainnet' scrape_interval: 10s static_configs: diff --git a/traefik/traefik.toml b/traefik/traefik.toml deleted file mode 100644 index b8d1a37c..00000000 --- a/traefik/traefik.toml +++ /dev/null @@ -1,161 +0,0 @@ -################################################################ -# -# Configuration sample for Traefik v2. -# -# For Traefik v1: https://github.com/containous/traefik/blob/v1.7/traefik.sample.toml -# -################################################################ - -################################################################ -# Global configuration -################################################################ -[global] - checkNewVersion = true - sendAnonymousUsage = false - -################################################################ -# Entrypoints configuration -################################################################ - -# Entrypoints definition -# -# Optional -# Default: -[entryPoints] - [entryPoints.web] - address = ":80" - - [entryPoints.websecure] - address = ":443" - - [entryPoints] - [entryPoints.metrics] - address = ":8082" - -# Monitoring -[metrics] - [metrics.prometheus] - entryPoint = "metrics" - -################################################################ -# Traefik logs configuration -################################################################ - -# Traefik logs -# Enabled by default and log to stdout -# -# Optional -# -[log] - - # Log level - # - # Optional - # Default: "ERROR" - # - level = "ERROR" - - # Sets the filepath for the traefik log. If not specified, stdout will be used. - # Intermediate directories are created if necessary. - # - # Optional - # Default: os.Stdout - # - # filePath = "log/traefik.log" - - # Format is either "json" or "common". - # - # Optional - # Default: "common" - # - # format = "json" - -################################################################ -# Access logs configuration -################################################################ - -# Enable access logs -# By default it will write to stdout and produce logs in the textual -# Common Log Format (CLF), extended with additional fields. -# -# Optional -# -# [accessLog] - - # Sets the file path for the access log. If not specified, stdout will be used. - # Intermediate directories are created if necessary. - # - # Optional - # Default: os.Stdout - # - # filePath = "/path/to/log/log.txt" - - # Format is either "json" or "common". - # - # Optional - # Default: "common" - # - # format = "json" - -################################################################ -# API and dashboard configuration -################################################################ - -# Enable API and dashboard -[api] - - # Enable the API in insecure mode - # - # Optional - # Default: false - # - # insecure = true - - # Enabled Dashboard - # - # Optional - # Default: true - # - # dashboard = false - -################################################################ -# Ping configuration -################################################################ - -# Enable ping -[ping] - - # Name of the related entry point - # - # Optional - # Default: "traefik" - # - # entryPoint = "traefik" - -################################################################ -# Docker configuration backend -################################################################ - -# Enable Docker configuration backend -[providers.docker] - - # Docker server endpoint. Can be a tcp or a unix socket endpoint. - # - # Required - # Default: "unix:///var/run/docker.sock" - # - # endpoint = "tcp://10.10.10.10:2375" - - # Default host rule. - # - # Optional - # Default: "Host(`{{ normalize .Name }}`)" - # - # defaultRule = "Host(`{{ normalize .Name }}.docker.localhost`)" - - # Expose containers by default in traefik - # - # Optional - # Default: true - # - # exposedByDefault = false \ No newline at end of file