0.3.6 • Published 6 months ago

redstone-monitoring v0.3.6

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

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.

ParamDescription
ORACLE_GATEWAYS_URLSJSON string with array of gateway urls. It will be used for testing prod data feeds
MAIN_REMOTE_CONFIG_URLURL for main remote monitoring configuration.
REMOTE_CONFIG_BACKUP_URLBackup URL for remote monitoring configuration.
UPTIME_KUMA_URL_FOR_FAILURESUptime kuma push URL that should be called in case of errors
UPTIME_KUMA_URL_FOR_PINGUptime kuma URL that should be called on each test iteration. It is used to monitor if the monitoring service is still working
TG_CHAT_IDTelegram Chat Id for sending failed logs
TG_BOT_TOKENTelegram Bot Token for sending failed logs
INSTI_1_SUBNET_RPC_URLRPC 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