答案 0 :(得分:0)
打开yml文件并对其进行编辑以映射到所需的配置,无需注释几行。
答案 1 :(得分:0)
只需执行以下操作(在heartbeat-7.8.0中):
heartbeat.monitors.0.hosts: ["<es-ip>:9200"]
heartbeat.monitors.0.type: http
heartbeat.monitors.1.type: tcp
heartbeat.monitors.2.type: tcp
heartbeat.monitors.0.schedule: '@every 30s'
heartbeat.monitors.1.schedule: '@every 30s'
heartbeat.monitors.2.schedule: '@every 30s'
heartbeat.monitors.1.hosts: ["<redis-ip>:6379"]
heartbeat.monitors.2.hosts: ["<postgres-ip>:5432"]
假设您要监视的应用程序是3,从0索引开始。
在此之下,我有通常的heartbeat.monitors部分,如下所示:
heartbeat.monitors:
- type: http
id: es-monitor
name: ES Monitor
urls: ["<es-ip>:9200"]
schedule: '@every 30s'
- . . .