├── .env.example ├── .env.mainnet.example ├── .gitignore ├── README.md ├── consensus └── Dockerfile ├── docker-compose.mainnet.yml ├── docker-compose.yml ├── execution └── Dockerfile ├── grafana ├── Dockerfile ├── dashboard.yml ├── datasource.yml └── provision-dashboards.sh ├── loki └── loki.yml ├── prometheus ├── blackbox.yml ├── json.yml └── prometheus.yml └── promtail └── promtail.yml /.env.example: -------------------------------------------------------------------------------- 1 | BUILDER_TX_SIGNING_KEY= 2 | BUILDER_ADDRESS= 3 | BUILDER_EXTRA_DATA= -------------------------------------------------------------------------------- /.env.mainnet.example: -------------------------------------------------------------------------------- 1 | BUILDER_TX_SIGNING_KEY= 2 | BUILDER_ADDRESS= 3 | BUILDER_EXTRA_DATA= 4 | BEACON_API_URL=https://sync-mainnet.beaconcha.in/ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flashbot compose 2 | 3 | Flashbot builder on docker-compose 4 | 5 | - docker-compose.yml: Goerli testnet setup 6 | - docker-compose.mainnet.yml: Mainnet setup, with prometheus, grafana from [eth-docker](https://github.com/eth-educators/eth-docker) -------------------------------------------------------------------------------- /consensus/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:bullseye 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y \ 5 | curl xz-utils \ 6 | gcc g++ mingw-w64 \ 7 | gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ 8 | cmake libssl-dev libxml2-dev vim apt-transport-https \ 9 | zip unzip libtinfo5 patch zlib1g-dev autoconf libtool \ 10 | pkg-config make docker.io gnupg2 libgmp-dev python 11 | 12 | RUN go install github.com/bazelbuild/bazelisk@latest 13 | 14 | RUN mkdir -p /usr/local/bin 15 | RUN cp /go/bin/bazelisk /usr/local/bin/bazelisk 16 | RUN ln -s /go/bin/bazelisk /usr/local/bin/bazel 17 | 18 | # This both verifies that bazel is in $PATH, 19 | # and also caches the latest bazel release at the time of docker build. 20 | RUN bazel version 21 | 22 | RUN mkdir -p /workspace 23 | 24 | WORKDIR /workspace 25 | 26 | RUN git clone https://github.com/flashbots/prysm.git . 27 | 28 | RUN bazel build //cmd/beacon-chain:beacon-chain --config=release 29 | 30 | ENTRYPOINT ["bazel","run","//cmd/beacon-chain:beacon-chain","--config=release","--"] -------------------------------------------------------------------------------- /docker-compose.mainnet.yml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | x-logging: &logging 3 | logging: 4 | driver: json-file 5 | options: 6 | max-size: 100m 7 | max-file: "3" 8 | tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}' 9 | 10 | services: 11 | execution: 12 | build: execution 13 | environment: 14 | - BUILDER_TX_SIGNING_KEY=${BUILDER_TX_SIGNING_KEY} 15 | volumes: 16 | - execution-data:/data 17 | - secrets:/secrets 18 | ports: 19 | - "8545:8545" 20 | - "8546:8546" 21 | - "30303:30303" 22 | command: [ 23 | "--builder=true", 24 | "--builder.remote_relay_endpoint=https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money", 25 | "--builder.secondary_remote_relay_endpoints=https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,https://0x98650451ba02064f7b000f5768cf0cf4d4e492317d82871bdc87ef841a0743f69f0f1eea11168503240ac35d101c9135@mainnet-relay.securerpc.com,https://0xb3ee7afcf27f1f1259ac1787876318c6584ee353097a50ed84f51a1f21a323b3736f271a895c7ce918c038e4265918be@relay.edennetwork.io,https://0x84e78cb2ad883861c9eeeb7d1b22a8e02332637448f84144e245d20dff1eb97d7abdde96d4e7f80934e5554e11915c56@relayooor.wtf", 26 | "--builder.beacon_endpoints=http://consensus:5052/", 27 | "--builder.bellatrix_fork_version=0x02000000", 28 | "--builder.genesis_fork_version=0x00000000", 29 | "--builder.genesis_validators_root=0x0000000000000000000000000000000000000000000000000000000000000000", 30 | "--builder.secret_key=${BUILDER_TX_SIGNING_KEY}", 31 | "--datadir=/data", 32 | "--syncmode=snap", 33 | "--port=30303", 34 | "--http", 35 | "--http.vhosts=*", 36 | "--http.corsdomain=*", 37 | "--http.addr=0.0.0.0", 38 | "--http.port=8545", 39 | "--http.api=admin,debug,web3,eth,txpool,personal,miner,net,builder,engine", 40 | "--ws", 41 | "--ws.api=web3,eth,txpool,net", 42 | "--ws.addr=0.0.0.0", 43 | "--ws.port=8546", 44 | "--pprof", 45 | "--pprof.addr=0.0.0.0", 46 | "--metrics", 47 | "--metrics.expensive", 48 | "--authrpc.addr=0.0.0.0", 49 | "--authrpc.port=8551", 50 | "--authrpc.jwtsecret=/secrets/jwtsecret", 51 | "--authrpc.vhosts=*", 52 | "--verbosity=3", 53 | "--miner.algotype=greedy", 54 | "--miner.extradata=${BUILDER_EXTRA_DATA}", 55 | "--miner.etherbase=${BUILDER_ADDRESS}", 56 | ] 57 | <<: *logging 58 | 59 | consensus: 60 | build: consensus 61 | volumes: 62 | - consensus-data:/data 63 | - secrets:/secrets 64 | ports: 65 | - "5052:5052" 66 | - "9000:9000" 67 | - "13000:13000" 68 | command: [ 69 | "--accept-terms-of-use", 70 | "--execution-endpoint=http://execution:8551", 71 | "--jwt-secret=/secrets/jwtsecret", 72 | "--suggested-fee-recipient=${BUILDER_ADDRESS}", 73 | "--datadir=/data", 74 | "--checkpoint-sync-url=${BEACON_API_URL}", 75 | "--genesis-beacon-api-url=${BEACON_API_URL}", 76 | "--rpc-host=0.0.0.0", 77 | "--grpc-gateway-host=0.0.0.0", 78 | "--grpc-gateway-port=5052", 79 | "--monitoring-host=0.0.0.0", 80 | "--monitoring-port=8008", 81 | "--p2p-tcp-port=9000", 82 | "--p2p-udp-port=9000", 83 | ] 84 | <<: *logging 85 | 86 | prometheus: 87 | restart: unless-stopped 88 | image: prom/prometheus 89 | volumes: 90 | - prom-data:/prometheus 91 | - /etc/localtime:/etc/localtime:ro 92 | - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml 93 | command: [ 94 | "--config.file=/etc/prometheus/prometheus.yml", 95 | "--storage.tsdb.path=/prometheus", 96 | "--web.console.libraries=/usr/share/prometheus/console_libraries", 97 | "--web.console.templates=/usr/share/prometheus/consoles" 98 | ] 99 | <<: *logging 100 | depends_on: 101 | - node-exporter 102 | - blackbox-exporter 103 | - json-exporter 104 | - cryptowat-exporter 105 | - cadvisor 106 | - ethereum-metrics-exporter 107 | 108 | ethereum-metrics-exporter: 109 | image: samcm/ethereum-metrics-exporter 110 | command: [ 111 | "--consensus-url=http://consensus:5052", 112 | "--execution-url=http://execution:8545", 113 | ] 114 | restart: unless-stopped 115 | <<: *logging 116 | depends_on: 117 | - execution 118 | - consensus 119 | 120 | node-exporter: 121 | image: quay.io/prometheus/node-exporter:latest 122 | command: [ 123 | "--path.rootfs=/host", 124 | "--path.procfs=/host/proc", 125 | "--path.sysfs=/host/sys", 126 | "--collector.filesystem.ignored-mount-points='^/(dev|proc|sys|run|var/lib/docker/.+)($$|/)'", 127 | "--no-collector.ipvs", 128 | ] 129 | pid: host 130 | restart: unless-stopped 131 | volumes: 132 | - '/:/host:ro,rslave' 133 | - /etc/hostname:/etc/nodename:ro 134 | - /proc:/host/proc:ro 135 | - /sys:/host/sys:ro 136 | - /etc/localtime:/etc/localtime:ro 137 | <<: *logging 138 | depends_on: 139 | - execution 140 | - consensus 141 | 142 | blackbox-exporter: 143 | restart: unless-stopped 144 | image: prom/blackbox-exporter:master 145 | volumes: 146 | - ./prometheus/blackbox.yml:/config/blackbox.yml 147 | - /etc/localtime:/etc/localtime:ro 148 | <<: *logging 149 | command: 150 | - --config.file=/config/blackbox.yml 151 | depends_on: 152 | - execution 153 | - consensus 154 | 155 | json-exporter: 156 | restart: unless-stopped 157 | image: quay.io/prometheuscommunity/json-exporter 158 | volumes: 159 | - ./prometheus/json.yml:/config/json.yml 160 | - /etc/localtime:/etc/localtime:ro 161 | <<: *logging 162 | command: 163 | - --config.file 164 | - /config/json.yml 165 | depends_on: 166 | - execution 167 | - consensus 168 | 169 | cryptowat-exporter: 170 | restart: unless-stopped 171 | image: nbarrientos/cryptowat_exporter 172 | volumes: 173 | - /etc/localtime:/etc/localtime:ro 174 | environment: 175 | - CRYPTOWAT_EXCHANGES=kraken 176 | - CRYPTOWAT_PAIRS=ethusd,ethchf 177 | - CRYPTOWAT_CACHESECONDS=300 178 | - TZ=Europe/Zurich 179 | <<: *logging 180 | depends_on: 181 | - execution 182 | - consensus 183 | 184 | cadvisor: 185 | image: gcr.io/cadvisor/cadvisor 186 | volumes: 187 | - /var/run/docker.sock:/var/run/docker.sock:ro 188 | - /:/rootfs:ro 189 | - /var/run:/var/run 190 | - /sys:/sys:ro 191 | - /var/lib/docker:/var/lib/docker:ro 192 | command: 193 | - --docker_only 194 | - --housekeeping_interval=30s 195 | <<: *logging 196 | depends_on: 197 | - execution 198 | - consensus 199 | 200 | promtail: 201 | image: grafana/promtail:latest 202 | user: root 203 | volumes: 204 | - /etc/machine-id:/etc/machine-id:ro 205 | - ./promtail:/etc/promtail 206 | - promtail-data:/tmp 207 | - /var/lib/docker/containers:/var/lib/docker/containers:ro 208 | command: 209 | - '--config.file=/etc/promtail/promtail.yml' 210 | restart: unless-stopped 211 | depends_on: 212 | - loki 213 | - execution 214 | - consensus 215 | <<: *logging 216 | 217 | loki: 218 | image: grafana/loki:latest 219 | volumes: 220 | - loki-data:/tmp 221 | - ./loki:/etc/loki 222 | command: 223 | - '--config.file=/etc/loki/loki.yml' 224 | restart: unless-stopped 225 | <<: *logging 226 | depends_on: 227 | - execution 228 | - consensus 229 | 230 | grafana: 231 | build: 232 | context: ./grafana 233 | image: grafana:local 234 | restart: unless-stopped 235 | ports: 236 | - "3000:3000" 237 | environment: 238 | - GF_SERVER_HTTP_PORT=3000 239 | volumes: 240 | - grafana-data:/var/lib/grafana 241 | - grafana-config:/etc/grafana 242 | - /etc/localtime:/etc/localtime:ro 243 | depends_on: 244 | - prometheus 245 | - loki 246 | - promtail 247 | - execution 248 | - consensus 249 | entrypoint: ["provision-dashboards.sh"] 250 | command: /run.sh 251 | <<: *logging 252 | 253 | volumes: 254 | execution-data: 255 | consensus-data: 256 | secrets: 257 | grafana-data: 258 | grafana-config: 259 | prom-data: 260 | loki-data: 261 | promtail-data: 262 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.1" 2 | 3 | services: 4 | execution: 5 | build: execution 6 | environment: 7 | - BUILDER_TX_SIGNING_KEY=${BUILDER_TX_SIGNING_KEY} 8 | volumes: 9 | - ./data/execution:/data 10 | - ./data/secrets:/secrets 11 | ports: 12 | - 30303 13 | command: 14 | [ 15 | "--builder=true", 16 | "--builder.remote_relay_endpoint=https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-goerli.flashbots.net", 17 | "--builder.beacon_endpoints=http://consensus:5052/", 18 | "--builder.bellatrix_fork_version=0x02001020", 19 | "--builder.genesis_fork_version=0x00001020", 20 | "--builder.genesis_validators_root=0x043db0d9a83813551ee2f33450d23797757d430911a9320530ad8a0eabc43efb", 21 | "--builder.secret_key=${BUILDER_TX_SIGNING_KEY}", 22 | "--datadir=/data", 23 | "--goerli", 24 | "--syncmode=snap", 25 | "--http", 26 | "--http.addr=0.0.0.0", 27 | "--http.api=admin,debug,web3,eth,txpool,personal,miner,net,builder,engine", 28 | "--authrpc.addr=0.0.0.0", 29 | "--authrpc.port=8551", 30 | "--authrpc.jwtsecret=/secrets/jwtsecret", 31 | "--authrpc.vhosts=*", 32 | "--verbosity=3", 33 | "--miner.extradata=${BUILDER_EXTRA_DATA}", 34 | "--miner.etherbase=${BUILDER_ADDRESS}", 35 | "--miner.algotype=greedy", 36 | ] 37 | consensus: 38 | build: consensus 39 | volumes: 40 | - ./data/consensus:/data 41 | - ./data/secrets:/secrets 42 | ports: 43 | - 13000 44 | command: 45 | [ 46 | "--accept-terms-of-use", 47 | "--goerli=true", 48 | "--execution-endpoint=http://execution:8551", 49 | "--jwt-secret=/secrets/jwtsecret", 50 | "--suggested-fee-recipient=${BUILDER_ADDRESS}", 51 | "--datadir=/data", 52 | "--checkpoint-sync-url=https://goerli.checkpoint-sync.ethpandaops.io", 53 | "--genesis-beacon-api-url=https://goerli.checkpoint-sync.ethpandaops.io" 54 | ] 55 | -------------------------------------------------------------------------------- /execution/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.20-alpine as builder 2 | 3 | RUN apk add --no-cache gcc musl-dev linux-headers git 4 | 5 | RUN git clone https://github.com/flashbots/builder.git /go-ethereum 6 | 7 | RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth 8 | 9 | # Pull Geth into a second stage deploy alpine container 10 | FROM alpine:latest 11 | 12 | RUN apk add --no-cache ca-certificates 13 | COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ 14 | 15 | EXPOSE 8545 8546 30303 30303/udp 16 | ENTRYPOINT ["geth"] 17 | -------------------------------------------------------------------------------- /grafana/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM grafana/grafana:latest 2 | 3 | USER root 4 | RUN apk --update add wget tree jq sed 5 | 6 | RUN mkdir -p /etc/grafana/provisioning/dashboards/ 7 | RUN mkdir -p /etc/grafana/provisioning/datasources/ 8 | COPY ./dashboard.yml /etc/grafana/provisioning/dashboards/ 9 | COPY ./datasource.yml /etc/grafana/provisioning/datasources/ 10 | COPY ./provision-dashboards.sh /usr/local/bin/ 11 | 12 | ENTRYPOINT [ "/run.sh" ] 13 | -------------------------------------------------------------------------------- /grafana/dashboard.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name. Required 5 | - name: "Prometheus" 6 | # Org id. Default to 1 7 | orgId: 1 8 | # name of the dashboard folder. 9 | folder: "" 10 | # folder UID. will be automatically generated if not specified 11 | folderUid: "" 12 | # provider type. Default to 'file' 13 | type: file 14 | # disable dashboard deletion 15 | disableDeletion: false 16 | # how often Grafana will scan for changed dashboards 17 | updateIntervalSeconds: 10 18 | # allow updating provisioned dashboards from the UI 19 | allowUiUpdates: true 20 | options: 21 | # path to dashboard files on disk. Required when using the 'file' type 22 | path: /etc/grafana/provisioning/dashboards 23 | # use folder names from filesystem to create folders in Grafana 24 | foldersFromFilesStructure: true 25 | -------------------------------------------------------------------------------- /grafana/datasource.yml: -------------------------------------------------------------------------------- 1 | # config file version 2 | apiVersion: 1 3 | 4 | # list of datasources that should be deleted from the database 5 | deleteDatasources: 6 | - name: Prometheus 7 | orgId: 1 8 | 9 | - name: Loki 10 | orgId: 1 11 | 12 | # list of datasources to insert/update depending 13 | # whats available in the database 14 | datasources: 15 | - name: Prometheus 16 | type: prometheus 17 | access: proxy 18 | orgId: 1 19 | url: http://prometheus:9090 20 | basicAuth: false 21 | isDefault: true 22 | version: 1 23 | editable: true 24 | 25 | - name: Loki 26 | type: loki 27 | access: proxy 28 | orgId: 1 29 | url: http://loki:3100 30 | editable: true 31 | -------------------------------------------------------------------------------- /grafana/provision-dashboards.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Provision dashboards for chosen client. This may not work too well if clients are changed 3 | # without deleting the grafana docker volume 4 | # Expects a full grafana command with parameters as argument(s) 5 | 6 | # case "$CLIENT" in 7 | # *prysm* ) 8 | # prysm_metanull 9 | __url='https://raw.githubusercontent.com/metanull-operator/eth2-grafana/master/eth2-grafana-dashboard-single-source-beacon_node.json' 10 | __file='/etc/grafana/provisioning/dashboards/prysm_metanull.json' 11 | wget -qcO - $__url | jq '.title = "prysm_metanull"' >$__file 12 | # prysm_less_10 13 | __url='https://raw.githubusercontent.com/GuillaumeMiralles/prysm-grafana-dashboard/master/less_10_validators.json' 14 | __file='/etc/grafana/provisioning/dashboards/prysm_less_10.json' 15 | wget -qcO - $__url | jq '.title = "prysm_less_10"' >$__file 16 | # prysm_more_10 17 | __url='https://raw.githubusercontent.com/GuillaumeMiralles/prysm-grafana-dashboard/master/more_10_validators.json' 18 | __file='/etc/grafana/provisioning/dashboards/prysm_more_10.json' 19 | wget -qcO - $__url | jq '.title = "prysm_more_10"' >$__file 20 | # prysm_ynager 21 | __url='https://raw.githubusercontent.com/ynager/grafana-eth-staking/main/dashboard.json' 22 | __file='/etc/grafana/provisioning/dashboards/prysm_ynager.json' 23 | wget -qcO - $__url | jq '.title = "prysm_ynager"' >$__file 24 | # ;;& 25 | # *lighthouse* ) 26 | # # lighthouse_summary 27 | # __url='https://raw.githubusercontent.com/sigp/lighthouse-metrics/master/dashboards/Summary.json' 28 | # __file='/etc/grafana/provisioning/dashboards/lighthouse_summary.json' 29 | # wget -qcO - $__url | jq '.title = "lighthouse_summary"' | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$__file 30 | # # lighthouse_validator_client 31 | # __url='https://raw.githubusercontent.com/sigp/lighthouse-metrics/master/dashboards/ValidatorClient.json' 32 | # __file='/etc/grafana/provisioning/dashboards/lighthouse_validator_client.json' 33 | # wget -qcO - $__url | jq '.title = "lighthouse_validator_client"' >$__file 34 | # # lighthouse_validator_monitor 35 | # __url='https://raw.githubusercontent.com/sigp/lighthouse-metrics/master/dashboards/ValidatorMonitor.json' 36 | # __file='/etc/grafana/provisioning/dashboards/lighthouse_validator_monitor.json' 37 | # wget -qcO - $__url | jq '.title = "lighthouse_validator_monitor"' >$__file 38 | # # lighthouse_yoldark34 39 | # # This needs a bit more for datasource than is here 40 | # #__url='https://raw.githubusercontent.com/Yoldark34/lighthouse-staking-dashboard/main/Yoldark_ETH_staking_dashboard.json' 41 | # #__file='/etc/grafana/provisioning/dashboards/lighthouse_yoldark34.json' 42 | # #wget -qcO - $__url | jq '.title = "lighthouse_yoldark34"' | jq '.uid = "t2yHaa3Zz3lou"' | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$__file 43 | # ;;& 44 | # *teku* ) 45 | # # teku_overview 46 | # __url='https://grafana.com/api/dashboards/12199/revisions/1/download' 47 | # __file='/etc/grafana/provisioning/dashboards/teku_overview.json' 48 | # wget -qcO - $__url | jq '.title = "teku_overview"' >$__file 49 | # ;;& 50 | # *nimbus* ) 51 | # # nimbus_dashboard 52 | # __url='https://raw.githubusercontent.com/status-im/nimbus-eth2/master/grafana/beacon_nodes_Grafana_dashboard.json' 53 | # __file='/etc/grafana/provisioning/dashboards/nimbus_dashboard.json' 54 | # wget -qcO - $__url | jq '.title = "nimbus_dashboard"' | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$__file 55 | # ;;& 56 | # *lodestar* ) 57 | # # lodestar summary 58 | # __url='https://raw.githubusercontent.com/ChainSafe/lodestar/stable/dashboards/lodestar_summary.json' 59 | # __file='/etc/grafana/provisioning/dashboards/lodestar_summary.json' 60 | # wget -qcO - $__url | jq '.title = "lodestar_dashboard"' | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' | \ 61 | # jq 'walk(if . == "prometheus_local" then "Prometheus" else . end)' >$__file 62 | # ;;& 63 | # *geth* ) 64 | # geth_dashboard 65 | __url='https://gist.githubusercontent.com/karalabe/e7ca79abdec54755ceae09c08bd090cd/raw/3a400ab90f9402f2233280afd086cb9d6aac2111/dashboard.json' 66 | __file='/etc/grafana/provisioning/dashboards/geth_dashboard.json' 67 | wget -qcO - $__url | jq '.title = "geth_dashboard"' | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$__file 68 | # ;;& 69 | # *erigon* ) 70 | # # erigon_dashboard 71 | # __url='https://raw.githubusercontent.com/ledgerwatch/erigon/devel/cmd/prometheus/dashboards/erigon.json' 72 | # __file='/etc/grafana/provisioning/dashboards/erigon_dashboard.json' 73 | # wget -qcO - $__url | jq '.title = "erigon_dashboard"' | jq '.uid = "YbLNLr6Mz"' >$__file 74 | # ;;& 75 | # *besu* ) 76 | # # besu_dashboard 77 | # __url='https://grafana.com/api/dashboards/10273/revisions/5/download' 78 | # __file='/etc/grafana/provisioning/dashboards/besu_dashboard.json' 79 | # wget -qcO - $__url | jq '.title = "besu_dashboard"' | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$__file 80 | # ;;& 81 | # *nethermind* ) 82 | # # nethermind_dashboard 83 | # __url='https://raw.githubusercontent.com/NethermindEth/metrics-infrastructure/master/grafana/dashboards/nethermind.json' 84 | # __file='/etc/grafana/provisioning/dashboards/nethermind_dashboard.json' 85 | # wget -qcO - $__url | jq '.title = "nethermind_dashboard"' >$__file 86 | # cp /tmp/nethermind_dashboard.json $__file 87 | # ;;& 88 | # *blox-ssv* ) 89 | # # Blox SSV Operator Dashboard 90 | # __url='https://raw.githubusercontent.com/bloxapp/ssv/main/monitoring/grafana/dashboard_ssv_operator.json' 91 | # __file='/etc/grafana/provisioning/dashboards/blox_ssv_operator_dashboard.json' 92 | # wget -qcO - $__url | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$__file 93 | # __url='https://raw.githubusercontent.com/bloxapp/ssv/main/monitoring/grafana/dashboard_ssv_validator.json' 94 | # __file='/etc/grafana/provisioning/dashboards/blox_ssv_validator_dashboard.json' 95 | # wget -qcO - $__url | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$__file 96 | # ;;& 97 | # * ) 98 | # Ethereum Metrics Exporter Dashboard 99 | __url='https://grafana.com/api/dashboards/16277/revisions/13/download' 100 | __file='/etc/grafana/provisioning/dashboards/ethereum-metrics-exporter-single.json' 101 | wget -qcO - $__url | jq 'walk(if . == "${DS_VICTORIAMETRICS}" then "Prometheus" else . end)' >$__file 102 | # cadvisor and node exporter dashboard 103 | __url='https://grafana.com/api/dashboards/10619/revisions/1/download' 104 | __file='/etc/grafana/provisioning/dashboards/docker-host-container-overview.json' 105 | wget -qcO - $__url | jq 'walk(if . == "${DS_PROMETHEUS}" then "Prometheus" else . end)' >$__file 106 | # ;; 107 | # esac 108 | 109 | tree /etc/grafana/provisioning/ 110 | 111 | exec "$@" 112 | -------------------------------------------------------------------------------- /loki/loki.yml: -------------------------------------------------------------------------------- 1 | auth_enabled: false 2 | 3 | server: 4 | http_listen_port: 3100 5 | grpc_listen_port: 9096 6 | 7 | common: 8 | path_prefix: /tmp/loki 9 | storage: 10 | filesystem: 11 | chunks_directory: /tmp/loki/chunks 12 | rules_directory: /tmp/loki/rules 13 | replication_factor: 1 14 | ring: 15 | instance_addr: 127.0.0.1 16 | kvstore: 17 | store: inmemory 18 | 19 | compactor: 20 | working_directory: /tmp/loki/boltdb-shipper-compactor 21 | shared_store: filesystem 22 | compaction_interval: 10m 23 | retention_enabled: true 24 | retention_delete_delay: 2h 25 | retention_delete_worker_count: 150 26 | 27 | schema_config: 28 | configs: 29 | - from: 2020-10-24 30 | store: boltdb-shipper 31 | object_store: filesystem 32 | schema: v11 33 | index: 34 | prefix: index_ 35 | period: 24h 36 | 37 | limits_config: 38 | retention_period: 30d 39 | -------------------------------------------------------------------------------- /prometheus/blackbox.yml: -------------------------------------------------------------------------------- 1 | modules: 2 | icmp: 3 | prober: icmp 4 | timeout: 10s 5 | icmp: 6 | preferred_ip_protocol: ipv4 7 | -------------------------------------------------------------------------------- /prometheus/json.yml: -------------------------------------------------------------------------------- 1 | modules: 2 | default: 3 | metrics: 4 | - name: ethusd 5 | path: "{ .ethereum.usd }" 6 | help: Ethereum (ETH) price in USD 7 | -------------------------------------------------------------------------------- /prometheus/prometheus.yml: -------------------------------------------------------------------------------- 1 | # A scrape configuration containing exactly one endpoint to scrape: 2 | # Here it's Prometheus itself. 3 | scrape_configs: 4 | - job_name: 'prometheus' 5 | scrape_interval: 5s 6 | static_configs: 7 | - targets: ['prometheus:9090'] 8 | - job_name: 'node_exporter' 9 | scrape_interval: 5s 10 | static_configs: 11 | - targets: ['node-exporter:9100'] 12 | - job_name: 'cadvisor' 13 | static_configs: 14 | - targets: ['cadvisor:8080'] 15 | - job_name: 'ethereum-metrics-exporter' 16 | static_configs: 17 | - targets: ['ethereum-metrics-exporter:9090'] 18 | - job_name: 'ping_google' 19 | metrics_path: /probe 20 | params: 21 | module: [icmp] 22 | static_configs: 23 | - targets: 24 | - 8.8.8.8 25 | relabel_configs: 26 | - source_labels: [__address__] 27 | target_label: __param_target 28 | - source_labels: [__param_target] 29 | target_label: instance 30 | - target_label: __address__ 31 | replacement: blackbox-exporter:9115 32 | - job_name: 'ping_cloudflare' 33 | metrics_path: /probe 34 | params: 35 | module: [icmp] 36 | static_configs: 37 | - targets: 38 | - 1.1.1.1 39 | relabel_configs: 40 | - source_labels: [__address__] 41 | target_label: __param_target 42 | - source_labels: [__param_target] 43 | target_label: instance 44 | - target_label: __address__ 45 | replacement: blackbox-exporter:9115 46 | - job_name: 'json_exporter' 47 | static_configs: 48 | - targets: ['json-exporter:7979'] 49 | - job_name: 'json' 50 | metrics_path: /probe 51 | params: 52 | module: [default] 53 | static_configs: 54 | - targets: 55 | - https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd 56 | relabel_configs: 57 | - source_labels: [__address__] 58 | target_label: __param_target 59 | - source_labels: [__param_target] 60 | target_label: instance 61 | - target_label: __address__ 62 | replacement: json-exporter:7979 63 | - job_name: 'cryptowatch' 64 | scrape_interval: 300s 65 | static_configs: 66 | - targets: ['cryptowat-exporter:9745'] 67 | - job_name: 'consensus node' 68 | scrape_interval: 5s 69 | static_configs: 70 | - targets: 71 | - prysm:8008 72 | - job_name: geth 73 | metrics_path: /debug/metrics/prometheus 74 | scheme: http 75 | static_configs: 76 | - targets: 77 | - builder:6060 78 | -------------------------------------------------------------------------------- /promtail/promtail.yml: -------------------------------------------------------------------------------- 1 | server: 2 | http_listen_port: 9080 3 | grpc_listen_port: 9081 4 | log_level: warn 5 | 6 | positions: 7 | filename: /tmp/positions.yaml 8 | 9 | clients: 10 | - url: http://loki:3100/loki/api/v1/push 11 | 12 | scrape_configs: 13 | - job_name: containers 14 | static_configs: 15 | - targets: 16 | - localhost 17 | labels: 18 | job: containerlogs 19 | __path__: /var/lib/docker/containers/*/*log 20 | 21 | pipeline_stages: 22 | - json: 23 | expressions: 24 | output: log 25 | stream: stream 26 | attrs: 27 | 28 | - json: 29 | expressions: 30 | tag: 31 | source: attrs 32 | 33 | - regex: 34 | expression: (?P(?:[^|]*[^|])).(?P(?:[^|]*[^|])).(?P(?:[^|]*[^|])).(?P(?:[^|]*[^|])) 35 | source: tag 36 | 37 | - timestamp: 38 | format: RFC3339Nano 39 | source: time 40 | 41 | - labels: 42 | stream: 43 | container_name: 44 | 45 | - labeldrop: 46 | - filename 47 | 48 | - output: 49 | source: output 50 | --------------------------------------------------------------------------------