{"id":36439050,"url":"https://github.com/sdvdxl/falcon-message","last_synced_at":"2026-01-11T20:55:34.913Z","repository":{"id":57484319,"uuid":"93372038","full_name":"sdvdxl/falcon-message","owner":"sdvdxl","description":"open-falcon alarm 发送消息组件","archived":false,"fork":false,"pushed_at":"2019-09-11T01:58:55.000Z","size":2615,"stargazers_count":66,"open_issues_count":0,"forks_count":42,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-21T10:32:14.406Z","etag":null,"topics":["dingding","dingtalk","open-falcon","wechat","weixin"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdvdxl.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}},"created_at":"2017-06-05T06:25:25.000Z","updated_at":"2024-07-09T07:06:53.000Z","dependencies_parsed_at":"2022-08-26T12:24:55.190Z","dependency_job_id":null,"html_url":"https://github.com/sdvdxl/falcon-message","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/sdvdxl/falcon-message","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdvdxl%2Ffalcon-message","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdvdxl%2Ffalcon-message/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdvdxl%2Ffalcon-message/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdvdxl%2Ffalcon-message/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdvdxl","download_url":"https://codeload.github.com/sdvdxl/falcon-message/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdvdxl%2Ffalcon-message/sbom","scorecard":{"id":807417,"data":{"date":"2025-08-11","repo":{"name":"github.com/sdvdxl/falcon-message","commit":"a3678854dff0d060706cb23f20dd1bdd2b5b6645"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.0.5 not signed: https://api.github.com/repos/sdvdxl/falcon-message/releases/19898460","Warn: release artifact v0.0.4 not signed: https://api.github.com/repos/sdvdxl/falcon-message/releases/19246377","Warn: release artifact v0.0.3 not signed: https://api.github.com/repos/sdvdxl/falcon-message/releases/18723393","Warn: release artifact v0.0.2 not signed: https://api.github.com/repos/sdvdxl/falcon-message/releases/17199041","Warn: release artifact v0.0.1 not signed: https://api.github.com/repos/sdvdxl/falcon-message/releases/14675782","Warn: release artifact v0.0.5 does not have provenance: https://api.github.com/repos/sdvdxl/falcon-message/releases/19898460","Warn: release artifact v0.0.4 does not have provenance: https://api.github.com/repos/sdvdxl/falcon-message/releases/19246377","Warn: release artifact v0.0.3 does not have provenance: https://api.github.com/repos/sdvdxl/falcon-message/releases/18723393","Warn: release artifact v0.0.2 does not have provenance: https://api.github.com/repos/sdvdxl/falcon-message/releases/17199041","Warn: release artifact v0.0.1 does not have provenance: https://api.github.com/repos/sdvdxl/falcon-message/releases/14675782"],"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-23T12:08:56.229Z","repository_id":57484319,"created_at":"2025-08-23T12:08:56.229Z","updated_at":"2025-08-23T12:08:56.229Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28323591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dingding","dingtalk","open-falcon","wechat","weixin"],"created_at":"2026-01-11T20:55:34.342Z","updated_at":"2026-01-11T20:55:34.906Z","avatar_url":"https://github.com/sdvdxl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# falcon-message\n\nopen-falcon alarm 发送消息组件，注意这个是基于2.0版本新增的im功能定制。\n\n现在实现了钉钉群消息和微信消息\n\n## 注意，需要修改mysql 中 uic库中的user表，把im字段的大小改为4000（防止钉钉token溢出截断，不生效）\n\n## 微信\n\n需要在通讯录的人员名单中的IM配置处配置微信名字。\n配置说明请参考 [https://github.com/Yanjunhui/chat](https://github.com/Yanjunhui/chat) 这里，代码也是从这里复制粘贴，进行了适当修改，以适应当前程序。\n\n## 钉钉群\n\n1. 钉钉消息是发送到某个群，而不是针对单个人发送，所以需要在这个群中设置一个机器人，定义的时候，选择自定义机器人，然后将webhook链接中access_token的值拷贝出来，以备待用。\n1. 在falcon dashaboar 用户管理中心新建一个用户，填写email，然后在 IM 处填写 `[ding]:access_token`，这里的access_token就是上面的access_token，如果相同消息要发送给多个机器人，则access_token之间用英文分号`;`分隔，保存用户信息。\n1. 在dashboard的群组管理中心新建一个群组，把上面的这个用户加入到这个群组。\n1. 在要告警的地方把上面的这个群组加入即可。\n1. 修改alarm组件中 `api` 下，增加 配置：`\"im\": \"http://localhost:23329/api/v1/message\"`，端口按照本项目配置文件中的进行修改。\n1. 启动本项目即可。\n\n## 模板\n\n默认模板文件是 `message-template.md`，可以使用的参数如下：\n\n- 告警等级: {{.Level}}\n- 告警类型: {{.Type}}\n- 告警指标: {{.Condition}}\n- 告警主机: {{.Endpoint}}\n- 告警时间: {{.Time}}\n- 告警说明: {{.Desc}}\n- 次数：{{.Count}}\n- 表达式中的连续次数 {{.TriggerCount}}\n\n**如果参数配置错误会导致模板渲染失败无法发送。**\n\n默认模板中有如下表达式：\n\n```text\n{{with elapse .Count 60 .TriggerCount 300}}{{divide . 60}}{{end}}\n```\n\n其中 60 是数据上报周期，默认是60s，如果修改了默认值，需要修改这里的值。\n\n300 是告警之间推迟时间，默认5分钟。\n\n{{divide . 60}} 是除以60s，得到分钟","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdvdxl%2Ffalcon-message","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdvdxl%2Ffalcon-message","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdvdxl%2Ffalcon-message/lists"}