{"id":22711712,"url":"https://github.com/manyakrus/telegram_loki","last_synced_at":"2025-07-17T03:32:56.875Z","repository":{"id":199729457,"uuid":"703535701","full_name":"ManyakRus/telegram_loki","owner":"ManyakRus","description":"Search and send all error texts from logger LOKI(GRAFANA) to Telegram messenger. Processes a list of all your services.","archived":false,"fork":false,"pushed_at":"2025-03-04T14:42:07.000Z","size":10376,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T16:13:12.139Z","etag":null,"topics":["errors","errors-handling","grafana","log","loki","telegram"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ManyakRus.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}},"created_at":"2023-10-11T12:28:31.000Z","updated_at":"2025-03-04T14:42:11.000Z","dependencies_parsed_at":"2024-09-13T18:58:50.672Z","dependency_job_id":"8fc9b109-179e-4555-b432-61717f395a86","html_url":"https://github.com/ManyakRus/telegram_loki","commit_stats":null,"previous_names":["manyakrus/telegram_loki"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ManyakRus/telegram_loki","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManyakRus%2Ftelegram_loki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManyakRus%2Ftelegram_loki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManyakRus%2Ftelegram_loki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManyakRus%2Ftelegram_loki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManyakRus","download_url":"https://codeload.github.com/ManyakRus/telegram_loki/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManyakRus%2Ftelegram_loki/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265563036,"owners_count":23788632,"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":["errors","errors-handling","grafana","log","loki","telegram"],"created_at":"2024-12-10T13:07:52.594Z","updated_at":"2025-07-17T03:32:56.841Z","avatar_url":"https://github.com/ManyakRus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Applications for sending logs with errors from the LOKI(GRAFANA) logger to the Telegram messenger\n\nThe LOKI logger has an inconvenient interface for searching errors in application logs,\nand no one will look there every 5 minutes -\nTherefore, it is necessary to automate the process of searching for errors in logs and notifying developers.\n\nThe application does:\nSearch for errors in the LOKI logger\n1. Log in to grafana\n2. Takes a list of services from the services.txt file,\nincluding the name of the service and the name of the person responsible\n3. For each service, searches for LOKI logs with the text: error:, panic:, ERROR:, PANIC:\n4. Sends the found logs with errors to the Telegram messenger\n5. Repeats the search every 10 minutes\n\nSearch for errors in the database:\n1. Log in to the PostgreSQL database\n2. Finds .sql files in the sql folder, and executes a script in the database,\nif the script returns a value, a message about this will come to the Telegram messenger,\nif the script does not return lines, then everything is fine.\n3. Repeats requests every 60 minutes\n4. If you fill in the scripts.txt file (scripts_add.txt),\nincluding the .sql file name and the name of the person responsible,\nthen the name of the person responsible will also be added.\n\nThe bot sends error logs to Telegram groups:\n1. General group with all errors, all programmers.\nGroup ID is filled in settings.txt, TELEGRAM_CHAT_NAME=\nIn the Telegram group settings, you need to set the rights Group type = \"Public\"\n2. Each programmer separately, only logs that apply to him.\nFilled in the files services.txt, scripts.txt\nEach programmer must add this telegram bot to his Telegram\n\nInstallation procedure:\n1. Compile this repository\n\u003emake build\nthe telegram_loki file will appear in the bin folder\n\n2. fill parametes in settings.txt file (or .env file)\nwith Grafana LOKI URL, login, password, etc.\n\n3. Fill in the settings/services.txt file\nIn json format write the service name in LOKI\nand the name (login) of the programmer (optional)\nsample:\n{\n   \"test-service1\": \"@DeveloperTelegramName\"\n}\n\n\n3. Run the telegram_loki file\n\n\nSource code in Golang language.\nTested on Linux Ubuntu\nReadme from 10/13/2023\n\nLicense:\nSave information about the author and the site.\n\nMade by Alexander Nikitin\nhttps://github.com/ManyakRus/telegram_loki","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanyakrus%2Ftelegram_loki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanyakrus%2Ftelegram_loki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanyakrus%2Ftelegram_loki/lists"}