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

告警错误2020/12/04 11:44:37.465 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 #86

Open
xupengyao opened this issue Dec 4, 2020 · 6 comments

Comments

@xupengyao
Copy link

配置了个告警规则,看日志像是触发了,但是写入数据库报错。为何这边是确认时间报错?
2020/12/04 11:44:00.105 [I] [asm_amd64.s:1337] Alerts to send:map[CALL:[] LANXIN:[] SMS:[]] 2020/12/04 11:44:00.105 [I] [asm_amd64.s:1337] Recoveries to send:map[LANXIN:map[]] 2020/12/04 11:44:37.461 [I] [controller.go:218] [{2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:dc-flume pod:dc-flume-kafka-1-86d6dd7bd4-njjc9] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 2.69} {2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:intergration-test pod:eaa-test-5b568c9568-627st] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 2.18} {2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:machine-learning pod:dc-index-verification-54cd5b977b-pssr8] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 4.15} {2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:machine-learning pod:dc-srtml-act-extract-6fbb644596-kj82s] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 2.17} {2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:business-manage pod:dc-work-order-54c9bc6c5c-vsw5h] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 2.85}] 2020/12/04 11:44:37.465 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 2020/12/04 11:44:37.467 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 2020/12/04 11:44:37.469 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 2020/12/04 11:44:37.471 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 2020/12/04 11:44:37.472 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1

@jayryu
Copy link
Collaborator

jayryu commented Dec 4, 2020

配置了个告警规则,看日志像是触发了,但是写入数据库报错。为何这边是确认时间报错?
2020/12/04 11:44:00.105 [I] [asm_amd64.s:1337] Alerts to send:map[CALL:[] LANXIN:[] SMS:[]] 2020/12/04 11:44:00.105 [I] [asm_amd64.s:1337] Recoveries to send:map[LANXIN:map[]] 2020/12/04 11:44:37.461 [I] [controller.go:218] [{2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:dc-flume pod:dc-flume-kafka-1-86d6dd7bd4-njjc9] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 2.69} {2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:intergration-test pod:eaa-test-5b568c9568-627st] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 2.18} {2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:machine-learning pod:dc-index-verification-54cd5b977b-pssr8] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 4.15} {2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:machine-learning pod:dc-srtml-act-extract-6fbb644596-kj82s] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 2.17} {2020-12-04 11:27:07.430944125 +0800 CST { pod内存过高 1} 2020-12-04 11:27:07.430944125 +0800 CST map[namespace:business-manage pod:dc-work-order-54c9bc6c5c-vsw5h] 2020-12-04 11:44:37.430944125 +0800 CST 0001-01-01 00:00:00 +0000 UTC 2 2020-12-04 11:47:37.430944125 +0800 CST 2.85}] 2020/12/04 11:44:37.465 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 2020/12/04 11:44:37.467 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 2020/12/04 11:44:37.469 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 2020/12/04 11:44:37.471 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1 2020/12/04 11:44:37.472 [E] [alerts.go:667] Insert alter failed:Error 1292: Incorrect datetime value: '0000-00-00' for column 'confirmed_at' at row 1

请看 #8

@xupengyao
Copy link
Author

@jayryu 谢谢,告警记录出来了。但是出现了其他错误:
doraemon root:a59OnlfVqQvt@tcp(10.45.35.50:3306)/ 2020/12/04 14:12:18.567 [D] [db.go:21] Initialize database connection: root:****@tcp(10.45.35.50:3306)/ 2020/12/04 14:12:18.578 [I] [asm_amd64.s:1337] http server Running on http://:8080 2020/12/04 14:12:56.526 [D] [server.go:2774] | 10.42.0.0| 200 | 812.952µs| nomatch| OPTIONS /api/v1/login/username 2020/12/04 14:12:56.536 [D] [server.go:2774] | 10.42.0.0| 200 | 296.142µs| match| GET /api/v1/login/username r:/api/v1/login/username 2020/12/04 14:12:56.643 [D] [server.go:2774] | 10.42.0.0| 200 | 508.596µs| nomatch| OPTIONS /api/v1/login/method 2020/12/04 14:12:56.646 [D] [server.go:2774] | 10.42.0.0| 200 | 484.644µs| nomatch| OPTIONS /api/v1/alerts 2020/12/04 14:12:56.653 [D] [server.go:2774] | 10.42.0.0| 200 | 684.714µs| match| GET /api/v1/login/method r:/api/v1/login/method 2020/12/04 14:12:56.653 [D] [server.go:2774] | 10.42.0.0| 200 | 631.035µs| nomatch| GET /api/v1/alerts panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x969ab0] goroutine 23 [running]: github.com/Qihoo360/doraemon/cmd/alert-gateway/models.SendAlertsFor(0xc00023d410, 0xc00023d330, 0x0, 0xc00023da00) /go/src/github.com/Qihoo360/doraemon/cmd/alert-gateway/models/groups.go:81 +0x9a0 github.com/Qihoo360/doraemon/cmd/alert-gateway/initial.Filter(0xc00023dd98, 0xc00023dd68, 0xc000178240, 0xc00023dca0) /go/src/github.com/Qihoo360/doraemon/cmd/alert-gateway/initial/timer.go:481 +0x1316 github.com/Qihoo360/doraemon/cmd/alert-gateway/initial.InitTimer.func5.2(0xc0002fe7e0, 0x13, 0xc000178240) /go/src/github.com/Qihoo360/doraemon/cmd/alert-gateway/initial/timer.go:792 +0x518 created by github.com/Qihoo360/doraemon/cmd/alert-gateway/initial.InitTimer.func5 /go/src/github.com/Qihoo360/doraemon/cmd/alert-gateway/initial/timer.go:770 +0xd8
目前pod一直在挂掉重启,请问是什么问题?

@jayryu
Copy link
Collaborator

jayryu commented Dec 4, 2020

@jayryu 谢谢,告警记录出来了。但是出现了其他错误:
doraemon root:a59OnlfVqQvt@tcp(10.45.35.50:3306)/ 2020/12/04 14:12:18.567 [D] [db.go:21] Initialize database connection: root:****@tcp(10.45.35.50:3306)/ 2020/12/04 14:12:18.578 [I] [asm_amd64.s:1337] http server Running on http://:8080 2020/12/04 14:12:56.526 [D] [server.go:2774] | 10.42.0.0| 200 | 812.952µs| nomatch| OPTIONS /api/v1/login/username 2020/12/04 14:12:56.536 [D] [server.go:2774] | 10.42.0.0| 200 | 296.142µs| match| GET /api/v1/login/username r:/api/v1/login/username 2020/12/04 14:12:56.643 [D] [server.go:2774] | 10.42.0.0| 200 | 508.596µs| nomatch| OPTIONS /api/v1/login/method 2020/12/04 14:12:56.646 [D] [server.go:2774] | 10.42.0.0| 200 | 484.644µs| nomatch| OPTIONS /api/v1/alerts 2020/12/04 14:12:56.653 [D] [server.go:2774] | 10.42.0.0| 200 | 684.714µs| match| GET /api/v1/login/method r:/api/v1/login/method 2020/12/04 14:12:56.653 [D] [server.go:2774] | 10.42.0.0| 200 | 631.035µs| nomatch| GET /api/v1/alerts panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x969ab0] goroutine 23 [running]: github.com/Qihoo360/doraemon/cmd/alert-gateway/models.SendAlertsFor(0xc00023d410, 0xc00023d330, 0x0, 0xc00023da00) /go/src/github.com/Qihoo360/doraemon/cmd/alert-gateway/models/groups.go:81 +0x9a0 github.com/Qihoo360/doraemon/cmd/alert-gateway/initial.Filter(0xc00023dd98, 0xc00023dd68, 0xc000178240, 0xc00023dca0) /go/src/github.com/Qihoo360/doraemon/cmd/alert-gateway/initial/timer.go:481 +0x1316 github.com/Qihoo360/doraemon/cmd/alert-gateway/initial.InitTimer.func5.2(0xc0002fe7e0, 0x13, 0xc000178240) /go/src/github.com/Qihoo360/doraemon/cmd/alert-gateway/initial/timer.go:792 +0x518 created by github.com/Qihoo360/doraemon/cmd/alert-gateway/initial.InitTimer.func5 /go/src/github.com/Qihoo360/doraemon/cmd/alert-gateway/initial/timer.go:770 +0xd8
目前pod一直在挂掉重启,请问是什么问题?

报警策略中的odin group和值班组不要填写,留空就行

@xupengyao
Copy link
Author

这两个组的作用是什么?为啥不用填呢

@xupengyao
Copy link
Author

@jayryu

@jayryu
Copy link
Collaborator

jayryu commented Dec 4, 2020

这两个组的作用是什么?为啥不用填呢

这是用于公司内部的接口

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