diff --git a/docker-compose-rpc.yml b/docker-compose-rpc.yml index 3b982121..6a68d0ff 100644 --- a/docker-compose-rpc.yml +++ b/docker-compose-rpc.yml @@ -33,11 +33,11 @@ services: image: ethereum/client-go:latest expose: - "8545" - - "8546" + - "6060" - "30303" volumes: - geth-goerli:/.goerli - command: "--goerli --http --http.api eth,net --http.addr 0.0.0.0 --http.port 8545 --http.vhosts=* --syncmode full --datadir .goerli --verbosity 3" + command: "--goerli --http --http.api eth,net --http.addr 0.0.0.0 --http.port 8545 --http.vhosts=* --syncmode full --datadir .goerli --verbosity 3 --metrics.addr 0.0.0.0 --pprof.addr 0.0.0.0" labels: - "traefik.enable=true" - "traefik.http.middlewares.ipwhitelist.ipwhitelist.sourcerange=$WHITELIST" @@ -52,11 +52,11 @@ services: image: ethereum/client-go:latest expose: - "8545" - - "8546" + - "6060" - "30303" volumes: - geth-rinkeby:/.rinkeby - command: "--rinkeby --http --http.api eth,net --http.addr 0.0.0.0 --http.port 8545 --http.vhosts=* --syncmode full --datadir .rinkeby --verbosity 3" + command: "--rinkeby --http --http.api eth,net --http.addr 0.0.0.0 --http.port 8545 --http.vhosts=* --syncmode full --datadir .rinkeby --verbosity 3 --metrics.addr 0.0.0.0 --pprof.addr 0.0.0.0" restart: unless-stopped labels: - "traefik.enable=true" @@ -72,11 +72,11 @@ services: image: ethereum/client-go:latest expose: - "8545" - - "8546" + - "6060" - "30303" volumes: - geth-ropsten:/.ropsten - command: "--ropsten --http --http.api eth,net --http.addr 0.0.0.0 --http.port 8545 --http.vhosts=* --syncmode full --datadir .ropsten --verbosity 3" + command: "--ropsten --http --http.api eth,net --http.addr 0.0.0.0 --http.port 8545 --http.vhosts=* --syncmode full --datadir .ropsten --verbosity 3 --metrics.addr 0.0.0.0 --pprof.addr 0.0.0.0" restart: unless-stopped labels: - "traefik.enable=true" @@ -93,10 +93,11 @@ services: expose: - "8545" - "8546" + - "6060" - "30303" volumes: - geth-mainnet:/.mainnet - command: "--http --http.api eth,net --http.addr 0.0.0.0 --http.port 8545 --http.vhosts=* --syncmode full --datadir .mainnet --verbosity 3" + command: "--http --http.api eth,net --http.addr 0.0.0.0 --http.port 8545 --http.vhosts=* --syncmode full --datadir .mainnet --verbosity 3 --metrics.addr 0.0.0.0 --pprof.addr 0.0.0.0" restart: unless-stopped labels: - "traefik.enable=true" @@ -247,7 +248,7 @@ services: image: prom/prometheus:v2.30.3 container_name: prometheus volumes: - - ./prometheus:/etc/prometheus + - ./prometheus/prometheus-rpc.yml:/etc/prometheus/prometheus.yml - prometheus_data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' diff --git a/prometheus/prometheus-rpc.yml b/prometheus/prometheus-rpc.yml new file mode 100644 index 00000000..01b43e67 --- /dev/null +++ b/prometheus/prometheus-rpc.yml @@ -0,0 +1,66 @@ +global: + scrape_interval: 15s + evaluation_interval: 15s + + # Attach these labels to any time series or alerts when communicating with + # external systems (federation, remote storage, Alertmanager). + external_labels: + monitor: 'docker-host-alpha' + +# Load and evaluate rules in this file every 'evaluation_interval' seconds. +rule_files: + - "alert.rules" + +# A scrape configuration containing exactly one endpoint to scrape. +scrape_configs: + - job_name: 'nodeexporter' + scrape_interval: 5s + static_configs: + - targets: ['nodeexporter:9100'] + + - job_name: 'cadvisor' + scrape_interval: 5s + static_configs: + - targets: ['cadvisor:8080'] + + - job_name: 'prometheus' + scrape_interval: 10s + static_configs: + - targets: ['localhost:9090'] + + - job_name: 'pushgateway' + scrape_interval: 10s + honor_labels: true + static_configs: + - targets: ['pushgateway:9091'] + + - job_name: 'geth-mainnet' + scrape_interval: 10s + honor_labels: true + static_configs: + - targets: ['geth-mainnet:6060'] + + - job_name: 'geth-goerli' + scrape_interval: 10s + honor_labels: true + static_configs: + - targets: ['geth-goerli:6060'] + + - job_name: 'geth-rinkeby' + scrape_interval: 10s + honor_labels: true + static_configs: + - targets: ['geth-rinkeby:6060'] + + - job_name: 'geth-ropsten' + scrape_interval: 10s + honor_labels: true + static_configs: + - targets: ['geth-ropsten:6060'] + +alerting: + alertmanagers: + - scheme: http + static_configs: + - targets: + - 'alertmanager:9093' \ No newline at end of file