Hello everyone,

I started to create my own ibft2 network, with 2 bootnodes and 6 
validators. following this tutorial 
<https://besu.hyperledger.org/en/latest/Tutorials/Private-Network/Create-IBFT-Network/>.
 
Now, I want to add Prometheus to my network. 

So I used a docker-compose.yml file:



---
version: '3.4'
services:
prometheus:
image: "prom/prometheus"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
ports:
- 9090:9090/tcp

grafana:
image: "grafana/grafana"
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
volumes:
- ./monitoring/grafana/provisioning/:/etc/grafana/provisioning/
- grafana:/var/lib/grafana
ports:
- 3000:3000/tcp

volumes:
public-keys:
prometheus:
grafana:



Then I used this script to run my network

#!/bin/bash

# bootnodes
cd node-1 && besu --data-path=data --genesis-file=../genesis.json 
--miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 
--rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,MINER --host-whitelist="*" 
--rpc-http-cors-origins="all" --min-gas-price=0 --metrics-enabled 
--metrics-host=127.0.0.11 --metrics-port=9545 &
cd node-2 && besu --data-path=data --genesis-file=../genesis.json 
--bootnodes=enode://26e9d73f42414bf8107395952cd795543c35c2868eba3d4b5382daa7d7f967794914a787e27f400e748f79bd25cf6cb3409f2b2c846921e66598ece8636a07f4@127.0.0.1:30303
 
--p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT 
--host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 
--min-gas-price=0 & 

# validators
cd node-3 && besu --data-path=data --genesis-file=../genesis.json 
--bootnodes=enode://26e9d73f42414bf8107395952cd795543c35c2868eba3d4b5382daa7d7f967794914a787e27f400e748f79bd25cf6cb3409f2b2c846921e66598ece8636a07f4@127.0.0.1:30303,enode://712f422a84453561580738076704d64809dae359ffd6bb71131c4fc0c19fcc8b4b24251c6b8b90ed486d5ac428c05c2932c8147b7f1027143c10782957df6ed6@127.0.0.1:30304
 
--p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT 
--host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 
--min-gas-price=0 &
cd node-4 && besu --data-path=data --genesis-file=../genesis.json 
--bootnodes=enode://26e9d73f42414bf8107395952cd795543c35c2868eba3d4b5382daa7d7f967794914a787e27f400e748f79bd25cf6cb3409f2b2c846921e66598ece8636a07f4@127.0.0.1:30303,enode://712f422a84453561580738076704d64809dae359ffd6bb71131c4fc0c19fcc8b4b24251c6b8b90ed486d5ac428c05c2932c8147b7f1027143c10782957df6ed6@127.0.0.1:30304
 
--p2p-port=30306 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT 
--host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8548 
--min-gas-price=0 &
cd node-5 && besu --data-path=data --genesis-file=../genesis.json 
--bootnodes=enode://26e9d73f42414bf8107395952cd795543c35c2868eba3d4b5382daa7d7f967794914a787e27f400e748f79bd25cf6cb3409f2b2c846921e66598ece8636a07f4@127.0.0.1:30303,enode://712f422a84453561580738076704d64809dae359ffd6bb71131c4fc0c19fcc8b4b24251c6b8b90ed486d5ac428c05c2932c8147b7f1027143c10782957df6ed6@127.0.0.1:30304
 
--p2p-port=30307 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT 
--host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8549 
--min-gas-price=0 &
cd node-6 && besu --data-path=data --genesis-file=../genesis.json 
--bootnodes=enode://26e9d73f42414bf8107395952cd795543c35c2868eba3d4b5382daa7d7f967794914a787e27f400e748f79bd25cf6cb3409f2b2c846921e66598ece8636a07f4@127.0.0.1:30303,enode://712f422a84453561580738076704d64809dae359ffd6bb71131c4fc0c19fcc8b4b24251c6b8b90ed486d5ac428c05c2932c8147b7f1027143c10782957df6ed6@127.0.0.1:30304
 
--p2p-port=30308 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT 
--host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8550 
--min-gas-price=0 &
cd node-7 && besu --data-path=data --genesis-file=../genesis.json 
--bootnodes=enode://26e9d73f42414bf8107395952cd795543c35c2868eba3d4b5382daa7d7f967794914a787e27f400e748f79bd25cf6cb3409f2b2c846921e66598ece8636a07f4@127.0.0.1:30303,enode://712f422a84453561580738076704d64809dae359ffd6bb71131c4fc0c19fcc8b4b24251c6b8b90ed486d5ac428c05c2932c8147b7f1027143c10782957df6ed6@127.0.0.1:30304
 
--p2p-port=30309 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT 
--host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8551 
--min-gas-price=0 &
cd node-8 && besu --data-path=data --genesis-file=../genesis.json 
--bootnodes=enode://26e9d73f42414bf8107395952cd795543c35c2868eba3d4b5382daa7d7f967794914a787e27f400e748f79bd25cf6cb3409f2b2c846921e66598ece8636a07f4@127.0.0.1:30303,enode://712f422a84453561580738076704d64809dae359ffd6bb71131c4fc0c19fcc8b4b24251c6b8b90ed486d5ac428c05c2932c8147b7f1027143c10782957df6ed6@127.0.0.1:30304
 
--p2p-port=30310 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT 
--host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8552 
--min-gas-price=0 

# monitoring
sudo docker-compose build --pull &
sudo docker-compose up 


The Prometheus and Garfana work well but they don't track the running 
nodes. I don't know why but they can't feel the presences of any nodes 
although they are running.

I think the problem is on  /monitoring/prometheus/prometheus.yml I don't 
have experience in writing .yml files. I don't understand what is the 
job_name and the target added to them. could this section be the problem?

scrape_configs:
- job_name: bootnode
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets: [ bootnode:9545 ]

- job_name: validator2
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets: [ validator2:9545 ]
.....


Is that right? or I missed something so the Prometheus can't see the nodes? 
Thanks in advance.




































-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4e088eb8-5fa0-4e86-9fdc-b169e589e34b%40googlegroups.com.

Reply via email to