heartzbeat agent 部署
版本: 1.6.1
https://dlcdn.apache.org/incubator/hertzbeat/1.6.1/apache-hertzbeat-collector-1.6.1-incubating-bin.tar.gz
其他版本:
https://hertzbeat.apache.org/zh-cn/docs/download/
部署:
解压安装包到主机 eg: /opt/hertzbeat-collector
配置采集器的配置文件 config/application.yml
里面的 HertzBeat Server 连接 IP, 端口, 采集器名称(需保证唯一性)等参数。
collector:
dispatch:
entrance:
netty:
enabled: true
identity: ${IDENTITY:}
mode: ${MODE:public}
manager-host: ${MANAGER_HOST:127.0.0.1}
manager-port: ${MANAGER_PORT:1158}
参数详解
identity : (可选) 设置采集器的唯一标识名称。注意多采集器时名称需保证唯一性。
mode : 配置运行模式(public or private), 公共集群模式或私有云边模式。
manager-host : 重要, 配置连接的 HertzBeat Server 地址,
manager-port : (可选) 配置连接的 HertzBeat Server 端口,默认 1158.
配置jdk
https://hertzbeat.apache.org/zh-cn/docs/start/package-deploy/
当你的服务器中默认环境变量不为Java 17时,如 Java 8 、 Java 11 ,若你服务器中有其他应用需要低版本 Java ,你不想更改环境变量,根据你的系统,到 https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html 选择相应的发行版下载,并将解压后的文件夹重命名为java,复制到Hertzbeat的解压目录下。
启动
执行位于安装目录 hertzbeat-collector/bin/ 下的启动脚本 startup.sh, windows 环境下为 startup.bat
- 开始探索 HertzBeat Collector
浏览器访问 http://ip:1157/ 即可开始探索使用,默认账户密码 admin/hertzbeat。
在服务端 打开 http://ip:1157/
这里写个名字,然后生成配置信息:
server:
port: 1159
shutdown: graceful
tomcat:
threads:
min-spare: 1
spring:
application:
name: ${HOSTNAME:@hertzbeat-collector@}${PID}
profiles:
active: cluster
lifecycle:
timeout-per-shutdown-phase: 10s
jackson:
default-property-inclusion: ALWAYS
# need to disable spring boot mongodb auto config, or default mongodb connection tried and failed...
autoconfigure:
exclude: org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration, org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
---
spring:
config:
activate:
on-profile: cluster
collector:
info:
version: ${COLLECTOR_VERSION:1.6.1}
ip: ${COLLECTOR_IP:}
dispatch:
entrance:
netty:
enabled: true
# Config the collector unique identity name.
identity: wiki
# Config the running mode(public or private), public cluster or private cloud-edge.
mode: public
manager-host: 39.107.126.1
manager-port: 1158
push:
uri: "39.107.126.1:1157"
common:
queue:
type: netty
欢迎来撩 : 汇总all