当前位置:网站首页>Elk - hearthbeat implements service monitoring

Elk - hearthbeat implements service monitoring

2022-06-11 11:43:00 Rufeng

Hearthbeat, heartbeat , seeing the name of a thing one thinks of its function ,Hearthbeat It can be used to detect whether the service is running normally .

Hearthbeat Support ICMP、TCP and HTTP, Also support TLS、 Authentication and proxy .

Hearthbeat Can and Logstash、Elasticsearch and Kibana Seamless collaboration . install Hearthbeat, Add services to be monitored , Good configuration Elasticsearch and Kibana, You can output the results to Elasticsearch, And in Kibana Show it .

Kibana No configuration required Dashboard, Just click Uptime Menu to see the results .

Elasticsearch and Kibana For installation, please refer to : Quickly build ELK(7.2.0)

download

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/

To configure

cd /opt/elk/heartbeat-7.2.0-linux-x86_64/
vi heartbeat.yml

For example, by simply detecting console url To monitor Websphere Is it working .

monitor TCP Refer to the examples in the notes .Schedule each 10 Every second .

# 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"]

start-up

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 &

verification

 Insert picture description here

原网站

版权声明
本文为[Rufeng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206111127344096.html