如何实现categraf同时上报心跳到两台n9e上

Viewed 34

我写了2个heartbeat字段但是报了已经定义。
2023/12/21 21:19:25 F! failed to init config: failed to load configs of dir: conf err:toml: line 55: Key 'heartbeat' has already been defined.

[heartbeat]
enable = true

report os version cpu.util mem.util metadata

url = "http://xxxx1111.com"

# interval, unit: s

interval = 60
[heartbeat]
enable = true

report os version cpu.util mem.util metadata

url = "http://xxxxx2222.com"

3 Answers

在toml中[[..]]是数组(table array,表数组)可以重复多个 ,heartbeat 应该是不能重复

上报两台n9e是什么场景?

部署了2台n9e,一台是做完备的