npm.io
0.3.6 • Published 2 years ago

redstone-monitoring

Licence
MIT
Version
0.3.6
Deps
14
Size
137 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Redstone monitoring

This project consists of scripts and tools for monitoring of Redstone infrastructure

How to use it

1. Prepare env variables

You can find sample env variable in the .env.example file.

Param Description
ORACLE_GATEWAYS_URLS JSON string with array of gateway urls. It will be used for testing prod data feeds
MAIN_REMOTE_CONFIG_URL URL for main remote monitoring configuration.
REMOTE_CONFIG_BACKUP_URL Backup URL for remote monitoring configuration.
UPTIME_KUMA_URL_FOR_FAILURES Uptime kuma push URL that should be called in case of errors
UPTIME_KUMA_URL_FOR_PING Uptime kuma URL that should be called on each test iteration. It is used to monitor if the monitoring service is still working
TG_CHAT_ID Telegram Chat Id for sending failed logs
TG_BOT_TOKEN Telegram Bot Token for sending failed logs
INSTI_1_SUBNET_RPC_URL RPC URL for Insti-1 Avalanche subnet
How to prepare uptime-kuma URLs

We assume that you already have uptime-kuma instance launched.

  1. To obtain an uptime-kuma url for ping you should create a new monitor of type push
  2. To obtain an uptime-kuma url for failures you should create a new monitor of type push and enable the Upside Down Mode. Please Note: to trigger an error in this monitor you need to send a request to the obtained Push URL with up status.
How to prepare telegram env variables
  1. Create a new bot. After creating a bot you will have the bot token.
  2. Create a new telegram channel (not a group). Invite your bot there as an admin. Send a message to the channel and use the following URL to obtain the chat id: https://api.telegram.org/bot${YOUR_BOT_TOKEN}/getUpdates
2. Run it

To run tests with 5s interval you can use the following command

bash shell-scripts/run-tests-in-loop.sh 5