{"id":18737421,"url":"https://github.com/mikesafonov/prometheus-telegram-alert","last_synced_at":"2025-04-12T19:32:23.017Z","repository":{"id":38107592,"uuid":"135058102","full_name":"MikeSafonov/prometheus-telegram-alert","owner":"MikeSafonov","description":"Transfer alerts from Prometheus Alertmanager to Telegram chat and channels using webhook.","archived":false,"fork":false,"pushed_at":"2023-03-06T09:01:37.000Z","size":215,"stargazers_count":17,"open_issues_count":9,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T01:02:28.493Z","etag":null,"topics":["java","prometheus-alertmanager","spring-boot","telegram"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikeSafonov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"MikeSafonov"}},"created_at":"2018-05-27T15:21:37.000Z","updated_at":"2024-01-08T12:37:07.000Z","dependencies_parsed_at":"2023-02-12T00:35:16.343Z","dependency_job_id":null,"html_url":"https://github.com/MikeSafonov/prometheus-telegram-alert","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeSafonov%2Fprometheus-telegram-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeSafonov%2Fprometheus-telegram-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeSafonov%2Fprometheus-telegram-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeSafonov%2Fprometheus-telegram-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikeSafonov","download_url":"https://codeload.github.com/MikeSafonov/prometheus-telegram-alert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248621275,"owners_count":21134794,"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":["java","prometheus-alertmanager","spring-boot","telegram"],"created_at":"2024-11-07T15:25:04.429Z","updated_at":"2025-04-12T19:32:22.713Z","avatar_url":"https://github.com/MikeSafonov.png","language":"Java","funding_links":["https://patreon.com/MikeSafonov"],"categories":[],"sub_categories":[],"readme":"# Prometheus Alertmanager Telegram \n\nThis Spring Boot application helps to transfer alerts \nfrom [Prometheus Alertmanager](https://prometheus.io/docs/alerting/alertmanager/)\n to Telegram chat and channels using webhooks and [spring-boot-starter-prometheus-alerts](https://github.com/MikeSafonov/spring-boot-starter-prometheus-alerts)\n \n [![codecov](https://codecov.io/gh/MikeSafonov/prometheus-telegram-alert/branch/master/graph/badge.svg)](https://codecov.io/gh/MikeSafonov/prometheus-telegram-alert)\n ![Travis-CI](https://travis-ci.com/MikeSafonov/prometheus-telegram-alert.svg?branch=master)\n [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n \n [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n \n [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n \n [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=MikeSafonov_prometheus-telegram-alert\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=MikeSafonov_prometheus-telegram-alert)\n\n\n## Getting started \n\n### Build from source\n\nYou can build application using following command:\n\n    ./gradlew clean build\n\n### Testing\n\nYou can run unit test using following command:\n\n    ./gradlew test\n\n### Configuration\n\nAccording to [Spring Docs](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files)\nyou can override default application properties by put custom **application.properties** file in one of the following\nlocations:\n\n- a `/config` subdirectory of the current directory\n- the current directory\n\nThe following properties can be configured in **application.properties**:\n\n| property | description |\n| -------- | ----------- |\n| prometheus.alertmanager.endpoint.base | base url for POST request mapping for prometheus alert (default `/alert`) |\n| server.port | application port (default `8080`) |\n| prometheus.telegram.auth-token | telegram bot auth token |\n| prometheus.telegram.chat-id | telegram chat id |\n| prometheus.telegram.proxy.enable | is use proxy (default `false`) |\n| prometheus.telegram.proxy.host | proxy host |\n| prometheus.telegram.proxy.port | proxy port |\n\n### Running jar\n\nYou can run application using following command:\n\n    java -jar prometheus-telegram-alert.jar\n\nYou can test application by sending POST request with request body \nfrom **test alerts/simple.json** file.\n\n### Building and running app with Docker and docker-compose\n\n - For building the application and creation Docker image run\n \n        docker-compose build\n\n - Customise configs with you preferred editor\n\n   place configs in ./config directory   \n\n - Run the docker image  \n\n        docker-compose up -d\n\n### Alertmanager configuration\n\n```\nroute:\n  receiver: 'telegram'\nreceivers:\n- name: 'telegram'\n  webhook_configs:\n    - url: http://\u003capplication-host\u003e:\u003capplication-port\u003e/alert\n```\n\n## Message format\n\nYou can create your own message format by implementing **MessageConverter.java**.\n\n## Holding secrets with [HashiCorp Vault](https://www.vaultproject.io/)\n\nIntegration with `Vault` was made using [spring-cloud-vault](https://cloud.spring.io/spring-cloud-vault/reference/html/).\n\nBy default `prometheus-telegram-alert` integration with `Vault` disabled. \n\nTo enable integration with `Vault` pass following arguments to `prometheus-telegram-alert` run command:\n\n    java -jar prometheus-telegram-alert.jar --spring.cloud.vault.enabled=true --spring.cloud.vault.uri=\u003cyour vault uri\u003e \n    --spring.cloud.vault.token=\u003cyour vault token\u003e --spring.cloud.vault.kv.application-name=\u003cvault application name\u003e\n \n \n## Contributing\n\nFeel free to contribute. \nNew feature proposals and bug fixes should be submitted as GitHub pull requests. \nFork the repository on GitHub, prepare your change on your forked copy, and submit a pull request.\n\n**IMPORTANT!**\n\u003eBefore contributing please read about [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) / [Conventional Commits RU](https://www.conventionalcommits.org/ru/v1.0.0-beta.2/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikesafonov%2Fprometheus-telegram-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikesafonov%2Fprometheus-telegram-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikesafonov%2Fprometheus-telegram-alert/lists"}