{"id":19064977,"url":"https://github.com/netkiller/alertmanager","last_synced_at":"2026-06-14T23:32:17.409Z","repository":{"id":69703483,"uuid":"577202740","full_name":"netkiller/alertmanager","owner":"netkiller","description":"普罗米修斯短信报警","archived":false,"fork":false,"pushed_at":"2022-12-12T07:58:26.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T02:44:33.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netkiller.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":"2022-12-12T07:57:17.000Z","updated_at":"2022-12-13T03:15:27.000Z","dependencies_parsed_at":"2023-07-11T05:34:30.604Z","dependency_job_id":null,"html_url":"https://github.com/netkiller/alertmanager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/netkiller/alertmanager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2Falertmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2Falertmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2Falertmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2Falertmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netkiller","download_url":"https://codeload.github.com/netkiller/alertmanager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netkiller%2Falertmanager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34342089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":[],"created_at":"2024-11-09T00:48:05.501Z","updated_at":"2026-06-14T23:32:17.374Z","avatar_url":"https://github.com/netkiller.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alertmanager Webhoook\n\n## 编译\n\n\tneo@MacBook-Pro-Neo ~/workspace/alertmanager % mvn clean package docker:build\n\n## Alertmanager 配置\n\n\tglobal:\n\t\n\troute:\n\t  group_by: [\"alertname\"]\n\t  group_wait: 10s\n\t  group_interval: 10s\n\t  repeat_interval: 1h\n\t  receiver: webhook\n\t\n\treceivers:\n\t- name: 'webhook'\n\t  webhook_configs:\n\t    - url: 'http://alertmanager-webhook:8080/webhook'\n\t\n## docker-compose.yaml 容器编排文件\n\n\tversion: '3.9'\t\n\tservices:\n\t  alertmanager-webhook:\n\t    image: netkiller/alertmanager\n\t    container_name: alertmanager-webhook\n\t    restart: always\n\t    hostname: alertmanager-webhook\n\t    extra_hosts:\n\t      - dysmsapi.aliyuncs.com:106.11.45.35\n\t    environment:\n\t      TZ: Asia/Shanghai\n\t      JAVA_OPTS: -Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m\n\t    ports:\n\t      - 8080:8080\n\t    volumes:\n\t      - ${PWD}/alertmanager/application.properties:/app/application.properties\n\t      - /tmp/alertmanager:/tmp\n\t    working_dir: /app\n\t    command:\n\t      --spring.config.location=/app/application.properties\n\t    \n## application.properties 配置文件\t    \n\n\t# 开启调试模式\n\tlogging.level.cn.netkiller=DEBUG\n\t# 暂未使用\n\talertmanager.email=netkiller@email.com\n\t# 报警手机，多个手机好吗使用逗号分割\n\talertmanager.mobile=13113666600\n\t\n\t# 阿里云区域\n\taliyun.sms.regionId=cn-shanghai\t\n\t# accessKeyId 和 accessSecret\n\taliyun.sms.accessKeyId=\n\taliyun.sms.accessSecret=\n\t# 签名\n\taliyun.sms.signName=\n\t# 模版号\n\taliyun.sms.templateCode=\n\t\n## Debug 调试信息\n\n\tneo@MacBook-Pro-Neo ~/workspace/docker/prometheus % docker-compose up alertmanager-webhook  \n\t[+] Running 0/1\n\t[+] Running 1/1ertmanager-webhook  Recreate                                                                                                                                                            0.1s\n\t ⠿ Container alertmanager-webhook  Started                                                                                                                                                             0.9s\n\tAttaching to alertmanager-webhook\n\talertmanager-webhook  | Alertmanager Webhook...\n\talertmanager-webhook  | \n\talertmanager-webhook  |   .   ____          _            __ _ _\n\talertmanager-webhook  |  /\\\\ / ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\n\talertmanager-webhook  | ( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n\talertmanager-webhook  |  \\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n\talertmanager-webhook  |   '  |____| .__|_| |_|_| |_\\__, | / / / /\n\talertmanager-webhook  |  =========|_|==============|___/=/_/_/_/\n\talertmanager-webhook  |  :: Spring Boot ::                (v2.5.4)\n\talertmanager-webhook  | \n\talertmanager-webhook  | 2021-08-24 11:44:28.024  INFO 1 --- [           main] cn.netkiller.alertmanager.Application    : Starting Application v0.0.1 using Java 16.0.2 on alertmanager-webhook with PID 1 (/app/alertmanager-0.0.1.jar started by root in /app)\n\talertmanager-webhook  | 2021-08-24 11:44:28.031 DEBUG 1 --- [           main] cn.netkiller.alertmanager.Application    : Running with Spring Boot v2.5.4, Spring v5.3.9\n\talertmanager-webhook  | 2021-08-24 11:44:28.032  INFO 1 --- [           main] cn.netkiller.alertmanager.Application    : No active profile set, falling back to default profiles: default\n\talertmanager-webhook  | 2021-08-24 11:44:31.307  INFO 1 --- [           main] o.s.b.web.embedded.netty.NettyWebServer  : Netty started on port 8080\n\talertmanager-webhook  | 2021-08-24 11:44:31.328  INFO 1 --- [           main] cn.netkiller.alertmanager.Application    : Started Application in 4.233 seconds (JVM running for 5.199)\n\t\n\t\n\talertmanager-webhook  | 2021-08-24 11:44:33.739 DEBUG 1 --- [or-http-epoll-2] c.n.a.controller.WebhookController       : Alertmanager [receiver=webhook, status=resolved, alerts=[Alert [status=resolved, labels=Labels [alertname=磁盘满22, dev=sda1, instance=example, msgtype=testing], annotations=Annotations [info=/dev/vdb2 磁盘空间满, summary=/dev/vdb1 磁盘空间满], startsAt=2021-08-24T11:33:19.3561516+08:00, endsAt=2021-08-24T11:38:19.3561516+08:00, generatorURL=, fingerprint=19ad02392a8479d3]], groupLabels=GroupLabels [instance=null], commonLabels=CommonLabels [alertname=磁盘满22, dev=sda1, instance=example, msgtype=testing], commonAnnotations=CommonAnnotations [info=/dev/vdb2 磁盘空间满, summary=/dev/vdb1 磁盘空间满], externalURL=http://alertmanager:9093, version=4, groupKey={}:{alertname=\"磁盘满22\"}, truncatedAlerts=0]\n\talertmanager-webhook  | 2021-08-24 11:44:33.742 DEBUG 1 --- [or-http-epoll-2] c.n.a.controller.WebhookController       : RFC3339 Data: 2021-08-24T11:33:19+08:00\n\talertmanager-webhook  | 2021-08-24 11:44:33.756  INFO 1 --- [or-http-epoll-2] c.n.a.controller.WebhookController       : Notification [status=resolved, time=Tue Aug 24 11:33:19 CST 2021, summary=/dev/vdb1 磁盘空间满]\n\talertmanager-webhook  | 2021-08-24 11:44:34.964 DEBUG 1 --- [         task-1] c.n.alertmanager.service.MessageService  : {\"RequestId\":\"6C893328-921B-52A3-83AD-BB9962F57877\",\"Message\":\"OK\",\"BizId\":\"629618129776674776^0\",\"Code\":\"OK\"}\n\talertmanager-webhook  | 2021-08-24 11:44:34.965  INFO 1 --- [         task-1] c.n.alertmanager.service.MessageService  : 发送短信 13113668890 =\u003e {\"status\":\"resolved\",\"time\":\"2021-08-24 11:33:19\",\"summary\":\"/dev/vdb1 磁盘空间满\"}\n\talertmanager-webhook  | 2021-08-24 11:44:38.685 DEBUG 1 --- [or-http-epoll-2] c.n.a.controller.WebhookController       : Alertmanager [receiver=webhook, status=firing, alerts=[Alert [status=firing, labels=Labels [alertname=磁盘满22, dev=sda1, instance=example, msgtype=testing], annotations=Annotations [info=/dev/vdb2 磁盘空间满, summary=/dev/vdb1 磁盘空间满], startsAt=2021-08-24T11:44:36.6812117+08:00, endsAt=0001-01-01T00:00:00Z, generatorURL=, fingerprint=19ad02392a8479d3]], groupLabels=GroupLabels [instance=null], commonLabels=CommonLabels [alertname=磁盘满22, dev=sda1, instance=example, msgtype=testing], commonAnnotations=CommonAnnotations [info=/dev/vdb2 磁盘空间满, summary=/dev/vdb1 磁盘空间满], externalURL=http://alertmanager:9093, version=4, groupKey={}:{alertname=\"磁盘满22\"}, truncatedAlerts=0]\n\talertmanager-webhook  | 2021-08-24 11:44:38.686 DEBUG 1 --- [or-http-epoll-2] c.n.a.controller.WebhookController       : RFC3339 Data: 2021-08-24T11:44:36+08:00\n\talertmanager-webhook  | 2021-08-24 11:44:38.687  INFO 1 --- [or-http-epoll-2] c.n.a.controller.WebhookController       : Notification [status=firing, time=Tue Aug 24 11:44:36 CST 2021, summary=/dev/vdb1 磁盘空间满]\n\talertmanager-webhook  | 2021-08-24 11:44:38.849 DEBUG 1 --- [         task-2] c.n.alertmanager.service.MessageService  : {\"RequestId\":\"109AB2F7-3796-562D-9881-EDDDD12A75F1\",\"Message\":\"OK\",\"BizId\":\"836814229776678788^0\",\"Code\":\"OK\"}\n\talertmanager-webhook  | 2021-08-24 11:44:38.849  INFO 1 --- [         task-2] c.n.alertmanager.service.MessageService  : 发送短信 13113668890 =\u003e {\"status\":\"firing\",\"time\":\"2021-08-24 11:44:36\",\"summary\":\"/dev/vdb1 磁盘空间满\"}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetkiller%2Falertmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetkiller%2Falertmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetkiller%2Falertmanager/lists"}