Monitoring Blocks Heimdall and Bor
Server
1 - Prerequisites
Curl
sudo apt install curlNVM
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profileNodejs
nvm install nodePM2
npm install -g pm2Git
sudo apt install git2 - Download code
git clone [email protected]:Michel-Leidson/blocks-monitoring.git3 - Enter in project directory
cd blocks-monitoring4 - Install dependencies of project
npm install5 - Running as a service in PM2
pm2 start server.js --name <choice-a-name-of-your-service>
pm2 save
pm2 startup6 - Configure job in prometheus config
a - Add job in prometheus config file.
- job_name: 'monitor_polygon_blocks'
static_configs:
- targets: ['localhost:9992']b - Restart prometheus service
sudo systemctl restart prometheus7 - Configuring reverse proxy nginx
a - Open your nginx configuration file
nano /etc/nginx/sites-enabled/defaultb - Paste the content in the file
location /blockshb/ {
gzip_types *;
proxy_pass http://127.0.0.1:9992/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:443;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto $scheme;
}c - Save the file
d - Restart Nginx service
sudo systemctl restart nginxClient
1 - Prerequisites
Curl
sudo apt install curlNVM
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profileNodejs
nvm install nodePM2
npm install -g pm2Git
sudo apt install git2 - Download the code
git clone [email protected]:Michel-Leidson/blocks-monitoring-polygon-client.git3 - Enter the project directory
cd blocks-monitoring-polygon-client4 - Install dependencies of project, and install dotenv with dev dependency flag
npm install
npm install dotenv --save-dev5 - Configure .env file based on .env.example
a - Copy .env.example to .env file
cp .env.example .env
nano .envb - Set your variabales
MATIC_VALIDATOR_ID=<node_name>
BACKEND_API=https://your-domain.com/blockshb6 - Running as a service in PM2
pm2 start index.js --name <choice-a-name-of-your-service>
pm2 save
pm2 startupCreate Heimdall and Bor Grafana Dashboard
1 - In "Dashboards" menu click in "Browse"

2 - Click in "New Dashboard" button

3 - Click in "Add new panel" button

4 - Define missed_blocks_type="heimdall" and define missed_blocks_matic_id in query

5 - Define title and description of panel and click in save button

6 - Define name of Dashboard select folder and click in "Save" button

7 - Duplicate heimdall panel and click in "Edit" button

8 - Define missed_blocks_type="bor" and define missed_blocks_matic_id in query

9 - Define title and description of panel and click in save button

Last updated