{"id":20618604,"url":"https://github.com/allanchain/grafana-feishu","last_synced_at":"2025-06-11T05:07:23.951Z","repository":{"id":160274572,"uuid":"635159980","full_name":"AllanChain/grafana-feishu","owner":"AllanChain","description":"Lightweight server to translate Grafana webhook to Feishu card.","archived":false,"fork":false,"pushed_at":"2024-05-15T08:59:41.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T08:01:32.445Z","etag":null,"topics":["feishu","grafana","webhook"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AllanChain.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}},"created_at":"2023-05-02T05:07:53.000Z","updated_at":"2024-09-17T01:49:14.000Z","dependencies_parsed_at":"2023-05-25T05:15:27.764Z","dependency_job_id":null,"html_url":"https://github.com/AllanChain/grafana-feishu","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/AllanChain%2Fgrafana-feishu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fgrafana-feishu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fgrafana-feishu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fgrafana-feishu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllanChain","download_url":"https://codeload.github.com/AllanChain/grafana-feishu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanChain%2Fgrafana-feishu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259204809,"owners_count":22821160,"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":["feishu","grafana","webhook"],"created_at":"2024-11-16T12:09:00.758Z","updated_at":"2025-06-11T05:07:23.933Z","avatar_url":"https://github.com/AllanChain.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grafana-Feishu\n\nLightweight server to translate Grafana webhook to Feishu card.\n\n## Usage\n\nThe program needs two environment variables:\n\n- `FEISHU_WEBHOOK`: (Optional) The web hook URL to push Feishu notifications. Should be something like `https://open.feishu.cn/open-apis/bot/v2/hook/a21843-123-123-abc987`\n- `FEISHU_WEBHOOK_BASE`: (Optional, has no effect if `FEISHU_WEBHOOK` is set) Something like `https://open.feishu.cn/open-apis/bot/v2/hook` (default).\n- `FEISHU_WEBHOOK_UUID`: (Optional, has no effect if `FEISHU_WEBHOOK` is set) The bot UUID, something like `a21843-123-123-abc987`.\nIf the bot UUID is not specified, it should be provided in the path. See below for detail.\n- `WEBHOOK_AUTH`: (Optional) The username and password. Should be something like `user:password`\n\nHere is an example docker compose file:\n\n```yaml\nversion: 3\nservices:\n  grafana:\n    # ...\n  grafana-feishu:\n    image: allanchain/grafana-feishu\n    container_name: grafana-feishu\n    restart: always\n    environment:\n      - WEBHOOK_AUTH=${WEBHOOK_AUTH}\n      - FEISHU_WEBHOOK=${FEISHU_WEBHOOK}\n      # Or, instead of FEISHU_WEBHOOK:\n      # - FEISHU_WEBHOOK_BASE=${FEISHU_WEBHOOK_BASE}\n      # - FEISHU_WEBHOOK_UUID=${FEISHU_WEBHOOK_UUID}\n```\n\nThe exposed port is `2387`.\n\nAfter setting up the server, go to Grafana \u003e \"Alerting\" \u003e \"Contact points\", add a new contact point with integration as \"Webhook\". Fill in the URL and credentials. \n\nIf the bot UUID is provided in `FEISHU_WEBHOOK` or `FEISHU_WEBHOOK_UUID` is set, the URL should be `http://grafana-feishu:2387`. Otherwise, the URL should be `http://grafana-feishu:2387/{botUUID}`, where `{botUUID}` is the UUID of the bot you created in Feishu, i.e. the last part of the bot webhook URL.\n\n\u003cimg width=\"737\" alt=\"Grafana config\" src=\"https://user-images.githubusercontent.com/36528777/235901125-181eeb60-df6c-45ff-b550-7756a91c65d1.png\"\u003e\n\nBy default, the color of the card reflects the alert status, and the card title will be the `\"summary\"` annotation, and the content will be the `\"description\"` annotation. You can customize the summary and description in alert rules using Go templates. An example:\n\n```\n{{ if $values.B }}{{ if eq $values.C.Value 0.0 }}Resolve {{ end }}alert{{ else }}No data{{ end }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallanchain%2Fgrafana-feishu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallanchain%2Fgrafana-feishu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallanchain%2Fgrafana-feishu/lists"}