{"id":22671410,"url":"https://github.com/cloudforet-io/plugin-grafana-mon-webhook","last_synced_at":"2025-07-03T09:31:55.563Z","repository":{"id":109062896,"uuid":"532700898","full_name":"cloudforet-io/plugin-grafana-mon-webhook","owner":"cloudforet-io","description":"webhook for grafana","archived":false,"fork":false,"pushed_at":"2025-04-29T02:15:19.000Z","size":1413,"stargazers_count":5,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-29T03:30:59.928Z","etag":null,"topics":["monitoring","plugin","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","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/cloudforet-io.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":"2022-09-05T01:13:49.000Z","updated_at":"2025-04-29T02:15:21.000Z","dependencies_parsed_at":"2023-04-08T09:20:03.563Z","dependency_job_id":"1bdab668-96bc-469a-8860-590f91e954da","html_url":"https://github.com/cloudforet-io/plugin-grafana-mon-webhook","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/cloudforet-io/plugin-grafana-mon-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-grafana-mon-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-grafana-mon-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-grafana-mon-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-grafana-mon-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudforet-io","download_url":"https://codeload.github.com/cloudforet-io/plugin-grafana-mon-webhook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-grafana-mon-webhook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263300345,"owners_count":23445221,"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":["monitoring","plugin","webhook"],"created_at":"2024-12-09T16:14:56.234Z","updated_at":"2025-07-03T09:31:55.534Z","avatar_url":"https://github.com/cloudforet-io.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plugin-grafana-monitoring-webhook\nwebhook for grafana\n\n# Data Model\n\n## Grafana Raw Data\n\nWebhook notification: https://grafana.com/docs/grafana/latest/alerting/old-alerting/notifications/#webhook\n\n~~~\n{\n  \"dashboardId\": 1,\n  \"evalMatches\": [\n    {\n      \"value\": 1,\n      \"metric\": \"Count\",\n      \"tags\": {}\n    }\n  ],\n  \"ruleUrl\": \"https://grafana.stargate.cloudeco.io/d/6eRS6XR7k/spaceone-dev-cluster-alerts-dashboard-20210621-backup?tab=alert\u0026viewPanel=14\u0026orgId=1\",\n  \"imageUrl\": \"https://grafana.com/assets/img/blog/mixed_styles.png\",\n  \"message\": \"Notification Message\",\n  \"orgId\": 1,\n  \"panelId\": 2,\n  \"ruleId\": 1,\n  \"ruleName\": \"Panel Title alert\",\n  \"ruleUrl\": \"http://localhost:3000/d/hZ7BuVbWz/test-dashboard?fullscreen\\u0026edit\\u0026tab=alert\\u0026panelId=2\\u0026orgId=1\",\n  \"state\": \"alerting\",\n  \"tags\": {\n    \"tag name\": \"tag value\"\n  },\n  \"title\": \"[Alerting] Panel Title alert\"\n}\n~~~\n\n| Field \t| Example |\n| ---   \t| ---     |\n| title\t\t| Dastabase Size alert |\n| message       | Database xxxxxx      |\n| state  \t| Alerting , ok , no_data |\n| orgID\t\t| 1\t\t\t|\n| ruleID\t| 92\t\t\t|\n| dashboardID\t|\t\t\t|\n| ruleName\t| Database Size alert\t|\n| panelID\t| 5\t\t\t|\n| ruleUrl\t| https://grafana.stargate.cloudeco.io/d/9tvNgo77k/mongodb-database-details_copy-20210818?tab=alert\u0026viewPanel=5\u0026orgId=1 |\n| ImageUrl\t| https://grafana.stargate.cloudeco.io/d/9tvNgo77k/mongodb-database-details_copy-20210818?tab=alert\u0026viewPanel=5\u0026orgId=1 |\n| tags\t\t| { \"a\": \"b\" } \t\t|\n| evalMatches\t| \"evalMatches\": [{\"value\": 342.2222, \"metric\": \"Count\", \"tags\": null}] |\n\n## Event key criteria\nHash key of ```raw_data.panel_id``` , ```raw_data.dashboard_id``` and ```raw_data.org_id```.\n\n## Severity matching information\n|Grafana  ```state```| SpaceONE Event  ```severity```|\n|---|---|\n|alerting|ALERT|\n|ok|RECOVERY|\n|no_data|NONE|\n\n\n## SpaceONE Event Model\n| Field\t\t| Type | Description\t| Example\t|\n| ---      | ---     | ---           | ---           |\n| event_id | str  | auto generation | event-1234556  |\n| event_key | str | hash key of raw_data.panel_id, dashboard_id, org_id | b5dfksdfjskfsdfklsf3423432dff |\n| event_type |  str  | RECOVERY , ALERT based on raw_data.state | RECOVERY\t|\n| title | str\t| raw_data.title\t| [ALERT] Database Size alert\t|\n| description | str | raw_data.message\t| Database xxxxxx\t\t|\n| severity | str  | alert level based raw_data.state (alerting  -\u003e ALERT, ok -\u003e RECOVERY, no_dat -\u003e NONE | ALERT\t|\n| resource | dict | Not used\t\t| N/A\t|\n| raw_data | dict | Grafana Raw Data | {\"title\": \"Database Size Alert\", \"dashboardId\": 1, ... } |\n| addtional_info | dict | raw_data.dashboardID, raw_data.orgID, raw_data.imageUrl, raw_data.ruleUrl, raw_data.evalMatches, raw_data.tags \t| {\"org_id\": \"1.0\", \"rule_url\" \"https://....\" } |\n| occured_at | datetime | webhook received time | \"2021-08-23T06:47:32.753Z\" |\n| alert_id | str | mapped alert_id\t| alert-3243434343 |\n| webhook_id | str  | webhook_id\t| webhook-34324234234234 |\n| project_id | str\t| project_id\t| project-12312323232    |\n| domain_id | str\t| domain_id\t| domain-12121212121\t|\n| created_at | datetime | created time | \"2021-08-23T06:47:32.753Z\"\t|\n\n## cURL Requests examples\nThis topic provides examples of calls to the SpaceONE Grafana monitoring webhook using cURL.\n\nHere's a cURL command that works for getting the response from webhook, you can test the following on your local machine.\n```\ncurl -X POST https://your_spaceone_monitoring_webhook_url -d '{\n  \"dashboardId\": xx,\n  \"evalMatches\": [\n    {\n      \"value\": xxx,\n      \"metric\": \"xxx\",\n      \"tags\": {}\n    }\n  ],\n  \"ruleUrl\": \"xxx\",\n  \"imageUrl\": \"xxx\",\n  \"message\": \"xxx\",\n  \"orgId\": xx,\n  \"panelId\": xx,\n  \"ruleId\": xx,\n  \"ruleName\": \"xxx\",\n  \"ruleUrl\": \"xxx\",\n  \"state\": \"xxx\",\n  \"tags\": {\n    \"xxx\": \"xxx\"\n  },\n  \"title\": \"xxx\"\n}\n```\n\nFollowings are examples which works for testing your own webhook.\n\n```\ncurl -X POST https://{your_spaceone_monitoring_grafana_webhook_url} -d '{\n  \"dashboardId\": 1,\n  \"evalMatches\": [\n    {\n      \"value\": 1,\n      \"metric\": \"Count\",\n      \"tags\": {}\n    }\n  ],\n  \"ruleUrl\": \"https://grafana.stargate.cloudeco.io/d/6eRS6XR7k/spaceone-dev-cluster-alerts-dashboard-20210621-backup?tab=alert\u0026viewPanel=14\u0026orgId=1\",\n  \"imageUrl\": \"https://grafana.com/assets/img/blog/mixed_styles.png\",\n  \"message\": \"Notification Message\",\n  \"orgId\": 1,\n  \"panelId\": 2,\n  \"ruleId\": 1,\n  \"ruleName\": \"Panel Title alert\",\n  \"ruleUrl\": \"http://localhost:3000/d/hZ7BuVbWz/test-dashboard?fullscreen\\u0026edit\\u0026tab=alert\\u0026panelId=2\\u0026orgId=1\",\n  \"state\": \"alerting\",\n  \"tags\": {\n    \"tag name\": \"tag value\"\n  },\n  \"title\": \"[Alerting] Panel Title alert\"\n}'\n```\n\n```\ncurl -X POST https://monitoring-webhook.dev.spaceone.dev/monitoring/v1/webhook/webhook-1eea0a98d2aa/ed270cc6ea8bb6037313ddbc1e6ee0b3/events -d '{\n  \"tags\": {},\n  \"orgId\": 0.0,\n  \"state\": \"alerting\",\n  \"message\": \"Someone is testing the alert notification within Grafana.\",\n  \"ruleUrl\": \"https://grafana.stargate.cloudeco.io/\",\n  \"dashboardId\": 1.0,\n  \"title\": \"[Alerting] Test notification\",\n  \"panelId\": 1.0,\n  \"ruleId\": 3.2760766009712717e+18,\n  \"ruleName\": \"Test notification\",\n  \"evalMatches\": [\n      {\n          \"metric\": \"High value\",\n          \"tags\": null,\n          \"value\": 100.0\n      },\n      {\n          \"metric\": \"Higher Value\",\n          \"value\": 200.0,\n          \"tags\": null\n      }\n  ]\n}'\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudforet-io%2Fplugin-grafana-mon-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudforet-io%2Fplugin-grafana-mon-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudforet-io%2Fplugin-grafana-mon-webhook/lists"}