我已经在 BIND9 主机上安装了 collectd 并将其配置为将指标传递给石墨。我希望能够查看至少 1 个月的指标,但 storage-schema.conf 中的保留未应用于 collectd 部分,并且应用了仅存储最近 24 小时指标的最后一个默认部分。我知道我需要设置正确的保留正则表达式以匹配指标,但在我看来这已经是正确的但它不起作用:(
我的storage-schemas.conf现在看起来像这样:
[carbon]
pattern = ^carbon\.
retentions = 60:90d
[mxservers]
pattern = ^mx-servers\.*
retentions = 60s:7d,5m:2y
[ns.servers]
pattern = ^ns\d\.collectd\..*
retentions = 60s:7d,10m:2y
[collectd]
pattern =^collectd\.*
retentions = 60s:7d,10m:2y
# *** Netapp Monitoring ***
[netapp.capacity]
pattern = ^netapp\.capacity\.*
retentions = 15m:100d, 1d:5y
[netapp.poller.capacity]
pattern = ^netapp\.poller\.capacity\.*
retentions = 15m:100d, 1d:5y
[netapp.perf]
pattern = ^netapp\.perf\.*
retentions = 60s:35d, 5m:100d, 15m:395d, 1h:5y
[netapp.poller.perf]
pattern = ^netapp\.poller\.perf\.*
retentions = 60s:35d, 5m:100d, 15m:395d, 1h:5y
[netapp.perf7]
pattern = ^netapp\.perf7\.*
retentions = 60s:35d, 5m:100d, 15m:395d, 1h:5y
[netapp.poller.perf7]
pattern = ^netapp\.poller\.perf7\.*
retentions = 60s:35d, 5m:100d, 15m:395d, 1h:5y
# *** Netapp Monitoring ***
[default_1min_for_1day]
pattern = .*
retentions = 60s:1d
我对名为 - [ns.servers] 的部分有疑问,尝试将其中的正则表达式设置为:
^ns\d\.collectd\.
^ns\d\.collectd\..*
^ns.\.collectd\.
^ns.\.collectd\..*
他们都没有解决问题。指标以如下名称存储:
ns1.collectd.load.load.shortterm
ns2.collectd.load.load.longterm
ns1.collectd.interface-bond0.if_packets.rx
ns2.collectd.interface-bond0.if_packets.tx
请帮助我设置正确的正则表达式以使其匹配。