Apache HertzBeat Docker Image
Apache HertzBeat是一款易用的开源实时监控系统Docker镜像,支持无代理部署、高性能集群、Prometheus兼容,提供自定义监控和状态页面构建能力,集成监控、告警、通知功能,适用于Web服务、数据库、中间件等多种场景监控。
Apache HertzBeat
A real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
Home: [*]
https://github.com/apache/hertzbeat
🎡 Introduction
https://github.com/apache/hertzbeat is an easy-to-use, open source, real-time monitoring system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
Features
- Combines monitoring, alarm, and notification features into one platform, and supports monitoring for web service, program, database, cache, os, webserver, middleware, bigdata, cloud-native, network, custom and more.
- Easy to use and agentless, web-based and with one-click monitoring and alerting, zero learning curve.
- Makes protocols such as
Http, Jmx, Ssh, Snmp, Jdbc, Prometheusconfigurable, allowing you to collect any metrics by simply configuring the templateYMLfile online. Imagine being able to quickly adapt to a new monitoring type like K8s or Docker simply by configuring online with HertzBeat. - Compatible with the
Prometheusecosystem and more, can monitoring whatPrometheuscan monitoring with few clicks on webui. - High performance, supports horizontal expansion of multi-collector clusters, multi-isolated network monitoring and cloud-edge collaboration.
- Provides flexible alarm threshold rules and timely notifications delivered via
DiscordSlackTelegramEmailDingtalkWeChatFeiShuWebhookSMSServerChan. - Provides powerful status page building capabilities, easily communicate the real-time status of your service to users.
HertzBeat's powerful customization, multi-type support, high performance, easy expansion, and low coupling, aims to help users quickly build their own monitoring system.
🐕 Quick Start
- If you wish to deploy HertzBeat locally, please refer to the following Deployment Documentation for instructions.
🍞 Install HertzBeat
HertzBeat supports installation through source code, docker or package, cpu support X86/ARM64.
Install quickly via docker
-
Just one command to get started:
docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat -
Access
localhost:1157to start, default account:admin/hertzbeat
More HertzBeat Config
shell$ docker run -d -p 1157:1157 -p 1158:1158 \ -e LANG=en_US.UTF-8 \ -e TZ=Asia/Shanghai \ -v $(pwd)/data:/opt/hertzbeat/data \ -v $(pwd)/logs:/opt/hertzbeat/logs \ -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ --name hertzbeat apache/hertzbeat
This command starts a running HertzBeat Docker container, and the container port 1157-1158 is mapped to the host machine 1157-1158. If existing processes on the host use the port, please modify host mapped port.
- docker run -d : Run a container in the background via Docker
-p 1157:1157 -p 1158:1158: Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port.-e LANG=en_US.UTF-8: Set the system language-e TZ=Asia/Shanghai: Set the system timezone-v $(pwd)/data:/opt/hertzbeat/data: (optional, data persistence) Important⚠️ Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container.-v $(pwd)/logs:/opt/hertzbeat/logs: (optional, if you don't have a need, just delete it) Mount the log file to the local host, to ensure the log will not be lost due creating or deleting container.-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml: (optional, if you don't have a need, just delete it) Mount the local configuration file into the container which has been modified in the previous step, namely using the local configuration file to cover container configuration file.-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml: (optional, if you don't have a need, just delete it) Mount account configuration file modified in the previous step into the container. Delete this command parameters if no needs.--name hertzbeat: Naming container name hertzbeatapache/hertzbeat: Use the pulled latest HertzBeat official application mirror to start the container.
-
Begin to explore HertzBeat
Access
http://ip:1157/using browser. You can explore HertzBeat with default accountadmin/hertzbeatnow! -
Deploy collector cluster (Optional)
shell$ docker run -d \ -e IDENTITY=custom-collector-name \ -e MANAGER_HOST=127.0.0.1 \ -e MANAGER_PORT=1158 \ -e MODE=public \ --name hertzbeat-collector apache/hertzbeat-collector
This command starts a running HertzBeat-Collector container.
docker run -d: Run a container in the background via Docker-e IDENTITY=custom-collector-name: (optional) Set the collector unique identity name. Attention the clusters collector name must unique.-e MODE=public: set the running mode(public or private), public cluster or private cloud-edge.-e MANAGER_HOST=127.0.0.1: Important⚠️ Set the main hertzbeat server ip.-e MANAGER_PORT=1158: (optional) Set the main hertzbeat server port, default 1158.-v $(pwd)/logs:/opt/hertzbeat-collector/logs: (optional) Mount the log file to the local host, to ensure the log will not be lost due creating or deleting container.--name hertzbeat-collector: Naming container name hertzbeat-collectorapache/hertzbeat-collector: Use the pulled latest HertzBeat-Collector official application mirror to start the container.
- Access
http://localhost:1157and you will see the registered new collector in dashboard.
Configure HertzBeat's configuration file(optional)
Create application.yml in the host directory,eg:/opt/application.yml
The configuration file content refer to project repositoryhttps://github.com/apache/hertzbeat/raw/master/script/application.yml,modify service parameters, IP port account password in td-engine or iotdb
Note⚠️(If use email to alert, please replace the mail server parameter. If use MYSQL data source, replace the datasource parameters inside refer toH2 database switch to MYSQL)
Specific replacement parameters is as follows:
warehouse: store: # store history metrics data, enable only one below # 存储历史数据方式, 下方只能enabled启用一种方式 jpa: enabled: true # The maximum retention time for history records, after which records will be deleted expire-time: 1h # The maximum number of history records retained, if this number is exceeded, half of the data in this configuration item will be deleted # (please set this configuration reasonably as history records can affect performance when it is large) max-history-record-num: 6000 victoria-metrics: enabled: false url: http://localhost:8428 username: root password: root td-engine: enabled: false driver-class-name: com.taosdata.jdbc.rs.RestfulDriver url: jdbc:TAOS-RS://localhost:6041/hertzbeat username: root password: taosdata greptime: enabled: false endpoint: localhost:4001 iot-db: enabled: false host: 127.0.0.1 rpc-port: 6667 username: root password: root # org.dromara.hertzbeat.warehouse.config.IotDbVersion: V_0_13 || V_1_0 version: V_1_0 query-timeout-in-ms: -1 # data expire time, unit:ms, default '7776000000'(90 days, -1:never expire) expire-time: '7776000000' influxdb: enabled: false server-url: http://127.0.0.1:8086 username: root password: root expire-time: '30d' replication: 1 # store real-time metrics data, enable only one below # 存储实时数据方式, 下方只能enabled启用一种方式 memory: enabled: true init-size: 16 redis: enabled: false host: 127.0.0.1 port: 6379 password: 123456
Configure the user configuration file(optional, custom user password)
HertzBeat default built-in three user accounts, respectively admin/hertzbeat tom/hertzbeat guest/hertzbeat
If you need add, delete or modify account or password, configure sureness.yml. Ignore this step without this demand.
Create sureness.yml in the host directory,eg:/opt/sureness.yml
The configuration file content refer to project repositoryhttps://github.com/dromara/hertzbeat/blob/master/script/sureness.yml
yaml# config the resource restful api that need auth protection, base rbac # rule: api===method===role # eg: /api/v1/source1===get===[admin] means /api/v2/host===post support role[admin] access. # eg: /api/v1/source2===get===[] means /api/v1/source2===get can not access by any role. resourceRole: - /api/account/auth/refresh===post===[admin,user,guest] - /api/apps/**===get===[admin,user,guest] - /api/monitor/**===get===[admin,user,guest] - /api/monitor/**===post===[admin,user] - /api/monitor/**===put===[admin,user] - /api/monitor/**===delete==[admin] - /api/monitors/**===get===[admin,user,guest] - /api/monitors/**===post===[admin,user] - /api/monitors/**===put===[admin,user] - /api/monitors/**===delete===[admin] - /api/alert/**===get===[admin,user,guest] - /api/alert/**===post===[admin,user] - /api/alert/**===put===[admin,user] - /api/alert/**===delete===[admin] - /api/alerts/**===get===[admin,user,guest] - /api/alerts/**===post===[admin,user] - /api/alerts/**===put===[admin,user] - /api/alerts/**===delete===[admin] - /api/notice/**===get===[admin,user,guest] - /api/notice/**===post===[admin,user] - /api/notice/**===put===[admin,user] - /api/notice/**===delete===[admin] - /api/tag/**===get===[admin,user,guest] - /api/tag/**===post===[admin,user] - /api/tag/**===put===[admin,user] - /api/tag/**===delete===[admin] - /api/summary/**===get===[admin,user,guest] - /api/summary/**===post===[admin,user] - /api/summary/**===put===[admin,user] - /api/summary/**===delete===[admin] - /api/collector/**===get===[admin,user,guest] - /api/collector/**===post===[admin,user] - /api/collector/**===put===[admin,user] - /api/collector/**===delete===[admin] - /api/status/page/**===get===[admin,user,guest] - /api/status/page/**===post===[admin,user] - /api/status/page/**===put===[admin,user] - /api/status/page/**===delete===[admin] # config the resource restful api that need bypass auth protection # rule: api===method # eg: /api/v1/source3===get means /api/v1/source3===get can be access by anyone, no need auth. excludedResource: - /api/alerts/report/**===* - /api/account/auth/**===* - /api/i18n/**===get - /api/apps/hierarchy===get - /api/push/**===* - /api/status/page/public/**===* # web ui resource - /===get - /dashboard/**===get - /monitors/**===get - /alert/**===get - /account/**===get - /setting/**===get - /passport/**===get - /status/**===get - /**/*.html===get - /**/*.js===get - /**/*.css===get - /**/*.ico===get - /**/*.ttf===get - /**/*.png===get - /**/*.gif===get - /**/*.jpg===get - /**/*.svg===get - /**/*.json===get - /**/*.woff===get - /**/*.eot===get # swagger ui resource - /swagger-resources/**===get - /v2/api-docs===get - /v3/api-docs===get # h2 database - /h2-console/**===* # account info config # eg: admin has role [admin,user], password is hertzbeat # eg: tom has role [user], password is hertzbeat # eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 account: - appId: admin credential: hertzbeat role: [admin] - appId: tom credential: hertzbeat role: [user] - appId: guest credential: hertzbeat role: [guest] - appId: lili # credential = MD5(password + salt) # plain password: lili # attention: digest authentication does not support salted encrypted password accounts credential: 1A676730B0C7F54654B0E09184448289 salt: 123 role: [guest]
Modify the following part parameters in sureness.yml [Note⚠️Other default sureness configuration parameters should be retained] :
yaml# user account information # Here is admin tom lili three accounts # eg: admin includes[admin,user]roles, password is hertzbeat # eg: tom includes[user], password is hertzbeat # eg: lili includes[guest], text password is lili, salt password is 1A676730B0C7F54654B0E09184448289 account: - appId: admin credential: hertzbeat role: [admin,user] - appId: tom credential: hertzbeat role: [user] - appId: guest credential: hertzbeat role: [guest]
HAVE FUN
apache/hertzbeat Related Documentation
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 hertzbeat 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务
