We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
环境: 夜莺版本3.3.1
问题描述: 没有收集到mysql_slave_status相关指标
夜莺插件采集配置: { "exporter_urls": ["http://127.0.0.1:9104/metrics"], "append_tags": [ "region=zyybj", "dept=ops", "exporter_port=9104", "mysql_port=3306" ], "endpoint": "", "ignore_metrics_prefix": ["go_"], "metric_prefix": "", "metric_type": { "mysql_global_status_connections":"SUBTRACT" }, "default_mapping_metric_type": "SUBTRACT", "timeout": 1000 }
agent报错信息: 2020-12-21 13:34:09.773894 WARNING core/push.go:35 metric:&{ mysql_slave_status_exec_master_log_pos 192.168.18.32 1608528849 60 3.9652926e+07 0 GAUGE channel_name=,connection_name=,dept=ops,exporter_port=9104,master_host=192.168.18.31,master_uuid=ea29fa07-bcd6-11ea-b794-005056aed2e9,mysql_port=3306,region=zyybj map[channel_name: dept:ops exporter_port:9104 master_host:192.168.18.31 master_uuid:ea29fa07-bcd6-11ea-b794-005056aed2e9 mysql_port:3306 region:zyybj] } err:tag key and value should not be empty
The text was updated successfully, but these errors were encountered:
这个有点麻烦了,夜莺不支持tagvalue为空,上面出现的tag:channel_name、connection_name,都是空,这个就会报错。要么改造mysqld_exporter的代码,要么改造prometheus-exporter-collector的代码
Sorry, something went wrong.
我先尝试自己编写个收集slave metrics的脚本吧。
1、通过prometheus-exporter-collector收集的数据如下 [{ "metric": "redis_commands_processed_total", "endpoint": "127.0.0.1", "timestamp": 1631013680, "step": 0, "value": 1970, "counterType": "COUNTER", "tags": "aaa=hellw,dept=cloud", "tagsMap": {}, "extra": "" }, { "metric": "redis_memory_used_peak_bytes", "endpoint": "127.0.0.1", "timestamp": 1631013680, "step": 0, "value": 813360, "counterType": "GAUGE", "tags": "aaa=hellw,dept=cloud", "tagsMap": {}, "extra": "" } ] 2、server端的日志却提示tags是map格式,这个是已知问题吗? json: cannot unmarshal string into Go struct field MetricValue.tags of type map[string]string
你用的v5吧,v5的格式变了,tags要写成map。不过既然是v5,也就不用这个插件了,直接prometheus那配置抓取mysqld_exporter的数据即可
No branches or pull requests
环境:
夜莺版本3.3.1
问题描述:
没有收集到mysql_slave_status相关指标
夜莺插件采集配置:
{
"exporter_urls": ["http://127.0.0.1:9104/metrics"],
"append_tags": [
"region=zyybj",
"dept=ops",
"exporter_port=9104",
"mysql_port=3306"
],
"endpoint": "",
"ignore_metrics_prefix": ["go_"],
"metric_prefix": "",
"metric_type": {
"mysql_global_status_connections":"SUBTRACT"
},
"default_mapping_metric_type": "SUBTRACT",
"timeout": 1000
}
agent报错信息:
2020-12-21 13:34:09.773894 WARNING core/push.go:35 metric:&{ mysql_slave_status_exec_master_log_pos 192.168.18.32 1608528849 60 3.9652926e+07 0 GAUGE channel_name=,connection_name=,dept=ops,exporter_port=9104,master_host=192.168.18.31,master_uuid=ea29fa07-bcd6-11ea-b794-005056aed2e9,mysql_port=3306,region=zyybj map[channel_name: dept:ops exporter_port:9104 master_host:192.168.18.31 master_uuid:ea29fa07-bcd6-11ea-b794-005056aed2e9 mysql_port:3306 region:zyybj] } err:tag key and value should not be empty
The text was updated successfully, but these errors were encountered: