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

通过HTTP监控告警出现unknown exception #54

Closed
zhangheng3 opened this issue Mar 23, 2022 · 5 comments
Closed

通过HTTP监控告警出现unknown exception #54

zhangheng3 opened this issue Mar 23, 2022 · 5 comments

Comments

@zhangheng3
Copy link

我想通过监控prometheus http api 来触发告警, 在后台配置好监控地址后, 浏览数据正常.
{
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"name": "kafka_cluster_partition_atminisr",
"instance": "localhost:9991",
"job": "ad-kafka",
"partition": "0",
"topic": "ad_station"
},
"value": [
1648002724.339,
"0"
]
}
]
},
"HTTP_STATUS": 200,
"EXPRESSION": "data.result[0].value[0] > 10",
"HTTP_COST": 2,
"status": "success"
}

然后在告警规则中判断表达式: data.result[0].value[0] > 10
最后保存的时候提示: unknown exception

请问我有哪里写的有问题吗?

@zhangheng3
Copy link
Author

错误日志信息:
"2022-03-23T10:33:28.123+08:00" "ERROR" "com.autohome.frostmourne.monitor.service.admin.impl.AlarmAdminService" "117" "java.lang.NullPointerException" "-" "error when save alarm" "com.autohome.frostmourne.monitor.service.admin.impl.AlarmAdminService" "atomicSave" "-" "-" "tech" "frostmourne" "frostmourne.monitor" "-" "205" "http-nio-10054-exec-10" "-" "localhost" "-" "-" "-" "-" "java.lang.NullPointerException
at com.autohome.frostmourne.monitor.service.admin.impl.ScheduleService.toXxlJobInfo(ScheduleService.java:92)
at com.autohome.frostmourne.monitor.service.admin.impl.ScheduleService.addJob(ScheduleService.java:31)
at com.autohome.frostmourne.monitor.service.admin.impl.AlarmAdminService.saveJobSchedule(AlarmAdminService.java:449)

@zhangheng3
Copy link
Author

用的是最新的0.4-RELEASE版本,发现只要选择http监控就会报错。 不管内容填写的是啥

@LittleShrimp1987
Copy link
Collaborator

看下xxl.job.executor.id这个配置了吗?

@LittleShrimp1987
Copy link
Collaborator

最好用最新的0.5

@zhangheng3
Copy link
Author

更新版本了, 已经恢复. 多谢~~

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