当前位置:网站首页>ELK - Hearthbeat实现服务监控
ELK - Hearthbeat实现服务监控
2022-06-11 11:27:00 【如锋】
Hearthbeat,心跳,顾名思义,Hearthbeat可以用来定时探测服务是否正常运行。
Hearthbeat支持ICMP、TCP 和 HTTP,也支持TLS、身份验证和代理。
Hearthbeat能够与Logstash、Elasticsearch和Kibana无缝协作。安装Hearthbeat,添加需要监控的服务,配置好Elasticsearch和Kibana,即可将结果输出到Elasticsearch,并在Kibana显示出来。
Kibana无须再配置Dashboard,直接点击Uptime菜单即可看到结果。
Elasticsearch和Kibana的安装可参考:快速搭建ELK(7.2.0)
下载
curl -L -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-7.2.0-linux-x86_64.tar.gz
tar xzvf heartbeat-7.2.0-linux-x86_64.tar.gz -C /opt/elk/
配置
cd /opt/elk/heartbeat-7.2.0-linux-x86_64/
vi heartbeat.yml
比如通过简单地探测console url来监控Websphere是否正常运行。
监控TCP可参考注释里的例子。Schedule表示每10秒监测一次。
# Configure monitors inline
heartbeat.monitors:
- type: http
# List or urls to query
urls: ["https://dummy.hostname.net:9043/ibm/console/logon.jsp"]
# Configure task schedule
schedule: '@every 10s'
#- type: tcp
#hosts: ["192.168.1.101:1414"]
#schedule: '@every 10s'
setup.kibana:
# Kibana Host
# Scheme and port can be left out and will be set to the default (http and 5601)
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
host: "localhost:5601"
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
启动
chown elk:elk -R /opt/elk/heartbeat-7.2.0-linux-x86_64/
sudo chmod o+rx -R /opt/elk/heartbeat-7.2.0-linux-x86_64/
sudo -u elk ./heartbeat setup
sudo -u elk nohup ./heartbeat -e &
验证
- Open http://localhost:5601/
- Go to Uptime.
- 重启被监控服务

边栏推荐
- JVM-类加载过程
- WordPress登录页面定制插件推荐
- JS interview questions - arrow function, find and filter some and every
- Learning in Bi design 03
- Set the default receiving address [project mall]
- Count the top k strings with the most occurrences
- Digital collection app applet official account source code
- Learn 02 - slice, morphological change and dimension exchange of numpy multidimensional array
- Source code construction of digital collection system
- WordPress登录页面美化插件:Login Designer推荐
猜你喜欢
![Définir l'adresse de réception par défaut [Centre commercial du projet]](/img/eb/2864b124b66d01849315a367948ed4.png)
Définir l'adresse de réception par défaut [Centre commercial du projet]

外观模式--在各种套餐中早就用到啦!

An introduction to creating VOC datasets or Yolo datasets using labelimg

Interview experience of Xiaomi Android development post~

How to solve the problem that high-precision positioning technologies such as ultra wideband UWB, Bluetooth AOA and RTK cannot be widely used due to their high cost? Adopt the idea of integrated deplo

MYCAT sub database and sub table

How to form a good habit? By perseverance? By determination? None of them!

Exploration of kangaroo cloud data stack on spark SQL optimization based on CBO

收货地址列表展示【项目 商城】

設置默認收貨地址【項目 商城】
随机推荐
JVM class loading process
Don't be a fake worker
Gerber文件在PCB制造中的作用
不做伪工作者
推荐几款Gravatar头像缓存插件
Command mode - attack, secret weapon
WordPress user name modification plug-in: username changer
数据库系统概论 ---- 第二章 -- 关系数据库(2.1~2.3)(重要知识点)
MWC 2022 lights up the future, and everything serves
AcWing 1353. Ski resort design (greedy)
Mongodb usage
Where is it safer to open an account for soda ash futures? How much capital is needed to trade soda ash futures at present?
Web development model selection, who graduated from web development
[file upload vulnerability 05] server suffix detection and bypass experiment (based on upload-labs-3 shooting range)
Node连接MySql数据库写模糊查询接口
再不刷题就晚了,最全的BAT大厂面试题整理
Runtime reconfiguration of etcd
Adapter mode -- can you talk well?
Application of volatile in single chip microcomputer
[issue 30] shopee golang development experience