Oracle插件配置自定义指标报错unparseable value 11.2.0.4.0

Viewed 21

metric.toml配置如下:

[[metrics]]
mesurement = "sysmetric"
metric_fields = [ "version" ] 
timeout = "3s" 
request = '''
SELECT version  FROM v$instance
'''

categraf 启动报错如下:

2023/11/03 13:28:33 oracle_linux_amd64.go:249: E! failed to convert field: version value: 0 error: unparseable value 11.2.0.4.0
2023/11/03 13:28:33 oracle_linux_amd64.go:221: E! failed to parse row: unparseable value 11.2.0.4.0

这是一个很简单的SQL,查询Oracle的版本号,我推测是返回值带点所以导致解析失败,那这算是BUG吗?

1 Answers

字符类型可以放到标签里,但是指标值应该只能是数值类型