Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【告警规则配置】先修改Metric部分后再去修改Hots部分,保存会丢失Metric部分,切换标签也会丢失之前改的信息 #684

Closed
Metatron98 opened this issue Jun 21, 2024 · 3 comments

Comments

@Metatron98
Copy link

接口:/api/n9e/busi-group/3/alert-rule/24
参数部分如下:
{"disabled":0,"name":"服务器通讯状态","append_tags":[],"group_id":3,"note":"","prod":"host","rule_config":{"inhibit":false,"queries":[{"key":"tags","op":"==","values":["group=weixing"]}],"triggers":[{"type":"target_miss","severity":2,"duration":30}]},"enable_status":true,"notify_channels":["email"],"notify_groups":["5"],"notify_recovered":1,"recover_duration":0,"notify_repeat_step":60,"notify_max_number":0,"callbacks":[],"annotations":{},"prom_eval_interval":15,"prom_for_duration":60,"cate":"host","enable_days_of_weeks":[["1","2","3","4","5","6","0"]],"enable_stimes":["00:00"],"enable_etimes":["23:59"],"enable_in_bg":0,"datasource_ids":[]}

image
我的系统版本如下 :
前端版本:v7.0.0-beta.12
后端版本:v7.0.0-beta.11-0a0049c6fbbc89bd242996d9b25117eb95280cbc
试过前端版本:v7.0.0-beta.12

@Metatron98
Copy link
Author

{"disabled":0,"name":"服务器通讯状态","append_tags":[],"group_id":3,"note":"","prod":"metric","rule_config":{"inhibit":false,"queries":[{"prom_ql":"http_response_result_code!=0","severity":2}]},"enable_status":true,"notify_channels":["email"],"notify_groups":["5"],"notify_recovered":1,"recover_duration":0,"notify_repeat_step":60,"notify_max_number":0,"callbacks":[],"annotations":{},"cate":"prometheus","datasource_ids":[0],"prom_eval_interval":15,"prom_for_duration":60,"enable_in_bg":0,"enable_days_of_weeks":[["1","2","3","4","5","6","0"]],"enable_stimes":["00:00"],"enable_etimes":["23:59"]}

这是Metric的put请求,对比一下很明显

@Metatron98 Metatron98 changed the title 【告警规则配置】先修改Metric部分后再去修改Hots部分,保存会丢失Metric部分,切换标签也会修饰之前改的信息 【告警规则配置】先修改Metric部分后再去修改Hots部分,保存会丢失Metric部分,切换标签也会丢失之前改的信息 Jun 21, 2024
@jsers
Copy link
Collaborator

jsers commented Jun 24, 2024

没有问题,产品设计就是如此
metric 和 host 是互斥的,一个告警规则只能选择一种告警条件模式

@jsers
Copy link
Collaborator

jsers commented Jul 18, 2024

暂时关闭不活跃的问题,后续有其他更新再重新打开即可

@jsers jsers closed this as completed Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants