{"id":19900064,"url":"https://github.com/m-lab/alertmanager-github-receiver","last_synced_at":"2025-09-03T04:34:21.840Z","repository":{"id":44527368,"uuid":"94920456","full_name":"m-lab/alertmanager-github-receiver","owner":"m-lab","description":"Prometheus Alertmanager webhook receiver that creates GitHub issues from alerts","archived":false,"fork":false,"pushed_at":"2025-01-05T16:27:18.000Z","size":190,"stargazers_count":48,"open_issues_count":8,"forks_count":23,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-08-28T11:28:46.193Z","etag":null,"topics":["prometheus"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-lab.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":"2017-06-20T18:01:07.000Z","updated_at":"2025-07-08T19:34:07.000Z","dependencies_parsed_at":"2024-11-06T17:30:52.640Z","dependency_job_id":"308a537d-6678-48c8-bd41-bd6bf4df1c86","html_url":"https://github.com/m-lab/alertmanager-github-receiver","commit_stats":{"total_commits":98,"total_committers":11,"mean_commits":8.909090909090908,"dds":0.5918367346938775,"last_synced_commit":"5220feb3d9a51f811408d1baf75a090790f860f1"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/m-lab/alertmanager-github-receiver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Falertmanager-github-receiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Falertmanager-github-receiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Falertmanager-github-receiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Falertmanager-github-receiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-lab","download_url":"https://codeload.github.com/m-lab/alertmanager-github-receiver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Falertmanager-github-receiver/sbom","scorecard":{"id":607949,"data":{"date":"2025-08-11","repo":{"name":"github.com/m-lab/alertmanager-github-receiver","commit":"5220feb3d9a51f811408d1baf75a090790f860f1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":9,"reason":"Found 18/19 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:15: pin your Docker image by updating gcr.io/distroless/static to gcr.io/distroless/static@sha256:2e114d20aa6371fd271f854aa3d6b2b7d2e70e797bb3ea44fb677afec60db22c","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"31 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2021-0053 / GHSA-c3h9-896r-86jm","Warn: Project is vulnerable to: GO-2020-0008 / GHSA-44r7-7p62-q3fr","Warn: Project is vulnerable to: GO-2023-2020 / GHSA-v86x-5fm3-5p7j","Warn: Project is vulnerable to: GO-2022-0322 / GHSA-cg3q-j54f-5p7p","Warn: Project is vulnerable to: GO-2022-0229 / GHSA-cjjc-xp8v-855w","Warn: Project is vulnerable to: GO-2020-0012 / GHSA-ffhg-7mh4-33c4","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2020-0015 / GHSA-5rcv-m4m3-hfh7","Warn: Project is vulnerable to: GO-2021-0113 / GHSA-ppp9-7jff-5vj2","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T02:01:56.564Z","repository_id":44527368,"created_at":"2025-08-21T02:01:56.564Z","updated_at":"2025-08-21T02:01:56.564Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273392123,"owners_count":25097255,"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-09-03T02:00:09.631Z","response_time":76,"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":["prometheus"],"created_at":"2024-11-12T20:11:03.161Z","updated_at":"2025-09-03T04:34:21.743Z","avatar_url":"https://github.com/m-lab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alertmanager-github-receiver\n [![Version](https://img.shields.io/github/tag/m-lab/alertmanager-github-receiver.svg)](https://github.com/m-lab/alertmanager-github-receiver/releases) [![Build Status](https://travis-ci.org/m-lab/alertmanager-github-receiver.svg?branch=master)](https://travis-ci.org/m-lab/alertmanager-github-receiver) [![Coverage Status](https://coveralls.io/repos/m-lab/alertmanager-github-receiver/badge.svg?branch=master)](https://coveralls.io/github/m-lab/alertmanager-github-receiver?branch=master) [![GoDoc](https://godoc.org/github.com/m-lab/alertmanager-github-receiver?status.svg)](https://godoc.org/github.com/m-lab/alertmanager-github-receiver) | [![Go Report Card](https://goreportcard.com/badge/github.com/m-lab/alertmanager-github-receiver)](https://goreportcard.com/report/github.com/m-lab/alertmanager-github-receiver)\n\nNot all alerts are an emergency. But, we want to track every one\nbecause alerts are always an actual problem. Either:\n\n * an actual problem in the monitored system\n * an actual problem in processes around the monitored system\n * an actual problem with the alert itself\n\nThe alertmanager github receiver creates GitHub issues using\n[Alertmanager](https://github.com/prometheus/alertmanager) webhook\nnotifications.\n\n# Build\n```\nmake docker DOCKER_TAG=repo/imageName\n```\nThis will build the binary and push it to repo/imageName.\n\n# Setup\n\n## Create GitHub access token\n\nThe github receiver uses user access tokens to create issues in an existing\nrepository.\n\nGenerate a new access token:\n\n* Log into GitHub and visit https://github.com/settings/tokens\n* Click the 'Generate new token' button\n* Select the 'repo' scope and all subscopes of 'repo'\n\nBecause this access token has permission to create issues and operate on\nrepositories the access token user can access, protect the access token as\nyou would a password.\n\n## Start GitHub Receiver\n\nTo start the github receiver locally:\n```\ndocker run -it -p 9393:9393 measurementlab/alertmanager-github-receiver:latest\n        -authtoken=$(GITHUB_AUTH_TOKEN) -org=\u003corg\u003e -repo=\u003crepo\u003e\n```\n\nNote: both the org and repo must already exist.\n\n## Configure Alertmanager Webhook Plugin\n\nThe Prometheus Alertmanager supports third-party notification mechanisms\nusing the [Alertmanager Webhook API](https://prometheus.io/docs/alerting/configuration/#webhook_config).\n\nAdd a receiver definition to the alertmanager configuration.\n\n```\n- name: 'github-receiver-issues'\n  webhook_configs:\n  - url: 'http://localhost:9393/v1/receiver'\n```\n\nTo publish a test notification by hand, try:\n\n```\nmsg='{\n  \"version\": \"4\",\n  \"groupKey\": \"fakegroupkey\",\n  \"status\": \"firing\",\n  \"receiver\": \"http://localhost:9393/v1/receiver\",\n  \"groupLabels\": {\"alertname\": \"FoobarIsBroken\"},\n  \"externalURL\": \"http://localhost:9093\",\n  \"alerts\": [\n    {\n      \"labels\": {\"thing\": \"value\"},\n      \"annotations\": {\"hint\": \"how to fix foobar\"},\n      \"status\": \"firing\",\n      \"startsAt\": \"2018-06-12T01:00:00Z\",\n      \"endsAt\": \"2018-06-14T01:00:00Z\"\n    }\n  ]\n}'\ncurl -XPOST --data-binary \"${msg}\" http://localhost:9393/v1/receiver\n```\n\n# Configuration\n\n## Alertmanager \u0026 Github Receiver\n\nThe Alertmanager configuration controls what labels are present on alerts\ndelivered to the github-receiver. The github-receiver configuration must be\ncompatible with these settings to work effectively.\n\nFor example, it is common for the Alertmanager to use alert routes that\n`group_by: ['alertname']`. See: https://github.com/prometheus/alertmanager#example\n\nAnd, the github-receiver's default \"title template\" is\n`{{ .Data.GroupLabels.alertname }}`, which depends on an alertname group\nlabel.\n\nIf an alert does not include this label, the template will evaluate to `\u003cno value\u003e`.\nTo prevent this, ensure that the github-receiver title template uses labels available\nin an Alertmanager [Message](https://godoc.org/github.com/prometheus/alertmanager/notify/webhook#Message).\n\n## Auto close\n\nIf `-enable-auto-close` is specified, the program will close each issue as its\ncorresponding alert is resolved. It searches for matching issues by filtering\nopen issues on the value of `-alertlabel` and then matching issue titles. The\nissue title template can be overridden using `-title-template-file` for greater\n(or lesser) specificity. The default template is\n`{{ .Data.GroupLabels.alertname }}`, which sets the issue title to the alert\nname. The template is passed a\n[Message](https://godoc.org/github.com/prometheus/alertmanager/notify/webhook#Message)\nas its argument.\n\n## Repository\n\nIf the alert includes a `repo` label, issues will be created in that repository,\nunder the GitHub organization specified by `-org`. If no `repo` label is\npresent, issues will be created in the repository specified by the `-repo`\noption.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Falertmanager-github-receiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-lab%2Falertmanager-github-receiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Falertmanager-github-receiver/lists"}