This project stores the collected data in a PostgreSQL database.
Copy the file .env.template into a new file .env.
Modify .env with the credentials to the database.
This script requires the command nc
to be available in the terminal.
npm install
createdb -h localhost -U postgres seedmon
(Replace postgres
with the user name, and seedmon
with the name of the database to create. These values should be in sync with what you put in .env)
npx prisma migrate deploy
Run the monitor using
npm run monitor
The monitor runs continuously until it is explicitly stopped. It pings the nodes every half an hour. The results are stored in the table "Ping".
Get the statistics using
npm run stats -- -c col
This script reads the entries in the "Ping" table to generate the uptime percentage.
col
specifies the mainnet while bom
specifies the testnet.