{"id":13564963,"url":"https://github.com/vitwit/validator-alertbot","last_synced_at":"2026-01-12T11:11:55.808Z","repository":{"id":98936088,"uuid":"299535520","full_name":"vitwit/validator-alertbot","owner":"vitwit","description":"Validator alertbot for cosmos ecosystem","archived":false,"fork":false,"pushed_at":"2023-05-16T09:52:24.000Z","size":97,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T11:32:24.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitwit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-29T07:16:22.000Z","updated_at":"2024-03-15T18:59:23.000Z","dependencies_parsed_at":"2024-01-14T03:49:51.272Z","dependency_job_id":"a44f8eec-14b0-464f-9198-b5aba0032c02","html_url":"https://github.com/vitwit/validator-alertbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Fvalidator-alertbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Fvalidator-alertbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Fvalidator-alertbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitwit%2Fvalidator-alertbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitwit","download_url":"https://codeload.github.com/vitwit/validator-alertbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247089627,"owners_count":20881805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:38.579Z","updated_at":"2026-01-12T11:11:55.776Z","avatar_url":"https://github.com/vitwit.png","language":"Go","readme":"## validator-alertbot\nValidator alertbot for cosmos ecosystem\n\n -   **Validator alert bot** is a custom alerting module has been developed to alert on key validator health events. The module uses data from influxdb and trigger alerts based on user-configured thresholds.\n It also provides telegram based commands to know information about your validator activity.\n\n## Install Prerequisites\n- **Go 13.x+**\n- **InfluxDB 1.7+**\n- **Docker 19+**\n\n### Here we are provinding steps to install influxdb, we assume you already have go and docker installed.\n\n#### Install InfluxDB \n\n```sh\n cd $HOME\nwget -q https://repos.influxdata.com/influxdata-archive_compat.key\necho '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c \u0026\u0026 cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg \u003e /dev/null\necho 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list\n```\n\n#### Start influxDB\n\n```sh\n sudo apt-get update \u0026\u0026 sudo apt-get install influxdb\n sudo service influxdb start\n\nThe default port that runs the InfluxDB HTTP service is :8086\n```\n\n**Note :** If you want cusomize the configuration, edit `influxdb.conf` at `/etc/influxdb/influxdb.conf` and don't forget to restart the server after the changes. You can find a sample 'influxdb.conf' [file here](https://github.com/jheyman/influxdb/blob/master/influxdb.conf).\n\n### Getting Started (Download and run the alert bot)\n\n```bash\ngit clone https://github.com/vitwit/validator-alertbot.git\ncd validator-alertbot\ncp example.config.toml config.toml\n```\n### Configure the following variables in `config.toml`\n\n- *tg_chat_id*\n\n    - Telegram chat ID to receive Telegram alerts, required for Telegram alerting.\n    \n- *tg_bot_token*\n\n    - Telegram bot token, required for Telegram alerting. The bot should be added to the chat and should have send message permission.\n\n- *sendgrid_token*\n\n    - If you want to get email notifications, then configure your sendgrid_token\n\n- *email_address*\n\n    - Configure your email address to which you wish to get the email notifications.\n\n- *alert_time1* and *alert_time2*\n\n    - These are for regular status updates. To receive validator status daily (twice), configure these parameters in the form of \"02:25PM\". The time here refers to UTC time.\n\n- *val_operator_addr*\n\n    - Operator address of your validator which will be used to get staking, delegation and distribution rewards.\n\n- *validator_hex_addr*\n\n    - Validator hex address useful to know about last proposed block, missed blocks and voting power.\n\n- *lcd_endpoint*\n\n    - Address of your lcd client (ex: http://localhost:1317).\n    \n    - If you want to start the rest server you can follow this (ex: gaiacli rest-server --laddr \"http://localhost:1317\" --chain-id testing) \n\n- *external_rpc*\n\n    - External open RPC endpoint(secondary RPC other than your own validator). Useful to gather information like validator caught up, syncing and missed blocks etc.\n\n- *validator_rpc_endpoint*\n\n     - Validator rpc end point (RPC of your own validator) useful to gather information about network info, validator voting power etc.\n\n- *balance_change_alert*\n\n    - If you want to receive alerts when your account balance changes then configure **balance_change_alert** to \"yes\" otherwise \"no\".\n\n- *block_diff_alert*\n\n    - If you want to receive block difference alert configure this **enable_alert** to \"yes\" otherwise \"no\".\n\n    - Configure **block_diff_threshold** An integer value to receive *Block difference alerts*, e.g. a value of 2 would alert you if your validator falls 2 or more blocks behind the chain's current block height.\n\n- *voting_power_alert*\n\n    - If you want to receive block difference alert configure this **enable_alert** to \"yes\" otherwise \"no\".\n\n    - Configure **voting_power_threshold** to receive alert when the voting power reaches or drops below of the threshold given.\n\n- *Peers_alert*\n\n    - If you want to receive block difference alert configure this **enable_alert** to \"yes\" otherwise \"no\".\n\n    -  Configure **num_peers_threshold** to get an alert if the no.of connected peers falls below the threshold.\n\n- *influxdb*\n\n    - Configure *port*, *username* and *database*. Make sure not to forget creating a database and configure it before you run the code.\n\nAfter populating config.toml, check if you have connected to influxdb and created a database which you are going to use.\n\nIf your connection throws error \"database not found\", create a database\n\n```bash\n$   cd $HOME\n$   influx\n\u003e   CREATE DATABASE db_name\n\nex: CREATE DATABASE akash_alertbot\n```\n\nAdd a retention policy for the db\n```bash\n$ use db_name\n$ CREATE RETENTION POLICY \"seven_days_only\" ON db_name DURATION 7d REPLICATION 1 DEFAULT;\n$ show retention policies\n```\n\nNote : Before running the code make sure that you have configured all the required details otherwise the code may give fatal errors.\n\n- Build and run the alerting bot using binary\n\n```bash\n$ go build -o validator-alert-bot \u0026\u0026 ./validator-alert-bot\n```\n\n- Run using docker\n\n```bash\n$ docker build -t alertbot .\n$ docker run -d --name validator-alertbot alertbot\n```\n\n## Here is the list of available alerts and telegram commands\n\n - Alert about validator node sync status.\n - Alert when a validator miss a block\n - Alert when there is a change in account balance.\n - Alert when no.of peers count falls below of **num_peers_threshold** which is user configured in *config.toml*\n- Alert when the block difference between network and validator reaches or exceeds the **block_diff_threshold** which is user configured in *config.toml*.\n- Alert about validator health, i.e. whether it's voting or jailed. You can get alerts twice a day based on the time you have configured **alert_time1** and **alert_time2** in *config.toml*. This is a useful sanity check, to confirm the validator is voting (or alerting you if it's jailed).\n- Alert when the voting power of your validator drops below **voting_power_threshold** which is user configured in *config.toml*\n\n### List of avaliable telegram commands\n To get response from these commands you can just */command_name** from your autorized telegram account.\n You will be getting response to your telegram account based on the tg_bot_token you have configured in *config.toml*\n\n - /status : Gives validator's status,current block height, voting power and network current block height.\n - /node : Gives status of caught-up\n - /peers : Returns number of connected peers\n - /balance : Returns the current balance of your account\n - /list : List of available commands\n\n ## Feedback and Questions\n\nPlease feel free to create issues in this repo to ask questions and/or suggest additional metrics, alerts or features.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitwit%2Fvalidator-alertbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitwit%2Fvalidator-alertbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitwit%2Fvalidator-alertbot/lists"}