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

categraf监控clickhouse,日志报错“E!metrics= 0” #1088

Open
CN-RexYeung opened this issue Nov 12, 2024 · 4 comments
Open

categraf监控clickhouse,日志报错“E!metrics= 0” #1088

CN-RexYeung opened this issue Nov 12, 2024 · 4 comments

Comments

@CN-RexYeung
Copy link

Relevant config.toml

[[instances]]
  username = "default"
  password = "xxxxxxxxx"
  servers = ["http://172.20.31.27:8123"]
  labels ={soft_type="clickhouse",RUN_ENV="prod",project_name="bi"}

Logs from categraf

2024/11/12 09:10:02 metrics_agent.go:242: E! input: local.arp_packet not supported
2024/11/12 09:10:02 bind.go:65: DEBUG: 0
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.clickhouse started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.conntrack started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.cpu started
2024/11/12 09:10:02 metrics_agent.go:242: E! input: local.dcgm not supported
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.disk started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.diskio started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.elasticsearch started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.ethtool started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.greenplum started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.http_response started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.influxdb started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.ipvs started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.kafka started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.kernel started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.kernel_vmstat started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.linux_sysctl_fs started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.mem started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.mysql started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.net started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.netstat started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.nfsclient started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.processes started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.prometheus started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.self_metrics started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.sockstat started
2024/11/12 09:10:02 metrics_agent.go:317: I! input: local.system started
2024/11/12 09:10:02 agent.go:46: I! [*agent.MetricsAgent] started
2024/11/12 09:10:02 agent.go:49: I! agent started
2024/11/12 09:10:02 clickhouse.go:190: E!metrics= 0
2024/11/12 09:10:17 clickhouse.go:190: E!metrics= 0
2024/11/12 09:10:32 clickhouse.go:190: E!metrics= 0
2024/11/12 09:10:47 clickhouse.go:190: E!metrics= 0
2024/11/12 09:11:02 clickhouse.go:190: E!metrics= 0
2024/11/12 09:11:17 clickhouse.go:190: E!metrics= 0
2024/11/12 09:11:32 clickhouse.go:190: E!metrics= 0

System info

categraf v0.3.70,centos7.9 , docker 24.0.2

Docker

No response

Steps to reproduce

1.修改input.clickhouse配置文件,重启categraf
2.n9e服务端可以正常获取到大量clickhouse指标
3.categraf的日志中看到大量“E!metrics= 0”提示
...

Expected behavior

clickhouse插件已经启动,metrics_agent.go:317: I! input: local.clickhouse started,但categraf的日志中仍看到大量“E!metrics= 0”提示

Actual behavior

正常无提示

Additional info

No response

@kongfei605
Copy link
Collaborator

[[instances.metrics]] 没配置

@CN-RexYeung
Copy link
Author

已按示例配置了[[instances.metrics]],现在categraf日志不是刷E!metrics= 0了,改为刷E!metrics= 1.

@CN-RexYeung
Copy link
Author

[[instances.metrics]]
mesurement = "sessions"
label_fields = [ "status", "type" ]
metric_fields = [ "value" ]
timeout = "3s"
request = '''
SELECT status, type, COUNT(*) as value FROM v$session GROUP BY status, type
'''

@kongfei605
Copy link
Collaborator

日志是个Warning 不应该是Error

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