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

bug:配置完报警后总是重启,但是会收到报警通知 #1154

Open
QinPD opened this issue Mar 14, 2024 · 2 comments
Open

bug:配置完报警后总是重启,但是会收到报警通知 #1154

QinPD opened this issue Mar 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@QinPD
Copy link

QinPD commented Mar 14, 2024

Describe the bug
配置完报警后经常会在10分钟左右或者20分钟左右报错,然后cv重启

ClickVisual Running Environment
Please provide the following information:
docker

  • ClickVisual version:
    image: clickvisual/clickvisual:1.0.0

  • ClickVisual.LOG:
    panic: invalid size

goroutine 79 [running]:
github.com/ClickHouse/ch-go/proto.(*ColFixedStr).Append(...)
/go/pkg/mod/github.com/!click!house/ch-go@v0.47.3/proto/col_fixed_str.go:64
github.com/ClickHouse/clickhouse-go/v2/lib/column.(*FixedString).AppendRow(0xc0011321b0, {0x2c194a0?, 0xc000de9f30})
/go/pkg/mod/github.com/!click!house/clickhouse-go/v2@v2.3.0/lib/column/fixed_string.go:158 +0x385
github.com/ClickHouse/clickhouse-go/v2/lib/column.(*Array).append(0xc000e83020, {0x2c194a0?, 0xc000d5f800?, 0x8?}, 0x1?)
/go/pkg/mod/github.com/!click!house/clickhouse-go/v2@v2.3.0/lib/column/array.go:174 +0x1f5
github.com/ClickHouse/clickhouse-go/v2/lib/column.(*Array).append(0xc000e83020, {0x2bcc0a0?, 0xc00118b0c8?, 0x64b93e0?}, 0x0)
/go/pkg/mod/github.com/!click!house/clickhouse-go/v2@v2.3.0/lib/column/array.go:165 +0x2ad
github.com/ClickHouse/clickhouse-go/v2/lib/column.(*Array).AppendRow(0xc000e83020, {0x2bcc0a0?, 0xc00118b0c8})
/go/pkg/mod/github.com/!click!house/clickhouse-go/v2@v2.3.0/lib/column/array.go:154 +0x2c5
github.com/ClickHouse/clickhouse-go/v2/lib/proto.(*Block).Append(0xc00121b580, {0xc00103eeb0?, 0x5, 0x50?})
/go/pkg/mod/github.com/!click!house/clickhouse-go/v2@v2.3.0/lib/proto/block.go:59 +0x18a
github.com/ClickHouse/clickhouse-go/v2.(*batch).Append(0xc00103ee10, {0xc00103eeb0?, 0x7fa32947c108?, 0x50?})
/go/pkg/mod/github.com/!click!house/clickhouse-go/v2@v2.3.0/conn_batch.go:93 +0x2a
github.com/ClickHouse/clickhouse-go/v2.(*stdBatch).Exec(0xc000de9f00, {0xc00103ee60, 0x5, 0xc000f917d8?})
/go/pkg/mod/github.com/!click!house/clickhouse-go/v2@v2.3.0/clickhouse_std.go:231 +0x124
github.com/ClickHouse/clickhouse-go/v2.(*stdBatch).ExecContext(0x0?, {0x47c9858?, 0xc000de9f00?}, {0xc001224410, 0x5, 0xc0001861e0?})
/go/pkg/mod/github.com/!click!house/clickhouse-go/v2@v2.3.0/clickhouse_std.go:242 +0x145
database/sql.ctxDriverStmtExec({0x47c9308, 0x64ef380}, {0x47c9858, 0xc000de9f00}, {0xc001224410?, 0x5, 0x5})
/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.1.linux-amd64/src/database/sql/ctxutil.go:65 +0xc4
database/sql.resultFromStatement({0x47c9308, 0x64ef380}, {0x47b76a8, 0xc0001861e0}, 0xc00121b740, {0xc000f91f80, 0x5, 0x5})
/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.1.linux-amd64/src/database/sql/sql.go:2642 +0x13a
database/sql.(*Stmt).ExecContext.func1(0x0?)
/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.1.linux-amd64/src/database/sql/sql.go:2616 +0x9f
database/sql.(*DB).retry(0x4?, 0xc000f91a88)
/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.1.linux-amd64/src/database/sql/sql.go:1538 +0x42
database/sql.(*Stmt).ExecContext(0x324df00?, {0x47c9308?, 0x64ef380?}, {0xc000f91f80?, 0x50?, 0x1?})
/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.1.linux-amd64/src/database/sql/sql.go:2610 +0x16b
database/sql.(*Stmt).Exec(...)
/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.1.linux-amd64/src/database/sql/sql.go:2630
github.com/clickvisual/prom2click.(*promWriter).Start.func1()
/go/pkg/mod/github.com/clickvisual/prom2click@v0.0.4-0.20230725081057-8faff41f6c43/prom_writer.go:182 +0x1025
created by github.com/clickvisual/prom2click.(*promWriter).Start in goroutine 107
/go/pkg/mod/github.com/clickvisual/prom2click@v0.0.4-0.20230725081057-8faff41f6c43/prom_writer.go:134 +0x4f

@QinPD QinPD added the bug Something isn't working label Mar 14, 2024
@kl7sn
Copy link
Collaborator

kl7sn commented Apr 7, 2024

报错和你本地的数据有关系,这个部分读取的数据 size 异常,可以提供下你的数据表结构以及告警语句,这边进一步排查
image

@QinPD
Copy link
Author

QinPD commented Apr 15, 2024

用的click house版本23.4.1
这个是表结构:
image

这是新增表的json:
{
"time":1712913213.36358,
"time":"2024-04-12 09:13:33",
"level":"Info",
"serviceName":"xxx",
"logger":"xxx",
"message":"xxx",
"host":"xxx"
}
告警语句:
CREATE MATERIALIZED VIEW IF NOT EXISTS sh03_dev.mappingRule_b119354f_4363_4508_802a_28219fb4a861_39 TO metrics.samples AS
SELECT
toDate(time_second) as date,
'clickvisual_alert_metrics' as name,
array('uuid=b119354f-4363-4508-802a-28219fb4a861','alarmId=2','filterId=39') as tags,
toFloat64(count(*)) as val,
time_second as ts,
toDateTime(time_second) as updated
FROM sh03_dev.mappingRule
WHERE level='Error' GROUP BY time_second;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants