无法重启心跳。找不到服务单元

时间:2019-07-05 14:03:29

标签: elasticsearch kibana filebeat heartbeat

7月05 14:00:25 ip-19-0-1-16.ec2。内部心跳[13996]:2019-07-05T14:00:25.518Z错误instance / beat.go:877退出:无法创建监视器:作业错误缺少访问“ heartbeat ... heartbeat.yml”的必填字段)7月5日14:00:25 ip-19-0-1-16.ec2.internal heartbeat [13996]:正在退出:无法创建监视器:作业错误缺少访问“ heartbeat.monitors.0.hosts”的必填字段(来源:'/ etc / heartbeat / heartbeat.yml')

2 个答案:

答案 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'
- . . .