Customizable real-time monitoring system HertzBeat

Insert image description here

What is HertzBeat?

HertzBeatAgentIt is an open source real-time monitoring and alarm system with powerful custom monitoring capabilities that does not require . It integrates monitoring + alarm + notification , supporting monitoring of application services, databases, operating systems, middleware, cloud native, network, etc., and threshold alarm notification in one step. More liberalized threshold rules (calculation expressions), timely delivery via email, Discord, Slack, Telegram, DingTalk, WeChat, Feishu, SMS, etc.Webhook

If you don’t want to build it yourself, you can try the official cloud service: https://tancloud.cn

Install

Install using Docker on Synology.

Search in the registry hertzbeat, select the first one tancloud/hertzbeat, version selection latest.

At the time of writing, latestthe version corresponds to v1.3.1;

Insert image description here

roll

Within dockerthe folder, create a new folder hertzbeatand within it two subfolders dataandlogs

folder mount path illustrate
docker/hertzbeat/data /opt/hertzbeat/data Store H2database
docker/hertzbeat/logs /opt/hertzbeat/logs Log directory

Insert image description here

port

As long as the local port does not conflict, if you are not sure, you can check it with the command

# 查看端口占用
netstat -tunlp | grep 端口号
local port container port
1157 1157

Insert image description here

environment

variable value
LANG Default is not C.UTF-8, change tozh_CN.UTF-8
TZ set toAsia/Shanghai

Insert image description here

Command line installation

If you are familiar with the command line, it may be docker clifaster to use

# 新建文件夹 hertzbeat 和 子目录
mkdir -p /volume2/docker/hertzbeat/{
    
    data,logs}

# 进入 hertzbeat 目录
cd /volume2/docker/hertzbeat

# 运行容器
docker run -d \
   --restart unless-stopped \
   --name hertzbeat \
   -p 1157:1157 \
   -v $(pwd)/data:/opt/hertzbeat/data \
   -v $(pwd)/logs:/opt/hertzbeat/logs \
   -e LANG=zh_CN.UTF-8 \
   -e TZ=Asia/Shanghai \
   tancloud/hertzbeat

Insert image description here

You can also use to docker-composeinstall and save the following content as docker-compose.ymla file

version: '3'

services:
  hertzbeat:
    image: tancloud/hertzbeat
    container_name: hertzbeat
    restart: unless-stopped
    ports:
      - 1157:1157
    volumes:
      - ./data:/opt/hertzbeat/data
      - ./logs:/opt/hertzbeat/logs
    environment:
      - LANG=zh_CN.UTF-8
      - TZ=Asia/Shanghai

Then execute the following command

# 新建文件夹 hertzbeat 和 子目录
mkdir -p /volume2/docker/hertzbeat/{
    
    data,logs}

# 进入 hertzbeat 目录
cd /volume2/docker/hertzbeat

# 将 docker-compose.yml 放入当前目录

# 一键启动
docker-compose up -d

run

Enter in the browser http://群晖IP:1157and you will see the login interface

Insert image description here

Default account passwordadmin/hertzbeat

Insert image description here

PING connectivity

监控 --> 应用服务监控 --> PING连通性 --> 新增PING连通性

Insert image description here

Fill in the host to be monitored IPand 监控名称test it

Insert image description here

If there is no problem, just do it directly确定

Insert image description here

MariaDB database

监控 --> 数据库监控 --> MariaDB数据库 --> 新增MariaDB数据库

Insert image description here

Lao Su is ready to test the system that comes with SynologyMariaDB 10

Insert image description here

IPFill in the host , port, and port to be monitored 监控名称, and then test

Insert image description here

If there is no problem, just do it directly确定

Insert image description here

Docker

Open/var/packages/Docker/etc/dockerd.json

Insert image description here

add a line

"hosts" : [ "tcp://192.168.0.197:2375", "unix:///var/run/docker.sock" ],

Among them: 192.168.0.197it is the host of SynologyIP

Insert image description here

After saving, execute it once. Of course, you can also 套件中心restart Dockerthe package

# 重启docker
synoservice --restart pkgctl-Docker

监控 --> 云原生监控 --> Docker --> 新增 Docker

Insert image description here

IPFill in the host , port, and port to be monitored 监控名称, and then test

Insert image description here

If there is no problem, just do it directly确定

Insert image description here

DashboardThere may be some events over time

Insert image description here

notification

HertzBeatMessage notifications support many types of

Insert image description here

The official provides detailed instructions, and they are in Chinese. Please study them carefully.

https://hertzbeat.com/zh-cn/docs/help/alert_email

No matter which page you encounter a problem, you can directly click 帮助the button in the upper right corner. The default is English, but you can switch to Chinese.

Insert image description here

Reference documentation

dromara/hertzbeat: A real-time monitoring system with custom-monitor and agentless. Support web service, database, os, middleware and more. A real-time monitoring system with powerful custom monitoring capabilities without Agent. Website monitoring, PING connectivity, port availability, database, operating system, middleware, API monitoring, threshold alarms, alarm notifications (email, WeChat, DingTalk, Feishu).
Address: https://github.com/dromara/hertzbeat

HertzBeat · An open source, real-time monitoring tool with custom-monitor and agentLess. | HertzBeat
地址:https://hertzbeat.com/

TANCLOUD Tanyun · Easy-to-use and friendly high-performance monitoring cloud | TANCLOUD Tanyun
Address: https://tancloud.cn/

Install HertzBeat through Docker | HertzBeat
address: https://hertzbeat.com/zh-cn/docs/start/docker-deploy/

Guess you like

Origin blog.csdn.net/wbsu2004/article/details/132401003