{"id":32654926,"url":"https://github.com/onliner/alerto","last_synced_at":"2025-10-31T09:53:51.009Z","repository":{"id":321046922,"uuid":"1081179940","full_name":"onliner/alerto","owner":"onliner","description":"Webhook bridge between Graylog and Telegram for real-time alert delivery.","archived":false,"fork":false,"pushed_at":"2025-10-27T14:09:02.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-27T14:37:05.932Z","etag":null,"topics":["alerting","graylog","python","telegram"],"latest_commit_sha":null,"homepage":"","language":"Python","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/onliner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-22T12:25:13.000Z","updated_at":"2025-10-22T13:06:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"2a4b567f-cfc3-4d08-a39e-a320486c7777","html_url":"https://github.com/onliner/alerto","commit_stats":null,"previous_names":["onliner/alerto"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/onliner/alerto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onliner%2Falerto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onliner%2Falerto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onliner%2Falerto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onliner%2Falerto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onliner","download_url":"https://codeload.github.com/onliner/alerto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onliner%2Falerto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281969164,"owners_count":26591719,"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","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alerting","graylog","python","telegram"],"created_at":"2025-10-31T09:53:49.393Z","updated_at":"2025-10-31T09:53:51.002Z","avatar_url":"https://github.com/onliner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚨 Graylog → Telegram Alerts\n\nA lightweight webhook service that receives alert payloads from Graylog,  \nformats them into structured Telegram messages, and sends them via the Telegram Bot API.  \nIt respects API rate limits and is easy to configure and deploy with Docker.\n\n[![Python][python-badge]][python-link]\n[![Docker][docker-badge]][docker-link]\n[![License][license-badge]][license-link]\n\n---\n\n## 🧑‍💻 Run Locally\n\n### 1. Clone the repository\n\n```bash\ngit clone git@github.com:onlinerby/alerto.git\ncd alerto\n```\n\n### 2. Create a virtual environment\n\n```bash\npython3 -m venv env\nsource env/bin/activate\n```\n\n### 3. Install requirements\n\n```bash\npip3 install --upgrade pip\npip3 install -r requirements.txt\n```\n\n### 4. Configure environment\n\nCreate a local `.env` file:\n\n```bash\ncp .env.example .env\n```\n\nThen edit it and set the following variables:\n\n- `AUTH_TOKEN` — Bearer token required for incoming webhook requests\n- `TELEGRAM_TOKEN` — API token from [@BotFather](https://t.me/botfather)\n- `CHAT_ID` — ID of the chat where bug reports should be delivered\n- `MAX_MESSAGES_PER_MINUTE` — Telegram rate limit (messages per minute)\n\n\u003e [!TIP]  \n\u003e If `AUTH_TOKEN` is not set, authentication is disabled, and anyone can POST alerts to your endpoint.  \n\u003e **For production, it’s strongly recommended to define a secure token.**\n\n\u003e [!CAUTION]  \n\u003e **Keep your tokens and API keys safe** — they grant full control over your bot.\n\n### 5. Start the service (development)\n\n```\npython app.py\n```\n\nThis command starts the built-in aiohttp development server.  \nBy default, it listens on http://localhost:8080.\n\n## 🐳 Run in Docker\n\n### 1. Clone the repository\n\n```bash\ngit clone git@github.com:onlinerby/alerto.git\ncd alerto\n```\n\n### 2. Configure environment\n\n```bash\ncp .env.example .env  \n# Fill in your TELEGRAM_TOKEN, CHAT_ID, and optionally AUTH_TOKEN\n```\n\n### 3. Build and run the container\n\n```bash\ndocker build -t alerto .\ndocker run --rm -p 8080:8080 --env-file .env alerto\n```\n\n\u003e [!NOTE]  \n\u003e To create a bot and get your API token, message [@BotFather](https://t.me/botfather) and follow the instructions:    \n\u003e [**Telegram Bot Guide →**](https://core.telegram.org/bots#6-botfather)\n\n## 🧾 Graylog Test Event\n\nAn example payload is available in [graylog.json](graylog.json).  \nYou can use it to test the service locally:\n\n```bash\ncurl -X POST http://localhost:8080 \\\n     -H \"Authorization: Bearer \u003cauth token\u003e\" \\\n     --data @graylog.json\n```\n\n## 🧩 Integration Guide\n\nFor a full setup walkthrough — including Graylog stream, pipeline, and event definition —\nsee the detailed documentation:  \n [**Integration Guide →**](docs/graylog.md)\n\n## 📜 License\n\nReleased under the [MIT License](LICENSE).\n\n\n[python-badge]: https://img.shields.io/badge/python-3.9+-brightgreen.svg\n[python-link]: https://www.python.org\n[docker-badge]: https://img.shields.io/badge/docker-ready-blue\n[docker-link]: https://www.docker.com\n[license-badge]: https://img.shields.io/badge/license-MIT-green  \n[license-link]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonliner%2Falerto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonliner%2Falerto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonliner%2Falerto/lists"}