我试图将Telegraf helm chart 安装到命名空间 internet-monitor 中的 kubernetes 集群。
我想集成 InfluxDB、Telegraf 和 Grafana 来监控互联网连接。
我要集成的 Grafana 仪表板是:https ://grafana.com/grafana/dashboards/2690
它说 Telegraf 输入 ping 插件应该有配置:
[[inputs.ping]]
interval = "60s"
urls = ["208.67.222.222", "208.67.220.220", "ddg.gg", "pfSense.home", "accessPoint.home", "amazon.com", "github.com"]
count = 4
ping_interval = 1.0
timeout = 2.0
我安装了带有值文件的电报图表:
config:
agent:
interval: "10s"
round_interval: true
metric_batch_size: 1000
metric_buffer_limit: 10000
collection_jitter: "0s"
flush_interval: "10s"
flush_jitter: "0s"
precision: ""
debug: false
quiet: false
logfile: ""
hostname: "$HOSTNAME"
omit_hostname: false
processors:
- enum:
mapping:
field: "status"
dest: "status_code"
value_mappings:
healthy: 1
problem: 2
critical: 3
outputs:
- health:
service_address: "http://:8888"
compares:
field: buffer_size
lt: 5000.0
contains:
field: buffer_size
- influxdb:
urls:
- "http://influxdb.internet-monitor.svc.cluster.local:8086"
database: "telegraf"
inputs:
- statsd:
service_address: ":8125"
percentiles:
- 50
- 95
- 99
metric_separator: "_"
allowed_pending_messages: 10000
percentile_limit: 1000
- ping:
interval: "60s"
count: 4
ping_interval: 1
timeout: 2
urls:
- "208.67.222.222"
- "amazon.com"
- "github.com"
- "google.com"
- "10.0.2.46"
- "192.168.1.223"
- "192.168.1.20"
但是在安装 helm chart 时,它会给出错误:
2019-12-23T11:06:25Z I! Starting Telegraf 1.12.6
2019-12-23T11:06:25Z I! Using config file: /etc/telegraf/telegraf.conf
2019-12-23T11:06:25Z E! [telegraf] Error running agent: Error parsing /etc/telegraf/telegraf.conf, line 46: (ping.Ping.PingInterval) cannot unmarshal TOML integer into float64
如此处所指定, PingInterval需要一个 float64 值。
我该如何解决这个问题?