{"id":15537263,"url":"https://github.com/knyar/phalerts","last_synced_at":"2025-04-23T14:31:54.063Z","repository":{"id":43473904,"uuid":"106105394","full_name":"knyar/phalerts","owner":"knyar","description":"Phabricator webhook for Prometheus Alertmanager","archived":false,"fork":false,"pushed_at":"2023-01-09T18:17:20.000Z","size":25,"stargazers_count":16,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T00:55:28.719Z","etag":null,"topics":["alertmanager","monitoring","notifications","phabricator","prometheus"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/knyar.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}},"created_at":"2017-10-07T14:47:02.000Z","updated_at":"2024-02-02T16:18:55.000Z","dependencies_parsed_at":"2023-02-08T13:30:38.743Z","dependency_job_id":null,"html_url":"https://github.com/knyar/phalerts","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/knyar%2Fphalerts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knyar%2Fphalerts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knyar%2Fphalerts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knyar%2Fphalerts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knyar","download_url":"https://codeload.github.com/knyar/phalerts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250451685,"owners_count":21432872,"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":["alertmanager","monitoring","notifications","phabricator","prometheus"],"created_at":"2024-10-02T11:55:42.972Z","updated_at":"2025-04-23T14:31:54.028Z","avatar_url":"https://github.com/knyar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://secure.travis-ci.org/knyar/phalerts.svg?branch=master)](http://travis-ci.org/knyar/phalerts?branch=master)\n[![Coverage Status](https://coveralls.io/repos/github/knyar/phalerts/badge.svg?branch=master)](https://coveralls.io/github/knyar/phalerts?branch=master)\n\n## Phabricator webhook for Prometheus Alertmanager\n\n`phalerts` is a simple service that implements\n[Alertmanager](https://github.com/prometheus/alertmanager) webhook receiver API\nand creates/updates [Phabricator](https://www.phacility.com/phabricator/) tasks\nbased on alert notifications from Alertmanager.\n\nThe service:\n\n* determines task title and description based on notification fields;\n* if there is an existing open task with a given title, updates its description\n  if necessary;\n* if there is no open task, created a new one.\n\nYou can optionally provide a project name/ID (or several) and `phalerts` will only\nlook for tasks in that project, and will assign that project to all new tasks it\ncreates.\n\n## Usage\n\nYou will need to create a\n[bot account](https://secure.phabricator.com/book/phabricator/article/users/#bot-accounts)\nwhich will be used to manage alert-based tasks and generate an API token via\n`[Bot User] \u003e Manage \u003e Edit Settings \u003e Conduit API Tokens`.\n\n`phalerts` expects the token to be present in `PHABRICATOR_TOKEN` environment\nvariable, so you'll typically use a command like this to start it:\n\n```\nPHABRICATOR_TOKEN=api-xxxxxx phalerts.py https://phab.company.tld bot-username\n```\n\nThen configure a new receiver in Alertmanager configuration file. For example,\nto create/update tasks in the `prometheus-alerts` Phabricator project, define:\n\n```yaml\nreceivers:\n- name: phalerts\n  webhook_configs:\n  - url: http://localhost:8292/alerts?project=prometheus-alerts\n    send_resolved: false\n```\n\nAt each call the Phabricator ID (`PHID`) for `prometheus-alerts` will be looked\nup. Specifying IDs is also supported via the `phid` query string parameter.\n\nFinally, actually route some alerts to the receiver you've created.\n\n### Title template\n\nTasks created by `phalerts` will be titled by a jinja template, by default the\nalert group's name (`--tpl_format` CLI option). You can override the title\ntemplate with the `title` query string parameter.\n\n## Known issues\n\nSearch queries issued to Phabricator only process first 100 results. This is\nunlikely to be a problem (especially for small installations), however you might\nneed to implement paging support in `phalerts` if you have many projects or\nopen tasks with similar names. You should see `phalerts_request_errors_total`\ncounter incremented and \"Unexpected 'after' cursor\" error messages if this\nbecomes a problem.\n\n## License\n\nLicensed under MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknyar%2Fphalerts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknyar%2Fphalerts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknyar%2Fphalerts/lists"}