https://github.com/yinheli/ucloud-alert-notifier
ucloud alert webhook for feishu
https://github.com/yinheli/ucloud-alert-notifier
feishu ucloud
Last synced: 2 months ago
JSON representation
ucloud alert webhook for feishu
- Host: GitHub
- URL: https://github.com/yinheli/ucloud-alert-notifier
- Owner: yinheli
- Created: 2023-02-16T09:44:20.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-01T06:11:39.000Z (almost 2 years ago)
- Last Synced: 2025-02-02T05:24:32.228Z (4 months ago)
- Topics: feishu, ucloud
- Language: Rust
- Homepage:
- Size: 232 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ucloud-alert-notifier
ucloud alert webhook for feishu
## Usage
### Run server
```bash
./ucloud-alert-notifier serve --help
``````text
Run server to receive webhookUsage: ucloud-alert-notifier serve [OPTIONS] --webhook [BIND]
Arguments:
[BIND] bind [env: ALERT_NOTIFIER_BIND=] [default: 0.0.0.0:8080]Options:
-w, --webhook feishu webhook [env: ALERT_NOTIFIER_WEBHOOK=]
-s, --secret webhook secret [env: ALERT_NOTIFIER_SECRET=]
-h, --help Print help
```### Add webhook
Refer: https://console.ucloud.cn/umon/contact
## Test
Send test via curl.
```bash
curl -X "POST" "http://xxxx/push" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"Region": " cn-north-03",
"ResourceType": "uhost",
"AlarmTime": 1458733318,
"content": "test ucloud alert webhook",
"MetricName": "MemUsage",
"ResourceId": "uhost-xxxx",
"SessionID": "xx"
}'
```## Resources
- https://docs.ucloud.cn/umon/guide/webhook
- https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN?lang=zh-CN