欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

169. ELK应用之Heartbeat 监控

程序员文章站 2024-01-20 09:09:58
...

169. ELK应用之Heartbeat 监控

1.安装heartbeat
[root@web01 ~]# rpm -ivh heartbeat-7.4.0-x86_64.rpm


2.配置heartbeat
[root@web01 ~]# egrep -v "^#|^$" /etc/heartbeat/heartbeat.yml 
heartbeat.config.monitors:
  path: ${path.config}/monitors.d/*.yml
  reload.enabled: false
  reload.period: 5s
  
heartbeat.monitors:
- type: http
  urls: ["http://10.0.0.161:9200","http://10.0.0.162:9200","http://10.0.0.163:9200"]
  schedule: '@every 10s'
  timeout: 16s
  
- type: tcp
  hosts: ["10.0.0.7"]
  schedule: '@every 10s'
  timeout: 16s
  ipv4: true
  ipv6: true
  mode: any
  ports: [80, 9200, 5044]
  

setup.kibana:
  host: "10.0.0.161:5601"
  
output.elasticsearch:
  hosts: ["10.0.0.161:9200","10.0.0.162:9200","10.0.0.163:9200"]
  
3.重启heartbeat
[root@web01 ~]# systemctl restart heartbeat-elastic.service

4.启动 Heartbeat
setup 命令加载 Kibana 索引模式。

[root@web01 ~]# heartbeat setup -e

169. ELK应用之Heartbeat 监控
169. ELK应用之Heartbeat 监控

相关标签: ELK Stack