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

使用dashboard配置的expression, alarm收到redis队列告警后异常退出 #49

Closed
modaoxia opened this issue May 2, 2017 · 2 comments

Comments

@modaoxia
Copy link

modaoxia commented May 2, 2017

expression是在dashboard上直接配置的一条。
看日志似乎是因为直接配置的expression,event的strategy为空,往表event_cases表查数据时,引用eve.Strategy.Note时报空指针了?

alarm报错日志如下(xxx代替实际的endpoint值)
···
time="2017-05-02T16:31:02+08:00" level=debug msg="pop event: <Endpoint:xxx, Status:PROBLEM, Strategy:, Expression:<Id:3, Metric:ss.estab, Tags:map[endpoint:xxx], all(#1)>100 MaxStep:3, P4 ActionId:4>, LeftValue:121, CurrentStep:1, PushedTags:map[], TS:2017-05-02 16:31:00>"
[ORM]2017/05/02 16:31:02 -[Queries/default] - [ OK / db.Query / 4.5ms] - [select * from event_cases where id = ?] - e_3_2db1e7c23078c45b32d773bcb5306d14
time="2017-05-02T16:31:02+08:00" level=debug msg="events: <Endpoint:xxx, Status:PROBLEM, Strategy:, Expression:<Id:3, Metric:ss.estab, Tags:map[endpoint:xxx], all(#1)>100 MaxStep:3, P4 ActionId:4>, LeftValue:121, CurrentStep:1, PushedTags:map[], TS:2017-05-02 16:31:00>"
time="2017-05-02T16:31:02+08:00" level=debug msg="expression is null: false"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x910c02]

goroutine 21 [running]:
github.com/open-falcon/falcon-plus/modules/alarm/model/event.InsertEvent(0xc42027e600)
/root/go/src/github.com/open-falcon/falcon-plus/modules/alarm/model/event/event_operation.go:83 +0x7d2
github.com/open-falcon/falcon-plus/modules/alarm/cron.popEvent(0xc42025ddc0, 0x4, 0x4, 0x0, 0x0, 0x0)
/root/go/src/github.com/open-falcon/falcon-plus/modules/alarm/cron/event_reader.go:76 +0x597
github.com/open-falcon/falcon-plus/modules/alarm/cron.ReadLowEvent()
/root/go/src/github.com/open-falcon/falcon-plus/modules/alarm/cron/event_reader.go:37 +0x61
created by main.main
/root/go/src/github.com/open-falcon/falcon-plus/modules/alarm/main.go:46 +0x1dd
···

@laiwei
Copy link
Member

laiwei commented May 2, 2017

c236a8c

fixed, thanks @hoppipolla-

@modaoxia
Copy link
Author

modaoxia commented May 2, 2017

测试ok

@modaoxia modaoxia closed this as completed May 2, 2017
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