
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
A real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
https://img.shields.io/badge/Chat-***-7289DA?logo=]([] https://img.shields.io/badge/Reddit-Community-7289DA?logo=reddit]([] https://img.shields.io/***/follow/hertzbeat1024?logo=]([] https://www.bestpractices.dev/projects/8139/badge](https://www.bestpractices.dev/projects/8139) https://img.shields.io/docker/pulls/tancloud/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download](https://hub.docker.com/repository/docker/tancloud/hertzbeat/general) https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/hertzbeat](https://artifacthub.io/packages/search?repo=hertzbeat) https://img.shields.io/***/channel/subscribers/UCri75zfWX0GHqJFPENEbLow?logo=***&label=***%20Channel]([]
Home: [*]
https://github.com/apache/hertzbeat
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.
Http, Jmx, Ssh, Snmp, Jdbc, Prometheus configurable, allowing you to collect any metrics by simply configuring the template YML file online. Imagine being able to quickly adapt to a new monitoring type like K8s or Docker simply by configuring online with HertzBeat.Prometheus ecosystem and more, can monitoring what Prometheus can monitoring with few clicks on webui.Discord Slack Telegram Email Dingtalk WeChat FeiShu Webhook SMS ServerChan.HertzBeat's powerful customization, multi-type support, high performance, easy expansion, and low coupling, aims to help users quickly build their own monitoring system.
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:1157 to 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 account admin/hertzbeat now!
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.http://localhost:1157 and you will see the registered new collector in dashboard.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
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 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: