0.3.6 • Published 6 months ago
redstone-monitoring v0.3.6
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.
- To obtain an
uptime-kuma url for ping
you should create a new monitor of typepush
- To obtain an
uptime-kuma url for failures
you should create a new monitor of typepush
and enable theUpside Down Mode
. Please Note: to trigger an error in this monitor you need to send a request to the obtained Push URL withup
status.
How to prepare telegram env variables
- Create a new bot. After creating a bot you will have the bot token.
- 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