diff --git a/home/docusaurus.config.js b/home/docusaurus.config.js index 291d2d0c3a..e4db02ca95 100644 --- a/home/docusaurus.config.js +++ b/home/docusaurus.config.js @@ -327,7 +327,7 @@ module.exports = { remarkPlugins: [ [require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }], ], - lastVersion: '1.8.0', + lastVersion: '1.9.0', versions: { current: { label: 'current', diff --git a/home/i18n/en/docusaurus-plugin-content-docs/version-1.9.0.json b/home/i18n/en/docusaurus-plugin-content-docs/version-1.9.0.json new file mode 100644 index 0000000000..2ef629d579 --- /dev/null +++ b/home/i18n/en/docusaurus-plugin-content-docs/version-1.9.0.json @@ -0,0 +1,166 @@ +{ + "version.label": { + "message": "1.9.0", + "description": "The label for version current" + }, + "sidebar.docs.category.quickstart": { + "message": "QuickStart", + "description": "The label for category quickstart in sidebar docs" + }, + "sidebar.docs.category.custom": { + "message": "Custom Monitoring", + "description": "The label for category custom in sidebar docs" + }, + "sidebar.docs.category.http": { + "message": "HTTP Protocol", + "description": "The label for category http in sidebar docs" + }, + "sidebar.docs.category.jdbc": { + "message": "JDBC Protocol", + "description": "The label for category jdbc in sidebar docs" + }, + "sidebar.docs.category.ssh": { + "message": "SSH Protocol", + "description": "The label for category ssh in sidebar docs" + }, + "sidebar.docs.category.telnet": { + "message": "TELNET Protocol", + "description": "The label for category telnet in sidebar docs" + }, + "sidebar.docs.category.guides": { + "message": "Use Guides", + "description": "The label for category guides in sidebar docs" + }, + "sidebar.docs.category.service": { + "message": "Service Monitor", + "description": "The label for category service in sidebar docs" + }, + "sidebar.docs.category.database": { + "message": "Database Monitor", + "description": "The label for category database in sidebar docs" + }, + "sidebar.docs.category.os": { + "message": "OS Monitor", + "description": "The label for category os in sidebar docs" + }, + "sidebar.docs.category.server": { + "message": "Server Monitor", + "description": "The label for category server in sidebar docs" + }, + "sidebar.docs.category.alert": { + "message": "Alerting", + "description": "The label for category alert in sidebar docs" + }, + "sidebar.docs.category.notice": { + "message": "Notification", + "description": "The label for category notice in sidebar docs" + }, + "sidebar.docs.category.service-discovery": { + "message": "Service Discovery", + "description": "The label for category service-discovery in sidebar docs" + }, + "sidebar.docs.category.mid": { + "message": "Middleware Monitor", + "description": "The label for category mid in sidebar docs" + }, + "sidebar.docs.category.Others": { + "message": "Others", + "description": "The label for category Others in sidebar docs" + }, + "sidebar.docs.category.cloud-native": { + "message": "CloudNative Monitor", + "description": "The label for category cloud-native in sidebar docs" + }, + "sidebar.docs.category.jmx": { + "message": "JMX Protocol", + "description": "The label for category jmx in sidebar docs" + }, + "sidebar.docs.category.snmp": { + "message": "SNMP Protocol", + "description": "The label for category snmp in sidebar docs" + }, + "sidebar.docs.link.Install via Helm": { + "message": "Install via Helm", + "description": "The label for link Install via Helm in sidebar docs, linking to https://artifacthub.io/packages/helm/hertzbeat/hertzbeat" + }, + "sidebar.docs.category.push": { + "message": "Push", + "description": "The label for category push in sidebar docs" + }, + "sidebar.docs.category.program": { + "message": "Program Monitor", + "description": "The label for category program in sidebar docs" + }, + "sidebar.docs.category.cache": { + "message": "Cache Monitor", + "description": "The label for category cache in sidebar docs" + }, + "sidebar.docs.category.bigdata": { + "message": "Bigdata Monitor", + "description": "The label for category bigdata in sidebar docs" + }, + "sidebar.docs.category.webserver": { + "message": "WebServer Monitor", + "description": "The label for category webserver in sidebar docs" + }, + "sidebar.docs.category.contribution": { + "message": "Contribution Guide", + "description": "The label for category contribution in sidebar docs" + }, + "sidebar.docs.category.submit": { + "message": "Submit Guide", + "description": "The label for category submit in sidebar docs" + }, + "sidebar.docs.category.release": { + "message": "Release Guide", + "description": "The label for category release in sidebar docs" + }, + "sidebar.docs.category.Community": { + "message": "Community", + "description": "The label for category Community in sidebar docs" + }, + "sidebar.docs.category.network": { + "message": "Network Monitor", + "description": "The label for category network in sidebar docs" + }, + "sidebar.docs.category.NGQL": { + "message": "NGQL", + "description": "The label for category NGQL in sidebar docs" + }, + "sidebar.docs.category.llm": { + "message": "AI LLM Monitor", + "description": "The label for category llm in sidebar docs" + }, + "sidebar.docs.category.aiConfig": { + "message": "AI LLM Config", + "description": "The label for category aiConfig in sidebar docs" + }, + "sidebar.docs.category.install": { + "message": "Install", + "description": "The label for category install in sidebar docs" + }, + "sidebar.docs.category.upgrade": { + "message": "Upgrade", + "description": "The label for category upgrade in sidebar docs" + }, + "sidebar.docs.category.setting": { + "message": "Setting", + "description": "The label for category setting in sidebar docs" + }, + "sidebar.docs.category.change-db": { + "message": "Change DB", + "description": "The label for category change-db in sidebar docs" + }, + "sidebar.docs.category.use-case": { + "message": "Use Case", + "description": "The label for category use-case in sidebar docs" + }, + "sidebar.docs.category.extern-deploy": { + "message": "Extern Install", + "description": "The label for category extern-deploy in sidebar docs" + }, + "sidebar.docs.category.log": { + "message": "Log", + "description": "The label for category log in sidebar docs" + } +} diff --git a/home/i18n/ko/docusaurus-plugin-content-docs/version-1.9.0.json b/home/i18n/ko/docusaurus-plugin-content-docs/version-1.9.0.json new file mode 100644 index 0000000000..b9e6dfb172 --- /dev/null +++ b/home/i18n/ko/docusaurus-plugin-content-docs/version-1.9.0.json @@ -0,0 +1,166 @@ +{ + "version.label": { + "message": "1.9.0", + "description": "The label for version current" + }, + "sidebar.docs.category.quickstart": { + "message": "빠른 시작", + "description": "The label for category quickstart in sidebar docs" + }, + "sidebar.docs.category.custom": { + "message": "커스텀 모니터링", + "description": "The label for category custom in sidebar docs" + }, + "sidebar.docs.category.http": { + "message": "HTTP 프로토콜", + "description": "The label for category http in sidebar docs" + }, + "sidebar.docs.category.jdbc": { + "message": "JDBC 프로토콜", + "description": "The label for category jdbc in sidebar docs" + }, + "sidebar.docs.category.ssh": { + "message": "SSH 프로토콜", + "description": "The label for category ssh in sidebar docs" + }, + "sidebar.docs.category.telnet": { + "message": "TELNET 프로토콜", + "description": "The label for category telnet in sidebar docs" + }, + "sidebar.docs.category.guides": { + "message": "사용 가이드", + "description": "The label for category guides in sidebar docs" + }, + "sidebar.docs.category.service": { + "message": "서비스 모니터링", + "description": "The label for category service in sidebar docs" + }, + "sidebar.docs.category.database": { + "message": "데이터베이스 모니터링", + "description": "The label for category database in sidebar docs" + }, + "sidebar.docs.category.os": { + "message": "OS 모니터링", + "description": "The label for category os in sidebar docs" + }, + "sidebar.docs.category.server": { + "message": "서버 모니터링", + "description": "The label for category server in sidebar docs" + }, + "sidebar.docs.category.alert": { + "message": "알람", + "description": "The label for category alert in sidebar docs" + }, + "sidebar.docs.category.notice": { + "message": "알림", + "description": "The label for category notice in sidebar docs" + }, + "sidebar.docs.category.service-discovery": { + "message": "서비스 디스커버리", + "description": "The label for category service-discovery in sidebar docs" + }, + "sidebar.docs.category.mid": { + "message": "미들웨어 모니터링", + "description": "The label for category mid in sidebar docs" + }, + "sidebar.docs.category.Others": { + "message": "기타", + "description": "The label for category Others in sidebar docs" + }, + "sidebar.docs.category.cloud-native": { + "message": "클라우드 네이티브 모니터링", + "description": "The label for category cloud-native in sidebar docs" + }, + "sidebar.docs.category.jmx": { + "message": "JMX 프로토콜", + "description": "The label for category jmx in sidebar docs" + }, + "sidebar.docs.category.snmp": { + "message": "SNMP 프로토콜", + "description": "The label for category snmp in sidebar docs" + }, + "sidebar.docs.link.Install via Helm": { + "message": "Helm으로 설치", + "description": "The label for link Install via Helm in sidebar docs, linking to https://artifacthub.io/packages/helm/hertzbeat/hertzbeat" + }, + "sidebar.docs.category.push": { + "message": "Push", + "description": "The label for category push in sidebar docs" + }, + "sidebar.docs.category.program": { + "message": "애플리케이션 모니터링", + "description": "The label for category program in sidebar docs" + }, + "sidebar.docs.category.cache": { + "message": "캐시 모니터링", + "description": "The label for category cache in sidebar docs" + }, + "sidebar.docs.category.bigdata": { + "message": "빅데이터 모니터링", + "description": "The label for category bigdata in sidebar docs" + }, + "sidebar.docs.category.webserver": { + "message": "웹서버 모니터링", + "description": "The label for category webserver in sidebar docs" + }, + "sidebar.docs.category.contribution": { + "message": "기여 가이드", + "description": "The label for category contribution in sidebar docs" + }, + "sidebar.docs.category.submit": { + "message": "제출 가이드", + "description": "The label for category submit in sidebar docs" + }, + "sidebar.docs.category.release": { + "message": "릴리스 가이드", + "description": "The label for category release in sidebar docs" + }, + "sidebar.docs.category.Community": { + "message": "커뮤니티", + "description": "The label for category Community in sidebar docs" + }, + "sidebar.docs.category.network": { + "message": "네트워크 모니터링", + "description": "The label for category network in sidebar docs" + }, + "sidebar.docs.category.NGQL": { + "message": "NGQL", + "description": "The label for category NGQL in sidebar docs" + }, + "sidebar.docs.category.llm": { + "message": "AI LLM 모니터링", + "description": "The label for category llm in sidebar docs" + }, + "sidebar.docs.category.aiConfig": { + "message": "AI LLM 설정", + "description": "The label for category aiConfig in sidebar docs" + }, + "sidebar.docs.category.install": { + "message": "설치", + "description": "The label for category install in sidebar docs" + }, + "sidebar.docs.category.upgrade": { + "message": "업그레이드", + "description": "The label for category upgrade in sidebar docs" + }, + "sidebar.docs.category.setting": { + "message": "설정", + "description": "The label for category setting in sidebar docs" + }, + "sidebar.docs.category.change-db": { + "message": "DB 변경", + "description": "The label for category change-db in sidebar docs" + }, + "sidebar.docs.category.use-case": { + "message": "사용 사례", + "description": "The label for category use-case in sidebar docs" + }, + "sidebar.docs.category.extern-deploy": { + "message": "외부 설치", + "description": "The label for category extern-deploy in sidebar docs" + }, + "sidebar.docs.category.log": { + "message": "로그", + "description": "The label for category log in sidebar docs" + } +} diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0.json b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0.json new file mode 100644 index 0000000000..ed7dc2be48 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0.json @@ -0,0 +1,186 @@ +{ + "version.label": { + "message": "1.9.0", + "description": "The label for version current" + }, + "sidebar.docs.category.quickstart": { + "message": "快速开始", + "description": "The label for category quickstart in sidebar docs" + }, + "sidebar.docs.category.custom": { + "message": "自定义监控", + "description": "The label for category custom in sidebar docs" + }, + "sidebar.docs.category.http": { + "message": "HTTP协议", + "description": "The label for category http in sidebar docs" + }, + "sidebar.docs.category.jdbc": { + "message": "JDBC协议", + "description": "The label for category jdbc in sidebar docs" + }, + "sidebar.docs.category.ssh": { + "message": "SSH协议", + "description": "The label for category ssh in sidebar docs" + }, + "sidebar.docs.category.telnet": { + "message": "TELNET协议", + "description": "The label for category telnet in sidebar docs" + }, + "sidebar.docs.category.guides": { + "message": "使用指南", + "description": "The label for category guides in sidebar docs" + }, + "sidebar.docs.category.service": { + "message": "应用服务监控", + "description": "The label for category service in sidebar docs" + }, + "sidebar.docs.category.database": { + "message": "数据库监控", + "description": "The label for category database in sidebar docs" + }, + "sidebar.docs.category.os": { + "message": "操作系统监控", + "description": "The label for category os in sidebar docs" + }, + "sidebar.docs.category.server": { + "message": "服务器监控", + "description": "The label for category server in sidebar docs" + }, + "sidebar.docs.category.mid": { + "message": "中间件监控", + "description": "The label for category mid in sidebar docs" + }, + "sidebar.docs.category.alert": { + "message": "阈值告警", + "description": "The label for category alert in sidebar docs" + }, + "sidebar.docs.category.notice": { + "message": "消息通知", + "description": "The label for category notice in sidebar docs" + }, + "sidebar.docs.category.service-discovery": { + "message": "服务发现", + "description": "The label for category service-discovery in sidebar docs" + }, + "sidebar.docs.category.Others": { + "message": "其它", + "description": "The label for category Others in sidebar docs" + }, + "sidebar.docs.category.cloud-native": { + "message": "云原生监控", + "description": "The label for category cloud-native in sidebar docs" + }, + "sidebar.docs.link.Install via HuaweiCloud": { + "message": "华为云方式部署", + "description": "The label for link Install via HuaweiCloud in sidebar docs, linking to https://marketplace.huaweicloud.com/contents/0477015c-ad63-4522-a308-816861769f0a#productid=OFFI863735781612109824" + }, + "sidebar.docs.category.jmx": { + "message": "JMX协议", + "description": "The label for category jmx in sidebar docs" + }, + "sidebar.docs.category.snmp": { + "message": "SNMP协议", + "description": "The label for category snmp in sidebar docs" + }, + "sidebar.docs.link.Install via Helm": { + "message": "Helm方式安装", + "description": "The label for link Install via Helm in sidebar docs, linking to https://artifacthub.io/packages/helm/hertzbeat/hertzbeat" + }, + "sidebar.docs.category.push": { + "message": "Push", + "description": "The label for category push in sidebar docs" + }, + "sidebar.docs.category.program": { + "message": "应用程序监控", + "description": "The label for category program in sidebar docs" + }, + "sidebar.docs.category.cache": { + "message": "缓存监控", + "description": "The label for category cache in sidebar docs" + }, + "sidebar.docs.category.bigdata": { + "message": "大数据监控", + "description": "The label for category bigdata in sidebar docs" + }, + "sidebar.docs.category.webserver": { + "message": "Web服务器监控", + "description": "The label for category webserver in sidebar docs" + }, + "sidebar.docs.category.Community": { + "message": "社区", + "description": "The label for category Community in sidebar docs" + }, + "sidebar.docs.category.contribution": { + "message": "贡献指南", + "description": "The label for category contribution in sidebar docs" + }, + "sidebar.docs.category.submit": { + "message": "提交指南", + "description": "The label for category submit in sidebar docs" + }, + "sidebar.docs.category.release": { + "message": "发布指南", + "description": "The label for category release in sidebar docs" + }, + "sidebar.docs.category.network": { + "message": "网络监控", + "description": "The label for category network in sidebar docs" + }, + "sidebar.docs.category.NGQL": { + "message": "NGQL", + "description": "The label for category NGQL in sidebar docs" + }, + "sidebar.docs.category.llm": { + "message": "AI大模型监控", + "description": "The label for category llm in sidebar docs" + }, + "sidebar.docs.category.aiConfig": { + "message": "AI大模型配置", + "description": "The label for category aiConfig in sidebar docs" + }, + "sidebar.docs.category.install": { + "message": "安装", + "description": "The label for category install in sidebar docs" + }, + "sidebar.docs.category.upgrade": { + "message": "升级", + "description": "The label for category upgrade in sidebar docs" + }, + "sidebar.docs.category.setting": { + "message": "配置", + "description": "The label for category setting in sidebar docs" + }, + "sidebar.docs.category.change-db": { + "message": "数据库切换", + "description": "The label for category change-db in sidebar docs" + }, + "sidebar.docs.category.use-case": { + "message": "使用案例", + "description": "The label for category use-case in sidebar docs" + }, + "sidebar.docs.category.extern-deploy": { + "message": "集成平台部署", + "description": "The label for category extern-deploy in sidebar docs" + }, + "sidebar.docs.category.quickstart-use-case": { + "message": "使用案例", + "description": "The label for category quickstart-use-case in sidebar docs" + }, + "sidebar.docs.category.guides-use-case": { + "message": "使用案例", + "description": "The label for category guides-use-case in sidebar docs" + }, + "sidebar.docs.category.help-custom": { + "message": "自定义监控", + "description": "The label for category help-custom in sidebar docs" + }, + "sidebar.docs.category.advanced-custom": { + "message": "自定义监控", + "description": "The label for category advanced-custom in sidebar docs" + }, + "sidebar.docs.category.log": { + "message": "日志监控 (Beta)", + "description": "The label for category log in sidebar docs" + } +} diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-default.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-default.md new file mode 100644 index 0000000000..41f24b3398 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-default.md @@ -0,0 +1,285 @@ +--- +id: extend-http-default +title: HTTP协议系统默认解析方式 +sidebar_label: 系统默认解析方式 +--- + +> HTTP接口调用获取响应数据后,用 Apache HertzBeat™ 默认的解析方式去解析响应数据。 + +**此需接口响应数据结构符合HertzBeat指定的数据结构规则** + +## HertzBeat数据格式规范 + +注意⚠️ 响应数据为JSON + +单层格式:key-value + +```json +{ + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" +} +``` + +多层格式:数组里面套key-value + +```json +[ + { + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" + }, + { + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" + } +] +``` + +样例: +查询自定义系统的CPU信息,其暴露接口为 `/metrics/cpu`,我们需要其中的`hostname,core,usage`指标 +若只有一台虚拟机,其单层格式为: + +```json +{ + "hostname": "linux-1", + "core": 1, + "usage": 78.0, + "allTime": 200, + "runningTime": 100 +} +``` + +若有多台虚拟机,其多层格式为: + +```json +[ + { + "hostname": "linux-1", + "core": 1, + "usage": 78.0, + "allTime": 200, + "runningTime": 100 + }, + { + "hostname": "linux-2", + "core": 3, + "usage": 78.0, + "allTime": 566, + "runningTime": 34 + }, + { + "hostname": "linux-3", + "core": 4, + "usage": 38.0, + "allTime": 500, + "runningTime": 20 + } +] +``` + +**对应的监控模板YML可以配置为如下** + +```yaml +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: a_example +# The monitoring i18n name +name: + zh-CN: 模拟应用 + en-US: EXAMPLE APP +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`
`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。 + en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `
`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template." + zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`
`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/ + en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/ +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + # required-true or false + required: true + # default value + defaultValue: 80 + # param field input placeholder + placeholder: 'Please Input Port' + # field-param field key + - field: username + # name-param field display i18n name + name: + zh-CN: 用户名 + en-US: Username + # type-param field type(most mapping the html input type) + type: text + # when type is text, use limit to limit string length + limit: 50 + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: password + # name-param field display i18n name + name: + zh-CN: 用户密码 + en-US: Password + # type-param field type(most mapping the html input tag) + type: password + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: ssl + # name-param field display i18n name + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + # required-true or false + required: false + # field-param field key + - field: method + # name-param field display i18n name + name: + zh-CN: 请求方式 + en-US: Method + # type-param field type(radio mapping the html radio tag) + type: radio + # required-true or false + required: true + # when type is radio checkbox, use option to show optional values {name1:value1,name2:value2} + options: + - label: GET + value: GET + - label: POST + value: POST + - label: PUT + value: PUT + - label: DELETE + value: DELETE + # field-param field key + - field: headers + # name-param field display i18n name + name: + zh-CN: 请求Headers + en-US: Headers + # type-param field type(key-value mapping the html key-value input tags) + type: key-value + # required-true or false + required: false + # when type is key-value, use keyAlias to config key alias name + keyAlias: Header Name + # when type is key-value, use valueAlias to config value alias name + valueAlias: Header Value +# collect metrics config list +metrics: + # metrics - cpu + - name: cpu + # metrics name i18n label + i18n: + zh-CN: CPU 信息 + en-US: CPU Info + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, i18n-metric name i18n label, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field + - field: hostname + type: 1 + label: true + i18n: + zh-CN: 主机名称 + en-US: Host Name + - field: usage + type: 0 + unit: '%' + i18n: + zh-CN: 使用率 + en-US: Usage + - field: cores + type: 0 + i18n: + zh-CN: 核数 + en-US: Cores + - field: waitTime + type: 0 + unit: s + i18n: + zh-CN: 主机名称 + en-US: Host Name + # (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field + aliasFields: + - hostname + - core1 + - core2 + - usage + - allTime + - runningTime + # mapping and conversion expressions, use these and aliasField above to calculate metrics value + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - hostname=hostname + - cores=core1+core2 + - usage=usage + - waitTime=allTime-runningTime + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: /metrics/cpu + # http method: GET POST PUT DELETE PATCH + method: GET + # if enabled https + ssl: false + # http request header content + headers: + ^_^headers^_^: ^_^headers^_^ + # http request params + params: + param1: param1 + param2: param2 + # http auth + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + type: Basic Auth + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: jsonPath + parseScript: '$' +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-example-hertzbeat.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-example-hertzbeat.md new file mode 100644 index 0000000000..f99807576b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-example-hertzbeat.md @@ -0,0 +1,217 @@ +--- +id: extend-http-example-hertzbeat +title: 教程一:适配一款基于HTTP协议的监控类型 +sidebar_label: 教程一:适配一款HTTP协议监控 +--- + +通过此教程我们一步一步描述如何在 Apache HertzBeat™ 监控系统下新增适配一款基于http协议的监控类型。 + +阅读此教程前我们希望您已经从[自定义监控](extend-point)和[http协议自定义](extend-http)了解熟悉了怎么自定义类型,指标,协议等。 + +## HTTP协议解析通用响应结构体,获取指标数据 +> +> 很多场景我们需要对提供的 HTTP API 接口进行监控,获取接口返回的指标值。这篇文章我们通过http自定义协议来解析我们常见的http接口响应结构,获取返回体中的字段作为指标数据。 + +```json +{ + "code": 200, + "msg": "success", + "data": {} +} + +``` + +如上,通常我们的后台API接口会设计这这样一个通用返回。hertzbeat系统的后台也是如此,我们今天就用hertzbeat的 API 做样例,新增适配一款新的监控类型 **hertzbeat**,监控采集它的系统摘要统计API +`http://localhost:1157/api/summary`, 其响应数据为: + +```json +{ + "msg": null, + "code": 0, + "data": { + "apps": [ + { + "category": "service", + "app": "jvm", + "status": 0, + "size": 2, + "availableSize": 0, + "unManageSize": 2, + "unAvailableSize": 0, + "unReachableSize": 0 + }, + { + "category": "service", + "app": "website", + "status": 0, + "size": 2, + "availableSize": 0, + "unManageSize": 2, + "unAvailableSize": 0, + "unReachableSize": 0 + } + ] + } +} +``` + +**我们这次获取其app下的 `category`,`app`,`status`,`size`,`availableSize`等指标数据。** + +### 新增自定义监控模板YML + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +> 监控模板YML用于定义 *监控类型的名称(国际化), 请求参数结构定义(前端页面根据配置自动渲染UI), 采集指标信息, 采集协议配置* 等。 +> 即我们通过自定义这个监控模板,配置定义什么监控类型,前端页面需要输入什么参数,采集哪些性能指标,通过什么协议去采集。 + +样例:自定义一个名称为`hertzbeat`的自定义监控类型,其使用HTTP协议采集指标数据。 + +```yaml +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat +name: + zh-CN: HertzBeat + en-US: HertzBeat +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat 监控系统的通用指标进行测量监控。`
`您可以点击 “``新建 HertzBeat监控系统``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor through general performance metric. You could click the "``New HertzBeat Monitor``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控系統的通用名額進行量測監控。`
`您可以點擊“``新建HertzBeat監控系統``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat +params: + - field: host + name: + zh-CN: 目标Host + en-US: Target Host + type: host + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + range: '[0,65535]' + required: true + defaultValue: 1157 + - field: ssl + name: + zh-CN: 启用HTTPS + en-US: HTTPS + type: boolean + required: true + - field: timeout + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + type: number + required: false + hide: true + - field: authType + name: + zh-CN: 认证方式 + en-US: Auth Type + type: radio + required: false + hide: true + options: + - label: Basic Auth + value: Basic Auth + - label: Digest Auth + value: Digest Auth + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 50 + required: false + hide: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: false + hide: true +metrics: + # the first metrics summary + # attention: Built-in monitoring metrics contains (responseTime - Response time) + - name: summary + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # metrics content contains field-metric name, type-metric type:0-number,1-string, instance-if is metrics, unit-metric unit('%','ms','MB') + - field: app + type: 1 + label: true + - field: category + type: 1 + - field: status + type: 0 + - field: size + type: 0 + - field: availableSize + type: 0 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here + protocol: http + # the config content when protocol is http + http: + # host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url, we don't need to enter a parameter here, just set the fixed value to /api/summary + url: /api/summary + timeout: ^_^timeout^_^ + # http method: GET POST PUT DELETE PATCH, default fixed value is GET + method: GET + # if enabled https, default value is false + ssl: ^_^ssl^_^ + # http auth + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + type: ^_^authType^_^ + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + digestAuthUsername: ^_^username^_^ + digestAuthPassword: ^_^password^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, we use jsonpath to parse response data here + parseType: jsonPath + parseScript: '$.data.apps.*' + +``` + +**新增完毕,现在我们重启hertzbeat系统。我们可以看到系统页面已经多了一个`hertzbeat`监控类型了。** + +![HertzBeat](/img/docs/advanced/extend-http-example-1.png) + +### 系统页面添加对`hertzbeat`监控类型的监控 + +> 我们点击新增 `HertzBeat监控系统`,配置监控IP,端口,采集周期,高级设置里的账户密码等, 点击确定添加监控。 + +![HertzBeat](/img/docs/advanced/extend-http-example-2.png) + +![HertzBeat](/img/docs/advanced/extend-http-example-3.png) + +> 过一定时间(取决于采集周期)我们就可以在监控详情看到具体的指标数据和历史图表啦! + +![HertzBeat](/img/docs/advanced/extend-http-example-4.png) + +### 设置阈值告警通知 + +> 接下来我们就可以正常的设置阈值,告警触发后可以在告警中心查看,也可以新增接收人,设置告警通知等,Have Fun!!! + +---- + +#### 完 + +HTTP协议的自定义监控的实践就到这里,HTTP协议还带其他参数headers,params等,我们可以像用postman一样去定义它,可玩性也非常高! + +如果您觉得hertzbeat这个开源项目不错的话欢迎给我们在GitHub Gitee star哦,灰常感谢。感谢老铁们的支持。笔芯! + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-example-token.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-example-token.md new file mode 100644 index 0000000000..674f2b56e0 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-example-token.md @@ -0,0 +1,400 @@ +--- +id: extend-http-example-token +title: 教程二:基于HTTP协议获取TOKEN指标值,给后续采集认证使用 +sidebar_label: 教程二:获取TOKEN后续认证使用 +--- + +通过此教程我们一步一步描述如何在教程一的基础上改造,新增一个监控指标,先调用认证接口获取TOKEN后,使用TOKEN作为参数供后面的监控指标采集认证使用。 + +阅读此教程前我们希望您已经从[自定义监控](extend-point)和[http协议自定义](extend-http)了解熟悉了怎么自定义类型,指标,协议等。 + +## 请求流程 + +【**认证信息监控指标(优先级最高)**】【**HTTP接口携带账户密码调用**】->【**响应数据解析**】->【**解析签发TOKEN-accessToken作为指标**】->【**将accessToken作为变量参数赋值给其他采集监控指标**】 + +> 这里我们依然用教程一的hertzbeat监控举例!hertzbeat后台接口不仅仅支持教程一使用的basic直接账户密码认证,也支持token认证。 + +**我们需要`POST`调用登录接口`/api/account/auth/form`获取`accessToken`,请求body(json格式)如下**: + +```json +{ + "credential": "hertzbeat", + "identifier": "admin" +} +``` + +**响应结构数据如下**: + +```json +{ + "data": { + "token": "xxxx", + "refreshToken": "xxxx" + }, + "msg": null, + "code": 0 +} +``` + +### 新增自定义监控类型`hertzbeat_token` + +1. 自定义监控类型需新增配置监控模板YML,我们直接复用教程一的 `hertzbeat` 监控类型,在其基础上修改 + +监控配置定义文件是用来定义采集类型是啥,需要用哪种协议采集方式,采集的指标是啥,协议的配置参数等。 +我们直接复用 app-hertzbeat.yml 里面的定义内容,修改为我们当前的监控类型`hertzbeat_auth`配置参数, 比如 `app, category等`。 + +```yaml +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat_token +# The monitoring i18n name +name: + zh-CN: HertzBeat(Token) + en-US: HertzBeat(Token) +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`
`您可以点击 “``新建 HertzBeat监控(Token)``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "``New HertzBeat Monitor(Token)``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`
`您可以點擊“``新建HertzBeat監控(Token)``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + required: true + defaultValue: 1157 + placeholder: 'Please input port' + - field: ssl + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + required: false + - field: contentType + name: + zh-CN: Content-Type + en-US: Content-Type + type: text + placeholder: 'Request Body Type' + required: false + - field: payload + name: + zh-CN: 请求BODY + en-US: BODY + type: textarea + placeholder: 'Available When POST PUT' + required: false +``` + +### 定义监控指标`auth`登录请求获取`token` + +1. 在`app-hertzbeat_token.yml`新增一个监控指标定义 `auth`, 设置采集优先级为最高0,采集指标 `token`. + +```yaml + +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat_token +# The monitoring i18n name +name: + zh-CN: HertzBeat(Token) + en-US: HertzBeat(Token) +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`
`您可以点击 “``新建 HertzBeat监控(Token)``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "``New HertzBeat Monitor(Token)``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`
`您可以點擊“``新建HertzBeat監控(Token)``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + required: true + defaultValue: 1157 + placeholder: 'Please input port' + - field: ssl + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + required: false + - field: contentType + name: + zh-CN: Content-Type + en-US: Content-Type + type: text + placeholder: 'Request Body Type' + required: false + - field: payload + name: + zh-CN: 请求BODY + en-US: BODY + type: textarea + placeholder: 'Available When POST PUT' + required: false +# collect metrics config list +metrics: + # metrics - auth + - name: auth + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field + - field: token + type: 1 + - field: refreshToken + type: 1 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: /api/account/auth/form + # http method: GET POST PUT DELETE PATCH + method: POST + # if enabled https + ssl: ^_^ssl^_^ + payload: ^_^payload^_^ + # http request header content + headers: + content-type: ^_^contentType^_^ + ^_^headers^_^: ^_^headers^_^ + # http request params + params: + ^_^params^_^: ^_^params^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: jsonPath + parseScript: '$.data' + +``` + +**此时,重启hertzbeat系统,在系统页面上添加 `hertzbeat_token` 类型监控,配置输入参数,`content-type`填`application/json` , `请求Body`填账户密码json如下:** + +```json +{ + "credential": "hertzbeat", + "identifier": "admin" +} +``` + +![HertzBeat](/img/docs/advanced/extend-http-example-5.png) + +**新增成功后我们就可以在详情页面看到我们采集的 `token`, `refreshToken`指标数据。** + +![HertzBeat](/img/docs/advanced/extend-http-example-6.png) + +![HertzBeat](/img/docs/advanced/extend-http-example-7.png) + +### 将`token`作为变量参数给后面的监控指标采集使用 + +**在`app-hertzbeat_token.yml`新增一个监控指标定义 `summary` 同教程一中的`summary`相同, 设置采集优先级为1** +**设置此监控指标的HTTP协议配置中认证方式为 `Bearer Token` 将上一个监控指标`auth`采集的指标`token`作为参数给其赋值,使用`^o^`作为内部替换符标识,即`^o^token^o^`。如下:** + +```yaml + - name: summary +# 当protocol为http协议时具体的采集配置 + http: + # 认证 + authorization: + # 认证方式: Basic Auth, Digest Auth, Bearer Token + type: Bearer Token + bearerTokenToken: ^o^token^o^ +``` + +**最终`app-hertzbeat_token.yml`定义如下:** + +```yaml + +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat_token +# The monitoring i18n name +name: + zh-CN: HertzBeat(Token) + en-US: HertzBeat(Token) +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`
`您可以点击 “``新建 HertzBeat监控(Token)``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "``New HertzBeat Monitor(Token)``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`
`您可以點擊“``新建HertzBeat監控(Token)``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + required: true + defaultValue: 1157 + placeholder: 'Please input port' + - field: ssl + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + required: false + - field: contentType + name: + zh-CN: Content-Type + en-US: Content-Type + type: text + placeholder: 'Request Body Type' + required: false + - field: payload + name: + zh-CN: 请求BODY + en-US: BODY + type: textarea + placeholder: 'Available When POST PUT' + required: false +# collect metrics config list +metrics: + # metrics - auth + - name: auth + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field + - field: token + type: 1 + - field: refreshToken + type: 1 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: /api/account/auth/form + # http method: GET POST PUT DELETE PATCH + method: POST + # if enabled https + ssl: ^_^ssl^_^ + payload: ^_^payload^_^ + # http request header content + headers: + content-type: ^_^contentType^_^ + ^_^headers^_^: ^_^headers^_^ + # http request params + params: + ^_^params^_^: ^_^params^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: jsonPath + parseScript: '$.data' + + + - name: summary + priority: 1 + fields: + - field: app + type: 1 + label: true + - field: category + type: 1 + - field: status + type: 0 + - field: size + type: 0 + - field: availableSize + type: 0 + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + url: /api/summary + method: GET + ssl: ^_^ssl^_^ + authorization: + type: Bearer Token + # ^o^xxx^o^ ^o^ substitution represents the value of the acquisition metric xxx of the previous priority + bearerTokenToken: ^o^token^o^ + parseType: jsonPath + parseScript: '$.data.apps.*' + +``` + +**配置完成后,再次重启 `hertzbeat` 系统,查看监控详情页面** + +![HertzBeat](/img/docs/advanced/extend-http-example-8.png) + +![HertzBeat](/img/docs/advanced/extend-http-example-9.png) + +### 设置阈值告警通知 + +> 接下来我们就可以正常设置阈值,告警触发后可以在告警中心查看,也可以新增接收人,设置告警通知等,Have Fun!!! + +---- + +#### 完 + +HTTP协议的自定义监控的实践就到这里,HTTP协议还带其他参数headers,params等,我们可以像用postman一样去定义它,可玩性也非常高! + +如果您觉得hertzbeat这个开源项目不错的话欢迎给我们在GitHub Gitee star哦,灰常感谢。感谢老铁们的支持。笔芯! + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-jsonpath.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-jsonpath.md new file mode 100644 index 0000000000..2a24b54a46 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-jsonpath.md @@ -0,0 +1,176 @@ +--- +id: extend-http-jsonpath +title: HTTP协议JsonPath解析方式 +sidebar_label: JsonPath解析方式 +--- + +> HTTP接口调用获取响应数据后,用JsonPath脚本解析的解析方式去解析响应数据。 + +注意⚠️ 响应数据为JSON格式 + +**使用JsonPath脚本将响应数据解析成符合 Apache HertzBeat™ 指定的数据结构规则的数据** + +## JsonPath操作符 + +[JSONPath在线验证](https://www.jsonpath.cn) + +| JSONPATH | 帮助描述 | +|------------------|-----------------------------------| +| $ | 根对象或元素 | +| @ | 当前对象或元素 | +| . or [] | 子元素操作符 | +| .. | 递归匹配所有子元素 | +| * | 通配符. 匹配所有对象或元素. | +| [] | 下标运算符,JsonPath索引从0开始 | +| [,] | 连接运算符,将多个结果拼成数组返回,JSONPath允许使用别名. | +| [start:end:step] | 数组切片运算符 | +| ?() | 过滤器(脚本)表达式. | +| () | 脚本表达式. | + +### HertzBeat数据格式规范 + +单层格式:key-value + +```json +{ + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" +} +``` + +多层格式:数组里面套key-value + +```json +[ + { + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" + }, + { + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" + } +] +``` + +#### 样例 + +查询自定义系统的数值信息,其暴露接口为 `/metrics/person`,我们需要其中的`type,num`指标 +接口返回的原始数据如下: + +```json +{ + "firstName": "John", + "lastName" : "doe", + "age" : 26, + "address" : { + "streetAddress": "naist street", + "city" : "Nara", + "postalCode" : "630-0192" + }, + "number": [ + { + "type": "core", + "num": 3343 + }, + { + "type": "home", + "num": 4543 + } + ] +} +``` + +我们使用JsonPath脚本解析,对应的脚本为: `$.number[*]` ,解析后的数据结构如下: + +```json +[ + { + "type": "core", + "num": 3343 + }, + { + "type": "home", + "num": 4543 + } +] +``` + +此数据结构符合HertzBeat的数据格式规范,成功提取指标`type,num`值。 + +**对应的监控模板YML可以配置为如下** + +```yaml +category: custom +# 监控应用类型 eg: linux windows tomcat mysql aws... +app: example +name: + zh-CN: 模拟应用类型 + en-US: EXAMPLE APP +# 监控参数定义. field 这些为输入参数变量,即可以用^_^host^_^的形式写到后面的配置中,系统自动变量值替换 +# 强制固定必须参数 - host +params: + # field-字段名称标识符 + - field: host + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # 是否是必输项 true-必填 false-可选 + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + # 当type为number时,用range表示范围 + range: '[0,65535]' + required: true + # 端口默认值 + defaultValue: 80 + # 参数输入框提示信息 + placeholder: '请输入端口' +# collect metrics config list +# 采集指标配置列表 +metrics: + # metrics - cpu + # 监控指标 - cpu + - name: cpu + # 指标调度优先级(0-127)越小优先级越高,优先级低的指标会等优先级高的指标采集完成后才会被调度,相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # 具体监控指标列表 + fields: + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: type + type: 1 + label: true + - field: num + type: 0 +# 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http +# 当protocol为http协议时具体的采集配置 + http: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + # url请求接口路径 + url: /metrics/person + # 请求方式 GET POST PUT DELETE PATCH + method: GET + # 是否启用ssl/tls,即是http还是https,默认false + ssl: false + # 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-网站可用性指标监控 + # 这里使用jsonPath解析 + parseType: jsonPath + parseScript: '$.number[*]' +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-xmlpath.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-xmlpath.md new file mode 100644 index 0000000000..4052d2798f --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http-xmlpath.md @@ -0,0 +1,326 @@ +--- +id: extend-http-xmlpath +title: HTTP 协议 XmlPath 解析方法 +sidebar_label: XmlPath 解析方法 +--- + +> 调用 HTTP API 获取响应数据后,使用 XmlPath 脚本解析方法解析响应数据。 + +注意⚠️ 响应数据必须是 XML 格式。 + +**使用 XPath 脚本将响应数据解析为符合 HertzBeat 指定的数据结构规则的数据。** + +## XmlPath 解析逻辑 + +HertzBeat 中的 XmlPath 解析方法使用两步 XPath 处理: + +1. **主 XPath 表达式 (`parseScript`)**: 此 XPath 表达式在 `http` 配置部分的 `parseScript` 中定义。它用于从响应中选择一个或多个主要的 XML 节点。每个选中的节点将对应 HertzBeat 中的一行指标数据。 +2. **相对字段 XPath 表达式 (`xpath`)**: 对于在 `fields` 列表中定义的每个指标字段,您可以指定一个相对的 `xpath`。此 XPath 表达式是*相对于*步骤 1 中 `parseScript` 选择的每个主节点进行评估的。它从当前主节点中提取该指标字段的具体值。 + +这使您可以轻松地解析包含多个记录或项目的结构化 XML 数据。 + +**特殊指标**: + +* `responseTime`: 这个内置指标代表 HTTP 请求的响应时间,是自动收集的。它不需要 `xpath`。 + +* `keyword`: 这个内置指标计算原始响应体中指定关键字(在 `http.keyword` 中配置)的出现次数。它不需要 `xpath`。 + +### 示例 + +假设 HTTP API 返回以下 XML 数据: + +```xml + + + + 36.400002 + + + + + 399640 + 98792 + 228492 + + + + + 1 + 1000 + + + 2 + 0 + + + 2025-01-06 10:27:48 + 87天0时55分59秒 + 2025-04-03 11:09:18 + 1 + + 16 + 23 + 12 + + NTP + 34.191.45.101 + +``` + +我们想要监控设备状态并提取各种指标。 + +以下是您将如何配置监控模板 YML: + +```yaml +category: server +# The monitoring type eg: linux windows tomcat mysql aws... +app: hikvision_isapi +# The monitoring i18n name +name: + zh-CN: 海康威视 ISAPI + en-US: Hikvision ISAPI +# The description and help of this monitoring type +help: + zh-CN: 通过ISAPI接口监控海康威视设备状态,获取设备健康数据。 + en-US: Monitor Hikvision devices through ISAPI interface to collect health data. + +# Input params define for monitoring(render web ui by the definition) +params: + - field: host + name: + zh-CN: 主机Host + en-US: Host + type: host + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + range: '[0,65535]' + required: true + defaultValue: 80 + - field: timeout + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + type: number + range: '[1000,60000]' + required: true + defaultValue: 5000 + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + required: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: true + - field: ssl + name: + zh-CN: 启用HTTPS + en-US: SSL + type: boolean + required: false + defaultValue: false + +# collect metrics config list +metrics: + - name: system_info + i18n: + zh-CN: 系统信息 + en-US: System Info + priority: 0 + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + ssl: ^_^ssl^_^ + url: /ISAPI/System/deviceInfo + method: GET + timeout: ^_^timeout^_^ + authorization: + type: Digest Auth + digestAuthUsername: ^_^username^_^ + digestAuthPassword: ^_^password^_^ + parseType: xmlPath + parseScript: //DeviceInfo + fields: + - field: deviceName + type: 1 + i18n: + zh-CN: 设备名称 + en-US: Device Name + - field: deviceID + type: 1 + i18n: + zh-CN: 设备ID + en-US: Device ID + - field: firmwareVersion + type: 1 + i18n: + zh-CN: 固件版本 + en-US: Firmware Version + - field: model + type: 1 + i18n: + zh-CN: 设备型号 + en-US: Device Model + - field: macAddress + type: 1 + i18n: + zh-CN: mac地址 + en-US: Mac Address + - name: status + i18n: + zh-CN: 设备状态 + en-US: Status + priority: 0 + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + ssl: ^_^ssl^_^ + url: /ISAPI/System/status + method: GET + timeout: ^_^timeout^_^ + authorization: + type: Digest Auth + digestAuthUsername: ^_^username^_^ + digestAuthPassword: ^_^password^_^ + parseType: xmlPath + parseScript: //DeviceStatus + fields: + - field: CPU_utilization + i18n: + zh-CN: CPU 利用率 + en-US: CPU Utilization + type: 0 + unit: '%' + - field: memory_usage + i18n: + zh-CN: 内存使用量 + en-US: Memory Usage + type: 0 + unit: MB + - field: memory_available + i18n: + zh-CN: 可用内存 + en-US: Memory Available + type: 0 + unit: MB + - field: cache_size + i18n: + zh-CN: 缓存大小 + en-US: Cache Size + type: 0 + unit: MB + - field: net_port_1_speed + i18n: + zh-CN: 网口1速度 + en-US: Net Port 1 Speed + type: 0 + unit: Mbps + - field: net_port_2_speed + i18n: + zh-CN: 网口2速度 + en-US: Net Port 2 Speed + type: 0 + unit: Mbps + - field: boot_time + i18n: + zh-CN: 启动时间 + en-US: Boot Time + type: 1 + - field: device_uptime + i18n: + zh-CN: 运行时长 + en-US: Device Uptime + type: 1 + - field: last_calibration_time + i18n: + zh-CN: 上次校时时间 + en-US: Last Calibration Time + type: 1 + - field: last_calibration_time_diff + i18n: + zh-CN: 上次校时时间差 + en-US: Last Calibration Time Diff + type: 0 + unit: s + - field: avg_upload_time + i18n: + zh-CN: 平均上传耗时 + en-US: Avg Upload Time + type: 0 + unit: ms + - field: max_upload_time + i18n: + zh-CN: 最大上传耗时 + en-US: Max Upload Time + type: 0 + unit: ms + - field: min_upload_time + i18n: + zh-CN: 最小上传耗时 + en-US: Min Upload Time + type: 0 + unit: ms + - field: last_calibration_mode + i18n: + zh-CN: 上次校时模式 + en-US: Last Calibration Mode + type: 1 + - field: last_calibration_address + i18n: + zh-CN: 上次校时地址 + en-US: Last Calibration Address + type: 1 + - field: response_time + i18n: + zh-CN: 响应时间 + en-US: Response Time + type: 0 + unit: ms + aliasFields: + - CPUList/CPU/cpuUtilization + - MemoryList/Memory/memoryUsage + - MemoryList/Memory/memoryAvailable + - MemoryList/Memory/cacheSize + - NetPortStatusList/NetPortStatus[id='1']/workSpeed + - NetPortStatusList/NetPortStatus[id='2']/workSpeed + - bootTime + - deviceUpTime + - lastCalibrationTime + - lastCalibrationTimeDiff + - uploadTimeConsumingList/avgTime + - uploadTimeConsumingList/maxTime + - uploadTimeConsumingList/minTime + - lastCalibrationTimeMode + - lastCalibrationTimeAddress + - responseTime + calculates: + - CPU_utilization=CPUList/CPU/cpuUtilization + - memory_usage=MemoryList/Memory/memoryUsage + - memory_available=MemoryList/Memory/memoryAvailable + - cache_size=MemoryList/Memory/cacheSize + - net_port_1_speed=NetPortStatusList/NetPortStatus[id='1']/workSpeed + - net_port_2_speed=NetPortStatusList/NetPortStatus[id='2']/workSpeed + - boot_time=bootTime + - device_uptime=deviceUpTime + - last_calibration_time=lastCalibrationTime + - last_calibration_time_diff=lastCalibrationTimeDiff + - avg_upload_time=uploadTimeConsumingList/avgTime + - max_upload_time=uploadTimeConsumingList/maxTime + - min_upload_time=uploadTimeConsumingList/minTime + - last_calibration_mode=lastCalibrationTimeMode + - last_calibration_address=lastCalibrationTimeAddress + - response_time=responseTime + units: + - memory_usage=KB->MB + - memory_available=KB->MB + - cache_size=KB->MB diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http.md new file mode 100644 index 0000000000..65a740c5a4 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-http.md @@ -0,0 +1,279 @@ +--- +id: extend-http +title: HTTP协议自定义监控 +sidebar_label: HTTP协议自定义监控 +--- + +> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用HTTP协议自定义指标监控。 + +## HTTP协议采集流程 + +【**HTTP接口调用**】->【**响应校验**】->【**响应数据解析**】->【**默认方式解析|JsonPath脚本解析 | XmlPath解析(todo) | Prometheus解析**】->【**指标数据提取**】 + +由流程可见,我们自定义一个HTTP协议的监控类型,需要配置HTTP请求参数,配置获取哪些指标,对响应数据配置解析方式和解析脚本。 +HTTP协议支持我们自定义HTTP请求路径,请求header,请求参数,请求方式,请求体等。 + +**系统默认解析方式**:http接口返回hertzbeat规定的json数据结构,即可用默认解析方式解析数据提取对应的指标数据,详细介绍见 [**系统默认解析**](extend-http-default) +**JsonPath脚本解析方式**:用JsonPath脚本对响应的json数据进行解析,返回系统指定的数据结构,然后提供对应的指标数据,详细介绍见 [**JsonPath脚本解析**](extend-http-jsonpath) + +### 自定义步骤 + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +下面详细介绍下监控模板YML的配置用法,请注意看使用注释。 + +### 监控模板YML + +> 监控模板YML用于定义 *监控类型的名称(国际化), 请求参数结构定义(前端页面根据配置自动渲染UI), 采集指标信息, 采集协议配置* 等。 +> 即我们通过自定义这个监控模板,配置定义什么监控类型,前端页面需要输入什么参数,采集哪些性能指标,通过什么协议去采集。 + +样例:自定义一个名称为example_http的自定义监控类型,其使用HTTP协议采集指标数据。 + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: a_example +# The monitoring i18n name +name: + zh-CN: 模拟应用 + en-US: EXAMPLE APP +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`
`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。 + en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `
`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template." + zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`
`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/ + en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/ +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + # required-true or false + required: true + # default value + defaultValue: 80 + # param field input placeholder + placeholder: 'Please Input Port' + # field-param field key + - field: username + # name-param field display i18n name + name: + zh-CN: 用户名 + en-US: Username + # type-param field type(most mapping the html input type) + type: text + # when type is text, use limit to limit string length + limit: 50 + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: password + # name-param field display i18n name + name: + zh-CN: 用户密码 + en-US: Password + # type-param field type(most mapping the html input tag) + type: password + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: ssl + # name-param field display i18n name + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + # required-true or false + required: false + # field-param field key + - field: method + # name-param field display i18n name + name: + zh-CN: 请求方式 + en-US: Method + # type-param field type(radio mapping the html radio tag) + type: radio + # required-true or false + required: true + # when type is radio checkbox, use option to show optional values {name1:value1,name2:value2} + options: + - label: GET + value: GET + - label: POST + value: POST + - label: PUT + value: PUT + - label: DELETE + value: DELETE + # field-param field key + - field: headers + # name-param field display i18n name + name: + zh-CN: 请求Headers + en-US: Headers + # type-param field type(key-value mapping the html key-value input tags) + type: key-value + # required-true or false + required: false + # when type is key-value, use keyAlias to config key alias name + keyAlias: Header Name + # when type is key-value, use valueAlias to config value alias name + valueAlias: Header Value +# collect metrics config list +metrics: + # metrics - cpu + - name: cpu + # metrics name i18n label + i18n: + zh-CN: CPU 信息 + en-US: CPU Info + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, i18n-metric name i18n label, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field + - field: hostname + type: 1 + label: true + i18n: + zh-CN: 主机名称 + en-US: Host Name + - field: usage + type: 0 + unit: '%' + i18n: + zh-CN: 使用率 + en-US: Usage + - field: cores + type: 0 + i18n: + zh-CN: 核数 + en-US: Cores + - field: waitTime + type: 0 + unit: s + i18n: + zh-CN: 主机名称 + en-US: Host Name + # (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field + aliasFields: + - hostname + - core1 + - core2 + - usage + - allTime + - runningTime + # mapping and conversion expressions, use these and aliasField above to calculate metrics value + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - hostname=hostname + - cores=core1+core2 + - usage=usage + - waitTime=allTime-runningTime + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: /metrics/cpu + # http method: GET POST PUT DELETE PATCH + method: GET + # if enabled https + ssl: false + # http request header content + headers: + ^_^headers^_^: ^_^headers^_^ + # http request params + params: + param1: param1 + param2: param2 + # http auth + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + type: Basic Auth + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: jsonPath + parseScript: '$' + + - name: memory + i18n: + zh-CN: 内存信息 + en-US: Memory Info + priority: 1 + fields: + - field: hostname + type: 1 + label: true + i18n: + zh-CN: 主机名称 + en-US: Hostname + - field: total + type: 0 + unit: kb + i18n: + zh-CN: 总量 + en-US: Total + - field: usage + type: 0 + unit: '%' + i18n: + zh-CN: 使用率 + en-US: Usage + - field: speed + type: 0 + i18n: + zh-CN: 速率 + en-US: Speed + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + url: /metrics/memory + method: GET + headers: + apiVersion: v1 + params: + param1: param1 + param2: param2 + authorization: + type: Basic Auth + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + parseType: default +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-jdbc.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-jdbc.md new file mode 100644 index 0000000000..c1e6545e4f --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-jdbc.md @@ -0,0 +1,245 @@ +--- +id: extend-jdbc +title: JDBC协议自定义监控 +sidebar_label: JDBC协议自定义监控 +--- + +> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用JDBC(目前支持mysql,mariadb,postgresql,sqlserver)自定义指标监控。 +> JDBC协议自定义监控可以让我们很方便的通过写SQL查询语句就能监控到我们想监控的指标 + +## JDBC协议采集流程 + +【**系统直连MYSQL**】->【**运行SQL查询语句**】->【**响应数据解析:oneRow, multiRow, columns**】->【**指标数据提取**】 + +由流程可见,我们自定义一个JDBC协议的监控类型,需要配置JDBC请求参数,配置获取哪些指标,配置查询SQL语句。 + +### 数据解析方式 + +SQL查询回来的数据字段和我们需要的指标映射,就能获取对应的指标数据,目前映射解析方式有三种:oneRow, multiRow, columns + +#### **oneRow** + +> 查询一行数据, 通过查询返回结果集的列名称,和查询的字段映射 + +例如: +查询的指标字段为:one tow three four +查询SQL:select one, tow, three, four from book limit 1; +这里指标字段就能和响应数据一一映射为一行采集数据。 + +#### **multiRow** + +> 查询多行数据, 通过查询返回结果集的列名称,和查询的字段映射 + +例如: +查询的指标字段为:one tow three four +查询SQL:select one, tow, three, four from book; +这里指标字段就能和响应数据一一映射为多行采集数据。 + +#### **columns** + +> 采集一行指标数据, 通过查询的两列数据(key-value),key和查询的字段匹配,value为查询字段的值 + +例如: +查询字段:one tow three four +查询SQL:select key, value from book; +SQL响应数据: + +| key | value | +|-------|-------| +| one | 243 | +| two | 435 | +| three | 332 | +| four | 643 | + +这里指标字段就能和响应数据的key映射,获取对应的value为其采集监控数据。 + +### 自定义步骤 + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +下面详细介绍下文件的配置用法,请注意看使用注释。 + +### 监控模板YML + +> 监控配置定义文件用于定义 *监控类型的名称(国际化), 请求参数结构定义(前端页面根据配置自动渲染UI), 采集指标信息, 采集协议配置* 等。 +> 即我们通过自定义这个YML,配置定义什么监控类型,前端页面需要输入什么参数,采集哪些性能指标,通过什么协议去采集。 + +样例:自定义一个名称为example_sql的自定义监控类型,其使用JDBC协议采集指标数据。 + +```yaml +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: db +# 监控应用类型(与文件名保持一致) eg: linux windows tomcat mysql aws... +app: example_sql +name: + zh-CN: 模拟MYSQL应用类型 + en-US: MYSQL EXAMPLE APP +# 监控参数定义. field 这些为输入参数变量,即可以用^_^host^_^的形式写到后面的配置中,系统自动变量值替换 +# 强制固定必须参数 - host +params: + - field: host + name: + zh-CN: 主机Host + en-US: Host + type: host + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + range: '[0,65535]' + required: true + defaultValue: 80 + placeholder: '请输入端口' + - field: database + name: + zh-CN: 数据库名称 + en-US: Database + type: text + required: false + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 50 + required: false + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: false + - field: url + name: + zh-CN: Url + en-US: Url + type: text + required: false +# 采集指标配置列表 +metrics: + - name: basic + # 指标调度优先级(0-127)越小优先级越高,优先级低的指标会等优先级高的指标采集完成后才会被调度,相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # 具体监控指标列表 + fields: + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: version + type: 1 + label: true + - field: port + type: 1 + - field: datadir + type: 1 + - field: max_connections + type: 0 + # (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换 + aliasFields: + - version + - version_compile_os + - version_compile_machine + - port + - datadir + - max_connections + # (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值 + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - port=port + - datadir=datadir + - max_connections=max_connections + - version=version+"_"+version_compile_os+"_"+version_compile_machine + protocol: jdbc + jdbc: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + platform: mysql + username: ^_^username^_^ + password: ^_^password^_^ + database: ^_^database^_^ + # SQL查询方式: oneRow, multiRow, columns + queryType: columns + # sql + sql: show global variables where Variable_name like 'version%' or Variable_name = 'max_connections' or Variable_name = 'datadir' or Variable_name = 'port'; + url: ^_^url^_^ + + - name: status + priority: 1 + fields: + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: threads_created + type: 0 + - field: threads_connected + type: 0 + - field: threads_cached + type: 0 + - field: threads_running + type: 0 + # (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换 + aliasFields: + - threads_created + - threads_connected + - threads_cached + - threads_running + # (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值 + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - threads_created=threads_created + - threads_connected=threads_connected + - threads_cached=threads_cached + - threads_running=threads_running + protocol: jdbc + jdbc: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + platform: mysql + username: ^_^username^_^ + password: ^_^password^_^ + database: ^_^database^_^ + # SQL查询方式: oneRow, multiRow, columns + queryType: columns + # sql + sql: show global status where Variable_name like 'thread%' or Variable_name = 'com_commit' or Variable_name = 'com_rollback' or Variable_name = 'questions' or Variable_name = 'uptime'; + url: ^_^url^_^ + + - name: innodb + priority: 2 + fields: + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: innodb_data_reads + type: 0 + unit: 次数 + - field: innodb_data_writes + type: 0 + unit: 次数 + - field: innodb_data_read + type: 0 + unit: kb + - field: innodb_data_written + type: 0 + unit: kb + protocol: jdbc + jdbc: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + platform: mysql + username: ^_^username^_^ + password: ^_^password^_^ + database: ^_^database^_^ + # SQL查询方式: oneRow, multiRow, columns + queryType: columns + # sql + sql: show global status where Variable_name like 'innodb%'; + url: ^_^url^_^ +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-jmx.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-jmx.md new file mode 100644 index 0000000000..b4dadf8cfd --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-jmx.md @@ -0,0 +1,238 @@ +--- +id: extend-jmx +title: JMX协议自定义监控 +sidebar_label: JMX协议自定义监控 +--- + +> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用JMX协议自定义指标监控。 +> JMX协议自定义监控可以让我们很方便的通过配置 JMX Mbean Object 就能监控采集到我们想监控的 Mbean 指标 + +## JMX协议采集流程 + +【**对端JAVA应用暴露JMX服务**】->【**HertzBeat直连对端JMX服务**】->【**获取配置的 Mbean Object 数据**】->【**指标数据提取**】 + +由流程可见,我们自定义一个JMX协议的监控类型,需要配置JMX请求参数,配置获取哪些指标,配置查询Object信息。 + +### 数据解析方式 + +通过配置监控模板YML的指标`field`, `aliasFields`, `jmx` 协议的 `objectName` 来和对端系统暴露的 `Mbean`对象信息映射解析。 + +### 自定义步骤 + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +下面详细介绍下监控模板的配置用法,请注意看使用注释。 + +### 监控模板YML + +> 监控配置定义文件用于定义 *监控类型的名称(国际化), 请求参数结构定义(前端页面根据配置自动渲染UI), 采集指标信息, 采集协议配置* 等。 +> 即我们通过自定义这个YML,配置定义什么监控类型,前端页面需要输入什么参数,采集哪些性能指标,通过什么协议去采集。 + +样例:自定义一个名称为 `example_jvm` 的自定义监控类型,其使用JMX协议采集指标数据。 + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: service +# The monitoring type eg: linux windows tomcat mysql aws... +# 监控类型 eg: linux windows tomcat mysql aws... +app: example_jvm +# The monitoring i18n name +# 监控类型国际化名称 +name: + zh-CN: 自定义JVM虚拟机 + en-US: CUSTOM JVM +# Input params define for monitoring(render web ui by the definition) +# 监控所需输入参数定义(根据定义渲染页面UI) +params: + # field-param field key + # field-字段名称标识符 + - field: host + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # field-param field key + # field-变量字段标识符 + - field: port + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,65535]' + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # default value + # 端口默认值 + defaultValue: 9999 + # field-param field key + # field-变量字段标识符 + - field: url + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: JMX URL + en-US: JMX URL + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: text + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: false + # hide param-true or false + # 是否隐藏字段 true or false + hide: true + # param field input placeholder + # 参数输入框提示信息 + placeholder: 'service:jmx:rmi:///jndi/rmi://host:port/jmxrmi' + # field-param field key + # field-变量字段标识符 + - field: username + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 用户名 + en-US: Username + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: text + # when type is text, use limit to limit string length + # 当type为text时,用limit表示字符串限制大小 + limit: 50 + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: false + # hide param-true or false + # 是否隐藏字段 true or false + hide: true + # field-param field key + # field-变量字段标识符 + - field: password + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 密码 + en-US: Password + # type-param field type(most mapping the html input tag) + # type-字段类型,样式(大部分映射input标签type属性) + type: password + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: false + # hide param-true or false + # 是否隐藏字段 true or false + hide: true +# collect metrics config list +# 采集指标配置列表 +metrics: + # metrics - basic + # 监控指标 - basic + - name: basic + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + # 指标采集调度优先级(0->127)->(优先级高->低) 优先级低的指标会等优先级高的指标采集完成后才会被调度, 相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # collect metrics content + # 具体监控指标列表 + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label + # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), label-是否是指标集合唯一标识符字段 + - field: VmName + type: 1 + - field: VmVendor + type: 1 + - field: VmVersion + type: 1 + - field: Uptime + type: 0 + unit: ms + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + # 用于监控的协议,例: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: jmx + # the config content when protocol is jmx + jmx: + # host: ipv4 ipv6 domain + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # port + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + # jmx mbean 对象名称 + objectName: java.lang:type=Runtime + url: ^_^url^_^ + + - name: memory_pool + priority: 1 + fields: + - field: name + type: 1 + label: true + - field: committed + type: 0 + unit: MB + - field: init + type: 0 + unit: MB + - field: max + type: 0 + unit: MB + - field: used + type: 0 + unit: MB + units: + - committed=B->MB + - init=B->MB + - max=B->MB + - used=B->MB + # (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field + # (可选)监控指标别名, 做为中间字段与采集数据字段和指标字段映射转换 + aliasFields: + - Name + - Usage->committed + - Usage->init + - Usage->max + - Usage->used + # mapping and conversion expressions, use these and aliasField above to calculate metrics value + # (可选)指标映射转换计算表达式,与上面的别名一起作用,计算出最终需要的指标值 + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - name=Name + - committed=Usage->committed + - init=Usage->init + - max=Usage->max + - used=Usage->used + protocol: jmx + jmx: + # host: ipv4 ipv6 domain + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # port + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + objectName: java.lang:type=MemoryPool,name=* + url: ^_^url^_^ +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-ngql.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-ngql.md new file mode 100644 index 0000000000..23b404986c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-ngql.md @@ -0,0 +1,174 @@ +--- +id: extend-ngql +title: NQGL自定义监控 +sidebar_label: NGQL自定义监控 +--- + +> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用NGQL自定义指标监控。 +> NGQL自定义监控可以让我们很方便的使用NGQL或者OpenCypher从NebulaGraph图数据库中查询指标数据,支持NebulaGraph 3.X版本。 + +## 数据解析方式 + +NGQL查询回来的数据字段和我们需要的指标映射,就能获取对应的指标数据,目前映射解析方式有四种: filterCount, oneRow, multiRow, columns + +### **filterCount** +> +> 对查询返回的结果按照指定字段进行过滤后,统计数量,通常用于 `SHOW ...` 语句中,如果可以使用NGQL语句直接返回数量的,建议使用NGQL语句统计数量。 +> commands字段语法格式: aliasField#NGQL#filterName#filterValue +> `aliasField`: 对应监控模板中的`aliasFields`中的值 +> `NGQL`: 查询语句 +> `filterName`: 过滤属性名称(可选) +> `filterValue`: 过滤属性值(可选) + +例如: + +- online_meta_count#SHOW HOSTS META#Status#ONLINE +对 `SHOW HOSTS META` 返回的结果中统计滤Status==ONLINE的数量 +- online_meta_count#SHOW HOSTS META## +统计 `SHOW HOSTS META` 返回的行数 + +#### **oneRow** + +> 查询一行数据, 通过查询返回结果集的列名称,和查询的字段映射 + +例如: + +- 查询的指标字段为:a,b +- 查询NGQL:match (v:metrics) return v.metrics.a as a,v.metrics.b as b; + +这里指标字段就能和响应数据一一映射为一行采集数据。 + +注意事项: + +- 使用 `oneRow` 方式时单条查询语句返回多行结果时只会使用第一行结果映射到指标字段; +- 当 `commands` 字段包含两条及两条以上查询语句时,如果多条查询语句返回的字段相同时,后一条语句返回的字段会覆盖前一条; +- 定义 `commands` 时建议使用 limit 语句限制返回结果集的行数; + +#### **multiRow** + +> 查询多行数据, 通过查询返回结果集的列名称,和查询的字段映射 + +例如: + +- 查询的指标字段为:a,b +- 查询NGQL:match (v:metrics) return v.metrics.a as a,v.metrics.b as b; +这里指标字段就能和响应数据一一映射为多行采集数据。 + +注意事项: + +- 使用 `multiRow` 方式时,`commands` 字段只能包含一条查询语句 + +#### **columns** + +> 采集一行指标数据, 通过查询的两列数据(key-value),key和查询的字段匹配,value为查询字段的值 + +注意事项: + +- 使用 `columns` 方式时,会默认使用结果集的前两列映射采集数据,第一列数据对应指标名称,第二列对应指标值; +- 当 `commands` 字段包含两条及两条以上查询语句时,如果多条查询语句返回的第一列数据有重复,会使用保留最后一条的结果; + +### 自定义步骤 + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +下面详细介绍下文件的配置用法,请注意看使用注释。 + +### 监控模板YML + +> 监控配置定义文件用于定义 *监控类型的名称(国际化), 请求参数结构定义(前端页面根据配置自动渲染UI), 采集指标信息, 采集协议配置* 等。 +> 即我们通过自定义这个YML,配置定义什么监控类型,前端页面需要输入什么参数,采集哪些性能指标,通过什么协议去采集。 + +样例:自定义一个名称为example_ngql的自定义监控类型,其使用NGQL采集指标数据。 + +```yaml +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: db +# 监控应用类型(与文件名保持一致) eg: linux windows tomcat mysql aws... +app: example_ngql +name: + zh-CN: NGQL自定义监控应用 + en-US: NGQL Custom APP +# 监控参数定义. field 这些为输入参数变量,即可以用^_^host^_^的形式写到后面的配置中,系统自动变量值替换 +# 这个部分通常不用修改 +params: + # field-param field key + - field: host + name: + zh-CN: 目标Host + en-US: Target Host + type: host + required: true + - field: graphPort + name: + zh-CN: graph端口 + en-US: graphPort + type: number + range: '[0,65535]' + required: true + defaultValue: 9669 + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + required: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: true + - field: spaceName + name: + zh-CN: 图空间 + en-US: Space Name + type: text + required: false + - field: timeout + name: + zh-CN: 连接超时时间(ms) + en-US: Connect Timeout(ms) + type: number + unit: ms + range: '[0,100000]' + required: true + defaultValue: 6000 +# 采集指标配置列表 +metrics: + - name: base_info + i18n: + zh-CN: 节点统计 + en-US: Vertex statistics + priority: 0 + fields: + - field: tag1 + type: 1 + i18n: + zh-CN: tag1 + en-US: tag1 + - field: tag1 + type: 1 + i18n: + zh-CN: tag2 + en-US: tag2 + aliasFields: + - tag1 + - tag2 + protocol: ngql + ngql: + host: ^_^host^_^ + username: ^_^username^_^ + password: ^_^password^_^ + port: ^_^graphPort^_^ + spaceName: ^_^spaceName^_^ + parseType: columns + # 定义采集数据使用的查询语句 + commands: + - match (v:tag1) return "tag1" as name ,count(v) as cnt + - match (v:tag2) return "tag2" as name ,count(v) as cnt + timeout: ^_^timeout^_^ +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-point.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-point.md new file mode 100644 index 0000000000..45e5669269 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-point.md @@ -0,0 +1,185 @@ +--- +id: extend-point +title: 自定义监控 +sidebar_label: 自定义监控 +--- + +> HertzBeat拥有自定义监控能力,您只需配置监控模板YML就能适配一款自定义的监控类型。 +> 目前自定义监控支持[HTTP协议](extend-http),[JDBC协议](extend-jdbc),[SSH协议](extend-ssh),[JMX协议](extend-jmx),[SNMP协议](extend-snmp),后续会支持更多通用协议。 + +## 自定义流程 + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +### 自定义监控指标刷新时间 + +现在,HertzBeat支持为每组监控指标设置不同的刷新时间。您可以在监控模板的 `metrics` 部分通过设置 `interval` 字段来实现,单位为秒。若不进行设置,则使用创建监控时设置的默认刷新时间。 + +------- + +### 监控模板YML + +**HertzBeat的设计是一个监控模板对应一个监控类型,所有监控类型都是由监控模板来定义的**。 + +> 监控模板YML定义了 *监控类型的名称(国际化), 配置参数映射, 采集指标信息, 采集协议配置* 等。 + +下面使用样例详细介绍下这监控模板YML的配置用法。 + +样例:自定义一个 `app` 名称为 `example2` 的自定义监控类型,其使用HTTP协议采集指标数据。 + +[监控模板] -> [新增监控类型] -> [右边配置如下监控模板YML] -> [保存并应用] + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +# 监控类型 eg: linux windows tomcat mysql aws... +app: example2 +# The monitoring i18n name +# 监控类型国际化名称 +name: + zh-CN: 模拟网站监测 + en-US: EXAMPLE WEBSITE +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`
`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。 + en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `
`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template." + zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`
`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/ + en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/ +# 监控所需输入参数定义(根据定义渲染页面UI) +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + # field-变量字段标识符 + - field: host + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # field-param field key + # field-变量字段标识符 + - field: port + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,65535]' + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # default value + # 默认值 + defaultValue: 80 + # field-param field key + # field-变量字段标识符 + - field: uri + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 相对路径 + en-US: URI + # type-param field type(most mapping the html input tag) + # type-字段类型,样式(大部分映射input标签type属性) + type: text + # when type is text, use limit to limit string length + # 当type为text时,用limit表示字符串限制大小 + limit: 200 + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: false + # 参数输入框提示信息 + # param field input placeholder + placeholder: 'Website uri path(no ip port) EG:/console' + # field-param field key + # field-变量字段标识符 + - field: ssl + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 启用HTTPS + en-US: HTTPS + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: boolean + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # field-param field key + # field-变量字段标识符 + - field: timeout + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + # type-param field type(most mapping the html input tag) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: false + # hide param-true or false + # 是否隐藏字段 true or false + hide: true + +metrics: + # metrics - summary, inner monitoring metrics (responseTime - response time, keyword - number of keywords) + # 监控指标 - summary, 内置监控指标有 (responseTime - 响应时间, keyword - 关键字数量) + - name: summary + # 指标调度优先级(0-127)越小优先级越高,优先级低的指标会等优先级高的指标采集完成后才会被调度,相同优先级的指标会并行调度采集 + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + # 指标采集调度优先级(0->127)->(优先级高->低) 优先级低的指标会等优先级高的指标采集完成后才会被调度, 相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # refresh interval for this metrics group + # 该指标组刷新时间 + interval: 10 + # collect metrics content + # 具体监控指标列表 + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label + # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), label-是否是指标集合唯一标识符字段 + - field: responseTime + type: 0 + unit: ms + - field: keyword + type: 0 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: ^_^uri^_^ + timeout: ^_^timeout^_^ + # http method: GET POST PUT DELETE PATCH + method: GET + # if enabled https + ssl: ^_^ssl^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + # http 响应数据解析方式: default-系统规则, jsonPath-jsonPath脚本, website-网站可用性指标监控, prometheus-Prometheus数据规则 + parseType: website + +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-snmp.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-snmp.md new file mode 100644 index 0000000000..018feed6f4 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-snmp.md @@ -0,0 +1,209 @@ +--- +id: extend-snmp +title: SNMP协议自定义监控 +sidebar_label: SNMP协议自定义监控 +--- + +> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用 SNMP 协议自定义指标监控。 +> SNMP 协议自定义监控可以让我们很方便的通过配置 Mib OID信息 就能监控采集到我们想监控的OID指标 + +## SNMP协议采集流程 + +【**对端开启SNMP服务**】->【**HertzBeat直连对端SNMP服务**】->【**根据配置抓取对端OID指标信息**】->【**指标数据提取**】 + +由流程可见,我们自定义一个SNMP协议的监控类型,需要配置SNMP请求参数,配置获取哪些指标,配置查询OID信息。 + +### 数据解析方式 + +通过配置监控模板YML的指标`field`, `aliasFields`, `snmp` 协议下的 `oids`来抓取对端指定的数据并解析映射。 + +### 自定义步骤 + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +下面详细介绍下文件的配置用法,请注意看使用注释。 + +### 监控模板YML + +> 监控配置定义文件用于定义 *监控类型的名称(国际化), 请求参数结构定义(前端页面根据配置自动渲染UI), 采集指标信息, 采集协议配置* 等。 +> 即我们通过自定义这个YML,配置定义什么监控类型,前端页面需要输入什么参数,采集哪些性能指标,通过什么协议去采集。 + +样例:自定义一个名称为 example_windows 的自定义监控类型,其使用 SNMP 协议采集指标数据。 + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring mid-middleware custom-custom monitoring os-operating system monitoring +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: os +# The monitoring type eg: linux windows tomcat mysql aws... +# 监控类型 eg: linux windows tomcat mysql aws... +app: windows +# The monitoring i18n name +# 监控类型国际化名称 +name: + zh-CN: Windows操作系统 + en-US: OS Windows +# 监控所需输入参数定义(根据定义渲染页面UI) +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + # field-变量字段标识符 + - field: host + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # field-param field key + # field-变量字段标识符 + - field: port + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,65535]' + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # default value + # 默认值 + defaultValue: 161 + # field-param field key + # field-变量字段标识符 + - field: version + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: SNMP 版本 + en-US: SNMP Version + # type-param field type(radio mapping the html radio tag) + # type-当type为radio时,前端用radio展示开关 + type: radio + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # when type is radio checkbox, use option to show optional values {name1:value1,name2:value2} + # 当type为radio单选框, checkbox复选框时, option表示可选项值列表 {name1:value1,name2:value2} + options: + - label: SNMPv1 + value: 0 + - label: SNMPv2c + value: 1 + # field-param field key + # field-变量字段标识符 + - field: community + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: SNMP 团体字 + en-US: SNMP Community + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: text + # when type is text, use limit to limit string length + # 当type为text时,用limit表示字符串限制大小 + limit: 100 + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # 参数输入框提示信息 + # param field input placeholder + placeholder: 'Snmp community for v1 v2c' + # field-param field key + # field-变量字段标识符 + - field: timeout + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,100000]' + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: false + # hide-is hide this field and put it in advanced layout + # hide-是否隐藏此参数将其放入高级设置中 + hide: true + # default value + # 默认值 + defaultValue: 6000 +# collect metrics config list +# 采集指标配置列表 +metrics: + # metrics - system + # 监控指标 - system + - name: system + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + # 指标采集调度优先级(0->127)->(优先级高->低) 优先级低的指标会等优先级高的指标采集完成后才会被调度, 相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # collect metrics content + # 具体监控指标列表 + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label + # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), label-是否是指标集合唯一标识符字段 + - field: name + type: 1 + - field: descr + type: 1 + - field: uptime + type: 1 + - field: numUsers + type: 0 + - field: services + type: 0 + - field: processes + type: 0 + - field: responseTime + type: 0 + unit: ms + - field: location + type: 1 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: snmp + # the config content when protocol is snmp + snmp: + # server host: ipv4 ipv6 domain + host: ^_^host^_^ + # server port + port: ^_^port^_^ + # snmp connect timeout + timeout: ^_^timeout^_^ + # snmp community + # snmp 团体字 + community: ^_^community^_^ + # snmp version + version: ^_^version^_^ + # snmp operation: get, walk + operation: get + # metrics oids: metric_name - oid_value + oids: + name: 1.3.6.1.2.1.1.5.0 + descr: 1.3.6.1.2.1.1.1.0 + uptime: 1.3.6.1.2.1.25.1.1.0 + numUsers: 1.3.6.1.2.1.25.1.5.0 + services: 1.3.6.1.2.1.1.7.0 + processes: 1.3.6.1.2.1.25.1.6.0 + location: 1.3.6.1.2.1.1.6.0 +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-ssh.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-ssh.md new file mode 100644 index 0000000000..9b19f2ae98 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-ssh.md @@ -0,0 +1,218 @@ +--- +id: extend-ssh +title: SSH协议自定义监控 +sidebar_label: SSH协议自定义监控 +--- + +> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用SSH协议自定义指标监控。 +> SSH协议自定义监控可以让我们很方便的通过写sh命令脚本就能监控采集到我们想监控的Linux指标 + +## SSH协议采集流程 + +【**系统直连Linux**】->【**运行SHELL命令脚本语句**】->【**响应数据解析:oneRow, multiRow**】->【**指标数据提取**】 + +由流程可见,我们自定义一个SSH协议的监控类型,需要配置SSH请求参数,配置获取哪些指标,配置查询脚本语句。 + +### 数据解析方式 + +SHELL脚本查询回来的数据字段和我们需要的指标映射,就能获取对应的指标数据,目前映射解析方式有两种:oneRow, multiRow,能满足绝大部分指标需求。 + +#### **oneRow** + +> 查询出一列数据, 通过查询返回结果集的字段值(一行一个值)与字段映射 + +例如: +需要查询Linux的指标 hostname-主机名称,uptime-启动时间 +主机名称原始查询命令:`hostname` +启动时间原始查询命令:`uptime | awk -F "," '{print $1}'` +则在hertzbeat对应的这两个指标的查询脚本为(用`;`将其连接到一起): +`hostname; uptime | awk -F "," '{print $1}'` +终端响应的数据为: + +```shell +tombook +14:00:15 up 72 days +``` + +则最后采集到的指标数据一一映射为: +hostname值为 `tombook` +uptime值为 `14:00:15 up 72 days` + +这里指标字段就能和响应数据一一映射为一行采集数据。 + +#### **multiRow** + +> 查询多行数据, 通过查询返回结果集的列名称,和查询的指标字段映射 + +例如: +查询的Linux内存相关指标字段:total-内存总量 used-已使用内存 free-空闲内存 buff-cache-缓存大小 available-可用内存 +内存指标原始查询命令为:`free -m`, 控制台响应: + +```shell + total used free shared buff/cache available +Mem: 7962 4065 333 1 3562 3593 +Swap: 8191 33 8158 +``` + +在hertzbeat中multiRow格式解析需要响应数据列名称和指标值一一映射,则对应的查询SHELL脚本为: +`free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}'` +控制台响应为: + +```shell +total used free buff_cache available +7962 4066 331 3564 3592 +``` + +这里指标字段就能和响应数据一一映射为采集数据。 + +### 自定义步骤 + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +下面详细介绍下文件的配置用法,请注意看使用注释。 + +### 监控模板YML + +> 监控配置定义文件用于定义 *监控类型的名称(国际化), 请求参数结构定义(前端页面根据配置自动渲染UI), 采集指标信息, 采集协议配置* 等。 +> 即我们通过自定义这个YML,配置定义什么监控类型,前端页面需要输入什么参数,采集哪些性能指标,通过什么协议去采集。 + +样例:自定义一个名称为example_linux的自定义监控类型,其使用SSH协议采集指标数据。 + +```yaml +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: os +# 监控应用类型(与文件名保持一致) eg: linux windows tomcat mysql aws... +app: example_linux +name: + zh-CN: 模拟LINUX应用类型 + en-US: LINUX EXAMPLE APP +# 监控参数定义. field 这些为输入参数变量,即可以用^_^host^_^的形式写到后面的配置中,系统自动变量值替换 +# 强制固定必须参数 - host +params: + - field: host + name: + zh-CN: 主机Host + en-US: Host + type: host + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + range: '[0,65535]' + required: true + defaultValue: 22 + placeholder: '请输入端口' + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 50 + required: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: true +# collect metrics config list +# 采集指标配置列表 +metrics: + # 第一个监控指标 basic + # 注意:内置监控指标有 (responseTime - 响应时间) + - name: basic + # 指标调度优先级(0-127)越小优先级越高,优先级低的指标会等优先级高的指标采集完成后才会被调度,相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # 具体监控指标列表 + fields: + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: hostname + type: 1 + label: true + - field: version + type: 1 + - field: uptime + type: 1 + # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: ssh + # 当protocol为http协议时具体的采集配置 + ssh: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + script: (uname -r ; hostname ; uptime | awk -F "," '{print $1}' | sed "s/ //g") | sed ":a;N;s/\n/^/g;ta" | awk -F '^' 'BEGIN{print "version hostname uptime"} {print $1, $2, $3}' + # 响应数据解析方式:oneRow, multiRow + parseType: multiRow + + - name: cpu + priority: 1 + fields: + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: info + type: 1 + - field: cores + type: 0 + unit: 核数 + - field: interrupt + type: 0 + unit: 个数 + - field: load + type: 1 + - field: context_switch + type: 0 + unit: 个数 + # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: ssh + # 当protocol为http协议时具体的采集配置 + ssh: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + script: "LANG=C lscpu | awk -F: '/Model name/ {print $2}';awk '/processor/{core++} END{print core}' /proc/cpuinfo;uptime | sed 's/,/ /g' | awk '{for(i=NF-2;i<=NF;i++)print $i }' | xargs;vmstat 1 1 | awk 'NR==3{print $11}';vmstat 1 1 | awk 'NR==3{print $12}'" + parseType: oneRow + + - name: memory + priority: 2 + fields: + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: total + type: 0 + unit: Mb + - field: used + type: 0 + unit: Mb + - field: free + type: 0 + unit: Mb + - field: buff_cache + type: 0 + unit: Mb + - field: available + type: 0 + unit: Mb + # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: ssh + # 当protocol为http协议时具体的采集配置 + ssh: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + script: free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}' + parseType: multiRow +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-telnet.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-telnet.md new file mode 100644 index 0000000000..dfaf2a5a71 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-telnet.md @@ -0,0 +1,299 @@ +--- +id: extend-telnet +title: Telnet协议自定义监控 +sidebar_label: Telnet协议自定义监控 +--- + +> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用Telnet协议自定义指标监控。 +> 使用 Telnet 协议自定义监控可以让我们通过编写 Telnet 命令脚本来监控和采集我们想要监控的 Linux 指标 + +## Telnet协议采集流程 + +【**系统直连Linux**】->【**运行TELNET命令脚本语句**】->【**响应数据解析**】->【**指标数据提取**】 + +由流程可见,我们自定义一个Telnet协议的监控类型,需要配置Telnet请求参数,配置获取哪些指标,配置查询脚本语句。 + +### 数据解析方式 + +通过配置监控模板YML的指标field, aliasFields, telnet 协议下的获取数据映射。 + +### 自定义步骤 + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** -> **点击保存应用** -> **使用新监控类型添加监控** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +下面详细介绍下文件的配置用法,请注意看使用注释。 + +### 监控模板YML + +> 监控配置定义文件用于定义 *监控类型的名称(国际化), 请求参数结构定义(前端页面根据配置自动渲染UI), 采集指标信息, 采集协议配置* 等。 +> 即我们通过自定义这个YML,配置定义什么监控类型,前端页面需要输入什么参数,采集哪些性能指标,通过什么协议去采集。 + +样例:自定义一个名称为zookeeper的自定义监控类型,其使用telnet协议采集指标数据。 + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: mid +# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws... +# 监控应用类型(与文件名保持一致) eg: linux windows tomcat mysql aws... +app: zookeeper +# The monitoring i18n name +# 监控类型国际化名称 +name: + zh-CN: Zookeeper服务 + en-US: Zookeeper Server +# 监控参数定义. field 这些为输入参数变量,即可以用^_^host^_^的形式写到后面的配置中,系统自动变量值替换 +# 强制固定必须参数 - host +params: + # field-param field key + # field-字段名称标识符 + - field: host + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # field-param field key + # field-字段名称标识符 + - field: port + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,65535]' + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # default + # 默认值 + defaultValue: 2181 + # param field input placeholder + # 参数输入框提示信息 + placeholder: '请输入端口' + # field-param field key + # field-字段名称标识符 + - field: timeout + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 查询超时时间(ms) + en-US: Query Timeout(ms) + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: false + # hide-is hide this field and put it in advanced layout + # 隐藏是隐藏这个字段,并把它放在高级布局 + hide: true + # default + # 默认值 + defaultValue: 6000 +# collect metrics config list +# 采集指标配置列表 +metrics: + # metrics - conf + # 第一个监控指标 conf + # 注意:内置监控指标有 (responseTime - 响应时间) + - name: conf + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + # 指标采集调度优先级(0->127)->(优先级高->低) 优先级低的指标会等优先级高的指标采集完成后才会被调度, 相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # collect metrics content + # 具体监控指标列表 + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: clientPort + type: 0 + i18n: + zh-CN: 客户端端口 + en-US: Client Port + - field: dataDir + type: 1 + i18n: + zh-CN: 数据目录 + en-US: Data Directory + - field: dataDirSize + type: 0 + unit: kb + i18n: + zh-CN: 数据目录大小 + en-US: Data Directory Size + - field: dataLogDir + type: 1 + i18n: + zh-CN: 日志目录 + en-US: Data Log Directory + - field: dataLogSize + type: 0 + unit: kb + i18n: + zh-CN: 日志目录大小 + en-US: Data Log Size + - field: tickTime + type: 0 + unit: ms + i18n: + zh-CN: 心跳间隔时间 + en-US: Tick Time + - field: maxClientCnxns + type: 1 + i18n: + zh-CN: 最大客户端连接数 + en-US: Max Client Connections + - field: minSessionTimeout + type: 0 + unit: ms + i18n: + zh-CN: 最小会话超时 + en-US: Min Session Timeout + - field: maxSessionTimeout + type: 0 + unit: ms + i18n: + zh-CN: 最大会话超时 + en-US: Max Session Timeout + - field: serverId + type: 0 + i18n: + zh-CN: 服务器ID + en-US: Server ID + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: telnet + # the config content when protocol is telnet + # 当protocol为telnet协议时具体的采集配置 + telnet: + # host: ipv4 ipv6 domain + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # port + # 端口 + port: ^_^port^_^ + # timeout + # 超时时间 + timeout: ^_^timeout^_^ + # telnet instruction + # telnet指令 + cmd: conf + + - name: stats + priority: 1 + fields: + - field: zk_version + type: 1 + i18n: + zh-CN: ZooKeeper版本 + en-US: ZooKeeper Version + - field: zk_server_state + type: 1 + i18n: + zh-CN: 服务器状态 + en-US: Server State + - field: zk_num_alive_connections + type: 0 + unit: 个 + i18n: + zh-CN: 存活连接数 + en-US: Number of Alive Connections + - field: zk_avg_latency + type: 0 + unit: ms + i18n: + zh-CN: 平均延迟 + en-US: Average Latency + - field: zk_outstanding_requests + type: 0 + unit: 个 + i18n: + zh-CN: 未完成请求数 + en-US: Outstanding Requests + - field: zk_znode_count + type: 0 + unit: 个 + i18n: + zh-CN: ZNode数量 + en-US: ZNode Count + - field: zk_packets_sent + type: 0 + unit: 个 + i18n: + zh-CN: 发送数据包数 + en-US: Packets Sent + - field: zk_packets_received + type: 0 + unit: 个 + i18n: + zh-CN: 接收数据包数 + en-US: Packets Received + - field: zk_watch_count + type: 0 + unit: 个 + i18n: + zh-CN: Watch数量 + en-US: Watch Count + - field: zk_max_file_descriptor_count + type: 0 + unit: 个 + i18n: + zh-CN: 最大文件描述符数量 + en-US: Max File Descriptor Count + - field: zk_approximate_data_size + type: 0 + unit: kb + i18n: + zh-CN: 大致数据大小 + en-US: Approximate Data Size + - field: zk_open_file_descriptor_count + type: 0 + unit: 个 + i18n: + zh-CN: 打开的文件描述符数量 + en-US: Open File Descriptor Count + - field: zk_max_latency + type: 0 + unit: ms + i18n: + zh-CN: 最大延迟 + en-US: Max Latency + - field: zk_ephemerals_count + type: 0 + unit: 个 + i18n: + zh-CN: 临时节点数量 + en-US: Ephemerals Count + - field: zk_min_latency + type: 0 + unit: ms + i18n: + zh-CN: 最小延迟 + en-US: Min Latency + protocol: telnet + telnet: + host: ^_^host^_^ + port: ^_^port^_^ + timeout: ^_^timeout^_^ + cmd: mntr + + +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-tutorial.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-tutorial.md new file mode 100644 index 0000000000..eecf853395 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/advanced/extend-tutorial.md @@ -0,0 +1,252 @@ +--- +id: extend-tutorial +title: 自定义适配一款基于HTTP协议的新监控类型 +sidebar_label: 教程案例 +--- + +通过此教程我们一步一步描述如何在 Apache HertzBeat™ 系统下自定义新增适配一款基于 http 协议的监控类型。 + +阅读此教程前我们希望您已经从[自定义监控](extend-point)和[http协议自定义](extend-http)了解熟悉了怎么自定义类型,指标,协议等。 + +## HTTP协议解析通用响应结构体,获取指标数据 +> +> 很多场景我们需要对提供的 HTTP API 接口进行监控,获取接口返回的指标值。这篇文章我们通过http自定义协议来解析我们常见的http接口响应结构,获取返回体中的字段作为指标数据。 + +```json +{ + "code": 200, + "msg": "success", + "data": {} +} + +``` + +如上,通常我们的后台API接口会设计这这样一个通用返回。hertzbeat系统的后台也是如此,我们今天就用hertzbeat的 API 做样例,新增适配一款新的监控类型 **hertzbeat**,监控采集它的系统摘要统计API +`http://localhost:1157/api/summary`, 其响应数据为: + +```json +{ + "msg": null, + "code": 0, + "data": { + "apps": [ + { + "category": "service", + "app": "jvm", + "status": 0, + "size": 2, + "availableSize": 0, + "unManageSize": 2, + "unAvailableSize": 0, + "unReachableSize": 0 + }, + { + "category": "service", + "app": "website", + "status": 0, + "size": 2, + "availableSize": 0, + "unManageSize": 2, + "unAvailableSize": 0, + "unReachableSize": 0 + } + ] + } +} +``` + +**我们这次获取其app下的 `category`,`app`,`status`,`size`,`availableSize`等指标数据。** + +### 新增配置监控模板YML + +**HertzBeat页面** -> **监控模板菜单** -> **新增监控类型** -> **配置自定义监控模板YML** + +定义我们在页面上需要输入哪些参数,一般的HTTP协议参数主要有ip, port, headers, params, uri, 账户密码等,我们直接复用 `api`监控模板 里面的参数定义内容,删除其中的我们不需要输入的uri参数和keyword关键字等参数即可。 + +定义采集类型是啥,需要用哪种协议采集方式,采集的指标是啥,协议的配置参数等。我们直接复用 `api`监控模板 里面的定义内容,修改为我们当前的监控类型`hertzbeat`配置参数即可,如下:注意⚠️我们这次获取接口响应数据中的`category`,`app`,`status`,`size`,`availableSize`等字段作为指标数据。 + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +# 监控类型 eg: linux windows tomcat mysql aws... +app: hertzbeat +# The monitoring i18n name +# 监控类型国际化名称 +name: + zh-CN: HertzBeat监控系统 + en-US: HertzBeat Monitor +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat 监控系统的通用指标进行测量监控。`
`您可以点击 “``新建 HertzBeat监控系统``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor through general performance metric. You could click the "``New HertzBeat Monitor``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控系統的通用名額進行量測監控。`
`您可以點擊“``新建HertzBeat監控系統``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat +# Input params define for monitoring(render web ui by the definition) +# 监控所需输入参数定义(根据定义渲染页面UI) +params: + # field-param field key + # field-字段名称标识符 + - field: host + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # field-param field key + # field-变量字段标识符 + - field: port + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,65535]' + # required-true or false + # required-是否是必输项 true-必填 false-可选 + required: true + # default value + # 端口默认值 + defaultValue: 1157 + - field: ssl + name: + zh-CN: 启用HTTPS + en-US: HTTPS + type: boolean + required: true + - field: timeout + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + type: number + required: false + hide: true + - field: authType + name: + zh-CN: 认证方式 + en-US: Auth Type + type: radio + required: false + hide: true + options: + - label: Basic Auth + value: Basic Auth + - label: Digest Auth + value: Digest Auth + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 50 + required: false + hide: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: false + hide: true +metrics: + # the first metrics summary + # attention: Built-in monitoring metrics contains (responseTime - Response time) + - name: summary + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + # 指标调度优先级(0-127)越小优先级越高,优先级低的指标会等优先级高的指标采集完成后才会被调度,相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # collect metrics content + # 具体监控指标列表 + fields: + # metrics content contains field-metric name, type-metric type:0-number,1-string, label-if is metrics label, unit-metric unit('%','ms','MB') + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: app + type: 1 + label: true + - field: category + type: 1 + - field: status + type: 0 + - field: size + type: 0 + - field: availableSize + type: 0 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here + # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk, 我们这里使用HTTP协议 + protocol: http + # the config content when protocol is http + # 当protocol为http协议时具体的采集配置 + http: + # http host: ipv4 ipv6 domain + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # http port + # 端口 + port: ^_^port^_^ + # http url, we don't need to enter a parameter here, just set the fixed value to /api/summary + # url请求接口路径,我们这里不需要输入传参,写死为 /api/summary + url: /api/summary + timeout: ^_^timeout^_^ + # http method: GET POST PUT DELETE PATCH, default fixed value is GET + # 请求方式 GET POST PUT DELETE PATCH,写死为 GET + method: GET + # if enabled https, default value is false + # 是否启用ssl/tls,即是http还是https,默认false + ssl: ^_^ssl^_^ + # http auth + # 认证 + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + # 认证方式: Basic Auth, Digest Auth, Bearer Token + type: ^_^authType^_^ + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + digestAuthUsername: ^_^username^_^ + digestAuthPassword: ^_^password^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, we use jsonpath to parse response data here + # 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-网站可用性指标监控,我们这里使用jsonpath来解析响应数据 + parseType: jsonPath + parseScript: '$.data.apps.*' +``` + +**点击保存并应用。我们可以看到系统页面的自定义监控菜单已经多了一个`hertzbeat`监控类型了。** + +![HertzBeat](/img/docs/advanced/extend-http-example-1.png) + +### 页面添加对`hertzbeat`监控类型的监控 + +> 我们点击新增 `HertzBeat监控系统`,配置监控IP,端口,采集周期,高级设置里的账户密码等, 点击确定添加监控。 + +![HertzBeat](/img/docs/advanced/extend-http-example-2.png) + +![HertzBeat](/img/docs/advanced/extend-http-example-3.png) + +> 过一定时间(取决于采集周期)我们就可以在监控详情看到具体的指标数据和历史图表啦! + +![HertzBeat](/img/docs/advanced/extend-http-example-4.png) + +### 设置阈值告警通知 + +> 接下来我们就可以正常设置阈值,告警触发后可以在告警中心查看,也可以新增接收人,设置告警通知等,Have Fun!!! + +---- + +#### 完 + +HTTP协议的自定义监控的实践就到这里,HTTP协议还带其他参数 `headers,params` 等,我们可以像用postman一样去定义它,可玩性也非常高! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/become_committer.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/become_committer.md new file mode 100644 index 0000000000..aa7928afa7 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/become_committer.md @@ -0,0 +1,58 @@ +--- +id: 'become_committer' +title: '成为Committer' +sidebar_position: 2 +--- + + + +## 成为 Apache HertzBeat™ 的 Committer + +任何支持社区并在 CoPDoC 领域中工作的人都可以成为 Apache HertzBeat™ 的 Committer。CoPDoC 是 ASF 的缩写,用来描述我们如何不仅仅通过代码来认识到您的贡献。 + +- **Community** - 你可以通过我们的邮件列表、问题追踪器、讨论页面与社区成员互动,并分享愿景和知识。 +- **Project** - 需要明确的愿景和共识。 +- **Documentation** - 没有它,内容只会停留在作者的头脑中。 +- **Code** - 没有代码,讨论就毫无意义。 + +Apache HertzBeat™ 社区努力追求基于功绩的原则。因此,一旦有人在 CoPDoC 的任何领域有了足够的贡献,他们就可以成为 Committer 的候选人,最终被投票选为 HertzBeat 的 Committer。成为 Apache HertzBeat™ 的 Committer 并不一定意味着你必须使用你的提交权限向代码库提交代码;它意味着你致力于 HertzBeat 项目并为我们社区的成功做出了积极的贡献。 + +## Committer 的要求 + +没有成为 Committer 或 PMC 成员的严格规则。新的 Committer 的候选人通常是积极的贡献者和社区成员。但是,如果能稍微明确一些规则,就可以在一定程度上消除贡献者的疑虑,使社区更加透明、合理和公平。 + +### 持续的贡献 + +Committer 的候选人应该持续参与并为 HertzBeat 做出大量的贡献(例如修复漏洞、添加新功能、编写文档、维护问题板、代码审查或回答社区问题)。 + +- 3+ months 的活动和参与。 +- 20+ pr 的代码,文档,测试等贡献。 + +### 贡献的质量 + +- 对项目有深入的理解。 +- 经过充分测试、良好设计、遵循 Apache HertzBeat™ 的编码标准,及简单的修复补丁。 +- 井井有条的面向用户的详细文档。 + +### 社区参与 + +- 在开发邮件列表上保持积极、礼貌与尊重,并帮助指导新的贡献者和用户。 +- 在项目维护的问题跟踪器上积极、有礼貌与尊重。 +- 对于拉取请求审查保持积极、有礼貌与尊重。 +- 即使存在分歧,也要以专业和外交的态度参与技术路线图的讨论。 +- 通过撰写文章或举办活动来推广项目。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/become_pmc_member.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/become_pmc_member.md new file mode 100644 index 0000000000..3829bf75b1 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/become_pmc_member.md @@ -0,0 +1,57 @@ +--- +id: 'become_pmc_member' +title: '成为PMC member' +sidebar_position: 3 +--- + + + +## 成为 Apache HertzBeat™ 的 PMC 成员 + +任何支持社区并在 CoPDoC 领域中工作的人都可以成为 Apache HertzBeat™ 的PMC 成员。CoPDoC 是 ASF 的缩写,用来描述我们如何不仅仅通过代码来认识到您的贡献。 + +- **Community** - 您可以通过我们的邮件列表、问题追踪器、讨论页面与社区成员互动,并分享愿景和知识。 +- **Project** - 需要明确的愿景和共识。 +- **Documentation** - 没有它,内容只会停留在作者的头脑中。 +- **Code** - 没有代码,讨论就毫无意义。 + +Apache HertzBeat™ 社区努力追求基于功绩的原则。因此,一旦有人在 CoPDoC 的任何领域有了足够的贡献,他们就可以成为 PMC 成员资格的候选人,最终被投票选为 HertzBeat 的 PMC 成员。成为 Apache HertzBeat™ 的 PMC 成员并不一定意味着您必须使用您的提交权限向代码库提交代码;它意味着您致力于 HertzBeat 项目并为我们社区的成功做出了积极的贡献。 + +## PMC 成员的要求 + +没有成为 Committer 或 PMC 成员的严格规则。新的 PMC 成员的候选人通常是积极的贡献者和社区成员。但是,如果能稍微明确一些规则,就可以在一定程度上消除贡献者的疑虑,使社区更加透明、合理和公平。 + +### 持续的贡献 + +PMC 成员的候选人应该持续参与并为 HertzBeat 做出大量的贡献(例如修复漏洞、添加新功能、编写文档、维护问题板、代码审查或回答社区问题)。 + +- 12+ months 的活动和参与。 + +### 贡献的质量 + +- 对项目有深入的理解。 +- 经过充分测试、良好设计、遵循 Apache HertzBeat™ 的编码标准,及简单的修复补丁。 +- 井井有条的面向用户的详细文档。 + +### 社区参与 + +- 在开发邮件列表上保持积极、礼貌与尊重,并帮助指导新的贡献者和用户。 +- 在项目维护的问题跟踪器上积极、有礼貌与尊重。 +- 对于拉取请求审查保持积极、有礼貌与尊重。 +- 即使存在分歧,也要以专业和外交的态度参与技术路线图的讨论。 +- 通过撰写文章或举办活动来推广项目。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/code-style-and-quality-guide.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/code-style-and-quality-guide.md new file mode 100644 index 0000000000..fe54c3f01f --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/code-style-and-quality-guide.md @@ -0,0 +1,649 @@ +--- +id: 'code_style_and_quality_guide' +title: '代码风格和质量指南' +sidebar_position: 3 +--- + + + +## 1 拉取请求与变更规则 + +1. `ISSUE`/`PR`(拉取请求) 的引导和命名 + + - 新建 `PR` 后需要在 `PR` 页面的 Github Development 按钮处关联已存在的对应 `ISSUE`(若无建议新建对应ISSUE) + + - 标题命名格式(英文,小写) + `[feature/bugfix/doc/improve/refactor/bug/cleanup] title` + +2. 添加描述信息 + + - 新建 `PR` 时请仔细描述此贡献,描述文档和代码同样重要。审阅者可以从描述中,而不仅仅是从代码中,了解问题和解决方案。 + - 勾选是否完成了对应的 Checklist。 +3. 建议一次 `PR` 只包含一个功能/一种修复/一类改进/一种重构/一次清理/一类文档等 +4. 提交消息(英文,小写,无特殊字符) + 消息的提交应遵循与 `PR` 类似的模式:`[feature/bugfix/doc/improve/refactor/bug/cleanup] title` + +## 2 代码检查样式 + +### 2.1 配置 Checkstyle + +1. 安装 Checkstyle-IDEA 插件. +2. 打开 Checkstyle 设置. 点击 **Settings** → **Tools** → **Checkstyle**。 +3. 设置 **Checkstyle version** 的版本为: **10.14.2**。 +4. 设置 **Scan scope** 为 **Only Java sources (including tests)**。 +5. 点击 **+** 按钮在 **Configuration** 部分打开一个对话框选择 checkstyle 配置文件。 + 1. 输入描述名称,比如:hertzbeat。 + 2. 选择 **Use a local checkstyle file**。 + 3. 设置 **File** 路径为: **script/checkstyle/checkstyle.xml**。 + 4. 选择 **Store relative to project location**。 + 5. 点击 **Next** → **Next** → **Finish**。 +6. 激活刚才的 **Checkstyle** 配置。 +7. 点击 **OK**。 + +- 后端代码规范 Maven 插件:`checkstyle` + 后端运行 `mvn checkstyle:checkstyle` + +- 前端代码格式化插件 `eslint` + 前端运行 `pnpm run lint:fix` + +### 2.2 文档样式检查 + +1. 安装`markdownlint-cli2`,运行`npm install markdownlint-cli2 --global` +2. 在项目中运行`markdownlint-cli2 "home/**/*.md"`,会执行Markdown文件格式自动检测。 +3. 在项目中运行`markdownlint-cli2 --fix "home/**/*.md"`,会执行Markdown文件格式自动格式化,以确保所有文档都符合规范。 + +> 提示: 修复只能修复部分问题,根据检查后的错误信息,手动调整。 + +错误码说明: + +| 错误代码 |说明 | +|---------------------------------------| ------------------------| +| **MD001 heading-increment** | 标题级别应一次只递增一个级别 | +| **MD003 heading-style** | 标题样式 | +| **MD004 ul-style** | 无序列表样式 | +| **MD005 list-indent** | 同一层级的列表项缩进不一致 | +| **MD007 ul-indent** | 无序列表缩进 | +| **MD009 no-trailing-spaces** | 行尾空格 | +| **MD010 no-hard-tabs** | 硬制表符 | +| **MD011 no-reversed-links** | 链接语法反转 | +| **MD012 no-multiple-blanks** | 多个连续空行 | +| **MD013 line-length** | 行长度 | +| **MD014 commands-show-output** | 命令前使用 `$` 符号但未显示输出 | +| **MD018 no-missing-space-atx** | ATX 样式标题符号后缺少空格 | +| **MD019 no-multiple-space-atx** | ATX 样式标题符号后有多个空格 | +| **MD020 no-missing-space-closed-atx** | 闭合 ATX 样式标题符号内部缺少空格 | +| **MD021 no-multiple-space-closed-atx** | 闭合 ATX 样式标题符号内部有多个空格 | +| **MD022 blanks-around-headings** | 标题周围应有空行 | +| **MD023 heading-start-left** | 标题必须从行首开始 | +| **MD024 no-duplicate-heading** | 存在多个内容相同的标题 | +| **MD025 single-title/single-h1** | 同一文档中有多个一级标题 | +| **MD026 no-trailing-punctuation** | 标题中有尾随标点符号 | +| **MD027 no-multiple-space-blockquote** | 引用符号后有多个空格 | +| **MD028 no-blanks-blockquote** | 引用块内有空行 | +| **MD029 ol-prefix** | 有序列表项前缀 | +| **MD030 list-marker-space** | 列表标记后的空格 | +| **MD031 blanks-around-fences** | 围栏代码块应被空行包围 | +| **MD032 blanks-around-lists** | 列表应被空行包围 | +| **MD033 no-inline-html** | 内联 HTML | +| **MD034 no-bare-urls** | 使用了裸露的 URL | +| **MD035 hr-style** | 水平分割线样式 | +| **MD036 no-emphasis-as-heading** | 不应使用强调样式代替标题 | +| **MD037 no-space-in-emphasis** | 强调标记内有空格 | +| **MD038 no-space-in-code** | 代码片段元素内有空格 | +| **MD039 no-space-in-links** | 链接文本内有空格 | +| **MD040 fenced-code-language** | 围栏代码块应指定语言 | +| **MD041 first-line-heading/first-line-h1** | 文件的第一行应为一级标题 | +| **MD042 no-empty-links** | 链接不可为空 | +| **MD043 required-headings** | 必须的标题结构 | +| **MD044 proper-names** | 专有名词应正确大写 | +| **MD045 no-alt-text** | 图片应有替代文字(alt 文本) | +| **MD046 code-block-style** | 代码块样式 | +| **MD047 single-trailing-newline** | 文件应以单个换行符结尾 | +| **MD048 code-fence-style** | 代码围栏样式 | +| **MD049 emphasis-style** | 强调样式 | +| **MD050 strong-style** | 粗体样式 | +| **MD051 link-fragments** | 链接片段应有效 | +| **MD052 reference-links-images** | 引用链接和图片应使用已定义的标签 | +| **MD053 link-image-reference-definitions** | 链接和图片引用定义应是必要的 | +| **MD054 link-image-style** | 链接和图片样式 | +| **MD055 table-pipe-style** | 表格管道样式 | +| **MD056 table-column-count** | 表格列数 | + +## 3 编程规范 + +### 3.1 命名风格 + +1. 优先为变量命名选择名词,这样更容易区分`变量`或`方法`。 + + ```java + Cache`` publicKeyCache; + ``` + +2. 变量的拼音缩写是禁止的(排除地名等名词),例如chengdu。 +3. 推荐的变量名以 `类型` 结尾。 + 对于 `Collection/List` 类型的变量,取 `xxxx` (复数表示多个元素)或以 `xxxList` (特定类型)结束。 + 对于 `map` 类型的变量,清晰地描述 `key` 和 `value`: + + ```java + Map idUserMap; + Map userIdNameMap; + ``` + +4. 通过其名称直观地知道变量的类型和含义。 + 方法名称应首先以动词开始,如下所示: + + ```java + void computeVcores(Object parameter1); + ``` + + > 注意:在 `Builder` 工具类中不必严格遵循这项规则。 + +### 3.2 常量变量定义 + +1. 多余的字符串应提取为常量 + + > 如果一个常量被硬编码两次或多次,请直接提取它为常量并更改相应的引用。 + > 通常,`log` 中的常量可以忽略提取。 + + - 负面示例: + + ```java + public static RestResponse success(Object data) { + RestResponse resp = new RestResponse(); + resp.put("status", "success"); + resp.put("code", ResponseCode.CODE_SUCCESS); + resp.put("data", data); + return resp; + } + + public static RestResponse error() { + RestResponse resp = new RestResponse(); + resp.put("status", "error"); + resp.put("code", ResponseCode.CODE_FAIL); + resp.put("data", null); + return resp; + } + ``` + + - 正面示例: + + > 字符串提取为常量引用。 + + ```java + public static final String STATUS = "status"; + public static final String CODE = "code"; + public static final String DATA = "data"; + + public static RestResponse success(Object data) { + RestResponse resp = new RestResponse(); + resp.put(STATUS, "success"); + resp.put(CODE, ResponseCode.CODE_SUCCESS); + resp.put(DATA, data); + return resp; + } + + public static RestResponse error() { + RestResponse resp = new RestResponse(); + resp.put(STATUS, "error"); + resp.put(CODE, ResponseCode.CODE_FAIL); + resp.put(DATA, null); + return resp; + } + ``` + +2. 确保代码的可读性和直观性 + + - `annotation` 符号中的字符串不需要提取为常量。 + + - 被引用的 `package` 或 `resource` 名称不需要提取为常量。 + +3. 未被重新分配的变量也必须声明为 `` final `` 类型。 + +4. 关于 `constant/variable` 行的排序顺序 + + 按以下顺序对类中的变量行进行排序: + 1. `public static final V`, `static final V`,`protected static final V`, `private static final V` + 2. `public static v`, `static v`,`protected static v`, `private static v` + 3. `public v`, `v`, `protected v`, `private v` + +### 3.3 方法规则 + +1. 按照 `public`、`protected`、`private` 的顺序对类中的方法进行排序。 + + 类的静态方法可以放在非静态方法之后,并根据一致的方法可见性进行排序。 + +2. 当方法有限制时,方法的参数和返回值需要用 `@Nonnull` 或 `@Nullable` 注释和约束进行注释。 + + 例如,如果参数不能为 null,最好添加一个 `@Nonnull` 注释。如果返回值可以为 null,则应首先添加 `@Nullable` 注释。 + + `` 注意:包名为 ``javax.validation.requirements`` `` + +3. 如果方法中的代码行数太多,请尝试在适当的点上使用多个子方法来分段方法体。 + + 一般来说,需要坚持以下原则: + - 便于测试 + - 有好的语义 + - 易于阅读 + + 此外,还需要考虑在组件、逻辑、抽象和场景等方面的切割是否合理。 + + > 然而,目前还没有明确的演示定义。在演变过程中,我们将为开发者提供更多的示例,以便他们有更清晰的参考和理解。 + +### 3.4 集合规则 + +1. 对于返回的 `collection` 值,除非有特殊的 `concurrent` (如线程安全),总是返回 `interface`,例如: + - 如果使用 `ArrayList`,则返回 `` List `` + - 如果使用 `HashMap`,则返回 `` Map `` + - 如果使用 `HashSet`,则返回 `` Set `` +2. 如果存在多线程,可以使用以下声明或返回类型: + + ```java + private CurrentHashMap map; + public CurrentHashMap funName(); + ``` + +3. 使用 `isEmpty()` 而不是 `length() == 0` 或者 `size() == 0` + - 负面示例: + + ```java + if (pathPart.length() == 0) { + return; + } + ``` + + - 正面示例: + + ```java + if (pathPart.isEmpty()) { + return; + } + ``` + +### 3.5 并发处理 + +1. 需要管理 `线程池`,使用统一的入口点获取 `线程池`。 + + `` 注意:在演变过程中,我们将为开发者提供更多的示例,以便他们有更清晰的参考和理解。 `` + +2. `线程池` 需要进行资源约束,以防止因处理不当导致的资源泄露。 + +### 3.6 控制/条件语句 + +1. 避免因不合理的 `条件/控制` 分支顺序导致: + - 多个代码行的 `深度` 为 `n+1` + - 多余的行 + +一般来说,如果一个方法的代码行深度由于连续嵌套的 `if... else..` 超过了 `2+ Tabs`,那么应该考虑试图 + +- `合并分支`, +- `反转分支条件` +- `提取私有方法` + +以减少代码行深度并提高可读性,例如: + +- 联合或将逻辑合并到下一级调用中 + - 负面示例: + + ```java + if (isInsert) { + save(platform); + } else { + updateById(platform); + } + ``` + + - 正面示例: + + ```java + saveOrUpdate(platform); + ``` + +- 合并条件 + - 负面示例: + + ```java + if (expression1) { + if(expression2) { + // ...... + } + } + ``` + + - 正面示例: + + ```java + if (expression1 && expression2) { + // ...... + } + ``` + +- 反转条件 + - 负面示例: + + ```java + public void doSomething() { + // 忽略更深的代码块行 + // ..... + if (condition1) { + // ... + } else { + // ... + } + } + ``` + + - 正面示例: + + ```java + public void doSomething() { + // 忽略更深的代码块行 + // ..... + if (!condition1) { + // ... + return; + } + // ... + } + ``` + +- 使用单一变量或方法减少复杂的条件表达式 + - 负面示例: + + ```java + if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { + // ... + } + ``` + + - 正面示例: + + ```java + if (containsSqlServer(dbType)) { + // .... + } + //..... + // containsSqlServer的定义 + ``` + +> 在未来,使用 `sonarlint` 和 `better highlights` 检查代码深度看起来是个不错的选择。 + +### 3.7 代码注释规则 + +1. 方法缺少注释: + + - `When`:该方法何时可以被调用 + - `How`:如何使用此方法以及如何传递参数等 + - `What`:此方法实现了哪些功能 + - `Note`:在调用此方法时开发人员应注意什么 + +2. 缺少必要的类头部描述注释。 + + 添加 `What`,`Note` 等,如上述 `1` 中提到的。 + +3. 在接口中的方法声明必须被注释。 + + - 如果实现的语义和接口声明的注释内容不一致,则具体的实现方法也需要用注释重写。 + + - 如果方法实现的语义与接口声明的注释内容一致,则建议不写注释以避免重复的注释。 + +4. 在注释行中的第一个词需要大写,如 `param` 行,`return` 行。 + 如果特殊引用作为主题不需要大写,需要注意特殊符号,例如引号。 + +### 3.8 Java Lambda 表达式 + +1. 更倾向于使用 `non-capturing` lambda(不包含对外部范围的引用的lambda)。 + Capturing lambda 在每次调用时都需要创建一个新的对象实例。`Non-capturing` lambda 可以为每次调用使用相同的实例。 + + - 负面示例: + + ```java + map.computeIfAbsent(key, x -> key.toLowerCase()) + ``` + + - 正面示例: + + ```java + map.computeIfAbsent(key, k -> k.toLowerCase()); + ``` + +2. 考虑使用方法引用而不是内联lambda + + - 负面示例: + + ```java + map.computeIfAbsent(key, k-> Loader.load(k)); + ``` + + - 正面示例: + + ```java + map.computeIfAbsent(key, Loader::load); + ``` + +### 3.9 Java Streams + +- 在任何对性能敏感的代码中避免使用 Java Streams。 + +- 使用 Java Streams 的主要动机是为了提高代码的可读性。因此,它们可以在代码的某些部分中很好地匹配,这些部分不是数据密集型的,而是处理协调。 + +- 即使在后一种情况下,也试图限制范围到一个方法,或者一个内部类中的几个私有方法。 + +### 3.10 前置条件检查 + +1. 使用统一的 `Utils.requireXXX` 来完成前提的验证,如果可能的话,用新的前置条件检查替换 `AlertXXException.throwIfXXX`。 + +### 3.11 StringUtils + +1. 使用 `StringUtils.isBlank` 而不是 `StringUtils.isEmpty` + + - 负面示例: + + ```java + if (StringUtils.isEmpty(name)) { + return; + } + ``` + + - 正面示例: + + ```java + if (StringUtils.isBlank(name)) { + return; + } + ``` + +2. 使用 `StringUtils.isNotBlank` 而不是 `StringUtils.isNotEmpty` + + - 负面示例: + + ```java + if (StringUtils.isNotEmpty(name)) { + return; + } + ``` + + - 正面示例: + + ```java + if (StringUtils.isNotBlank(name)) { + return; + } + ``` + +3. 使用 `StringUtils.isAllBlank` 而不是 `StringUtils.isAllEmpty` + + - 负面示例: + + ```java + if (StringUtils.isAllEmpty(name, age)) { + return; + } + ``` + + - 正面示例: + + ```java + if (StringUtils.isAllBlank(name, age)) { + return; + } + ``` + +### 3.12 `Enum` 类 + +1. 枚举值比较 + + - 负面示例: + + ```java + if (status.equals(JobStatus.RUNNING)) { + return; + } + ``` + + - 正面示例: + + ```java + if (status == JobStatus.RUNNING) { + return; + } + ``` + +2. 枚举类不需要实现 Serializable + + - 负面示例: + + ```java + public enum JobStatus implements Serializable { + // ... + } + ``` + + - 正面示例: + + ```java + public enum JobStatus { + // ... + } + ``` + +3. 使用 `Enum.name()` 而不是 `Enum.toString()` + + - 负面示例: + + ```java + System.out.println(JobStatus.RUNNING.toString()); + ``` + + - 正面示例: + + ```java + System.out.println(JobStatus.RUNNING.name()); + ``` + +4. 枚举类名称统一使用 Enum 后缀 + + - 负面示例: + + ```java + public enum JobStatus { + // ... + } + ``` + + - 正面示例: + + ```java + public enum JobStatusEnum { + // ... + } + ``` + +### 3.13 `Deprecated` 注解 + +- 负面示例: + +```java +@deprecated +public void process(String input) { + // ... +} +``` + +- 正面示例: + +```java +@Deprecated +public void process(String input) { + // ... +} +``` + +## 4 日志 + +1. 使用 `占位符` 进行日志输出: + + - 负面示例 + + ```java + log.info("Deploy cluster request " + deployRequest); + ``` + + - 正面示例 + + ```java + log.info("load plugin:{} to {}", file.getName(), appPlugins); + ``` + +2. 打印日志时,注意选择 `日志级别` + + 当打印日志内容时,如果传递了日志占位符的实际参数,必须避免过早评估,以避免由日志级别导致的不必要评估。 + + - 负面示例: + + 假设当前日志级别为 `INFO`: + + ```java + // 忽略声明行。 + List`` userList = getUsersByBatch(1000); + LOG.debug("All users: {}", getAllUserIds(userList)); + ``` + + - 正面示例: + + 在这种情况下,我们应该在进行实际的日志调用之前提前确定日志级别,如下所示: + + ```java + // 忽略声明行。 + List`` userList = getUsersByBatch(1000); + if (LOG.isDebugEnabled()) { + LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); + } + ``` + +## 5 测试 + +1. 建议使用 `JUnit5` 进行测试用例的准备。 + +2. 实现的接口需在`e2e`模块下编写`e2e`测试用例脚本。 + +## 参考资料 + +- [https://site.mockito.org/](https://site.mockito.org/) +- [https://alibaba.github.io/p3c/](https://alibaba.github.io/p3c/) +- [https://junit.org/junit5/](https://junit.org/junit5/) +- [https://streampark.apache.org/](https://streampark.apache.org/) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/contact.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/contact.md new file mode 100644 index 0000000000..db125d4bf3 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/contact.md @@ -0,0 +1,21 @@ +--- +id: contact +title: 交流联系 +sidebar_label: 交流联系 +--- + +> 如果您在使用过程中需要帮助或者想交流建议,可以通过 ISSUE 或 Github Discussion 讨论交流。 + +[订阅邮件列表](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) : 发送邮件至 `dev-subscribe@hertzbeat.apache.org` 来订阅邮件列表. + +[Chat On Discord](https://discord.gg/Fb6M73htGr) + +微信交流群 : 加 `ahertzbeat` 好友邀请进群. + +微信公众号 : 搜索 ID `usthecom`. + +[Github Discussion](https://github.com/apache/hertzbeat/discussions) + +[Follow Us Twitter](https://x.com/hertzbeat1024) + +[Subscribe YouTube](https://www.youtube.com/channel/UCri75zfWX0GHqJFPENEbLow) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/contribution.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/contribution.md new file mode 100644 index 0000000000..2a5ec4a44c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/contribution.md @@ -0,0 +1,178 @@ +--- +id: contribution +title: 贡献指南 +sidebar_position: 0 +--- + + + +> 非常欢迎参与项目贡献,我们致力于维护一个互相帮助的快乐社区。 + +## 贡献方式 +> +> 在 Apache HertzBeat™ 社区,贡献方式有很多: + +- 💻**代码**:可以帮助社区完成一些任务、编写新的 feature 或者是修复一些 bug; + +- ⚠️**测试**:可以来参与测试代码的编写,包括了单元测试、集成测试、e2e 测试; + +- 📖**文档**:可以编写或完善文档,来帮助用户更好地了解和使用 HertzBeat; + +- 📝**博客**:可以撰写 HertzBeat 的相关文章,来帮助社区更好地推广; + +- 🤔**讨论**:可以参与 HertzBeat 新的 feature 的讨论,将您的想法跟 HertzBeat 融合; + +- 💡**布道**:可以帮助宣传或推广 HertzBeat 社区,在 meetup 或 summit 中演讲; + +- 💬**建议**:也可以对项目或者社区提出一些建议,促进社区的良性发展; + +更多贡献方式参见 [Contribution Types](https://allcontributors.org/en/reference/emoji-key/) + +即便是小到错别字的修正我们也都非常欢迎 :) + +### 让 HertzBeat 运行起来 + +> 让 HertzBeat 的代码在您的开发工具上运行起来,并且能够断点调试。 +> 此为前后端分离项目,本地代码启动需将后端 [manager](https://github.com/apache/hertzbeat/tree/master/hertzbeat-manager) 和前端 [web-app](https://github.com/apache/hertzbeat/tree/master/web-app) 分别启动生效。 + +#### 后端启动 + +1. 需要 `maven3+`, `java25` 和 `lombok` 环境 + +2. (可选)修改配置文件配置信息-`hertzbeat-startup/src/main/resources/application.yml` + +3. 在项目根目录运行编译: `mvn clean install -DskipTests` + +4. 在 `jvm` 加入参数 `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED` + +5. 启动`springboot startup`服务 `hertzbeat-startup/src/main/java/org/apache/hertzbeat/startup/HertzBeatApplication.java` + +#### 前端启动 + +1. 需要 `nodejs pnpm` 环境, 确保 `Node.js >= 18` + +2. 进入 `web-app` 目录: `cd web-app` + +3. 安装 pnpm: `npm install -g pnpm` + +4. 在前端工程目录 `web-app` 下执行: `pnpm install` or `pnpm install --registry=https://registry.npmmirror.com` in `web-app` + +5. 待本地后端启动后,在 web-app 目录下启动本地前端 `pnpm start` + +6. 浏览器访问 localhost:4200 即可开始,默认账号密码 **admin/hertzbeat** + +### 寻找任务 + +寻找您感兴趣的 Issue!在我们的 GitHub 仓库和邮件列表中,我们经常会发布一些带有 good first issue 或者 status: volunteer wanted 标签的 issue,这些issue都欢迎贡献者的帮助。 +其中 good first issue 往往门槛较低、适合新手。 + +当然,如果您有好的想法,也可以直接在 GitHub Discussion 中提出或者联系社区。 + +### 提交 Pull Request + +1. 首先您需要 Fork 目标仓库 [hertzbeat repository](https://github.com/apache/hertzbeat). +2. 然后 用 git 命令 将代码下载到本地: + + ```shell + git clone git@github.com:`YOUR_USERNAME`/hertzbeat.git #Recommended + ``` + +3. 下载完成后,请参考目标仓库的入门指南或者 README 文件对项目进行初始化。 +4. 接着,您可以参考如下命令进行代码的提交, 切换新的分支, 进行开发: + + ```shell + git checkout -b a-feature-branch #Recommended + ``` + +5. 提交 commit, commit 描述信息需要符合约定格式: [module name or type name]feature or bugfix or doc: custom message. + + ```shell + git add + git commit -m '[docs]feature: necessary instructions' #Recommended + ``` + +6. 推送到远程仓库 + + ```shell + git push origin a-feature-branch + ``` + +7. 然后您就可以在 GitHub 上发起新的 PR (Pull Request)。 + + 请注意 PR 的标题需要符合我们的规范,并且在 PR 中写上必要的说明,来方便 Committer 和其他贡献者进行代码审查。 + +### 等待PR代码被合并 + +在提交了 PR 后,Committer 或者社区的小伙伴们会对您提交的代码进行审查(Code Review),会提出一些修改建议,或者是进行一些讨论,请及时关注您的PR。 + +若后续需要改动,不需要发起一个新的 PR,在原有的分支上提交 commit 并推送到远程仓库后,PR会自动更新。 + +另外,我们的项目有比较规范和严格的 CI 检查流程,在提交 PR 之后会触发 CI,请注意是否通过 CI 检查。 + +最后,Committer 可以将 PR 合并入 master 主分支。 + +### 代码被合并后 + +在代码被合并后,您就可以在本地和远程仓库删除这个开发分支了: + +```shell +git branch -d a-dev-branch +git push origin --delete a-dev-branch +``` + +在主分支上,您可以执行以下操作来同步上游仓库: + +```shell +git remote add upstream https://github.com/apache/hertzbeat.git #Bind the remote warehouse, if it has been executed, it does not need to be executed again +git checkout master +git pull upstream master +``` + +### 领取贡献者证书 + +在您的 PR 被合并后,您可以发送如下内容邮件到 `dev@hertzbeat.apache.org` 来申请领取属于您的 Apache HertzBeat™ 贡献者电子证书。 + +```text +Title: [Contributor] Request for a Contributor Certificate: +Body: +Hello, +I would like to request a Contributor Certificate for my contributions to the Apache HertzBeat™ project. + +- Full Name: # The Full Name will be printed on the certificate, any name you want. +- GitHub Username: +- Pull Request Links: +- Email Address: + +Best regards, + +``` + +在几个工作日内,您会收到携带电子证书的回复,您的名字也会出现在贡献者列表中。 +注意贡献者的证书是电子的,待您成为 `Committer` 或者 `PMC` 的证书是实体的。 + +证书样例: + +![cert](/img/docs/hertzbeat-cert.png) + +### 如何成为 Committer? + +通过上述步骤,您就是 HertzBeat 的贡献者了。重复前面的步骤,在社区中保持活跃,坚持下去,您就能成为 Committer! + +### 加入讨论交流 + +[讨论交流](contact) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/development.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/development.md new file mode 100644 index 0000000000..3df906d2f8 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/development.md @@ -0,0 +1,75 @@ +--- +id: development +title: 如何将 HertzBeat 运行编译? +sidebar_label: 运行编译 +--- + +## 让 HertzBeat 运行起来 + +> 让 HertzBeat 的代码在您的开发工具上运行起来,并且能够断点调试。 +> 此为前后端分离项目,本地代码启动需将后端 [manager](https://github.com/apache/hertzbeat/tree/master/hertzbeat-manager) 和前端 [web-app](https://github.com/apache/hertzbeat/tree/master/web-app) 分别启动生效。 + +### 后端启动 + +1. 需要 `maven3+`, `java25` 和 `lombok` 环境 + +2. (可选)修改配置文件配置信息-`hertzbeat-startup/src/main/resources/application.yml` + +3. 在项目根目录运行编译: `mvn clean install -DskipTests` + +4. 在 `jvm` 加入参数 `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED` + +5. 启动`springboot startup`服务 `hertzbeat-startup/src/main/java/org/apache/hertzbeat/startup/HertzBeatApplication.java` + +### 前端启动 + +1. 需要 `nodejs pnpm` 环境, 版本要求 `Node.js >= 18` + +2. 进入 `web-app` 目录: `cd web-app` + +3. 安装pnpm: `npm install -g pnpm` + +4. 在前端工程目录 `web-app` 下执行: `pnpm install` 或者 `pnpm install --registry=https://registry.npmmirror.com` + +5. 待本地后端启动后,在web-app目录下启动本地前端 `pnpm start` + +6. 浏览器访问 localhost:4200 即可开始,默认账号密码 admin/hertzbeat + +## 生成二进制包 + +> 需要 `maven3+`, `java25`, `node` 和 `pnpm` 环境. + +### 前端打包 + +1. 需要 `Node pnpm` 环境, 版本要求 `Node.js >= 18` + +2. 切换到 `web-app` 目录: `cd web-app` + +3. 安装 pnpm: `npm install -g pnpm` + +4. 安装本项目依赖: `pnpm install` 或 `pnpm install --registry=https://registry.npmmirror.com` + +5. 打包: `pnpm package` + +### 后端打包 + +1. 需要 `maven3+`, `java25` 环境 + +2. 在项目根目录运行: `mvn clean package -Prelease` + +HertzBeat 包将生成为 `dist/apache-hertzbeat-{version}-bin.tar.gz` + +### 采样器打包 + +1. 需要 `maven3+`, `java25` 环境 + +2. 在项目根目录运行: `mvn clean install` + +3. 切换到 `hertzbeat-collector` 目录: `cd hertzbeat-collector` + +4. 在 `hertzbeat-collector` 目录下打 JVM 采集器安装包: `mvn clean package -Pcluster` +5. 在 `hertzbeat-collector` 目录下打 Native 采集器安装包: `mvn clean package -pl hertzbeat-collector-collector -am -Pnative` + +> Native 采集器打包需要带有 `native-image` 命令的 GraalVM JDK 25 环境。 + +HertzBeat 采集器安装包将生成为 `dist/apache-hertzbeat-collector-{version}-bin.tar.gz`,以及类似 `dist/apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz` 这样的 Native 平台安装包 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/document.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/document.md new file mode 100644 index 0000000000..2b803c9664 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/document.md @@ -0,0 +1,139 @@ +--- +id: 'document' +title: '文档说明' +sidebar_position: 1 +--- + + + +对于任何类型的软件来说,良好的文档都是至关重要的。任何能够改进 HertzBeat 文档的贡献都是受欢迎的。 + +## 获取文档项目 + +HertzBeat 项目的文档在 [git 仓库 home 目录](https://github.com/apache/hertzbeat/tree/master/home) 中维护。 + +首先,您需要将文档项目 fork 到您自己的 github 仓库,然后将文`clone`到您的本地计算机。 + +```shell +git clone git@github.com:/hertzbeat.git +``` + +## 预览和生成静态文件 + +此网站使用 node 进行编译,使用 Docusaurus 框架组件。 + +1. 下载并安装 nodejs (版本 18.8.0) +2. 将代码克隆到本地 `git clone git@github.com:apache/hertzbeat.git` +3. 在`home`目录下运行 `pnpm install` 来安装所需的依赖库。 +4. 在`home`目录下运行 `pnpm start`,您可以访问 [http://localhost:3000](http://localhost:3000) 查看站点的英文模式预览 +5. 在`home`目录下运行 `pnpm start-zh-cn`,您可以访问 [http://localhost:3000](http://localhost:3000) 查看站点的中文模式预览 +6. 若要生成静态网站资源文件,请运行 `pnpm build`。构建的静态资源位于 build 目录中。 + +## 文档格式检验 + +在 Apache HertzBeat 中,所有的 MD 文章都要通过 MD 的 [CI](https://github.com/apache/hertzbeat/blob/master/.github/workflows/doc-build-test.yml) 检测才能够合并,目的是为了保持文档官网的美观和文章格式的一致性。 + +在您编写了相关 MD 文章之后,您可以在本地执行以下命令,预先检查 MD 的文章内容是否符合要求,减少 review 的工作量,节省您的时间: + +```shell +cd home && pnpm install + +pnpm md-lint + +# 如果文档错误,您可以使用 pnpm md-lint-fix 修复 +pnpm md-lint-fix +``` + +MD 文章的相关格式规则您可以参考:[Markdown-lint-rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md) +项目中的 MD 格式配置文件:[.markdownlint-cli2.jsonc](https://github.com/apache/hertzbeat/blob/master/.markdownlint-cli2.jsonc) + +## 目录结构 + +```html +|-- docs +|-- blog +|-- i18n +| `-- zh-CN // 中文国际化 +| |-- code.json +| |-- docusaurus-plugin-content-blog +| |-- docusaurus-plugin-content-docs +| `-- docusaurus-theme-classic +|-- resource // 静态资源文件 +|-- src +| |-- theme +| |-- css +| |-- js +| |-- pages +| | |-- components +| | |-- index.js +| |-- constants.js +|-- static // 图片静态资源 +| |-- img // +| | |-- blog // 博客图片 +| | |-- docs // 文档图片 +| | |-- home // 产品图片 +| | |-- icons // 图标 +|-- docusaurus.config.js +|-- sidebars.js // 文档侧边栏菜单配置 +``` + +## 写一篇博客 + +文章放在 `blog/` 下,翻译版本放在 `i18n/<语种>/docusaurus-plugin-content-blog/`,文件名保持一致。 + +```yaml +--- +title: Apache HertzBeat™ 1.8.0 版本发布公告 +author: Apache HertzBeat Community +author_url: https://github.com/apache/hertzbeat +tags: [releases] +description: Apache HertzBeat 1.8.0 带来 AI 对话与 MCP 工具、日志监控,以及大幅性能提升。 +cover_headline: Apache HertzBeat 1.8.0 +--- +``` + +- **`tags`** —— 第一个必须是 `blog/tags.yml` 里定义的分类之一(`releases`、`engineering`、 + `tutorials`、`community`),博客列表页的分类筛选依赖它。后面可以再加自由主题标签。 +- **`description`** —— 一到两句话。它同时是卡片摘要和搜索引擎摘要。不填的话 + Docusaurus 会取正文第一段,通常是问候语或小标题。 +- **`cover_headline`** —— 可选。博客列表会为每篇文章渲染统一视觉风格的封面,这个字段 + 设置封面上的大标题(例如 `Welcome Bob`)。不填则自动从标题里的版本号或 + 被监控产品名推导。 +- **`cover_kicker`** —— 可选。生成封面上的小胶囊徽章文字(例如 `New Committer`), + 不填默认用分类英文名。封面文字各语言统一用英文,保持视觉一致。 +- **`image`** —— 可选。真实封面图,配置后完全替代生成式封面。 + +## 规范 + +### 文件的命名规范 + +全部由小写,数字,下划线和破折号组成。 + +正例:`render-dom.js / signup.css / index.html / company-logo.png / hertz_beat.md` + +反例:`renderDom.js / UserManagement.html` + +### 资源路径 + +图片资源统一放在 `static/img/{模块名称}` 下 + +css 和其他样式文件放在 `src/css` 目录中。 + +### 页面内容修改 + +> 所有页面文档都可以通过底部的'编辑此页面'按钮直接跳转到相应的 github 资源修改页面。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/how-to-release.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/how-to-release.md new file mode 100644 index 0000000000..16039e6794 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/how-to-release.md @@ -0,0 +1,608 @@ +--- +id: 'how_to_release' +title: 如何进行版本发布 +sidebar_position: 4 +--- + +本教程详细描述了如何发布 Apache HertzBeat。 + +:::caution 开始之前:本文中需要替换的变量 +文中的命令和邮件模板使用了占位符,执行前请全部替换为你自己的值,**不要直接复制粘贴**。 + +| 占位符 | 含义 | 示例 | +| --- | --- | --- | +| `{version}` | 发布版本号 | `1.9.0` | +| `RC1` | 候选版本号,从 1 开始,每次重新投票 +1 | `RC2` | +| `` | 你的 Apache LDAP 用户名 | `duansg` | +| `@apache.org` | 你的 Apache 邮箱 | `duansg@apache.org` | +| `` | 你的 GPG 短密钥 ID,`gpg --keyid-format SHORT --list-keys` 可查看 | `EF04C474` | +| `` | 邮件署名 | `Duan SiGuo` | + +文中代码块里的**命令输出示例**(如 `gpg` 的回显、签名校验结果)保留了具体值,仅供对照格式,你实际看到的会是自己的信息。 +::: + +## 1. 环境要求 + +此发布过程在 UbuntuOS(可在 Windows Mac) 中进行操作,并需要以下环境: + +- JDK 25 +- Node18 pnpm +- Apache Maven 3.x +- GnuPG 2.x +- Git +- SVN (Apache使用svn来托管项目发布) + +> 注意需要设置环境变量 `export GPG_TTY=$(tty)` + +## 2. 准备发布 + +> 首先整理帐户信息以更好地了解操作过程,稍后会多次使用。 +> +> - apache id: `` (APACHE LDAP 用户名) +> - apache passphrase: `APACHE LDAP 密钥` +> - apache email: `@apache.org` +> - gpg real name: `` (任何名称均可用, 建议设置为与 apache id 相同的名称) +> - gpg key passphrase: `创建gpg密钥时设置的密码,你需要记住此密码` + +### 2.1 生成密钥 + +```shell +$ gpg --full-gen-key +gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Please select what kind of key you want: +(1) RSA and RSA (default) +(2) DSA and Elgamal +(3) DSA (sign only) +(4) RSA (sign only) +(14) Existing key from card +Your selection? 1 # Please enter 1 +RSA keys may be between 1024 and 4096 bits long. +What keysize do you want? (3072) 4096 # Please enter 4096 here +Requested keysize is 4096 bits +Please specify how long the key should be valid. +0 = key does not expire +`` = key expires in n days +``w = key expires in n weeks +``m = key expires in n months +``y = key expires in n years +Key is valid for? (0) 0 # Please enter 0 +Key does not expire at all +Is this correct? (y/N) y # Please enter y here + +GnuPG needs to construct a user ID to identify your key. + +Real name: # Please enter 'gpg real name' +Email address: @apache.org # Please enter your apache email address here +Comment: apache key # Please enter some comments here +You selected this USER-ID: + "duansg (apache key) [duansg@apache.org](mailto:duansg@apache.org)" + +Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O # Please enter O here +We need to generate a lot of random bytes. It is a good idea to perform +some other action (type on the keyboard, move the mouse, utilize the +disks) during the prime generation; this gives the random number +generator a better chance to gain enough entropy. + +# At this time, a dialog box will pop up, asking you to enter the key for this gpg. +# you need to remember that it will be used in subsequent steps. +┌─────────────────────────────────────────────────────┐ +│ Please enter this passphrase to │ +│ protect your new key │ +│ │ +│ Passphrase: _______________________________________ │ +│ │ +│ `` `` │ +└─────────────────────────────────────────────────────┘ + +# Here you need to re-enter the password in the previous step. +┌─────────────────────────────────────────────────────┐ +│ Please re-enter this passphrase │ +│ │ +│ Passphrase: _______________________________________ │ +│ │ +│ `` `` │ +└─────────────────────────────────────────────────────┘ +gpg: directory '/Users/duansg/.gnupg/openpgp-revocs.d' created +gpg: revocation certificate stored as '/Users/duansg/.gnupg/openpgp-revocs.d/C787268D3396367EB3C2242402CA7E2CEF04C474.rev' +public and secret key created and signed. + +pub rsa4096 2026-07-27 [SC] + C787268D3396367EB3C2242402CA7E2CEF04C474 +uid duansg +sub rsa4096 2026-07-27 [E] +``` + +密钥可以通过`gpg --list-signatures` 或者 `gpg --keyid-format SHORT --list-keys` 命令查看 + +### 2.2 将生成的密钥上传到公共服务器 + +```shell +$ gpg --keyid-format SHORT --list-keys +------------------------ +pub rsa4096/EF04C474 2026-07-27 [SC] + C787268D3396367EB3C2242402CA7E2CEF04C474 +uid [ultimate] duansg +sub rsa4096/E955F059 2026-07-27 [E] + +# Send public key to keyserver via key id +$ gpg --keyserver hkps://keyserver.ubuntu.com:443 --send-key +# Among them, keyserver.ubuntu.com is the selected keyserver, it is recommended to use this, because the Apache Nexus verification uses this keyserver +``` + +#### 2.3 检查密钥是否创建成功 + +验证是否已经同步到公共网络,需要一分钟左右才能知道答案,如果不成功,您可以多次上传并重试。 + +```shell +gpg --keyserver hkps://keyserver.ubuntu.com:443 --recv-key # If the following content appears, it means success +gpg: key 02CA7E2CEF04C474: "duansg " not changed +gpg: Total number processed: 1 +gpg: unchanged: 1 +``` + +或者进入 [https://keyserver.ubuntu.com/](https://keyserver.ubuntu.com/) 网址,输入密钥的名称,然后点击'Search key' 按钮,查看是否有对应名称的密钥。 + +#### 2.4 将 gpg 公钥添加到 Apache SVN 项目仓库的 KEYS 文件中 + +- Apache HertzBeat Dev 分支 [https://dist.apache.org/repos/dist/dev/hertzbeat](https://dist.apache.org/repos/dist/dev/hertzbeat) +- Apache HertzBeat Release 分支 [https://dist.apache.org/repos/dist/release/hertzbeat](https://dist.apache.org/repos/dist/release/hertzbeat) + +##### 2.4.1 将公钥添加到dev分支的KEYS + +切换到 HertzBeat 的根目录进行相关操作: + +```shell +$ mkdir -p svn/dev +$ cd svn/dev + +$ svn co https://dist.apache.org/repos/dist/dev/hertzbeat +$ cd svn/dev/hertzbeat + +# 将生成的KEY追加到KEYS文件中,检查是否添加正确 +$ (gpg --list-sigs @apache.org && gpg --export --armor @apache.org) >> KEYS + +$ svn ci -m "add gpg key for " +``` + +##### 2.4.2 将公钥添加到release分支的KEYS + +切换到 HertzBeat 的根目录进行相关操作: + +```shell +$ mkdir -p svn/release +$ cd svn/release + +$ svn co https://dist.apache.org/repos/dist/release/hertzbeat +$ cd svn/release/hertzbeat + +# 将生成的KEY追加到KEYS文件中,检查是否添加正确 +$ (gpg --list-sigs @apache.org && gpg --export --armor @apache.org) >> KEYS + +$ svn ci -m "add gpg key for " +``` + +## 3. 准备物料 & 发布 + +### 准备发布物料 + +#### 3.1 基于 master 分支,创建一个名为 release-`release_version`-rcx 的分支,例如 `release-{version}-rc1`。并基于 `release-{version}-rc1` 分支创建一个名为 `v{version}-rc1` 的标签,并将此标签设置为预发布 + +```shell +git checkout master +git checkout -b release-{version}-rc1 +``` + +#### 3.2 本地切换到待发布分支 + +```shell +git checkout release-{version}-rc1 +``` + +#### 3.3 编译二进制包 + +> HertzBeat 编译打包,在项目`web-app`目录下执行以下命令, + +```shell +pnpm install + +pnpm package +``` + +> 在项目根目录下执行以下命令 + +```shell +mvn clean package -Prelease +``` + +然后 + +```shell +mvn clean install +``` + +> HertzBeat-Collector 编译打包,在项目根目录下执行以下命令 + +```shell +mvn clean package -pl hertzbeat-collector/hertzbeat-collector-collector -am -Pcluster +``` + +> 使用带 `native-image` 的 GraalVM JDK 25,为当前宿主机构建 Native 采集器安装包 + +```shell +mvn clean package -pl hertzbeat-collector/hertzbeat-collector-collector -am -Pnative -DskipTests +``` + +> 仓库中的 `.github/workflows/collector-native-build.yml` 是 release 辅助工作流,不参与日常 PR 或 push 的常规 CI。 +> +> 之所以只保留手动触发,是因为跨平台 Native 构建耗时更长,也会占用相对稀缺的 Linux ARM、macOS 和 Windows Runner。准备发版时,请在 GitHub Actions 页面选择 `Collector Native Release`,基于 release 分支或 tag 手动触发,然后下载上传的产物用于签名和发布。 + +生成的二进制包在: + +- `dist/apache-hertzbeat-{version}-bin.tar.gz` +- `dist/apache-hertzbeat-collector-{version}-bin.tar.gz` +- `dist/apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz` +- `dist/apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz` +- `dist/apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip` +- `dist/apache-hertzbeat-{version}-docker-compose.tar.gz` + +> **构建完成后请逐个启动一次 Native 采集器包再进行签名。** Native 包曾出现过构建成功、启动即崩溃的情况, +> 而签名和上传流程都不会发现这一点。解压后执行 `bin/startup.sh`(Windows 为 `bin\startup.bat`), +> 确认日志出现 `Started Collector` 和 `Registered N collect strategies`,且进程在十几秒后仍然存活。 + +#### 3.4 打包项目源代码 + +> 打包项目源码 + +```shell +# 注意替换版本号 +git archive \ +--format=tar.gz \ +--output="dist/apache-hertzbeat-{version}-src.tar.gz" \ +--prefix=apache-hertzbeat-{version}-src/ \ +release-{version}-rc1 +``` + +生成的代码归档文件在 `dist/apache-hertzbeat-{version}-src.tar.gz` + +### 签名发布物料 + +#### 3.5 对二进制和源码包进行签名 + +将上步骤生成的三个文件包放到`dist`目录下(若无则新建目录),然后对文件包进行签名和SHA512校验和生成。 + +> 其中 `` 是你的 GPG 短密钥 ID,可以通过 `gpg --keyid-format SHORT --list-keys` 查看。 + +```shell +cd dist + +# 签名,已有签名的物料会跳过 +for i in *.tar.gz *.zip; do + [ -e "$i.asc" ] || { echo "sign: $i"; gpg -u --armor --output "$i.asc" --detach-sig "$i"; } +done + +# SHA512 校验和,已有校验和的物料会跳过 +for i in *.tar.gz *.zip; do + [ -e "$i.sha512" ] || { echo "sha512: $i"; sha512sum "$i" > "$i.sha512"; } +done + +# macOS 上若提示 sha512sum 不存在,可通过 brew install coreutils 安装 + +# 完整性自检:每个物料都必须同时有 .asc 和 .sha512 +# 通配符漏掉某类物料时(例如只写 *.tar.gz 会漏掉 Windows 的 .zip),这里会立刻发现 +for i in *.tar.gz *.zip; do + [ -e "$i.asc" ] || echo "缺少签名: $i" + [ -e "$i.sha512" ] || echo "缺少校验和: $i" +done +``` + +> 最终文件列表如下 + +```text +apache-hertzbeat-{version}-src.tar.gz +apache-hertzbeat-{version}-src.tar.gz.asc +apache-hertzbeat-{version}-src.tar.gz.sha512 +apache-hertzbeat-{version}-bin.tar.gz +apache-hertzbeat-{version}-bin.tar.gz.asc +apache-hertzbeat-{version}-bin.tar.gz.sha512 +apache-hertzbeat-{version}-docker-compose.tar.gz +apache-hertzbeat-{version}-docker-compose.tar.gz.asc +apache-hertzbeat-{version}-docker-compose.tar.gz.sha512 +apache-hertzbeat-collector-{version}-bin.tar.gz +apache-hertzbeat-collector-{version}-bin.tar.gz.asc +apache-hertzbeat-collector-{version}-bin.tar.gz.sha512 +apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz +apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz.asc +apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz.sha512 +apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz +apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz.asc +apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz.sha512 +apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip +apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip.asc +apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip.sha512 +``` + +#### 3.6 验证签名 + +```shell +$ cd dist + +# 验证签名 +$ for i in *.tar.gz *.zip; do echo $i; gpg --verify $i.asc $i ; done + +apache-hertzbeat-{version}-bin.tar.gz +gpg: Signature made Sun Sep 13 06:59:54 2026 PDT +gpg: using RSA key C787268D3396367EB3C2242402CA7E2CEF04C474 +gpg: Good signature from "duansg " [ultimate] + +apache-hertzbeat-{version}-docker-bin.tar.gz +gpg: Signature made Sun Sep 13 07:00:39 2026 PDT +gpg: using RSA key C787268D3396367EB3C2242402CA7E2CEF04C474 +gpg: Good signature from "duansg " [ultimate] +apache-hertzbeat-{version}-docker-compose.tar.gz +gpg: Signature made Sun Sep 13 07:00:39 2026 PDT +gpg: using RSA key C787268D3396367EB3C2242402CA7E2CEF04C474 +gpg: Good signature from "duansg " [ultimate] +apache-hertzbeat-{version}-src.tar.gz +gpg: Signature made Sun Sep 13 07:00:39 2026 PDT +gpg: using RSA key C787268D3396367EB3C2242402CA7E2CEF04C474 +gpg: Good signature from "duansg " [ultimate] +apache-hertzbeat-collector-{version}-bin.tar.gz +gpg: Signature made Sun Sep 13 07:00:40 2026 PDT +gpg: using RSA key C787268D3396367EB3C2242402CA7E2CEF04C474 +gpg: Good signature from "duansg " [ultimate] +apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz +gpg: Signature made Sun Sep 13 07:00:41 2026 PDT +gpg: using RSA key C787268D3396367EB3C2242402CA7E2CEF04C474 +gpg: Good signature from "duansg " [ultimate] +apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz +gpg: Signature made Sun Sep 13 07:00:41 2026 PDT +gpg: using RSA key C787268D3396367EB3C2242402CA7E2CEF04C474 +gpg: Good signature from "duansg " [ultimate] +apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip +gpg: Signature made Sun Sep 13 18:42:45 2026 PDT +gpg: using RSA key C787268D3396367EB3C2242402CA7E2CEF04C474 +gpg: Good signature from "duansg " [ultimate] + +# 验证 SHA512 +$ for i in *.tar.gz *.zip; do echo $i; sha512sum --check $i.sha512; done + +apache-hertzbeat-{version}-bin.tar.gz +apache-hertzbeat-{version}-bin.tar.gz: OK +apache-hertzbeat-{version}-docker-bin.tar.gz +apache-hertzbeat-{version}-docker-bin.tar.gz: OK +apache-hertzbeat-{version}-docker-compose.tar.gz +apache-hertzbeat-{version}-docker-compose.tar.gz: OK +apache-hertzbeat-{version}-src.tar.gz +apache-hertzbeat-{version}-src.tar.gz: OK +apache-hertzbeat-collector-{version}-bin.tar.gz +apache-hertzbeat-collector-{version}-bin.tar.gz: OK +apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz +apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz: OK +apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz +apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz: OK +apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip +apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip: OK +``` + +#### 3.7 发布 Apache SVN 仓库中 dev 目录的物料包 + +- 检出仓库 + +```shell +# 检出 Apache SVN 仓库中的 dev/hertzbeat 目录到 Apache HertzBeat™ 项目根目录下的 svn/dev 目录下 +svn co https://dist.apache.org/repos/dist/dev/hertzbeat svn/dev + +# 历史候选版本较多时,可改用空检出,避免下载全部历史物料 +# svn co --depth empty https://dist.apache.org/repos/dist/dev/hertzbeat svn/dev +``` + +- 复制物料包到 SVN 仓库 + +创建一个版本号目录,并以`release_version`-`RC_version`的形式命名。RC_version从1开始,即候选版本从RC1开始。在发布过程中,如果出现导致投票失败的问题,需要进行修正,那么RC版本需要迭代,RC版本号需要+1。例如:为版本 `{version}-RC1` 投票。如果投票顺利通过,那么RC1版本的资料将作为最终版本的资料发布。如果出现问题并需要纠正,那么修正后重新启动投票,下一次的候选版本为 `{version}-RC2`。 + +```shell +mkdir -p svn/dev/{version}-RC1 +cp -f dist/* svn/dev/{version}-RC1 +``` + +- 提交到SVN + +```shell +cd svn/dev + +# 1. 检查svn状态 +svn status + +# 2. 添加到svn +svn add {version}-RC1 + +svn status + +# 3. 提交到svn远端服务器 +svn commit -m "release for HertzBeat {version}-RC1" +``` + +- 检查 Apache SVN 提交结果 + +> 在浏览器中访问 [https://dist.apache.org/repos/dist/dev/hertzbeat/](https://dist.apache.org/repos/dist/dev/hertzbeat/) , 检查是否有新的版本内容 + +## 4. 进入社区投票阶段 + +### 4.1 发送社区投票邮件 + +发送社区投票邮件需要至少三个`+1`,且无`-1`。 + +:::caution 发信前先确认两件事 + +1. **你的公钥已经在 KEYS 文件里**:访问 [https://downloads.apache.org/hertzbeat/KEYS](https://downloads.apache.org/hertzbeat/KEYS) 搜索自己的邮箱,找不到则投票者无法验证签名。KEYS 的添加见 2.4。 +2. **模板里的版本号和 RC 号已全部替换**:下面的模板共有 **5 处**需要改动——邮件标题、正文第一行、Release notes 链接、候选物料链接、Git tag 链接。RC 号递增时(RC1 → RC2)这几处必须同步修改,漏改任何一处都会让投票者困惑。 +::: + +> `Send to`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org)
+> `Title`: `[VOTE] Release Apache HertzBeat {version} rc1`
+> `Body`: + +```text +Hello HertzBeat Community: + +This is a call for vote to release Apache HertzBeat version release-{version}-RC1. + +Apache HertzBeat - a real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities. + +Release notes: +https://github.com/apache/hertzbeat/releases/tag/v{version}-rc1 + +The release candidates: +https://dist.apache.org/repos/dist/dev/hertzbeat/{version}-RC1/ + +Git tag for the release: +https://github.com/apache/hertzbeat/releases/tag/v{version}-rc1 + +The artifacts signed with PGP key [], corresponding to [@apache.org], that can be found in keys file: +https://downloads.apache.org/hertzbeat/KEYS + +The vote will be open for at least 72 hours or until the necessary number of votes are reached. + +Please vote accordingly: + +[ ] +1 approve +[ ] +0 no opinion +[ ] -1 disapprove with the reason + +*Valid check is a requirement for a vote. *Checklist for reference: + +[ ] Download HertzBeat are valid. +[ ] Checksums and PGP signatures are valid. +[ ] Source code distributions have correct names matching the current +release. +[ ] LICENSE and NOTICE files are correct for each HertzBeat repo. +[ ] All files have license headers if necessary. +[ ] No compiled archives bundled in source archive. +[ ] Can compile from source. + +Steps to validate the release,Please refer to: +https://hertzbeat.apache.org/docs/community/how_to_verify_release + +How to Build: +https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-package + +Thanks! +``` + +在72小时后,将统计投票结果,并发送投票结果邮件,如下所示。 + +> `Send to`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org)
+> `Title`: `[RESULT][VOTE] Release Apache HertzBeat {version}-rc1`
+> `Body`: + +```text +Dear HertzBeat community, + +Thanks for your review and vote for "Release Apache HertzBeat {version}-rc1" +I'm happy to announce the vote has passed: +--- +4 binding +1, from: + +- cc + +1 non-binding +1, from: + +- Roc Marshal +--- +no 0 or -1 votes. + +Vote thread: +https://lists.apache.org/thread/t01b2lbtqzyt7j4dsbdp5qjc3gngjsdq +--- +Thank you to everyone who helped us to verify and vote for this release. +--- +Best, + +``` + +邮件内容中的一项是`Vote thread`,在 [https://lists.apache.org/list.html?dev@hertzbeat.apache.org](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) 查看获取 + +## 5. 完成最终发布步骤 + +### 5.1 迁移源代码和二进制包 + +```shell +svn mv https://dist.apache.org/repos/dist/dev/hertzbeat/{version}-RC1 https://dist.apache.org/repos/dist/release/hertzbeat/{version} -m "transfer packages for {version}-RC1" +``` + +### 5.2 添加新版本下载地址到官网 + +[https://github.com/apache/hertzbeat/blob/master/home/docs/download.md](https://github.com/apache/hertzbeat/blob/master/home/docs/download.md) +[https://github.com/apache/hertzbeat/blob/master/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/download.md](https://github.com/apache/hertzbeat/blob/master/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/download.md) + +完成后打开官网地址 [https://hertzbeat.apache.org/docs/download/](https://hertzbeat.apache.org/docs/download/) 查看是否有新版本的下载 + +> 需要注意的是,下载链接可能需要一个小时后才会生效,请注意。 + +### 5.3 Github 生成 Release + +基于 `release-{version}-rc1` 分支修改创建一个名为 `v{version}` 的标签,并将此标签设置为 latest release。 + +:::tip +在原有的 Release 上面修改,无需重新创建 Release。 +::: + +然后输入发版标题和描述 + +- 发版标题: + +```text +v{version} +``` + +- 描述: + +```text +xxx +release note: xxx +``` + +然后点击`Publish release`按钮。 + +然后将 `release-{version}-rc1` 分支重命名为 `release-{version}`。 + +### 5.4 发送新版本公告邮件 + +> `Send to`: [announce@apache.org](mailto:announce@apache.org)
+> `cc`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org)
+> `Title`: `[ANNOUNCE] Apache HertzBeat {version} released`
+> `Body`: + +```text +Hi Community, + +We are glad to announce the release of Apache HertzBeat {version}. +Thanks again for your help. + +Apache HertzBeat (https://hertzbeat.apache.org/) - a real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities. + +Download Link: +https://hertzbeat.apache.org/docs/download/ + +Release Note: +https://github.com/apache/hertzbeat/releases/tag/v{version} + +Website: +https://hertzbeat.apache.org/ + +HertzBeat Resources: +- Issue: https://github.com/apache/hertzbeat/issues +- Mailing list: dev@hertzbeat.apache.org +--- +Apache HertzBeat Team + +Best, + +``` + +该版本的发布顺利结束。 + +--- diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/how-to-verify.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/how-to-verify.md new file mode 100644 index 0000000000..d1cd2c6172 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/how-to-verify.md @@ -0,0 +1,268 @@ +--- +id: how_to_verify_release +title: 版本物料的验证 +sidebar_position: 4 +--- + +## 验证候选版本 + +详细检查列表请参考 ASF 官方的[发布策略](https://www.apache.org/legal/release-policy.html)与[发布检查清单](https://infra.apache.org/release-publishing.html) + +在浏览器中可访问版本内容 [https://dist.apache.org/repos/dist/dev/hertzbeat/](https://dist.apache.org/repos/dist/dev/hertzbeat/) + +### 1. 下载候选版本到本地 + +> 需要依赖gpg工具,如果没有,建议安装gpg2 + +```shell +# 将 {version} 与 RC1 替换为本次投票的版本号和候选版本号,例如 1.9.0 与 RC2 + +# 如果本地有 svn,可以整个目录检出 +svn co https://dist.apache.org/repos/dist/dev/hertzbeat/{version}-RC1/ + +# 或者直接下载单个物料文件 +wget https://dist.apache.org/repos/dist/dev/hertzbeat/{version}-RC1/apache-hertzbeat-{version}-src.tar.gz + +``` + +### 2. 验证上传的版本是否合规 + +> 开始验证环节,验证包含但不局限于以下内容和形式 + +#### 2.1 查看发布包是否完整 + +> 上传到dist的包必须包含源码包,二进制包可选 + +1. 是否包含源码包 +2. 是否包含源码包的签名 +3. 是否包含源码包的sha512 +4. 如果上传了二进制包(含 native 采集器包),则每个包同样检查第 2、3 项 + +> **每一个**物料都必须有对应的 `.asc` 和 `.sha512`,一个都不能少。可以用下面的命令快速核对, +> 有输出就说明有物料缺失: +> +> ```shell +> for i in *.tar.gz *.zip; do +> [ -e "$i.asc" ] || echo "缺少签名: $i" +> [ -e "$i.sha512" ] || echo "缺少校验和: $i" +> done +> ``` + +#### 2.2 检查gpg签名 + +首先导入发布人公钥。从svn仓库导入KEYS到本地环境。(发布版本的人不需要再导入,帮助做验证的人需要导入,用户名填发版人的即可) + +##### 2.2.1 导入公钥 + +```shell +curl https://downloads.apache.org/hertzbeat/KEYS > KEYS # 下载KEYS +gpg --import KEYS # 导入KEYS到本地 +``` + +##### 2.2.2 关于信任公钥 + +:::tip 验证签名并不需要信任公钥 +`gpg --verify` 对未信任的公钥同样会输出 `Good signature`,只是会附带一行提示: + +```text +WARNING: This key is not certified with a trusted signature! +``` + +**这行 WARNING 是正常的,只要出现 `Good signature` 即视为通过。** + +如果你确实想消除这个提示,可以按下面的方式设置信任级别。但请注意,`5 = ultimate` 在 GPG 语义中表示 +“这是我自己的密钥”,把他人的公钥设为 ultimate 会污染本地信任网,一般选择 `4 = fully` 更合适。 +::: + +> 设置此次版本所使用 KEY 的信任级别(可选) + +```shell +$ gpg --edit-key xxxxxxxxxx #此次版本所使用的KEY用户 +gpg (GnuPG) 2.2.21; Copyright (C) 2020 Free Software Foundation, Inc. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Secret key is available. +gpg> trust #信任 +Please decide how far you trust this user to correctly verify other users' keys +(by looking at passports, checking fingerprints from different sources, etc.) + + 1 = I don't know or won't say + 2 = I do NOT trust + 3 = I trust marginally + 4 = I trust fully + 5 = I trust ultimately + m = back to the main menu + +Your decision? 5 #选择5 +Do you really want to set this key to ultimate trust? (y/N) y #选择y + +gpg> + +``` + +##### 2.2.3 检查签名 + +```shell +# 注意同时覆盖 *.zip,Windows 的 native 采集器包是 zip 格式, +# 只写 *.tar.gz 会静默跳过它 +for i in *.tar.gz *.zip; do echo $i; gpg --verify $i.asc $i ; done +``` + +> 核对签名所用的 key 与投票邮件中声明的 PGP key ID 是否一致。只有 `Good signature` 而 key 对不上, +> 并不能说明物料是发布者签的。 + +检查结果 + +> 出现类似以下内容则说明签名正确,关键字:**`Good signature`** + +```shell +apache-hertzbeat-${release_version}-src.tar.gz +gpg: Signature made XXXX +gpg: using RSA key XXXXX +gpg: Good signature from "XXX " +``` + +#### 2.3 检查sha512哈希 + +> 本地计算sha512哈希后,验证是否与dist上的一致,如果上传二进制包,则同样需要检查二进制包的sha512哈希 + +```shell +for i in *.tar.gz *.zip; do echo $i; sha512sum --check "$i.sha512"; done + +# macOS 上如果没有 sha512sum,可用系统自带的 shasum 替代 +# for i in *.tar.gz *.zip; do echo $i; shasum -a 512 -c "$i.sha512"; done +``` + +> 每个物料输出 `OK` 即为通过: +> +> ```text +> apache-hertzbeat-{version}-src.tar.gz: OK +> ``` + +#### 2.4 检查二进制包 + +解压缩 `apache-hertzbeat-${release_version}-bin.tar.gz` + +```shell +tar -xzvf apache-hertzbeat-${release_version}-bin.tar.gz +``` + +进行如下检查: + +- [ ] 存在`LICENSE`和`NOTICE`文件 +- [ ] `NOTICE`文件中的年份正确 +- [ ] 所有文本文件开头都有ASF许可证 +- [ ] 检查第三方依赖许可证: +- [ ] 第三方依赖的许可证兼容 +- [ ] 所有第三方依赖的许可证都在`LICENSE`文件中声名 +- [ ] 如果依赖的是Apache许可证并且存在`NOTICE`文件,那么这些`NOTICE`文件也需要加入到版本的`NOTICE`文件中 +- [ ] ..... + +参考: [https://apache.org/legal/resolved.html](https://apache.org/legal/resolved.html) + +#### 2.5 检查 Native 采集器包 + +Native 采集器包(`apache-hertzbeat-collector-native-{version}-*`)是**预编译的原生可执行文件**, +不适用下面的“源码编译验证”,需要单独检查。 + +```shell +tar -xzf apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz +cd apache-hertzbeat-collector-native-{version}-linux-amd64-bin +MANAGER_HOST=127.0.0.1 ./bin/startup.sh +tail -f logs/startup.log +``` + +进行如下检查: + +- [ ] 存在 `LICENSE`、`NOTICE` 和 `licenses/` 目录 +- [ ] 能够正常启动:日志出现 `Started Collector` 与 `Registered N collect strategies` +- [ ] 启动十几秒后进程仍然存活(**崩溃可能发生在 `Started Collector` 之后**,只看这一行不够) + +:::caution Native 包有硬性运行环境要求 +不满足时的表现是**进程瞬间退出、没有任何日志输出**,很容易被误判为物料损坏。遇到这种情况请先确认环境: + +- **x86 包需要 CPU 支持 AVX2**:Intel Haswell(2013)及以后、AMD Zen(2017)及以后。部分 Atom 血统的低端芯片、 + Apple Silicon 上的 Rosetta 2、旧版 Windows on ARM 模拟均不支持 +- **Linux 包需要 glibc ≥ 2.34**:Ubuntu 22.04+、Debian 12+、RHEL/Rocky 9+ 可用; + Ubuntu 20.04、Debian 11、RHEL 8、CentOS 7 不可用 +- **Windows 包需要** Windows 10 / Server 2016 及以上,并安装 Microsoft Visual C++ 2015-2022 可再发行组件包 + +环境不满足属于已知限制,不应据此投 -1;请在回复中说明你的验证环境。 +::: + +#### 2.6 源码编译验证 + +解压缩 `apache-hertzbeat-${release_version}-src.tar.gz` + +```shell +cd apache-hertzbeat-${release_version}-src +``` + +编译源码: [https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-package](https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-package) + +进行如下检查: + +- [ ] 检查源码包是否包含由于包含不必要文件,致使tar包过于庞大 +- [ ] 存在`LICENSE`和`NOTICE`文件 +- [ ] `NOTICE`文件中的年份正确 +- [ ] 只存在文本文件,不存在二进制文件 +- [ ] 所有文件的开头都有ASF许可证 +- [ ] 能够正确编译 +- [ ] ..... + +参考: [https://apache.org/legal/resolved.html](https://apache.org/legal/resolved.html) + +### 3. 邮件回复 + +如果发起了发布投票,验证后,可以参照此回复示例进行邮件回复 + +:::caution 注意 +回复的邮件一定要带上自己检查了那些项信息,仅仅回复`+1 approve`,是无效的。 + +PMC 在 [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) HertzBeat 的社区投票时,请带上 binding 后缀,表示对 HertzBeat 社区中的投票具有约束性投票,方便统计投票结果。 + +::: + +非PMC成员 + +```text ++1 (non-binding) +I checked: + 1. All download links are valid + 2. Checksums and signatures are OK for all artifacts, including the .zip + 3. LICENSE and NOTICE exist and are correct + 4. Built successfully from source on <你的操作系统和版本> + 5. Native collector package starts and registers its collect strategies + 6. .... +``` + +PMC成员 + +```text ++1 (binding) +I checked: + 1. All download links are valid + 2. Checksums and signatures are OK for all artifacts, including the .zip + 3. LICENSE and NOTICE exist and are correct + 4. Built successfully from source on <你的操作系统和版本> + 5. Native collector package starts and registers its collect strategies + 6. .... +``` + +发现问题时,请给出具体的复现信息,便于发布者定位: + +```text +-1 (binding) + +The <物料名> is missing its .sha512 checksum. + +Checked on: macOS 26 / arm64 +Steps: + 1. svn co https://dist.apache.org/repos/dist/dev/hertzbeat/1.9.0-RC2/ + 2. for i in *.tar.gz *.zip; do [ -e "$i.sha512" ] || echo "missing: $i"; done +Output: + missing: apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip +``` + +--- diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/mailing_lists.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/mailing_lists.md new file mode 100644 index 0000000000..0a2801753b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/mailing_lists.md @@ -0,0 +1,61 @@ +--- +id: 'mailing_lists' +title: '邮件列表' +sidebar_position: 1 +--- + + + +[开发者邮件列表](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) 是社区推荐的沟通和获取最新信息的方式。 + +在您向邮件列表发送任何内容之前,请确保您已经**订阅**了它们。 + +## 用途 + +### 开发者列表 + +- 使用此列表提出您对 HertzBeat 的问题 +- 由 HertzBeat 贡献者用来讨论 HertzBeat 的开发 + +| 列表名称 | 地址 | 订阅 | 退订 | 归档 | +|-----------|--------------------------|-------------------------------------------------|---------------------------------------------------|-------------------------------------------------------------------| +| **开发者列表** | [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) | [订阅](mailto:dev-subscribe@hertzbeat.apache.org) | [退订](mailto:dev-unsubscribe@hertzbeat.apache.org) | [归档](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) | + +### 通知列表 + +- 关于 HertzBeat 代码库的更改的通知,频繁通知 + +| 列表名称 | 地址 | 订阅 | 退订 | 归档 | +|----------|------------------------------------|-----------------------------------------------------------|-------------------------------------------------------------|-----------------------------------------------------------------------------| +| **通知列表** | [notifications@hertzbeat.apache.org](mailto:notifications@hertzbeat.apache.org) | [订阅](mailto:notifications-subscribe@hertzbeat.apache.org) | [退订](mailto:notifications-unsubscribe@hertzbeat.apache.org) | [归档](https://lists.apache.org/list.html?notifications@hertzbeat.apache.org) | + +## 订阅步骤 + +发送订阅邮件即可订阅。步骤如下: + +- 1、**订阅**:点击上表中的 **订阅** 按钮,它将重定向到您的邮件客户端。主题和内容是任意的。 + 之后,您会从 [dev-help@hertzbeat.apache.org](mailto:dev-help@hertzbeat.apache.org) 收到确认邮件(如果没有收到,请确认电子邮件是否被自动分类为垃圾邮件、推广邮件、订阅邮件等)。 +- 2、**确认**:直接回复确认邮件,或点击邮件中的链接快速回复。主题和内容是任意的。 +- 3、**欢迎**:在完成上述步骤后,您会收到一个主题为 WELCOME to [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) 的欢迎邮件,您已成功订阅 Apache HertzBeat 邮件列表。 + +## 发送纯文本邮件 + +在发送邮件列表时,请使用纯文本邮件。 +**不要使用 HTML 邮件**。 +HTML 邮件更有可能被视为垃圾邮件并被拒绝。 +通过不同的邮件客户端,它可能会出现格式错误,并且其他人不容易阅读。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/maturity.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/maturity.md new file mode 100644 index 0000000000..2c54ecac20 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/maturity.md @@ -0,0 +1,88 @@ +--- +id: maturity +title: Maturity +sidebar_position: 0 +--- + +## Maturity Assessment for Apache HertzBeat™ + +The goals of this maturity model are to describe how Apache projects operate in a concise and high-level way, and to provide a basic framework that projects may choose to use to evaluate themselves. + +More details can be found in the [Apache Project Maturity Model](https://community.apache.org/apache-way/apache-project-maturity-model.html). + +## Status of this assessment + +This assessment is evaluated during HertzBeat's Incubating. + +## Maturity model assessment + +The following table is filled according to the [Apache Maturity Model](https://community.apache.org/apache-way/apache-project-maturity-model.html). Mentors and community members are welcome to comment and modify it. + +### CODE + +| **ID** | **Description** | **Status** | +| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **CD10** | The project produces Open Source software for distribution to the public, at no charge. | **YES** The project source code is licensed under the `Apache License 2.0`. | +| **CD20** | Anyone can easily discover and access the project's code.. | **YES** The [official website](https://hertzbeat.apache.org/) includes `GitHub` link which can access the project's repository on GitHub directly. | +| **CD30** | Anyone using standard, widely-available tools, can build the code in a reproducible way. | **YES** Apache HertzBeat provide `how-to-build` document for every component to tell user how to compile on bare metal, such as the [core's](https://hertzbeat.apache.org/docs/community/development). | +| **CD40** | The full history of the project's code is available via a source code control system, in a way that allows anyone to recreate any released version. | **YES** It depends on git, and anyone can view the full history of the project via commit logs. | +| **CD50** | The source code control system establishes the provenance of each line of code in a reliable way, based on strong authentication of the committer. When third parties contribute code, commit messages provide reliable information about the code provenance. | **YES** The project uses GitHub and managed by Apache Infra, it ensuring provenance of each line of code to a committer. And the third-party contributions are accepted in accordance with the contributing guides. | + +### LICENSE + +| **ID** | **Description** | **Status** | +| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **LC10** | The Apache License, version 2.0, covers the released code. | **YES** The [LICENSE](https://github.com/apache/hertzbeat/blob/master/LICENSE) is in GitHub repository. And all source files are with APLv2 header, checked by Github Action. | +| **LC20** | Libraries that are mandatory dependencies of the project's code do not create more restrictions than the Apache License does. | **YES** All dependencies are listed. | +| **LC30** | The libraries mentioned in LC20 are available as Open Source software. | **YES** All dependencies are listed are available as Open Source software | +| **LC40** | Committers are bound by an Individual Contributor Agreement (the "Apache iCLA") that defines which code they may commit and how they need to identify code that is not their own. | **YES** All committers have iCLAs. | +| **LC50** | The project clearly defines and documents the copyright ownership of everything that the project produces. | **YES** And all source files are with APLv2 header, checked by GitHub Action. | + +### Releases + +| **ID** | **Description** | **Status** | +| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **RE10** | Releases consist of source code, distributed using standard and open archive formats that are expected to stay readable in the long term. | **YES** Source release is distributed via [dist.apache.org](https://dist.apache.org/repos/dist/release/incubator/hertzbeat/) and linked from [download page](https://hertzbeat.apache.org/docs/download). | +| **RE20** | The project's PPMC (Project Management Committee, see CS10) approves each software release in order to make the release an act of the Foundation. | **YES** All releases have been voted at [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) and [general@incubator.apache.org](mailto:general@incubator.apache.org), and have at least 3 PPMC member's votes. | +| **RE30** | Releases are signed and/or distributed along with digests that anyone can reliably use to validate the downloaded archives. | **YES** All releases are signed, and the [KEYS](https://dist.apache.org/repos/dist/release/hertzbeat/KEYS) are available. | +| **RE40** | The project can distribute convenience binaries alongside source code, but they are not Apache Releases, they are provided with no guarantee. | **YES** User can easily build binaries from source code, and we do not provide binaries as Apache Releases. | +| **RE50** | The project documents a repeatable release process so that someone new to the project can independently generate the complete set of artifacts required for a release. | **YES** We can follow the [Release guide](https://hertzbeat.apache.org/docs/community/how_to_release) to make a new Apache HertzBeat release, and so far we had 4 different release managers. | + +### Quality + +| **ID** | **Description** | **Status** | +| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **QU10** | The project is open and honest about the quality of its code. Various levels of quality and maturity for various modules are natural and acceptable as long as they are clearly communicated. | **YES** We encourage user to [report issues](https://github.com/apache/hertzbeat/issues). | +| **QU20** | The project puts a very high priority on producing secure software. | **YES** All security reports are actively handled. | +| **QU30** | The project provides a well-documented, secure and private channel to report security issues, along with a documented way of responding to them. | **Yes** The official Github Repo provides a [security doc](https://github.com/apache/hertzbeat/blob/master/SECURITY.md) | +| **QU40** | The project puts a high priority on backwards compatibility and aims to document any incompatible changes and provide tools and documentation to help users transition to new features. | **Yes** We follow semantic versions. As long as it's within one major version, it's backward compatible. And when any breaking changes added, we provide corresponding upgrade guides. | +| **QU50** | The project strives to respond to documented bug reports in a timely manner. | **YES** The project has resolved 743+ issues and 2348+ pull requests so far, with very prompt response. | + +### Community + +| **ID** | **Description** | **Status** | +| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **CO10** | The project has a well-known homepage that points to all the information required to operate according to this maturity model. | **YES** The [official website](https://hertzbeat.apache.org/) includes all information user need to run Apache HertzBeat. | +| **CO20** | The community welcomes contributions from anyone who acts in good faith and in a respectful manner, and who adds value to the project. | **Yes** We provide contributing guides for every component. And we also have a [general contributing guide](https://hertzbeat.apache.org/docs/community/contribution) | +| **CO30** | Contributions include source code, documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. | **YES** All good contributions including code and non-code are welcomed. | +| **CO40** | The community strives to be meritocratic and gives more rights and responsibilities to contributors who, over time, add value to the project. | **YES** The community has elected 3 new PPMC members and 13 new committers so far. | +| **CO50** | The project documents how contributors can earn more rights such as commit access or decision power, and applies these principles consistently. | **YES** The community has clear docs on nominating committers and PPMC members | +| **CO60** | The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects. | **YES** All decisions are made after vote by community members. | +| **CO70** | The project strives to answer user questions in a timely manner. | **YES** We use [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), [GitHub issue](https://github.com/apache/hertzbeat/issues) and [GitHub discussion](https://github.com/apache/hertzbeat/discussions) to do this in a timely manner. | + +### Consensus + +| **ID** | **Description** | **Status** | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |--------------------------------------------------------------------------------------------------------------| +| **CS10** | The project maintains a public list of its contributors who have decision power. The project's PPMC (Project Management Committee) consists of those contributors. | **Yes** See [members](https://hertzbeat.apache.org/team/) with all PPMC members and committers. | +| **CS20** | Decisions require a consensus among PPMC members and are documented on the project's main communications channel. The PPMC takes community opinions into account, but the PPMC has the final word. | **YES** All decisions are made by votes on [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), and with at least 3 +1 votes from PPMC. | +| **CS30** | The project uses documented voting rules to build consensus when discussion is not sufficient. | **YES** The project uses the standard ASF voting rules. | +| **CS40** | In Apache projects, vetoes are only valid for code commits. The person exercising the veto must justify it with a technical explanation, as per the Apache voting rules defined in CS30. | **YES** Apache HertzBeat community has not used the veto power yet except for code commits. | +| **CS50** | All "important" discussions happen asynchronously in written form on the project's main communications channel. Offline, face-to-face or private discussions that affect the project are also documented on that channel. | **YES** All important discussions and conclusions are recorded in written form. | + +### Independence + +| **ID** | **Description** | **Status** | +| -------- | ---------------------------------------------------------------------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **IN10** | The project is independent from any corporate or organizational influence. | **YES** The PPMC members and committer of Apache HertzBeat are from several different companies, and majority of them are NOT From the company that donated this project. | +| **IN20** | Contributors act as themselves, not as representatives of a corporation or organization. | **YES** The contributors act on their own initiative without representing a corporation or organization. | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/new_committer_process.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/new_committer_process.md new file mode 100644 index 0000000000..aa4cb00058 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/new_committer_process.md @@ -0,0 +1,505 @@ +--- +id: 'new_committer_process' +title: '提名新Committer流程' +sidebar_position: 4 +--- + + + +[官方指南](https://community.apache.org/newcommitter.html#new-committer-process) + +## 提名新Committer的流程 + +- 在邮件`private@hertzbeat.apache.org`中发起投票 + + 参见 **Committer投票模板** + +- 关闭投票 + + 参见 **关闭投票模板** + +- 如果结果是赞成,邀请新的Committer + + 参见 **Committer邀请模板** + +- 如果同意,那么:接受Committer + + 参见 **Committer接受模板** + +- 新Committer签署CLA,等待CLA的接收记录 + +- 请求创建Committer账户 + + 参见 **Committer账户创建模板** + + - 等待root告诉我们已经完成 + - [Roster](https://whimsy.apache.org/roster/ppmc/hertzbeat) 添加新的 committer +- Announce New Committer + + 参见 **Announce New Committer Template** + +## 模板 + +请注意,模板中有三个占位符在使用之前应该替换: + +- NEW_COMMITTER_NAME 这须是真实名字,而非 Github 名称或 Id +- NEW_COMMITTER_EMAIL +- NEW_COMMITTER_APACHE_NAME + +### Committer投票模板 + +:::note +NEW_COMMITTER_NAME 这须是真实名字,而非 Github 名称或 Id +::: + +```text +To: private@hertzbeat.apache.org +Subject: [VOTE] New committer: `NEW_COMMITTER_NAME` +``` + +```text +Hi HertzBeat PMC, + +This is a formal vote about inviting `NEW_COMMITTER_NAME` as our community new committer. + +Work list: https://github.com/apache/hertzbeat/commits?author=xxx + +Here is the list of `NEW_COMMITTER_NAME`'s contributions in HertzBeat Community: + +> [27 commits](https://github.com/apache/hertzbeat/commits?author=xxx) +> +> 7,495 ++ 627 -- + +Submitted PR (27 commits) +- [ISSUE #4534] [feature] add new feature in hertzbeat #3445 +- xxx + +Submitted Issues (18 commits) + +- [bug] find some bugs in hertzbeat nodes #6565 +- xxx + +Please vote: + ++1: I support this proposal and will welcome `NEW_COMMITTER_NAME` as a committer. ++0: I don't care. +-1: I object to this proposal and here are my reasons. + +This vote will be open for at least 7 days. + +Best Wishes, +ttt +``` + +注意,投票将在今天一周后结束,即 +[midnight UTC on YYYY-MM-DD](https://www.timeanddate.com/counters/customcounter.html?year=YYYY&month=MM&day=DD) +[Apache投票指南](https://community.apache.org/newcommitter.html) + +### 关闭投票模板 + +```text +To: private@hertzbeat.apache.org +Subject: [RESULT] [VOTE] New committer: `NEW_COMMITTER_NAME` +``` + +```text +Hi HertzBeat PMC, + +The vote has now closed. The results are: + +Binding Votes: + ++1 [TOTAL BINDING +1 VOTES] + 0 [TOTAL BINDING +0/-0 VOTES] +-1 [TOTAL BINDING -1 VOTES] + +The vote is ***successful/not successful*** +``` + +### Committer邀请模板 + +```text +To: NewCommiter@domain.com +Cc: private@hertzbeat.apache.org +Subject: Invitation to become HertzBeat committer: [Candidate Name] + +``` + +```text +Hello [Candidate Name], + +The HertzBeat Project Management Committee (PMC) +hereby offers you committer privileges to the project + +These privileges are offered on the understanding that you'll use them +reasonably and with common sense. We like to work on trust +rather than unnecessary constraints. + +Being a committer enables you to more easily make +changes without needing to go through the patch +submission process. + +Being a committer does not require you to +participate any more than you already do. It does +tend to make one even more committed. You will +probably find that you spend more time here. + +Of course, you can decline and instead remain as a +contributor, participating as you do now. + +This personal invitation is a chance for you to accept or decline in private. +Please let us know in reply to this message whether you accept or decline. +Also, please refrain from sharing that you were invited before the official +announcement by the PMC. + +If you accept, you will need an Apache account (id) with privileges. +Please follow these instructions. + +A. If you already have an ICLA on file: + + 1. If you already have an Apache account, let us know your id and we +will grant you privileges on the project repositories. + + 2. If you have previously sent an ICLA, let us know the email address +and public name used on the ICLA and your preferred Apache id, and +we will request your account. + + 3. If the email address on the previously submitted ICLA is no longer +valid, let us know the email address and public name used on the new ICLA, +and your preferred Apache id. Continue to step B below and file your new ICLA. + +Look to see if your preferred ID is already taken at +https://people.apache.org/committer-index.html + +B. If there is not already an ICLA on file, you need to submit an ICLA: + + 1. Details of the ICLA and the forms are found + through this link: https://www.apache.org/licenses/#clas + + 2. Instructions for its completion and return to + the Secretary of the ASF are found at + https://www.apache.org/licenses/contributor-agreements.html#submitting + + Do not copy the project or any other individual on your message + to Secretary, as the form contains Personally Identifiable Information + that should be kept private. + + 3. When you complete the ICLA form, be sure to include in the form + the Apache HertzBeat project and choose a + unique Apache ID. Look to see if your preferred + ID is already taken at + https://people.apache.org/committer-index.html + This will allow the Secretary to notify the PMC + when your ICLA has been recorded. + +When recording of your ICLA is noted, you will +receive a follow-up message with the next steps for +establishing you as a committer. + +``` + +### Committer接受模板 + +```text +To: `NEW_COMMITTER_EMAIL` +Cc: private@hertzbeat.apache.org +Subject: Re: invitation to become HertzBeat committer +``` + +```text +Welcome. Here are the next steps in becoming a project committer. After that +we will make an announcement to the dev@hertzbeat.apache.org list. + +You need to send a Contributor License Agreement to the ASF. +Normally you would send an Individual CLA. If you also make +contributions done in work time or using work resources, +see the Corporate CLA. Ask us if you have any issues. +https://www.apache.org/licenses/#clas. + +You need to choose a preferred ASF user name and alternatives. +In order to ensure it is available you can view a list of taken IDs at +https://people.apache.org/committer-index.html + +Please notify us when you have submitted the CLA and by what means +you did so. This will enable us to monitor its progress. + +We will arrange for your Apache user account when the CLA has +been recorded. + +After that is done, please make followup replies to the dev@hertzbeat.apache.org list. +We generally discuss everything there and keep the +private@hertzbeat.apache.org list for occasional matters which must be private. + +The developer section of the website describes roles within the ASF and provides other +resources: + https://www.apache.org/foundation/how-it-works.html + https://www.apache.org/dev/ + +The incubator also has some useful information for new committers +in incubating projects: + https://incubator.apache.org/guides/committer.html + https://incubator.apache.org/guides/ppmc.html + +Just as before you became a committer, participation in any ASF community +requires adherence to the ASF Code of Conduct: + https://www.apache.org/foundation/policies/conduct.html + +Yours, +The Apache HertzBeat PMC +``` + +### Announce New Committer Template + +```text +To: dev@hertzbeat.apache.org, `NEW_COMMITTER_EMAIL` +Subject: [ANNOUNCE] New committer: `NEW_COMMITTER_NAME` +``` + +```text +Hello Community, + +The Podling Project Management Committee (PMC) for Apache HertzBeat +has invited `NEW_COMMITTER_NAME` to become a committer and we are pleased to +announce that he has accepted. + +`NEW_COMMITTER_NAME` is active in the Apache HertzBeat community, hope to see your +further interactions with the community! +Thanks for your contributions. + +Best Wishes! +``` + +## 详细步骤 + +### 接受邀请 + +当通过PMC内部投票后,PMC会向您索要个人邮箱,之后您会收到一封邮件,邮件会指引您进行下一步操作,内容为: + +```text +Hello xxxx, + +The HertzBeat Project Management Committee (PMC) +hereby offers you committer privileges to the project. +These privileges are offered on the understanding that +you'll use them reasonably and with common sense. +We like to work on trust rather than unnecessary constraints. + +Being a committer enables you to more easily make +changes without needing to go through the patch +submission process. + +Being a committer does not require you to +participate any more than you already do. It does +tend to make one even more committed. You will +probably find that you spend more time here. + +Of course, you can decline and instead remain as a +contributor, participating as you do now. + +A. This personal invitation is a chance for you to +accept or decline in private. Either way, please +let us know in reply to the private@hertzbeat.apache.org +address only. + +B. If you accept, the next step is to register an iCLA: + 1. Details of the iCLA and the forms are found + through this link: https://www.apache.org/licenses/#clas + + 2. Instructions for its completion and return to + the Secretary of the ASF are found at + https://www.apache.org/licenses/#submitting + + 3. When you transmit the completed iCLA, request + to notify the Apache HertzBeat and choose a + unique Apache ID. Look to see if your preferred + ID is already taken at + https://people.apache.org/committer-index.html + This will allow the Secretary to notify the PMC + when your iCLA has been recorded. + +When recording of your iCLA is noted, you will +receive a follow-up message with the next steps for +establishing you as a committer. +``` + +如果您接受邀请,请回复该邮件,记住要**回复全部**,回复内容为: + +```text +hi, i accept. Thanks for invitaion. +``` + +随后您会收到一封邮件,里面描述这如何具体步骤,也可以根据我们的文档继续进行操作。 + +### ICLA签署流程 + +接受邀请后,会收到邮件,邮件会指引签署iCLA。 + +1. 下载iCLA申请表 + + 打开访问:[https://www.apache.org/licenses/#clas](https://www.apache.org/licenses/#clas) + + 找到`CLAs`点击进入页面 + + ![HertzBeat](/img/docs/community/clas-web.png) + + 找到`ICLA(个人贡献者许可协议)`,点击[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) + + ![HertzBeat](/img/docs/community/icla-web.png) + + 跳转后,会显示需要签署的协议,这里可以在网页上直接填写,也可以下载后填写。 + + ![HertzBeat](/img/docs/community/icla-pdf.png) + +2. 填写iCLA + + > tips: 签名时需要手写签名,其他的可以直接填写后打印。 + + 需要填写的内容: + + ![HertzBeat](/img/docs/community/icla-content-1.png) + ![HertzBeat](/img/docs/community/icla-content-2.png) + + 在PDF中需要填写的字段: + + - `Full name` + - `Public name` + - `Postal Address` + - `Country` + - `E-Mail` + - `(optional) preferred Apache id(s)` + - `(optional) notify project` + - `Date` + + > 填写样例 + > ![HertzBeat](/img/docs/community/icla-content-3.png) + > ![HertzBeat](/img/docs/community/icla-content-4.png) + +3. 打印并签署 + + ![HertzBeat](/img/docs/community/icla-content-5.png) + + `Please sign`字段需要将文件打印出来然后手写签名,内容为自己姓名的全拼。 + +4. 将签名后的文件拍照或扫描转为PDF,并重命名为`姓名拼音-icla.pdf` + +5. 发送邮件到指定邮箱 + + 邮件发送到`secretary@apache.org`,抄送到`private@hertzbeat.apache.org`。 + + 注意⚠️此邮件内容需要附加上之前的 committer 邀请邮件信息, 建议在之前的往来邮件点击回复然后修改标题和收件人等。 + + **发送模板** + + 主题:`Accept to become a HertzBeat committer` + + 正文: + + ```text + Hello Apache, + I am willing contribute to the ASF. The attachment is my ICLA information. My Github account is : https://github.com/xxxx. + Thanks ! + ``` + + 大概1-5个工作日你就会收到一封来自`root@apache.org`的邮件。 + + 当您收到邮件标题为:`Welcome to the Apache Software Foundation`的邮件,恭喜你,你已经获取到Apache ID了! + +### 设置Apache密码 + +在网站 [https://id.apache.org/reset/enter](https://id.apache.org/reset/enter) 输入您的Apache ID + +![HertzBeat](/img/docs/community/account-1.png) + +点击`Send Email`后会提示发送成功。 + +在您提供给PMC的邮箱中会收到一封来自`root@apache.org`重置密码的邮件,标题为`Password reset request for xxx from Apache ID`,在邮件正文中会有重置密码的链接,我们点击链接设置密码。 + +### 将Apache账号和GitHub账号关联 + +访问: [https://whimsy.apache.org/roster/committer/`APACHE_ID`](https://whimsy.apache.org/roster/committer/`APACHE_ID`) + +- ``APACHE_ID``替换成你的Apache ID + +登录后可以看到这个内容`Link GitHub username to ASF id`,点击跳转 + +![HertzBeat](/img/docs/community/account-2.png) + +输入您的Apache的账号和密码并登录 + +![HertzBeat](/img/docs/community/account-3.png) + +点击 `Authenticate with GitHub` + +![HertzBeat](/img/docs/community/account-4.png) + +点击`Authorize apache`授权给Apache + +![HertzBeat](/img/docs/community/account-5.png) + +点击`Send GitHub Invitation!` 发送GitHub邀请邮件 + +![HertzBeat](/img/docs/community/account-6.png) + +邮箱中会收到一封邮件,点击`Join @apache` + +> 这里邮箱指的是您提供给PMC的那个邮箱地址 + +![HertzBeat](/img/docs/community/account-7.png) + +点击`Join The Apache Software Foundation`,加入GitHub加入Apache组织,会自动跳转到GitHub页面 + +![HertzBeat](/img/docs/community/account-8.png) +![HertzBeat](/img/docs/community/account-9.png) + +回到Apache页面,提示GitHub启用多重身份认证,在GitHub页面启用双重身份认证 + +> GitHub双重身份认证介绍,[点击跳转官方文档](https://docs.github.com/zh/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication) + +![HertzBeat](/img/docs/community/account-10.png) + +启动完成之后等几分钟,提示已经绑定完成 + +![HertzBeat](/img/docs/community/account-11.png) + +至此您的GitHub账号与Apache账号就绑定完成了。 + +最后一步,联系PMC主席开启svn和其他访问权限。 + +## 邮箱绑定 + +### GMail邮箱绑定 + +邮箱地址:[https://mail.google.com/](https://mail.google.com/) + +进入设置页面,并点击`添加其他电子邮件地址`` + +![HertzBeat](/img/docs/community/email-1.png) + +填写您的apache邮箱,按照指引点击下一步 + +![HertzBeat](/img/docs/community/email-2.png) +![HertzBeat](/img/docs/community/email-3.png) +![HertzBeat](/img/docs/community/email-4.png) + +设置为默认发送邮箱(可选) + +![HertzBeat](/img/docs/community/email-5.png) + +配置完成。 + +最后一步,别忘了订阅[开发者邮箱列表](./mailing_lists.md)。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/new_pmc_member_process.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/new_pmc_member_process.md new file mode 100644 index 0000000000..dd1e638579 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/new_pmc_member_process.md @@ -0,0 +1,309 @@ +--- +id: 'new_pmc_ember_process' +title: '提名新PMC成员流程' +sidebar_position: 5 +--- + + + +这个指南是基于 [apache newcommitter](https://community.apache.org/newcommitter.html#new-committer-process) 的。 + +## 新PMC成员的流程 + +- 在邮件`private@hertzbeat.apache.org`中进行投票 + + 参见 **PMC成员投票模板** + +- 关闭投票 + + 参见 **关闭投票模板** + +- 董事会批准新的PMC成员 + + 参见 **董事会批准新PMC成员** + +- 如果结果是赞成,邀请新的PMC成员 + + 参见 **PMC成员邀请模板** + +- 如果同意,那么:接受PMC成员 + + 参见 **PMC成员接受模板** + +- 通知PMC成员完成 + + 参见 **PMC成员完成模板** + +- 宣布新的PMC成员 + + 参见 **PMC成员公告模板** + +## 模板 + +注意,在使用模板之前,有三个占位符需要被替换 + +- NEW_PMC_NAME +- NEW_PMC_EMAIL +- NEW_PMC_APACHE_NAME + +### PMC成员投票模板 + +```text +To: private@hertzbeat.apache.org +Subject: [VOTE] New PMC member candidate: `NEW_PMC_NAME` +``` + +```text +Hi HertzBeat PMC, + +This is a formal vote about inviting `NEW_PMC_NAME` as our new PMC member. + +${Work list}[1] + +[1] https://github.com/apache/hertzbeat/commits?author=`NEW_PMC_NAME` +``` + +注意,投票将在今天一周后结束,即 +[midnight UTC on YYYY-MM-DD](https://www.timeanddate.com/counters/customcounter.html?year=YYYY&month=MM&day=DD) +[Apache 参考投票指南](https://community.apache.org/newcommitter.html) + +### Close Vote Template + +```text +To: private@hertzbeat.apache.org +Subject: [RESULT] [VOTE] New PMC member: `NEW_PMC_NAME` +``` + +```text +Hi HertzBeat PMC, + +The vote has now closed. The results are: + +Binding Votes: + ++1 [TOTAL BINDING +1 VOTES] + 0 [TOTAL BINDING +0/-0 VOTES] +-1 [TOTAL BINDING -1 VOTES] + +The vote is ***successful/not successful*** +``` + +### Board Approval of new PMC member Template + +```text +To: board@apache.org +Cc: private@``.apache.org +Subject: [NOTICE] `NEW_PMC_NAME` for HertzBeat PMC member +``` + +```text +HertzBeat proposes to invite `NEW_PMC_NAME` to join the PMC. + +The vote result is available here: https://lists.apache.org/... +``` + +[Apache New Pmc Guide](https://www.apache.org/dev/pmc.html#newpmc) + +### PMC成员邀请模板 + +```text +To: `NEW_PMC_EMAIL` +Cc: private@hertzbeat.apache.org +Subject: Invitation to become HertzBeat PMC member: `NEW_PMC_NAME` +``` + +```text +Hello [Candidate Name], + +The HertzBeat Project Management Committee (PMC) +hereby offers you PMC members privileges to the project +These privileges are offered on the understanding that you'll use them +reasonably and with common sense. We like to work on trust +rather than unnecessary constraints. + +Being a PMC member enables you +to guide the direction of the project. + +Being a committer does not require you to +participate any more than you already do. It does +tend to make one even more committed. You will +probably find that you spend more time here. + +Of course, you can decline and instead remain as a +contributor, participating as you do now. + +This personal invitation is a chance for you to accept or decline in private. +Please let us know in reply to this message whether you accept or decline. +Also, please refrain from sharing that you were invited before the official +announcement by the PMC. + +If you accept, you will need an Apache account (id) with privileges. +Please follow these instructions. + +A. If you already have an ICLA on file: + + 1. If you already have an Apache account, let us know your id and we +will grant you privileges on the project repositories. + + 2. If you have previously sent an ICLA, let us know the email address +and public name used on the ICLA and your preferred Apache id, and +we will request your account. + + 3. If the email address on the previously submitted ICLA is no longer +valid, let us know the email address and public name used on the new ICLA, +and your preferred Apache id. Continue to step B below and file your new ICLA. + +Look to see if your preferred ID is already taken at +https://people.apache.org/committer-index.html + +B. If there is not already an ICLA on file, you need to submit an ICLA: + + 1. Details of the ICLA and the forms are found + through this link: https://www.apache.org/licenses/#clas + + 2. Instructions for its completion and return to + the Secretary of the ASF are found at + https://www.apache.org/licenses/contributor-agreements.html#submitting + + Do not copy the project or any other individual on your message + to Secretary, as the form contains Personally Identifiable Information + that should be kept private. + + 3. When you complete the ICLA form, be sure to include in the form + the Apache HertzBeat project and choose a + unique Apache ID. Look to see if your preferred + ID is already taken at + https://people.apache.org/committer-index.html + This will allow the Secretary to notify the PMC + when your ICLA has been recorded. + +When recording of your ICLA is noted, you will +receive a follow-up message with the next steps for +establishing you as a PMC. +``` + +### PMC成员接受模板 + +```text +To: `NEW_PMC_EMAIL` +Cc: private@hertzbeatv.apache.org +Subject: Re: invitation to become HertzBeat PMC member +``` + +```text +Welcome. Here are the next steps in becoming a project PMC. After that +we will make an announcement to the dev@hertzbeat.apache.org list. + +You need to send a Contributor License Agreement to the ASF. +Normally you would send an Individual CLA. If you also make +contributions done in work time or using work resources, +see the Corporate CLA. Ask us if you have any issues. +https://www.apache.org/licenses/#clas. + +You need to choose a preferred ASF user name and alternatives. +In order to ensure it is available you can view a list of taken IDs at +https://people.apache.org/committer-index.html + +Please notify us when you have submitted the CLA and by what means +you did so. This will enable us to monitor its progress. + +We will arrange for your Apache user account when the CLA has +been recorded. + +After that is done, please make followup replies to the dev@hertzbeat.apache.org list. +We generally discuss everything there and keep the +private@hertzbeat.apache.org list for occasional matters which must be private. + +The developer section of the website describes roles within the ASF and provides other +resources: + https://www.apache.org/foundation/how-it-works.html + https://www.apache.org/dev/ + +The incubator also has some useful information for new PMC +in incubating projects: + https://incubator.apache.org/guides/committer.html + https://incubator.apache.org/guides/ppmc.html + +Just as before you became a PMC member, participation in any ASF community +requires adherence to the ASF Code of Conduct: + https://www.apache.org/foundation/policies/conduct.html + +Yours, +The Apache HertzBeat PMC +``` + +### PMC成员完成模板 + +```text +To: private@hertzbeat.apache.org, `NEW_PMC_EMAIL` +Subject: account request: `NEW_PMC_NAME` +``` + +```text +`NEW_PMC_EMAIL`, as you know, the ASF Infrastructure has set up your +committer account with the username '`NEW_PMC_APACHE_NAME`'. + +Please follow the instructions to set up your SSH, +svn password, svn configuration, email forwarding, etc. +https://www.apache.org/dev/#committers + +You have commit access to specific sections of the +ASF repository, as follows: + +The general "committers" at: + https://svn.apache.org/repos/private/committers + +If you have any questions during this phase, then please +see the following resources: + +Apache developer's pages: https://www.apache.org/dev/ +Incubator committer guide: https://incubator.apache.org/guides/committer.html + +Naturally, if you don't understand anything be sure to ask us on the dev@hertzbeat.apache.org mailing list. +Documentation is maintained by volunteers and hence can be out-of-date and incomplete - of course +you can now help fix that. + +A PMC member will announce your election to the dev list soon. +``` + +### PMC成员通知模板 + +```text +To: dev@hertzbeat.apache.org +[ANNOUNCE] New PMC member: `NEW_PMC_NAME` +``` + +```text +Hi HertzBeat Community, + +The Podling Project Management Committee (PMC) for Apache HertzBeat +has invited `NEW_PMC_NAME` to become our PMC member and +we are pleased to announce that he has accepted. + +### add specific details here ### + +Please join me in congratulating `NEW_PMC_NAME`! + +Being a committer enables easier contribution to the +project since there is no need to go via the patch +submission process. This should enable better productivity. +A PMC member helps manage and guide the direction of the project. + +Thanks, +On behalf of the Apache HertzBeat PMC +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/submit-code.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/submit-code.md new file mode 100644 index 0000000000..ab649c94ea --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/community/submit-code.md @@ -0,0 +1,72 @@ +--- +id: 'submit_code' +title: '提交代码' +sidebar_position: 2 +--- + + +* 首先从远程仓库 [https://github.com/apache/hertzbeat.git](https://github.com/apache/hertzbeat.git) 将代码的一份副本 fork 到您自己的仓库 + +* 远程仓库开发合并分支:`master` + +* 将您fork仓库clone到您的本地设备 + + ```shell + git clone git@github.com:<您的账户名>/hertzbeat.git + ``` + +* 添加远程仓库地址,命名为 upstream + + ```shell + git remote add upstream git@github.com:apache/hertzbeat.git + ``` + +* 查看仓库 + + ```shell + git remote -v + ``` + + > 此时会有两个仓库:origin(您自己的仓库)和 upstream(远程仓库) + +* 获取/更新远程仓库代码 + + ```shell + git fetch upstream + ``` + +* 将远程仓库代码同步到本地仓库 + + ```shell + git checkout origin/master + git merge --no-ff upstream/master + ``` + +* **⚠️注意一定要新建分支开发特性 `git checkout -b feature-xxx`,不建议使用master分支直接开发** +* 在本地修改代码后,提交到自己的仓库: + **注意提交信息为英文,不包含特殊字符** + + ```shell + git commit -m '[docs]necessary instructions' + git push + ``` + +* 将更改提交到远程仓库后,您可以在您的仓库页面上看到一个绿色的按钮“Compare & pull request”,点击它。 +* 这会弹出新建 Pull Request 页面,您需要这里仔细填写信息(英文),描述和代码同样重要,然后点击“Create pull request”按钮。 +* 然后社区的 Committers 将进行 CodeReview,并与您讨论一些细节(包括设计、实现、性能等),之后您可以根据建议直接在这个分支更新代码(无需新建PR)。当社区 Committer approve之后,提交将被合并到 master 分支。 +* 最后,恭喜您,您已经成为 HertzBeat 的官方贡献者,您会被加在贡献者墙上,您可以联系社区获取贡献者证书! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/download.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/download.md new file mode 100644 index 0000000000..8c03c02951 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/download.md @@ -0,0 +1,132 @@ +--- +id: download +title: 下载 Apache HertzBeat - 最新版本 +sidebar_label: 下载 +description: Apache HertzBeat 监控系统下载 - 服务器、采集器、源码和 Docker Compose 包,包含签名和校验和。 +--- + +## 如何下载 HertzBeat? + +下载最新 Apache HertzBeat™ 发布版(v1.9.0)的服务器二进制、采集器二进制、源码或 Docker Compose 包。所有发布版都包含 GPG 签名和 SHA512 校验和用于验证。 + +**最新版本:** v1.9.0(发布日期:2026年9月17日) + +**快速下载:** + +- [服务器二进制](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-bin.tar.gz) +- [采集器二进制](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-1.9.0-bin.tar.gz) +- [源码](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-src.tar.gz) + +## 下载包类型 + +| 包类型 | 大小 | 用途 | 平台 | +|--------|------|------|------| +| **服务器二进制** | ~364MB | 主监控服务器 | Linux、macOS、Windows | +| **采集器二进制** | ~163MB | 分布式采集器 | Linux、macOS、Windows | +| **Native 采集器** | ~77MB | 分布式采集器,无需 JVM | linux-amd64、linux-arm64、windows-amd64 | +| **源码** | ~3MB | 从源码构建 | 任何支持 Java 25+ 的平台 | +| **Docker Compose** | ~45KB | 全栈部署 | Docker 环境 | + +:::tip Native 采集器推荐 +如果你不需要 `ext-lib` 外部 JDBC 驱动,可以优先选择 Native 采集器安装包,通常启动更快、内存更省。MySQL、MariaDB、OceanBase 在没有提供 `mysql-connector-j` 时也属于这条 Native 友好路径;TiDB 的 SQL 查询指标也遵循同样规则。 + +它的代价是安装包按平台区分,且不支持运行时 `ext-lib` JDBC 加载。详见 [Native 采集器指南](start/native-collector)。 +::: + +:::tip 安全验证 +使用 GPG 签名和 SHA512 校验和验证下载。参见 [Apache 验证指南](https://www.apache.org/dyn/closer.cgi#verify) 和 [HertzBeat KEYS](https://downloads.apache.org/hertzbeat/KEYS)。 +::: + +## 最新版本(推荐) + +:::tip 安全公告 +以前版本可能包含安全漏洞。请始终使用最新版本。 +::: + +| 版本 | 日期 | 下载 | Release | +|--------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------| +| v1.9.0 | 2026.09.17 | [apache-hertzbeat-1.9.0-bin.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-bin.tar.gz) (Server) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-bin.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-bin.tar.gz.sha512) )
[apache-hertzbeat-collector-1.9.0-bin.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-1.9.0-bin.tar.gz) (Collector) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-1.9.0-bin.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-1.9.0-bin.tar.gz.sha512) )
[apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz) (Native Collector linux-amd64) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz.sha512) )
[apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz) (Native Collector linux-arm64) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz.sha512) )
[apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip) (Native Collector windows-amd64) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip.sha512) )
[apache-hertzbeat-1.9.0-src.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-src.tar.gz) (Source Code) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-src.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-src.tar.gz.sha512) )
[apache-hertzbeat-1.9.0-docker-compose.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-docker-compose.tar.gz) (Docker Compose) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-docker-compose.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-docker-compose.tar.gz.sha512) ) | [note](https://github.com/apache/hertzbeat/releases/tag/v1.9.0) | + +## Docker 镜像版本 + +> Apache HertzBeat™ 为每个版本制作了 Docker 镜像. 你可以从 [Docker Hub](https://hub.docker.com/r/apache/hertzbeat) 拉取使用. + +- HertzBeat [https://hub.docker.com/r/apache/hertzbeat](https://hub.docker.com/r/apache/hertzbeat) +- HertzBeat Collector [https://hub.docker.com/r/apache/hertzbeat-collector](https://hub.docker.com/r/apache/hertzbeat-collector) + +## 归档版本 + +在这里查看所有历史已归档版本:[archive](https://archive.apache.org/dist/incubator/hertzbeat/). + +## 下载常见问题 + +### 应该下载哪个包? + +**服务器二进制** - 大多数用户使用。包含主 HertzBeat 监控服务器和 Web UI。 + +**采集器二进制** - 分布式部署使用。在远程网络部署采集器向主服务器上报。 +Native 采集器下载包按目标平台区分,例如 `apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz` 或 `apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip`。 + +如果你正在 JVM 采集器和 Native 采集器之间做选择,建议先阅读 [Native 采集器指南](start/native-collector)。 + +**源码** - 开发者想要构建、修改或贡献 HertzBeat 时使用。 + +**Docker Compose** - 快速全栈部署,包含数据库和时间序列存储。 + +### 如何验证下载? + +1. 下载 GPG 签名(.asc)和校验和(.sha512)文件 +2. 验证签名:`gpg --verify apache-hertzbeat-*.tar.gz.asc apache-hertzbeat-*.tar.gz` +3. 验证校验和:`sha512sum -c apache-hertzbeat-*.tar.gz.sha512` + +首先导入 Apache HertzBeat KEYS:`wget https://downloads.apache.org/hertzbeat/KEYS && gpg --import KEYS` + +### 系统要求是什么? + +**服务器二进制要求:** + +- Java 25 或更高版本 +- 4GB RAM 最低(推荐 8GB) +- 2 CPU 核心 最低 +- 20GB 磁盘空间 + +**采集器二进制要求:** + +- Java 25 或更高版本 +- 2GB RAM 最低 +- 1 CPU 核心 最低 +- 5GB 磁盘空间 + +Native 采集器安装包会按目标平台分别发布,JVM 采集器安装包仍然保持跨平台。 + +### 可以用 Docker 代替二进制包吗? + +可以。Docker 是推荐的安装方法: + +```bash +docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat +``` + +### 如何解压和运行二进制? + +```bash +tar -xzf apache-hertzbeat-1.9.0-bin.tar.gz +cd apache-hertzbeat-1.9.0 +./bin/startup.sh +``` + +访问 Web UI:`http://localhost:1157`, 凭据:admin/hertzbeat + +### 版本之间有什么区别? + +每个版本包含错误修复、安全补丁和新功能。下载表中的发布说明链接详细说明了具体变更。 + +**始终使用最新版本**以确保安全性和稳定性。 + +### 在哪里可以找到旧版本? + +以前版本归档在 [https://archive.apache.org/dist/incubator/hertzbeat/](https://archive.apache.org/dist/incubator/hertzbeat/) + +### 新版本多久发布一次? + +HertzBeat 遵循定期发布计划,新版本大约每 2-3 个月发布一次。安全补丁可能更频繁发布。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/activemq.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/activemq.md new file mode 100644 index 0000000000..1ff09a41fe --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/activemq.md @@ -0,0 +1,145 @@ +--- +id: activemq +title: 监控 Apache ActiveMQ 消息中间件 +sidebar_label: ActiveMQ消息中间件 +keywords: [开源监控系统, 开源中间件监控, ActiveMQ消息中间件监控] +--- + +> 对 Apache ActiveMQ 消息中间件的运行状态,节点,Topic等相关指标进行监测。 + +**使用协议:JMX** + +## 监控前操作 +> +> 您需要在 ActiveMQ 开启 `JMX` 服务,HertzBeat 使用 JMX 协议对 ActiveMQ 进行指标采集。 + +1. 修改安装目录下的 `conf/activemq.xml` 文件,开启JMX + + > 在 `broker` 标签中添加 `userJmx="true"` 属性 + + ```xml + + + + ``` + +2. 修改安装目录下的 `bin/env` 文件,配置JMX 端口 IP等 + + 将如下原配置信息 + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=`ACTIVEMQ_CONF`/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=`ACTIVEMQ_CONF`/jmx.access" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` + + 更新为如下配置,⚠️注意修改`本机对外IP` + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=`ACTIVEMQ_CONF`/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=`ACTIVEMQ_CONF`/jmx.access" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` + +3. 重启 ACTIVEMQ 服务,在 HertzBeat 添加对应 ActiveMQ 监控即可,参数使用 JMX 配置的 IP 端口。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| JMX端口 | JMX 对外提供的HTTP端口,默认为 11099。 | +| JMX URL | 可选,自定义 JMX URL 连接 | +| 用户名 | 认证时使用的用户名 | +| 密码 | 认证时使用的密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:broker + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|-----------------------------------------------------------------------| +| BrokerName | 无 | The name of the broker. | +| BrokerVersion | 无 | The version of the broker. | +| Uptime | 无 | Uptime of the broker. | +| UptimeMillis | ms | Uptime of the broker in milliseconds. | +| Persistent | 无 | Messages are synchronized to disk. | +| MemoryPercentUsage | % | Percent of memory limit used. | +| StorePercentUsage | % | Percent of store limit used. | +| TempPercentUsage | % | Percent of temp limit used. | +| CurrentConnectionsCount | 无 | Attribute exposed for management | +| TotalConnectionsCount | 无 | Attribute exposed for management | +| TotalEnqueueCount | 无 | Number of messages that have been sent to the broker. | +| TotalDequeueCount | 无 | Number of messages that have been acknowledged on the broker. | +| TotalConsumerCount | 无 | Number of message consumers subscribed to destinations on the broker. | +| TotalProducerCount | 无 | Number of message producers active on destinations on the broker. | +| TotalMessageCount | 无 | Number of unacknowledged messages on the broker. | +| AverageMessageSize | 无 | Average message size on this broker | +| MaxMessageSize | 无 | Max message size on this broker | +| MinMessageSize | 无 | Min message size on this broker | + +#### 指标集合:topic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|-------------------------------------------------------------------------------------------| +| Name | 无 | Name of this destination. | +| MemoryLimit | MB | Memory limit, in bytes, used by undelivered messages before paging to temporary storage. | +| MemoryPercentUsage | 无 | The percentage of the memory limit used | +| ProducerCount | 无 | Number of producers attached to this destination | +| ConsumerCount | 无 | Number of consumers subscribed to this destination. | +| EnqueueCount | 无 | Number of messages that have been sent to the destination. | +| DequeueCount | 无 | Number of messages that has been acknowledged (and removed) from the destination. | +| ForwardCount | 无 | Number of messages that have been forwarded (to a networked broker) from the destination. | +| InFlightCount | 无 | Number of messages that have been dispatched to, but not acknowledged by, consumers. | +| DispatchCount | 无 | Number of messages that has been delivered to consumers, including those not acknowledged | +| ExpiredCount | 无 | Number of messages that have been expired. | +| StoreMessageSize | B | The memory size of all messages in this destination's store. | +| AverageEnqueueTime | ms | Average time a message was held on this destination. | +| MaxEnqueueTime | ms | The longest time a message was held on this destination | +| MinEnqueueTime | ms | The shortest time a message was held on this destination | +| TotalBlockedTime | ms | Total time (ms) messages have been blocked by flow control | +| AverageMessageSize | B | Average message size on this destination | +| MaxMessageSize | B | Max message size on this destination | +| MinMessageSize | B | Min message size on this destination | + +#### 指标集合:memory_pool + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| name | 无 | 指标名称 | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:class_loading + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|----------| +| LoadedClassCount | 个 | 已加载类数量 | +| TotalLoadedClassCount | 个 | 历史已加载类总量 | +| UnloadedClassCount | 个 | 未加载类数量 | + +#### 指标集合:thread + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|-----------| +| TotalStartedThreadCount | 个 | 已经开始的线程数量 | +| ThreadCount | 个 | 线程数 | +| PeakThreadCount | 个 | 未加载类数量 | +| DaemonThreadCount | 个 | 守护进程数 | +| CurrentThreadUserTime | ms | 使用时间 | +| CurrentThreadCpuTime | ms | 使用CPU时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ai_agent.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ai_agent.md new file mode 100644 index 0000000000..9def604995 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ai_agent.md @@ -0,0 +1,357 @@ +--- +id: ai_agent +title: HertzBeat AI 智能助手用户指南 +sidebar_label: HertzBeat AI +keywords: [AI, 聊天, 智能助手, 监控, AI Agent, OpenAI] +--- + +> HertzBeat AI 智能助手是一个智能监控 AI 助手,通过自然语言对话帮助您管理监控器、配置告警并优化基础设施监控。 + +## 概述 + +HertzBeat AI 智能助手功能提供了一个交互式聊天界面,您可以: + +**监控器管理:** + +- 🔍 按状态、类型、主机和标签查询和过滤现有监控器 +- ➕ 为网站、API、数据库和服务添加新的监控器 +- 📊 获取可用监控器类型及其参数的详细信息 +- ⚡ 检查监控器状态并排除监控问题 + +**告警管理:** + +- 🚨 通过综合过滤(类型、状态、搜索)查询活跃告警 +- 📈 获取告警摘要统计和分布 +- 🔔 查看单个和分组告警 +- 📋 分析告警模式和趋势 + +**指标分析:** + +- 📊 检索任何监控器的实时指标数据 +- 📈 访问可自定义时间范围的历史指标 +- 💾 检查仓库存储系统状态 +- 🔍 查询特定指标字段和标签 + +**告警规则管理:** + +- ⚙️ 配置告警规则和阈值 +- 📝 管理不同监控器类型的告警定义 +- 🎯 设置自定义告警条件 + +## 先决条件 + +在使用 AI 智能助手之前,请确保: + +1. **OpenAI 配置**:必须配置有效的 OpenAI API 密钥。可选地,您可以在 `application.yml` 中的 `spring.ai.openai.chat.options.model` 下更改模型(默认为 `gpt-4.1-nano`)。 +2. **数据库连接**:HertzBeat 数据库必须可访问以进行监控器操作 + +## 配置 + +### OpenAI API 密钥设置 + +AI 智能助手使用 OpenAI 的 GPT 模型。您需要通过以下方式配置 OpenAI API 密钥: + +#### 通过 UI 进行数据库配置 + +1. 导航到 AI 智能助手界面 +2. 如果未配置 API 密钥,您将看到配置对话框 +3. 输入您的 OpenAI API 密钥 +4. 点击 **保存配置** + +### 配置优先级 + +- **数据库配置** 优先于 YAML 配置 +- 配置更改立即生效,无需重启 +- 保存前会自动验证无效的 API 密钥 + +## 使用 AI 智能助手 + +### 访问聊天界面 + +1. 在 HertzBeat Web 界面中导航到 **AI 智能助手** 部分 +2. 您将看到 HertzBeat 监控 AI 助手欢迎屏幕 +3. 在聊天输入框中开始输入您的问题 + +### 示例对话 + +#### 添加新监控器 + +```text +您:为我的网站 https://example.com 添加一个新的 HTTP 监控器 +AI 助手:我将帮助您为 https://example.com 添加一个 HTTP 监控器。 +让我使用以下配置创建该监控器: +- 名称:example.com 网站监控器 +- 类型:HTTP +- 主机:example.com +- 端口:443 (HTTPS) +- 路径:/ +- 间隔:60 秒 + +监控器创建成功,ID:12345 +``` + +#### 列出现有监控器 + +```text +您:显示我所有当前的监控器 +AI 助手:以下是您当前的监控器: + +1. **Linux 服务器** (ID: 1001) + - 状态:✅ 在线 + - 主机:192.168.1.100 + - 最后检查:2 分钟前 + +2. **MySQL 数据库** (ID: 1002) + - 状态:⚠️ 警告 + - 主机:db.example.com + - 最后检查:30 秒前 + +3. **网站监控器** (ID: 1003) + - 状态:✅ 在线 + - 主机:https://example.com + - 最后检查:1 分钟前 + +您想了解任何特定监控器的详细信息吗? +``` + +#### 获取监控器类型信息 + +```text +您:监控 PostgreSQL 数据库需要哪些参数? +AI 助手:要监控 PostgreSQL 数据库,您需要这些参数: + +**必需参数:** +- **主机**:数据库服务器 IP/主机名 +- **端口**:PostgreSQL 端口(默认:5432) +- **数据库**:要连接的数据库名称 +- **用户名**:数据库用户名 +- **密码**:数据库密码 + +**可选参数:** +- **超时**:连接超时(默认:6000ms) +- **查询超时**:SQL 查询超时(默认:3000ms) +- **SSL**:启用 SSL 连接(默认:false) + +您想让我帮助您添加一个 PostgreSQL 监控器吗? +``` + +#### 告警管理 + +```text +您:显示过去 24 小时内的所有严重告警 +AI 助手:以下是过去 24 小时内的严重告警: + +🚨 **活跃告警(3 个触发中)** +1. **高 CPU 使用率** - Linux 服务器 (ID: 1001) + - 状态:🔥 触发中 + - 触发时间:2 小时前 + - 严重程度:严重 + - 消息:CPU 使用率 95% > 阈值 90% + +2. **数据库连接失败** - MySQL 数据库 (ID: 1002) + - 状态:🔥 触发中 + - 触发时间:45 分钟前 + - 严重程度:严重 + - 消息:10 秒后连接超时 + +3. **网站响应时间** - 网站监控器 (ID: 1003) + - 状态:⚠️ 警告 + - 触发时间:15 分钟前 + - 严重程度:警告 + - 消息:响应时间 5.2s > 阈值 3s + +**告警摘要:** +- 总告警数:12 +- 触发中:3(2 个严重,1 个警告) +- 已解决:9 + +您想让我帮助调查任何特定的告警吗? +``` + +#### 指标分析 + +```text +您:显示我的 Linux 服务器过去 6 小时的 CPU 使用率 +AI 助手:以下是您的 Linux 服务器(监控器 ID:1001)过去 6 小时的 CPU 使用率数据: + +📊 **CPU 使用率指标 - 过去 6 小时** + +时间 | 使用率 (%) | 负载平均 | 进程数 +14:00-15:00 | 45.2% | 1.2 | 156 +15:00-16:00 | 67.8% | 2.1 | 178 +16:00-17:00 | 89.4% | 3.8 | 195 +17:00-18:00 | 92.1% | 4.2 | 203 +18:00-19:00 | 94.7% | 4.8 | 210 +19:00-20:00 | 88.3% | 3.5 | 188 + +**分析:** +- 峰值使用率:19:00 时 94.7% +- 平均使用率:79.6% +- 趋势:高使用率持续 3+ 小时 +- 当前状态:下降中(88.3%) + +**实时指标:** +- 当前 CPU:76.2% +- 内存使用率:82.1% +- 磁盘 I/O:正常 + +您想让我检查历史数据进行比较或调查高使用率的原因吗? +``` + +#### 告警规则配置 + +```text +您:当我的网站响应时间超过 5 秒时设置告警规则 +AI 助手:我将帮助您创建网站响应时间监控的告警规则。 + +**告警规则配置:** +- **监控器类型**:HTTP/网站 +- **指标**:响应时间 +- **条件**:大于 5 秒 +- **严重程度**:警告 +- **评估**:每 60 秒检查一次 +- **通知**:邮件 + 仪表板 + +**建议规则:** +```yaml +name: "网站响应时间告警" +condition: "response_time > 5000ms" +severity: "warning" +description: "当网站响应时间超过 5 秒时告警" +evaluation_interval: 60s +for: 2m # 条件持续 2 分钟后告警 +``` + +此规则将: + +1. 每分钟监控响应时间 +2. 如果响应时间 > 5s 持续 2+ 分钟则触发告警 +3. 通过配置的渠道发送通知 +4. 在仪表板中显示警告状态 + +您想让我应用此配置还是修改任何设置? + +``` text + +### 聊天功能 + +#### 消息历史 + +- 所有对话都会自动保存 +- 从侧边栏访问以前的对话 +- 搜索对话历史 +- 导出对话日志 + +#### 实时响应 + +- 流式响应提供即时反馈 +- 输入指示器显示助手正在处理时 +- 如需要可取消正在进行的请求 + +#### 对话管理 + +- 为不同主题创建新对话 +- 重命名对话以便更好地组织 +- 删除旧对话以保持整洁 +注意:对话不会保存在数据库中 + +## 故障排除 + +### 常见问题 + +#### 聊天界面无法加载 + +**症状**:聊天界面无限显示加载旋转器 +**解决方案**: + +1. 检查浏览器控制台中的 JavaScript 错误 +2. 确保与 HertzBeat 服务器的网络连接 + +#### "服务不可用"消息 + +**症状**:聊天显示"HertzBeat AI 监控服务不可用" +**解决方案**: +1. 验证 OpenAI API 密钥配置 +2. 检查应用程序日志中的错误 +3. 确保数据库连接 + +#### 无效 API 密钥错误 + +**症状**:配置对话框显示"无效 API 密钥"错误 +**解决方案**: + +1. 验证您的 OpenAI API 密钥以 `sk-` 开头 +2. 检查 API 密钥是否有足够的积分/配额 +3. 直接使用 OpenAI API 测试 API 密钥 +4. 确保 API 密钥中没有多余的空格 + +#### 监控器创建失败 + +**症状**:AI 建议监控器配置但创建失败 +**解决方案**: + +1. 验证您有创建监控器的权限 +2. 检查是否已存在同名监控器 +3. 确保目标主机/服务可访问 +4. 查看监控器参数验证错误 + +### 调试模式 + +通过设置日志级别为 DEBUG 来启用调试日志: + +```yaml +logging: + level: + org.apache.hertzbeat.ai.agent: DEBUG +``` + +## 最佳实践 + +### 有效的聊天使用 + +1. **具体明确**:"为 api.example.com 端口 8080 添加 HTTP 监控器" vs "添加一个监控器" +2. **提供上下文**:说明您想要生产环境还是测试环境监控器 +3. **询问后续问题**:如需要请求配置详细信息 +4. **使用自然语言**:AI 理解对话式请求 + +### 监控器管理 + +1. **命名约定**:使用描述性的监控器名称 +2. **文档记录**:要求 AI 记录复杂配置 + +### 安全考虑 + +1. **API 密钥安全**:安全存储 OpenAI API 密钥 +2. **访问控制**:限制 AI 聊天访问给授权用户 +3. **数据隐私**:注意聊天日志中的敏感信息 +4. **网络安全**:确保与 OpenAI API 的安全连接 + +## 高级功能 + +### 批量操作 + +```text +您:为我的预发布环境中的所有服务添加 HTTP 监控器: +- api-staging.example.com:8080 +- web-staging.example.com:80 +- admin-staging.example.com:3000 +``` + +## 限制 + +- 需要活跃的互联网连接访问 OpenAI API +- OpenAI API 使用会根据令牌消耗产生费用 +- 复杂的多步骤操作可能需要多次交互 +- 某些高级配置可能需要手动设置 +- 可能会根据 OpenAI 计划应用速率限制 + +## 支持 + +对于 AI 智能助手的问题: + +1. 首先查看此文档 +2. 查看应用程序日志中的错误 +3. 独立测试 OpenAI API 连接 +4. 联系 HertzBeat 支持并提供具体错误消息 + +--- diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/airflow.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/airflow.md new file mode 100644 index 0000000000..9de8401ab8 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/airflow.md @@ -0,0 +1,38 @@ +--- +id: airflow +title: 监控:Apache Airflow监控 +sidebar_label: Apache Airflow +keywords: [开源监控系统, 开源数据库监控, Apache Airflow监控] +--- + +> 对Apache Airflow通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|-----------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://) | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| 端口 | 数据库对外提供的端口,默认为8080 | +| 查询超时时间 | 设置连接未响应的超时时间,单位ms毫秒,默认3000毫秒 | +| HTTPS | 是否启用HTTPS | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:airflow_health + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|------------------| +| metadatabase | 无 | metadatabase健康情况 | +| scheduler | 无 | scheduler健康情况 | +| triggerer | 无 | triggerer健康情况 | + +#### 指标集合:airflow_version + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|---------------| +| value | 无 | Airflow版本 | +| git_version | 无 | Airflow git版本 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_center.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_center.md new file mode 100644 index 0000000000..0da8bcb150 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_center.md @@ -0,0 +1,56 @@ +--- +id: alarm_center +title: 告警中心 +sidebar_label: 告警中心 +keywords: [开源监控系统, 告警中心, 告警管理,告警显示] +--- + +> 告警中心是一个展示平台,用于显示所有经过分组、收敛、抑制、静默等处理的告警,包括由内部系统阈值触发的告警和第三方接入告警。 + +## 告警来源 + +HertzBeat 的告警中心管理来自两个主要来源的告警: + +1. 系统内部阈值触发的告警 + - 当监控指标超过预定义阈值时生成 + - 与系统中配置的监控任务和阈值规则直接相关 + - 可以通过调整监控任务和阈值设置进行控制 +2. 第三方接入告警 + - 通过 API 接口从外部系统接收 + - 支持与其他监控系统或告警平台集成 + - 与内部告警一样经过相同的处理流程 + +## 告警处理机制 + +在显示到告警中心之前,所有告警都会经过几个处理步骤: + +1. 分组 + - 基于来源、类型、日志级别和其他属性(标签)对相关告警进行分类 + - 帮助高效管理大量告警 + - 支持针对不同场景的自定义分组规则 +2. 收敛 + - 减少短时间内发生的多个类似告警产生的干扰 + - 以更简洁的方式呈现收敛后的告警,避免信息冗余 +3. 抑制 + - 处理告警之间的依赖关系 + - 当关键告警触发时,可以抑制相关的次要告警 + - 支持配置定义告警依赖关系的抑制规则 +4. 静默 + - 在特定时间段内暂时屏蔽某些告警 + - 适用于系统维护、已知问题处理等场景 + - 可以基于时间设置静默规则 + +## 告警中心界面 + +![alarm_center](/img/docs/help/alarm-center-1.png) + +告警中心提供了系统所有告警的全面视图: + +1. 告警显示 + - 列出所有告警,包含告警状态、来源、标签和时间等关键信息 + - 提供详细视图功能,显示完整的告警信息和上下文 +2. 搜索功能 + - 帮助快速定位特定告警 + - 支持多种搜索(标签、注解、告警状态等) +3. 告警管理 + - 告警删除:移除不再需要关注的告警 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_group.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_group.md new file mode 100644 index 0000000000..4bdea01d92 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_group.md @@ -0,0 +1,24 @@ +--- +id: alarm_group +title: 分组收敛 +sidebar_label: 分组收敛 +keywords: [ 开源监控系统, 告警收敛, 告警分组 ] +--- + +> 分组收敛支持对指定分组标签的告警进行分组合并,对时间段的相同重复告警去重收敛。 当阈值规则触发告警或外部告警上报后,会进入到分组收敛进行告警分组,告警去重,以避免大量告警消息导致告警风暴。 + +## 分组策略参数配置 + +- 策略名称:唯一标识分组策略的名称 +- 分组标签:告警分组标签,最多支持添加10个标签 + + > 标签来源:监控,阈值规则,外部告警携带的标签 + +- 等待时间:新告警产生后等待时间,在此时间内收到的相同告警将被分组,默认30秒 + + > 当一条新(无法加入已有分组)的告警产生,分组收敛将按照 `等待时间` 等待,在此期间,相同告警或满足分组条件的告警将被分组。直到当前时间与该分组第一条告警产生时间间隔超过 `等待时间`,分组后的告警才被发送到告警抑制模块进行后续处理。 + +- 间隔时间:发送分组告警通知的最小时间间隔,避免告警通知过于频繁,默认5分钟 +- 重复间隔:重复告警的最小通知间隔,对于持续触发的告警,避免重复发送通知,默认4小时 + +**注意**:只有分组后的告警才能使用抑制规则进行告警抑制。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_inhibit.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_inhibit.md new file mode 100644 index 0000000000..b36ab6907b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_inhibit.md @@ -0,0 +1,38 @@ +--- +id: alarm_inhibit +title: 告警抑制 +sidebar_label: 告警抑制 +keywords: [ 开源监控系统, 告警收敛, 告警抑制 ] +--- + +> 告警抑制用于配置告警之间的抑制关系。当某个告警发生时,可以抑制其他告警的产生,可以理解为“重要”告警抑制“不重要”告警的产生,例如一台服务器宕机产生的告警抑制这台服务器上其他服务产生的告警。 + +## 前置条件 + +- 正确配置分组收敛规则 + +## 抑制规则配置 + +- 抑制规则名称: 唯一标识抑制规则的名称; +- 源标签: 当告警包含这些标签时,将会抑制目标告警,支持添加多个标签; + > 识别“重要”告警的标签,告警标签需要包含全部源标签才会抑制被目标标签标记的告警。 +- 目标标签: 匹配这些标签的告警将被抑制; + > 识别“不重要”告警的标签,告警标签需要包含全部目标标签才会被抑制。 +- 相等标签: 判断告警相关性的标签。支持最多10个标签; +- 启用状态: 启用或禁用该抑制规则。 + +## 示例 + +场景: 使用 HertzBeat 监控 两个 Centos 服务器 192.168.1.1 和 192.168.1.2,和部署在两个服务器上的 Redis 服务 Redis-1 和 Redis-2。 +并配置如下阈值规则: + +- 监控 Centos Linux /监控可用性。绑定标签 `server-status:down` +- 监控 Redis数据库 /监控可用性。绑定标签 `redis-status:down` + +如果需要实现当Centos 宕机告警产生后,Redis 告警不再产生,则可以配置如下告警抑制规则: + +- 源标签: `server-status:down` +- 目标标签: `redis-status:down` +- 相等标签: `instancehost` + +当 Centos 192.168.1.1 宕机告警产生时,通知Redis-1 不可用的告警将不再产生。且同时 Centos 192.168.1.2 运行正常且 Redis-2 不可用时,通知 Redis-2 不可用的告警将正常产生。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_silence.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_silence.md new file mode 100644 index 0000000000..9929c6c603 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alarm_silence.md @@ -0,0 +1,29 @@ +--- +id: alarm_silence +title: 告警静默 +sidebar_label: 告警静默 +keywords: [ 开源监控系统, 告警静默 ] +--- + +> 告警静默管理用于您在系统维护期间或夜晚周末不想受到告警打扰时,可以配置系统静默策略,设置指定时间段内屏蔽告警通知。告警静默规则支持一次性时间段或周期性时间段,支持标签匹配和告警级别匹配部分告警。 + +## 一次性时间段静默配置 + +- 策略名称:唯一标识静默策略的名称; +- 应用所有:是否对所有告警启用该静默策略; +- 匹配标签:当 `应用所有` 配置关闭时,可根据匹配标签匹配需要静默的告警; +- 静默类型:选择 `一次性静默` ; +- 静默时段:选择 `一次性静默` 类型后,静默时段设置如下图所示,可自行配置 + ![alarm_silence](/img/docs/help/alert-silence-1.png) +- 启用状态:启用或禁用该静默策略。 + +## 周期性时间段静默配置 + +- 策略名称:唯一标识静默策略的名称; +- 应用所有:是否对所有告警启用该静默策略; +- 匹配标签:当 `应用所有` 配置关闭时,可根据匹配标签匹配需要静默的告警; +- 静默类型:选择 `周期性静默` ; +- 选择日期: 选择 `周期性静默` 类型后,可以配置需要静默的日期; +- 静默时段:选择 `周期性静默` 类型后,静默时段设置如下图所示,可自行配置,比如在周末时间静默 + ![alarm_silence](/img/docs/help/alert-silence-2.png) +- 启用状态:启用或禁用该静默策略。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_console.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_console.md new file mode 100644 index 0000000000..1dc33aec6c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_console.md @@ -0,0 +1,18 @@ +--- +id: alert_console +title: 告警模板中自定义的控制台地址 +sidebar_label: 告警模板登录台地址 +--- + +> 阈值触发后发送告警信息,通过钉钉/企业微信/飞书机器人通知或者使用邮箱通知的时候,告警内容中有登录控制台的详情链接 + +## 自定义设置 + +在我们的启动配置文件application.yml中,找到下面的配置 + +```yml +alerter: + console-url: #这里就是我们的自定义控制台地址 +``` + +默认值是赫兹跳动的官方控制台地址 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_dingtalk.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_dingtalk.md new file mode 100644 index 0000000000..8af9d7b46c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_dingtalk.md @@ -0,0 +1,41 @@ +--- +id: alert_dingtalk +title: 告警钉钉机器人通知 +sidebar_label: 告警钉钉机器人通知 +keywords: [告警钉钉机器人通知, 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过钉钉机器人通知到接收人。 + +## 操作步骤 + +1. **【钉钉桌面客户端】-> 【群设置】-> 【智能群助手】-> 【添加新建机器人-选自定义】-> 【设置机器人名称头像】-> 【注意⚠️设置自定义关键字: HertzBeat】 ->【添加成功后复制其WebHook地址】** + + > 注意⚠️ 新增机器人时需在安全设置块需设置其自定义关键字: HertzBeat ,其它安全设置加签或IP段不填写 + + ![email](/img/docs/help/alert-notice-8.png) + +2. **【保存机器人的WebHook地址access_token值】** + + > 例如: webHook地址:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > 其机器人access_token值为 `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + +3. **【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】** + + ![email](/img/docs/help/alert-notice-9.png) + +4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-4.png) + +### 钉钉机器人通知常见问题 + +1. 钉钉群未收到机器人告警通知 + +> 请排查在告警中心是否已有触发的告警信息 +> 请排查钉钉机器人是否配置了安全自定义关键字:HertzBeat +> 请排查是否配置正确机器人ACCESS_TOKEN,是否已配置告警策略关联 + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_discord.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_discord.md new file mode 100644 index 0000000000..469b9596cb --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_discord.md @@ -0,0 +1,70 @@ +--- +id: alert_discord +title: 告警 Discord 机器人通知 +sidebar_label: 告警 Discord 机器人通知 +keywords: [告警 Discord 机器人通知, 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过 Discord 机器人通知到接收人。 + +## 操作步骤 + +> 部署网络本身需支持科学上网,不支持设置代理 + +### 在 Discord 创建应用, 应用下创建机器人, 获取机器人 Token + +1. 访问 [https://discord.com/developers/applications](https://discord.com/developers/applications) 创建应用 + + ![bot](/img/docs/help/discord-bot-1.png) + +2. 在应用下创建机器人,获取机器人 Token + + ![bot](/img/docs/help/discord-bot-2.png) + + ![bot](/img/docs/help/discord-bot-3.png) + +3. 授权机器人到聊天服务器 + + > 在 OAuth2 菜单下给此机器人授权,`SCOPES` 范围选 `bot`, `BOT PERMISSIONS` 选发送消息 `Send Messages` + + ![bot](/img/docs/help/discord-bot-4.png) + + > 获取到最下方生成的 URL, 浏览器访问此 URL 给机器人正式授权,即设置将机器人加入哪个聊天服务器。 + +4. 查看您的聊天服务器是否已经加入机器人成员 + + ![bot](/img/docs/help/discord-bot-5.png) + +### 开启开发者模式,获取频道 Channel ID + +1. 个人设置 -> 高级设置 -> 开启开发者模式 + + ![bot](/img/docs/help/discord-bot-6.png) + +2. 获取频道 Channel ID + +> 右键选中您想要发送机器人消息的聊天频道,点击 COPY ID 按钮获取 Channel ID + +![bot](/img/docs/help/discord-bot-7.png) + +### 在 HertzBeat 新增告警通知人,通知方式为 Discord Bot + +1. **【告警通知】->【新增接收人】 ->【选择 Discord 机器人通知方式】->【设置机器人Token和ChannelId】-> 【确定】** + + ![email](/img/docs/help/discord-bot-8.png) + +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-policy.png) + +### Discord 机器人通知常见问题 + +1. Discord 未收到机器人告警通知 + +> 请排查在告警中心是否已有触发的告警信息 +> 请排查是否配置正确机器人Token, ChannelId,是否已配置告警策略关联 +> 请排查机器人是否被 Discord聊天服务器正确赋权 + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_email.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_email.md new file mode 100644 index 0000000000..319786cfac --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_email.md @@ -0,0 +1,39 @@ +--- +id: alert_email +title: 告警邮件通知 +sidebar_label: 告警邮件通知 +keywords: [告警邮件通知, 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过邮件通知到接收人。 + +## 操作步骤 + +1. **【告警通知】->【新增接收人】 ->【选择邮件通知方式】** + + ![email](/img/docs/help/alert-notice-1.png) + +2. **【获取验证码】-> 【输入邮箱验证码】-> 【确定】** + ![email](/img/docs/help/alert-notice-2.png) + + ![email](/img/docs/help/alert-notice-3.png) + +3. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-4.png) + +### 邮件通知常见问题 + +1. 自己内网部署的HertzBeat无法接收到邮件通知 + + > HertzBeat需要自己配置邮件服务器,TanCloud无需,请确认是否在application.yml配置了自己的邮件服务器 + +2. 云环境TanCloud无法接收到邮件通知 + + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确邮箱,是否已配置告警策略关联 + > 请查询邮箱的垃圾箱里是否把告警邮件拦截 + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_enterprise_wechat_app.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_enterprise_wechat_app.md new file mode 100644 index 0000000000..7aa783f91c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_enterprise_wechat_app.md @@ -0,0 +1,34 @@ +--- +id: alert_enterprise_wechat_app +title: 企业微信应用告警通知 +sidebar_label: 告警企业微信应用通知 +keywords: [开源告警系统, 开源监控告警系统, 企业微信应用告警通知] +--- + +> 阈值触发后发送告警信息,通过企业微信应用通知到接收人. + +## Operation steps + +1. **【企业微信后台管理】-> 【App管理】-> 【创建一个新的应用】-> 【设置应用信息】->【添加成功后复制应用的AgentId和Secret】** + + ![email](/img/docs/help/alert-wechat-1.jpg) + +2. **【告警通知】->【新增接收人】 ->【选择企业微信应用通知方式】->【设置企业ID,企业应用id和应用的secret 】-> 【确定】** + + ![email](/img/docs/help/alert-wechat-2.jpg) + +3. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人。** + + ![email](/img/docs/help/alert-wechat-3.jpg) + +### 企业微信应用通知常见问题 + +1. 企业微信应用未收到告警通知. + +> 请检查用户是否具有应用程序权限. +> 请检查企业应用程序回调地址设置是否正常. +> 请检查服务器IP是否在企业应用程序白名单上. + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_feishu.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_feishu.md new file mode 100644 index 0000000000..f247dcc663 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_feishu.md @@ -0,0 +1,39 @@ +--- +id: alert_feishu +title: 告警飞书机器人通知 +sidebar_label: 告警飞书机器人通知 +keywords: [告警飞书机器人通知, 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过飞书机器人通知到接收人。 + +## 操作步骤 + +1. **【飞书客户端】-> 【群设置】-> 【群机器人】-> 【添加机器人】 -> 【自定义机器人】 -> 【设置机器人名称头像】-> 【添加成功后复制其WebHook地址】** + +2. **【保存机器人的WebHook地址的KEY值】** + + > 例如: webHook地址:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > + > 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + +3. **【告警通知】->【新增接收人】 ->【选择飞书机器人通知方式】->【设置飞书机器人KEY】-> 【确定】** + +4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-4.png) + +### 飞书机器人通知常见问题 + +1. 飞书群未收到机器人告警通知 + + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确机器人KEY,是否已配置告警策略关联 + +2. 如何在告警通知中@某人 + + > 在新增接收人的表单中,填写 `用户ID` 。如果需要 @所有人,可以在 `用户ID` 字段中填入 `all`。同时支持填写多个用户id,用逗号 `,` 分隔。获取飞书用户id的具体方法,请参考:[获取飞书用户ID](https://open.feishu.cn/document/faq/trouble-shooting/how-to-get-internal-user-id) + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_feishu_app.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_feishu_app.md new file mode 100644 index 0000000000..5bf22797b8 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_feishu_app.md @@ -0,0 +1,75 @@ +--- +id: alert_feishu_app +title: 告警飞书自建应用通知 +sidebar_label: 告警飞书自建应用通知 +keywords: [告警飞书自建应用通知 , 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过飞书自建应用通知到接收人。 + +## 操作步骤 + +1. **【[飞书开放平台](https://open.feishu.cn/)】->【创建企业自建应用】->【创建】->【添加应用能力:机器人】** + +2. **【开发配置】->【权限配置】:不同的通知对象类型所需要的API权限不同,可按需开通** + + | 权限名称 | 权限代码 | 指定用户 | 指定群聊 | 指定部门 | 所有用户 | + |------------------------|-----------------------------------|:----:|:----:|:----:|:----:| + | 获取用户 user ID | contact:user.employee_id:readonly | ✓ | | | ✓ | + | 以应用的身份发消息 | im:message:send_as_bot | ✓ | ✓ | ✓ | ✓ | + | 获取飞书人事(标准版)应用中的员工花名册信息 | ehr:employee:readonly | | | | ✓ | + | 给一个或多个部门的成员批量发消息 | im:message:send_multi_depts | | | ✓ | | + | 给多个用户批量发消息 | im:message:send_multi_users | | | | ✓ | + + > 注意⚠️:在指定群聊的通知类型中,应用需作为机器人添加进群聊里,若要@某人需要开通`获取用户 user ID`权限 + > + > 批量导入权限 + > + > ```json + > { + > "scopes": { + > "tenant": [ + > "contact:user.employee_id:readonly", + > "im:message:send_as_bot", + > "ehr:employee:readonly", + > "im:message:send_multi_depts", + > "im:message:send_multi_users" + > ], + > "user": [] + > } + > } + > ``` + +3. **【应用发布】->【版本发布与管理】->【创建版本】->【保存】->【发布】** + +4. **【基础信息】->【凭证与基础信息】->【复制保存App ID和App Secret】** + +5. **【告警通知】->【新增接收人】 ->【选择飞书自建应用通知方式】->【设置应用ID、应用secret】-> 【选择通知对象类型】-> 【设置对应的ID】** + +6. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-4.png) + +### 飞书自建应用通知常见问题 + +1. 飞书未收到告警通知 + + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确App ID和App Secret,是否已配置告警策略关联 + > 请排查应用发布时该用户是否在可用范围内 + +2. 如何在指定群聊中@某人 + + > 在新增接收人的表单中,填写 `用户ID` 。如果需要 @所有人,可以在 `用户ID` 字段中填入 `all`。同时支持填写多个用户id,用逗号 `,` 分隔。获取飞书用户id的具体方法,请参考:[如何获取用户的 User ID](https://open.feishu.cn/document/faq/trouble-shooting/how-to-obtain-user-id#529e21a9) + +3. 如何获取群聊ID + + 请参考:[群ID获取方式](https://open.feishu.cn/document/server-docs/group/chat/chat-id-description#394516c9) + +4. 如何获取部门ID + + 请参考:[部门资源介绍](https://open.feishu.cn/document/server-docs/contact-v3/department/field-overview#9c02ed7a) + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_integration.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_integration.md new file mode 100644 index 0000000000..8b85275f68 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_integration.md @@ -0,0 +1,32 @@ +--- +id: alert_integration +title: 告警集成 +sidebar_label: 告警集成 +keywords: [开源监控, 告警集成, 告警管理, 多源告警] +--- + +> HertzBeat 的告警集成模块旨在实现对来自不同第三方监控与可观测性平台的告警进行统一接收、标准化处理与智能分发。作为一个集中式“告警中心”,HertzBeat 能够高效地接入外部系统的告警信息,并执行灵活的告警管理策略。 + +## 核心能力 + +- **多源告警接入**:支持从 Webhook、Prometheus、Alertmanager、SkyWalking、腾讯云等主流平台接收告警消息 +- **告警格式标准化**:将来自不同平台的告警数据转换为 HertzBeat 内部统一格式,便于后续处理 +- **丰富的告警处理机制**,包括: + - **分组收敛**:根据标签对告警进行分组管理,对时间段的相同重复告警去重收敛 + - **抑制**:在满足特定条件时自动屏蔽次要告警 + - **静默**:在系统维护或已知异常期间临时关闭告警通知,避免干扰 + +### 已支持的告警来源 + +HertzBeat 当前已支持以下第三方监控平台的告警接入: + +- **Webhook**:通用接入方式,支持自定义告警格式推送。 +- **Prometheus**:可以在 Prometheus Server 的 Alertmanager 配置中直接配置 HertzBeat 的服务地址,使用 HertzBeat 替换 Alertmanager 直接来接收处理 Prometheus Server 的告警信息。 +- **Alertmanager**:支持将 Prometheus AlertManager 的告警发送到 HertzBeat 告警平台。 +- **SkyWalking**:将 SkyWalking 的告警通过 Webhook 方式发送到 HertzBeat 告警平台。 +- **腾讯云监控**:将腾讯云的告警通过 Webhook 方式发送到 HertzBeat 告警平台。 +- **更多**:HertzBeat 正在积极扩展其集成支持。如果暂时没有找到你需要的集成,活跃的社区也可以协助你添加。 + +你可以通过 HertzBeat 的“集成接入”界面查看具体的接入方式和配置示例。 + +![integration](/img/docs/help/alert_integration_cn.png) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_notification_template.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_notification_template.md new file mode 100644 index 0000000000..242342256e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_notification_template.md @@ -0,0 +1,124 @@ +--- +id: alert_notification_template +title: 通知模板 +sidebar_label: 通知模板 +keywords: [模板, 告警模板, 通知模板,消息通知, 告警 Webhook 回调通知] +--- + +> HertzBeat 支持自定义通知模板,模板采用占位符变量进行渲染,系统会在推送时自动将变量替换为实际告警数据。 + +## 模板配置 + +【消息通知】->【通知模板】->【模板配置】 + +![模板管理](/img/docs/help/alert-notification-template-1.png) + +## 模板渲染 + +HertzBeat 通知模板基于 FreeMarker 语法,支持变量占位符、条件判断、循环、格式化等高级用法。模板渲染时,系统会将告警数据对象(如 GroupAlert、SingleAlert)注入模板,变量会被自动替换为实际值。 + +## 可用变量与数据结构 + +### GroupAlert 结构体字段 + +[GroupAlert定义](https://github.com/apache/hertzbeat/blob/master/hertzbeat-common-spring/src/main/java/org/apache/hertzbeat/common/entity/alerter/GroupAlert.java) + +- `id`:告警分组主键 +- `groupKey`:分组唯一标识 +- `status`:分组状态(如 firing、resolved) +- `groupLabels`:分组标签(Map) +- `commonLabels`:公共标签(Map) +- `commonAnnotations`:公共注解(Map) +- `alertFingerprints`:告警指纹列表 +- `creator`、`modifier`、`gmtCreate`、`gmtUpdate`:元数据 +- `alerts`:告警明细列表(`List`) + +### SingleAlert 结构体字段 + +[SingleAlert定义](https://github.com/apache/hertzbeat/blob/master/hertzbeat-common-spring/src/main/java/org/apache/hertzbeat/common/entity/alerter/SingleAlert.java) + +- `id`:明细主键 +- `fingerprint`:唯一指纹 +- `labels`:标签(Map) +- `annotations`:注解(Map) +- `content`:告警内容 +- `status`:状态(firing|resolved) +- `triggerTimes`:触发次数 +- `startAt`、`activeAt`、`endAt`:时间戳 +- `creator`、`modifier`、`gmtCreate`、`gmtUpdate`:元数据 + +## 模板变量与语法说明 + +- **全局变量**: + - ``status``:告警状态(如告警、恢复等) + - ``groupKey``:分组唯一标识 + - `${commonLabels.xxx}`、`${commonAnnotations.xxx}`:公共标签和注解,可通过 `xxx` 访问具体字段 + +- **告警明细列表**: + - ``alerts``:告警明细集合,通常配合 `<#list alerts as alert>` 进行遍历 + - `${alert.labels.xxx}`、`${alert.annotations.xxx}`:单条告警的标签和注解 + - `${alert.content}`:告警内容 + - `${alert.triggerTimes}`:触发次数 + - `${alert.startAt}`:首次触发时间 + +- **模板语法支持**: + - 支持 FreeMarker 语法,包括条件判断 `<#if>`、循环 `<#list>`、JSON 字符串化 `?json_string`、时间格式化 `?number_to_datetime`、字符串格式化 `?string('yyyy-MM-dd HH:mm:ss')` 等 + - 可灵活组合变量与模板语法,实现复杂的消息定制 + - 更多语法请参考 [FreeMarker 官方文档](https://freemarker.apache.org/) + +## 模板示例 + +```json +{ + "title": "🔔 HertzBeat Alert Notification", + "status": "${status!"UNKNOWN"}", + "commonLabels": { + <#if commonLabels?? && commonLabels.severity??> + "severity": "${commonLabels.severity?switch("critical", "❤️ Critical", "warning", "💛 Warning", "info", "💚 Info", "Unknown")}"<#if commonLabels.alertname??>, + + <#if commonLabels?? && commonLabels.alertname??> + "alertName": "${commonLabels.alertname}" + + }, + "alerts": [ + <#if alerts?? && alerts?size gt 0> + <#list alerts as alert> + { + "index": ${alert?index + 1}, + "labels": { + <#if alert.labels?? && alert.labels?size gt 0> + <#list alert.labels?keys as key> + "`key`": "${alert.labels[key]?json_string}"<#if key?has_next>, + + + }, + <#if alert.content?? && alert.content != ""> + "content": "${alert.content?json_string}", + + "triggerTimes": ${alert.triggerTimes!0}, + "startAt": "${((alert.startAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}", + <#if alert.activeAt?? && alert.activeAt gt 0> + "activeAt": "${((alert.activeAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}", + + <#if alert.endAt?? && alert.endAt gt 0> + "endAt": "${(alert.endAt?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}"<#if alert.annotations?? && alert.annotations?size gt 0>, + + <#if alert.annotations?? && alert.annotations?size gt 0> + "annotations": { + <#list alert.annotations?keys as key> + "`key`": "${alert.annotations[key]?json_string}"<#if key?has_next>, + + } + + }<#if alert?has_next>, + + + ], + "commonAnnotations": { + <#if commonAnnotations?? && commonAnnotations?size gt 0> + <#list commonAnnotations?keys as key> + "`key`": "${commonAnnotations[key]?json_string}"<#if key?has_next>, + + + } +} diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_slack.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_slack.md new file mode 100644 index 0000000000..f4ef1913fc --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_slack.md @@ -0,0 +1,37 @@ +--- +id: alert_slack +title: 告警 Slack Webhook 通知 +sidebar_label: 告警 Slack Webhook 通知 +keywords: [告警 Slack Webhook 通知, 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过 Slack Webhook 通知到接收人。 + +## 操作步骤 + +> 部署网络本身需支持科学上网,不支持设置代理 + +### 在 Slack 开启 Webhook, 获取 Webhook URL + +参考官网文档 [Sending messages using Incoming Webhooks](https://api.slack.com/messaging/webhooks) + +### 在 HertzBeat 新增告警通知人,通知方式为 Slack Webhook + +1. **【告警通知】->【新增接收人】 ->【选择 Slack Webhook 通知方式】->【设置 Webhook URL】-> 【确定】** + + ![email](/img/docs/help/slack-bot-1.png) + +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-policy.png) + +### Slack 机器人通知常见问题 + +1. Slack 未收到机器人告警通知 + +> 请排查在告警中心是否已有触发的告警信息 +> 请排查是否配置正确 Slack Webhook URL,是否已配置告警策略关联 + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_smn.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_smn.md new file mode 100644 index 0000000000..2c9b4b0b5c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_smn.md @@ -0,0 +1,43 @@ +--- +id: alert_smn +title: 华为云SMN通知 +sidebar_label: 告警华为云SMN通知 +keywords: [ 告警华为云SMN通知, 开源告警系统, 开源监控告警系统 ] +--- + +> 阈值触发后发送告警信息,通过华为云SMN通知到接收人。 + +## 操作步骤 + +1. **按照[华为云SMN官方文档](https://support.huaweicloud.com/qs-smn/smn_json.html)开通SMN服务并配置SMN** + + ![alert-notice-10](/img/docs/help/alert-notice-10.png) + +2. **保存SMN的主题URN** + + ![alert-notice-11](/img/docs/help/alert-notice-11.png) + +3. **按照[华为云签名文档](https://support.huaweicloud.com/devg-apisign/api-sign-provide.html)获取AK、SK和项目ID** + + ![alert-notice-12](/img/docs/help/alert-notice-12.png) + + ![alert-notice-13](/img/docs/help/alert-notice-13.png) + +4. **【告警通知】->【新增接收人】 ->【选择华为云SMN通知方式】->【设置华为云SMN AK、SK等配置】-> 【确定】** + + ![alert-notice-14](/img/docs/help/alert-notice-14.png) + +5. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-4.png) + +### 华为云SMN通知常见问题 + +1. 华为云SMN群未收到告警通知 + +> 请排查在告警中心是否已有触发的告警信息 +> 请排查是否正确配置华为云SMN AK、SK等配置,是否已配置告警策略关联 + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_sms.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_sms.md new file mode 100644 index 0000000000..8ae126e4ab --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_sms.md @@ -0,0 +1,235 @@ +--- +id: alert_sms +title: 告警短信通知 +sidebar_label: 告警短信通知 +keywords: [开源监控系统, 开源告警系统, 开源短信告警通知] +--- + +> 当阈值触发后发送告警信息,通过短信方式通知接收人。 + +## 短信服务配置 + +只有成功配置了您自己的短信服务,监控系统内触发的告警短信才会正常发送。 +hertzbeat有两种方式配置短信服务,一种是直接修改`application.yml`配置文件,另一种是通过hertzbeat前端界面(系统设置 > 消息服务配置)配置。 +> 注意⚠️:两种方式配置的短信服务只能选择一种生效,当两种方式都配置并且开启时,hertzbeat将会优先使用前端界面配置的短信服务。 + +### 腾讯云短信配置 + +在`application.yml`新增/填写如下腾讯平台短信服务器配置(参数需替换为您的短信服务器配置) + +```yaml +alerter: + sms: + enable: true # 是否启用 + type: tencent # 短信服务商类型,支持tencent、 + tencent: # 腾讯云短信配置 + secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY + secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA + app-id: 1435441637 + sign-name: 赫兹跳动 + template-id: 1343434 +``` + +1. 腾讯云短信创建签名(sign-name) + ![image](/img/docs/help/alert-sms-tencent-cloud-signature.png) + +2. 腾讯云短信创建正文模板(template-id) + + ```text + 监控:{1},告警级别:{2}。内容:{3} + ``` + + ![image](/img/docs/help/alert-sms-tencent-cloud-template.png) + +3. 腾讯云短信创建应用(app-id) + ![image](/img/docs/help/alert-sms-tencent-cloud-app.png) + +4. 腾讯云访问管理(secret-id、secret-key) + ![image](/img/docs/help/alert-sms-tencent-cloud-access.png) + +### 阿里云短信配置 + +开通使用阿里云短信服务,您可参考阿里云官方文档:[短信新手操作指引](https://help.aliyun.com/zh/sms/getting-started/get-started-with-sms) + +您可以使用图形化界面配置阿里云短信服务,也可以在`application.yml`中配置阿里云短信服务。 +使用`application.yml`需要新增/填写如下阿里云短信配置(参数需替换为您的短信服务器配置) + +```yaml +alerter: + sms: + enable: true # 启用配置 + type: alibaba # 短信服务商类型,设置为alibaba + alibaba: # 填写阿里云短信配置 + access-key-id: # 您的AccessKey ID + access-key-secret: # 您的AccessKey Secret + sign-name: # 短信签名 + template-code: # 短信模板CODE +``` + +1. 创建阿里云账号并开通短信服务 + - 访问[阿里云短信服务控制台](https://dysms.console.aliyun.com/) + - 开通短信服务 + +2. 创建短信签名(sign-name) + - 登录[短信服务控制台](https://dysms.console.aliyun.com/) + - 选择国内/国际短信服务 + - 进入"签名管理"页面,点击"添加签名" + - 填写签名信息并提交审核 + - 等待签名审核通过 + +3. 创建短信模板(template-code) + - 进入"模板管理"页面 + - 点击"添加模板" + - 创建如下内容的模板(阿里云占位符语法为 `${...}`,且模板必须恰好声明这三个变量——多一个少一个都会报"模板变量与占位符不一致"错误): + + ```text + 监控项:${instance},告警级别:${priority}。内容:${content} + ``` + + - 提交模板等待审核 + +4. 获取访问密钥(access-key-id、access-key-secret) + :::tip + 阿里云官方建议使用 RAM 用户 AccessKey,并进行最小化授权。 + ::: + - 进入[RAM访问控制](https://ram.console.aliyun.com/users)管理RAM用户 + - 创建用户并选择"使用永久 AccessKey 访问" + - 安全保存AccessKey ID和AccessKey Secret + - 为用户授权短信服务权限"AliyunDysmsFullAccess" + +现在您可以把这些信息配置到您的hertzbeat应用中。 + +### uni-sms配置 + +uni-sms是一个聚合短信服务平台,您可以参考[UniSMS合一短信文档](https://unisms.apistd.com/docs/tutorials)进行配置。 + +在`application.yml`新增/填写如下uni-sms短信服务配置(参数需替换为您的短信服务器配置) + +```yaml +alerter: + sms: + enable: true # 启用配置 + type: unisms # 短信服务商类型,设置为unisms + unisms: # 填写uni-sms短信配置 + # auth-mode: simple or hmac + auth-mode: simple + access-key-id: YOUR_ACCESS_KEY_ID + # hmac mode need to fill in access-key-secret + access-key-secret: YOUR_ACCESS_KEY_SECRET + signature: YOUR_SMS_SIGNATURE + template-id: YOUR_TEMPLATE_ID +``` + +1. 注册uni-sms账号 + - 访问[uni-sms官网](https://unisms.apistd.com/) + +2. 创建短信签名(signature) + - 登录[uni-sms控制台](https://unisms.apistd.com/console/) + - 进入"短信报备-签名管理"页面 + - 点击"添加签名" + - 填写签名信息并提交审核 + - 等待签名审核通过 + +3. 创建短信模板(template-id) + - 进入"短信报备-模板管理"页面 + - 点击"添加模板" + - 创建如下格式的模板: + + ```text + 监控项:{instance},告警级别:{priority}。内容:{content} + ``` + + - 提交模板等待审核 + +4. 获取`access-key-id`和`access-key-secret` + - 登录[uni-sms控制台](https://unisms.apistd.com/console/) + - 进入"凭证管理"页面 + - 获取AccessKey ID和AccessKey Secret + - 安全保存AccessKey ID和AccessKey Secret + + :::note + UniSMS 提供以下两种鉴权方式共开发者选择,可在控制台-凭证管理中设置,默认为简易模式。 + - 简易模式 [默认]:此模式仅核验 AccessKey ID,不对请求参数进行验签,方便开发者快速接入。 + - HMAC模式:此模式要求使用 AccessKey Secret 对请求参数进行验签,以加强保障请求的安全与真实性。 + ::: + +### AWS Cloud SMS配置 + +要激活和使用 AWS Cloud SMS 服务,请参考官方 AWS 文档: [SMS Getting Started Guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/what-is-sms-mms.html) + +您可以通过图形界面或 application.yml 文件配置 AWS Cloud SMS 服务。 +要使用 application.yml,请添加/填写以下 AWS Cloud SMS 配置(请用您的 SMS 服务器配置信息替换参数): + +```yaml +alerter: + sms: + enable: true # Whether to enable + type: aws # SMS provider type, supports "aws" + aws: # AWS Cloud SMS configuration + access-key-id: # Your AccessKey ID + access-key-secret: # Your AccessKey Secret + region: # Region Of Your AWS +``` + +1. 创建 AWS 账户 + - 如果您尚未创建 AWS 账户,请访问 [AWS Cloud SMS Console](https://aws.amazon.com/console/)进行注册。 + +2. 获取访问密钥凭据(access-key-id, access-key-secret) + - 进入 AWS IAM(身份与访问管理)控制台。 + - 创建一个具有编程访问权限的 IAM 用户,并附加必要的权限。 + - 获取您的 Access Key ID 和 Secret Access Key(配置时需要)。 + +3. 选择要用于 AWS 终端用户消息传递服务的特定区域 + - 选择支持 AWS 终端用户消息传递(SMS 服务)的区域。 + - 您可以在 这里 查看支持的区域[guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html). + +4. 将 AWS SMS 从沙盒模式移动到生产模式 + - 默认情况下,AWS SMS 以沙盒模式运行,在该模式下,短信仅能发送到已验证的电话号码。 + 要将消息发送到任意号码,您必须将您的账户升级到生产模式。请参考此 指南。 [guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/sandbox.html#sandbox-sms-move-to-production) + +5. 验证目标电话号码(适用于沙盒模式) + - 如果您的账户仍处于沙盒模式,您只能向已验证的电话号码发送短信。要添加已验证的号码,请参考此 [guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/verify-destination-phone-number.html) + - 注意: 您不需要创建 Origination Identity 或 Origination Simulator,只需使用 AWS CLI 添加已验证的电话号码。 + + > 短信模板格式固定如下:“Instance: {}, Priority: {}, Content: {}” + + 现在,您可以在您的 HertzBeat 应用程序中配置这些信息. + +现在您可以把这些信息配置到您的hertzbeat应用中。 + +### smslocal短信配置 + +smslocal是一款面向企业的一体化短信服务平台,具备诸如多种发送方式、强大的安全性以及全天候支持等特性。你可以参考 smslocal 的[开发者文档](https://www.smslocal.com/developer/)来进行配置。 + +在 `application.yml` 中添加/填写以下 smslocal 配置内容(请用你自己的短信服务器配置参数替换相关参数): + +```yaml +alerter: + sms: + enable: true # 是否启用 + type: smslocal # 短信服务提供商类型,设置为smslocal + smslocal: # smslocal配置 + api-key: 在此处填入你的API密钥 +``` + +1. 注册 smslocal 账号 + - 访问 [smslocal官网](https://www.smslocal.com/) + +2. 获取 `api-key` + - 登录 [smslocal API accessKey访问页面](https://secure.smslocal.com/cpaas/pages/profile/settings/api-reference) + - 进入 “API 访问” 页面 + - 点击眼睛图标按钮 + - 复制显示的访问密钥 + - 然后你就可以配置 `application.yml` 文件了 + +现在你可以在你的 HertzBeat 应用程序中配置这些信息。 + +## 操作步骤 + +1. **【告警通知】->【新增接收人】 ->【选择短信通知方式】** + +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【关联刚才设置的接收人】-> 【确认】** + + > **注意⚠️ 新增接收人并不代表就生效能收到告警信息,还需要配置关联的告警通知策略,即指定哪些消息发给哪些接收人。** + +如有问题可通过交流群ISSUE反馈! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_telegram.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_telegram.md new file mode 100644 index 0000000000..41bf3bc9b5 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_telegram.md @@ -0,0 +1,67 @@ +--- +id: alert_telegram +title: 告警 Telegram 机器人通知 +sidebar_label: 告警 Telegram 机器人通知 +keywords: [告警 Telegram 通知, 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过 Telegram 机器人通知到接收人。 + +## 操作步骤 + +> 部署网络本身需支持科学上网,不支持设置代理 + +### 在 Telegram 创建机器人, 获取 Bot Token 和 UserId + +1. 使用 [@BotFather](https://t.me/BotFather) 创建自己的机器人并获取访问令牌`Token` + + ![telegram-bot](/img/docs/help/telegram-bot-1.png) + +2. 获取接收人的 `User ID` + + **使用您要通知的接收人账户给刚创建 Bot 账户随便发送一个信息**, + 访问 ```https://api.telegram.org/bot``/getUpdates``` , **`使用上一步的 Bot Token 替换其中的`**, 响应`Json`数据中第一个`result.message.from.id` 值即为接收人的 `User ID` + + ```json + { + "ok":true, + "result":[ + { + "update_id":632299191, + "message":{ + "from":{ + "id": "User ID" + }, + "chat":{ + }, + "date":1673858065, + "text":"111" + } + } + ] + } + ``` + +3. 记录保存我们获得的 `Token` 和 `User Id` + +### 在 HertzBeat 新增告警通知人,通知方式为 Telegram Bot + +1. **【告警通知】->【新增接收人】 ->【选择 Telegram 机器人通知方式】->【设置机器人Token和UserId】-> 【确定】** + + ![email](/img/docs/help/telegram-bot-2.png) + +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-policy.png) + +### Telegram 机器人通知常见问题 + +1. Telegram 未收到机器人告警通知 + +> 请排查在告警中心是否已有触发的告警信息 +> 请排查是否配置正确机器人Token, UserId,是否已配置告警策略关联 +> UserId 应为消息接收对象的UserId + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_threshold.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_threshold.md new file mode 100644 index 0000000000..050ef5d729 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_threshold.md @@ -0,0 +1,196 @@ +--- +id: alert_threshold +title: 告警阈值规则配置 +sidebar_label: 阈值规则 +--- + +:::tip +告警阈值规则是 `HertzBeat` 的核心功能,用户可以通过阈值规则来配置告警的触发条件。 +阈值规则支持实时阈值和计划阈值,可应用于**监控指标**和**日志数据**两种数据类型。实时阈值可以在监控数据采集时直接触发告警,计划阈值支持 PromQL、SQL 等表达式在指定时间段内计算触发告警。 +支持可视化页面配置或更高灵活性的表达式规则配置,支持配置触发次数,告警级别,通知模板,关联指定监控等。通知模板已支持对象嵌套访问,可以更灵活地展示告警信息。 +::: + +![threshold](/img/docs/help/alert-threshold-1.png) + +## 实时阈值 + +> 实时阈值是指在监控数据采集时直接触发告警,适用于对实时性要求较高的场景。支持监控指标和日志数据两种数据类型。 + +### 创建实时阈值规则 + +> 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 -> 选择实时阈值 -> 选择数据类型(监控指标/日志数据) + +#### 监控指标实时阈值 + +配置阈值,例如: 选择SSL证书指标对象,配置告警表达式-当指标`expired`为`true`触发,即`equals(expired,"true")` , 设置告警级别通知模板信息等。 + +![HertzBeat](/img/docs/start/ssl_5.png) + +配置项说明: + +- **阈值名称**:定义此阈值规则的唯一名称 +- **数据类型**:选择监控指标或日志数据 +- **指标对象**:选择我们需要配置阈值的监控指标对象 例如:网站监控类型下的 -> 响应时间指标 +- **阈值规则**:配置具体指标的告警触发规则,支持图形界面和表达式规则,表达式环境变量和操作符见页面提示。阈值表达式详细帮助见 [阈值表达式帮助](alert_threshold_expr) +- **关联监控**:应用此阈值规则到指定的监控对象(支持直接绑定和标签关联),若未配置,则应用到所有符合此阈值类型规则的监控对象上。 +- **告警级别**:触发阈值的告警级别,从低到高依次为:警告-warning,严重-critical,紧急-emergency +- **触发次数**:设置触发阈值多少次之后才会真正的触发告警 +- **通知模板**:告警触发后发送的通知信息模板,模板环境变量见页面提示,支持对象嵌套访问,例如:`__instancename__` 指标的值为 `responseTime`,大于 50 触发告警,也可以访问对象属性如 `${log.attributes.hostname}` +- **附加标签**:给此阈值规则附加标签,当产生告警时,此标签也会附加到告警上。 +- **附加声明**:给此阈值规则附加声明信息(声明内容支持环境变量),当产生告警时,此声明信息会被渲染并附加到告警上。 +- **启用告警**:此告警阈值配置开启生效或关闭 + +#### 日志数据实时阈值 + +针对日志数据配置实时告警规则,支持对日志内容、属性、资源信息等进行条件判断。 + +例如,当 300s 内收到 60 次错误日志时触发告警。 + +![log_realtime](/img/docs/help/alert-threshold-3.png) + +配置项说明: + +- **阈值名称**:定义此阈值规则的唯一名称 +- **数据类型**:选择日志数据 +- **阈值规则**:配置日志告警触发规则,支持图形界面和表达式规则: + - **图形界面**:可视化配置日志字段条件,支持 `log.level`、`log.message`、`log.attributes.*`、`log.resource.*` 等字段 + - **表达式规则**:使用自定义表达式,支持对象嵌套访问,例如:`equals(log.level,"ERROR")` 或 `contains(log.attributes.hostname,"server-01")` +- **时间窗口**:设置日志聚合的时间窗口,单位为秒,最小60秒。在此时间窗口内的日志会被聚合处理 +- **告警级别**:触发阈值的告警级别,从低到高依次为:警告-warning,严重-critical,紧急-emergency +- **告警模式**:选择告警发送方式: + - **窗口组模式(group)**:将时间窗口内满足条件的所有日志作为一个告警发送 + - **单条模式(individual)**:每条满足条件的日志都单独发送告警 +- **触发次数**:设置在时间窗口内满足条件的日志数量达到多少次后才触发告警 +- **通知模板**:告警触发后发送的通知信息模板,支持对象嵌套访问: + - 基本变量:``__instancename__``、``__alertname__`` 等 + - 日志字段:`${log.level}`、`${log.message}`、`${log.timestamp}` 等 + - 嵌套属性:`${log.attributes.hostname}`、`${log.resource.service.name}` 等 +- **附加标签**:给此阈值规则附加标签,当产生告警时,此标签也会附加到告警上 +- **附加声明**:给此阈值规则附加声明信息(声明内容支持环境变量),当产生告警时,此声明信息会被渲染并附加到告警上 +- **启用告警**:此告警阈值配置开启生效或关闭 + +**阈值告警配置完毕,已经被成功触发的告警信息可以在【告警中心】看到。** +**若需要将告警信息邮件,微信,钉钉飞书通知给相关人员,可以在【消息通知】配置。** + +## 计划阈值 + +> 计划阈值规则是指系统按照设定的周期性时间间隔,执行一次表达式规则(如 PromQL、SQL),以判断指定时间范围内的监控数据或日志数据是否满足告警条件。这类规则适用于需要评估趋势或聚合数据的场景,而不是对单个实时数据点做出立即反应。支持监控指标和日志数据两种数据类型。 + +### 计划阈值表达式语法 + +计划阈值使用基于 ANTLR 语法的专用表达式语言,根据数据类型支持不同的查询语法: + +#### 监控指标表达式语法(PromQL) + +支持 PromQL 风格的查询,具体语法请查询配置的时序数据库官网关于 PromQL 的文档: + +1. **查询表达式**: 引用监控数据 + + ```text + cpu_usage + memory{__field__="field1"} + ``` + +2. **比较表达式**: 将值与阈值进行比较 + + ```text + cpu_usage > 80 + memory_usage >= 90.5 + response_time < 1000 + ``` + +3. **逻辑表达式**: 组合多个条件 + + ```text + cpu_usage > 80 and memory_usage > 70 + disk_usage > 90 or inode_usage > 85 + cpu_usage > 80 unless maintenance_mode == 1 + ``` + +4. **括号表达式**: 控制求值顺序 + + ```text + (cpu_usage > 80 or memory_usage > 90) and service_status == 1 + ``` + +#### 日志数据表达式语法(SQL) + +支持标准 SQL 语法查询日志数据并过滤数据,可以对日志表进行聚合查询: + +```sql +-- 查询错误日志数量 +SELECT COUNT(*) as error_count +FROM hertzbeat_logs +WHERE level = 'ERROR' +AND timestamp >= NOW() - INTERVAL 5 MINUTE + +-- 按服务分组统计错误数 +SELECT service_name, COUNT(*) as error_count +FROM hertzbeat_logs +WHERE level = 'ERROR' +GROUP BY service_name +HAVING COUNT(*) > 10 +``` + +### 创建计划阈值规则 + +> 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 -> 选择计划阈值 -> 选择数据类型(监控指标/日志数据) + +#### 监控指标计划阈值 + +针对监控指标配置计划阈值,例如:针对一组 CPU 指标,设定表达式 `cpu_usage{instance="server1"}` > 80`,当满足该表达式时触发告警。 + +![threshold](/img/docs/help/alert-threshold-2.png) + +配置项说明: + +- **规则名称**:用于唯一标识该阈值规则的名称 +- **数据类型**:选择监控指标 +- **查询语言**:选择 PromQL 作为查询语言 +- **阈值表达式**:用于定义告警条件的 PromQL 表达式,系统会按照"执行周期"定期对其进行评估。表达式支持: + - **查询标识符**: 引用监控指标(如 `cpu_usage`, `memory{instance="server1"}`) + - **比较操作符**: `>`, `>=`, `<`, `<=`, `==`, `!=` + - **逻辑操作符**: `and`, `or`, `unless` + - **括号**: 用于分组和控制求值顺序 + - **数字字面量**: 阈值(如 `80`, `90.5`) +- **执行周期**:表达式的执行时间间隔,单位为秒。例如 `300` 表示每 5 分钟评估一次表达式 +- **告警级别**:设定当触发告警时的日志级别,包括:`warning`(警告)、`critical`(严重)、`emergency`(紧急) +- **触发次数**:表达式连续满足告警条件的次数,超过该次数后才实际触发告警 +- **通知模板**:当告警被触发后发送的通知内容模板,支持对象嵌套访问,页面上提供了可用的模板变量供参考 +- **附加标签**:给此阈值规则附加标签,当产生告警时,此标签也会附加到告警上 +- **附加声明**:给此阈值规则附加声明信息(声明内容支持环境变量),当产生告警时,此声明信息会被渲染并附加到告警上 +- **启用告警**:用于控制该阈值规则是否启用 + +#### 日志数据计划阈值 + +针对日志数据配置计划阈值,通过 SQL 查询对日志进行聚合分析和告警判断。 + +![threshold](/img/docs/help/alert-threshold-4.png) + +配置项说明: + +- **规则名称**:用于唯一标识该阈值规则的名称 +- **数据类型**:选择日志数据 +- **查询语言**:选择 SQL 作为查询语言 +- **日志查询表达式**:使用标准 SQL 语法查询日志数据,支持聚合函数、分组、过滤等操作。例如: + +```sql +SELECT COUNT(*) as error_count FROM hertzbeat_logs +WHERE level = 'ERROR' AND timestamp >= NOW() - INTERVAL 5 MINUTE +``` + +- **执行周期**:SQL 查询的执行时间间隔,单位为秒。例如 `300` 表示每 5 分钟执行一次查询 +- **告警级别**:设定当触发告警时的日志级别,包括:`warning`(警告)、`critical`(严重)、`emergency`(紧急) +- **告警模式**:选择告警发送方式: + - **窗口组模式(group)**:将查询结果作为一个整体告警发送 + - **单条模式(individual)**:查询结果中的每行数据都单独发送告警 +- **触发次数**:查询结果连续满足告警条件的次数,超过该次数后才实际触发告警 +- **通知模板**:当告警被触发后发送的通知内容模板,支持访问查询结果中的字段,例如: + - 查询结果字段:``error_count``、``service_name`` 等 + - 基本变量:``__alertname__``、``__severity__`` 等 +- **附加标签**:给此阈值规则附加标签,当产生告警时,此标签也会附加到告警上 +- **附加声明**:给此阈值规则附加声明信息(声明内容支持环境变量),当产生告警时,此声明信息会被渲染并附加到告警上 +- **启用告警**:用于控制该阈值规则是否启用 + +**阈值规则配置完成后,成功触发的告警将显示在【告警中心】中。** +**如需通过邮件、企业微信、钉钉、飞书等方式发送告警通知,请前往【通知配置】中进行设置。** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_threshold_expr.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_threshold_expr.md new file mode 100644 index 0000000000..1cb9b77deb --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_threshold_expr.md @@ -0,0 +1,67 @@ +--- +id: alert_threshold_expr +title: 阈值触发表达式 +sidebar_label: 阈值触发表达式 +--- + +> 在我们配置阈值告警时,需要配置阈值触发表达式,系统根据表达式和监控指标值计算触发是否告警,这里详细介绍下表达式使用。 + +## 表达式支持的操作符 + +| 运算符(可视化配置) | 运算符(表达式配置) | 支持类型 | 说明 | | +| ------------------ | -------------------- | ----------------------- | ------------------------ | - | +| 等于 | equals(str1,str2) | 字符型 | 判断字符串是否相等 | | +| 不等于 | !equals(str1,str2) | 字符型 | 判断字符串是否不相等 | | +| 包含 | contains(str1,str2) | 字符型 | 判断字符串是否包含 | | +| 不包含 | !contains(str1,str2) | 字符型 | 判断字符串是否不包含 | | +| 匹配 | matches(str1,str2) | 字符型 | 判断字符串正则是否匹配 | | +| 不匹配 | !matches(str1,str2) | 字符型 | 判断字符串正则是否不匹配 | | +| 存在值 | exists(obj) | 字符型、数值型、时间型 | 判断字符是否有值存在 | | +| 不存在值 | !exists(obj) | 字符型 、数值型、时间型 | 判断字符是否有值存在 | | +| > | obj1 > obj2 | 数值型、时间型 | 判断数值是否大于 | | +| `<` | `obj1 < obj2` | 数值型、时间型 | 判断数值是否小于 | | +| >= | obj1 >= obj2 | 数值型、时间型 | 判断数值是否大于等于 | | +| `<=` | `obj1 <= obj2` | 数值型、时间型 | 判断数值是否小于等于 | | +| != | obj1 != obj2 | 数值型、时间型 | 判断数值是否不相等 | | +| == | obj1 == obj2 | 数值型、时间型 | 判断数值是否相等 | | + +### 表达式函数库列表 + +| 支持函数库 | 说明 | +|----------------------------------------------|-----------------------------------| +| condition ? trueExpression : falseExpression | 三元运算符 | +| toDouble(str) | 将字符串转换为Double类型 | +| toBoolean(str) | 将字符串转换为Boolean类型 | +| toInteger(str) | 将字符串转换为Integer类型 | +| array[n] | 取数组第n个元素 | +| * | 算法乘 | +| / | 算法除 | +| % | 求余 | +| ( 和 ) | 括号用于控制运算的优先级,确保在逻辑或数学表达式中某些部分先被计算 | +| + | 加号用于表示数学中的加法运算、字符串拼接 | +| - | 减号用于表示数学中的减法运算 | +| && | 逻辑AND操作符 | +| \|\| | 逻辑OR操作符 | + +#### 支持的环境变量 + +> 环境变量即指标值等支持的变量,用于在表达式中,阈值计算判断时会将变量替换成实际值进行计算 + +非固定环境变量:这些变量会根据我们选择的监控指标对象而动态变化,例如我们选择了**网站监控的响应时间指标**,则环境变量就有 `responseTime - 此为响应时间变量` +如果我们想设置**网站监控的响应时间大于400时**触发告警,则表达式为 `responseTime>400` + +固定环境变量(不常用):`instance : 所属行实例值` +此变量主要用于计算多实例时,比如采集到c盘d盘的`usage`(`usage为非固定环境变量`),我们只想设置**c盘的usage大于80**时告警,则表达式为 `equals(instance,"c")&&usage>80` + +#### 表达式设置案例 + +1. 网站监控->响应时间大于等于400ms时触发告警 + `responseTime>=400` +2. API监控->响应时间大于3000ms时触发告警 + `responseTime>3000` +3. 全站监控->URL(instance)路径为 `https://baidu.com` 的响应时间大于200ms时触发告警 + `equals(instance,"https://baidu.com")&&responseTime>200` +4. MYSQL监控->status指标->threads_running(运行线程数)指标大于7时触发告警 + `threads_running>7` + +若遇到问题可以通过交流群ISSUE交流反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_webhook.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_webhook.md new file mode 100644 index 0000000000..bb487d788d --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_webhook.md @@ -0,0 +1,66 @@ +--- +id: alert_webhook +title: 告警 Webhook 回调通知 +sidebar_label: 告警 Webhook 回调通知 +keywords: [告警 Webhook 回调通知, 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过post请求方式调用WebHook接口通知到接收人。 + +## 操作步骤 + +1. **【告警通知】->【新增接收人】 ->【选择WebHook通知方式】-> 【设置WebHook回调地址】 -> 【确定】** + + ![email](/img/docs/help/alert-notice-5.png) + +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-4.png) + +### WebHook回调POST请求体BODY内容 + +内容格式:JSON + +```json +{ + "alarmId": 76456, + "target": "`target`", + "thresholdId": 33455, + "priority": 0, + "content": "udp_port monitoring availability alert, code is FAIL", + "status": 0, + "times": 1, + "triggerTime": "2022-02-25T13:32:13", + "tags": { + "app": "windows", + "monitorId": "180427708350720", + "metrics": "availability", + "code": "UN_CONNECTABLE", + "thresholdId": "112", + "monitorName": "WINDOWS_192.168.124.12" + } +} +``` + +| | | +|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| alarmId | integer($int64) title: Alarm record entity primary key index ID 告警记录实体主键索引ID | +| target | string title: Alert target object: monitor availability-available metrics-app.metrics.field 告警目标对象: 监控可用性-available 指标-app.metrics.field | +| thresholdId | integer($int64) title: Alarm definition ID associated with the alarm 告警关联的告警定义ID | +| priority | string($byte) title: Alarm level 0: high-emergency-critical alarm-red 1: medium-critical-critical alarm-orange 2: low-warning-warning alarm-yellow 告警级别 0:高-emergency-紧急告警-红色 1:中-critical-严重告警-橙色 2:低-warning-警告告警-黄色 | +| content | string title: The actual content of the alarm notification 告警通知实际内容 | +| status | string($byte) title: Alarm status: 0-normal alarm (to be processed) 1-threshold triggered but not reached the number of alarms 2-recovered alarm 3-processed 告警状态: 0-正常告警(待处理) 1-阈值触发但未达到告警次数 2-恢复告警 3-已处理 | +| times | integer($int32) title: Alarm threshold trigger times 告警阈值触发次数 | +| triggerTime | integer($int64) title: Alarm trigger time (timestamp in milliseconds) 首次告警触发时间(毫秒时间戳) | +| tags | example: `{key1:value1}` | + +### webhook通知常见问题 + +1. WebHook回调未生效 + +> 请查看告警中心是否已经产生此条告警信息 +> 请排查配置的WebHook回调地址是否正确 + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_wework.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_wework.md new file mode 100644 index 0000000000..d282ae3052 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/alert_wework.md @@ -0,0 +1,39 @@ +--- +id: alert_wework +title: 告警企业微信通知 +sidebar_label: 告警企业微信通知 +keywords: [告警企业微信通知, 开源告警系统, 开源监控告警系统] +--- + +> 阈值触发后发送告警信息,通过企业微信机器人通知到接收人。 + +## 操作步骤 + +1. **【企业微信端】-> 【群设置】-> 【群机器人】-> 【添加新建机器人】-> 【设置机器人名称头像】-> 【添加成功后复制其WebHook地址】** + + ![email](/img/docs/help/alert-notice-6.jpg) + +2. **【保存机器人的WebHook地址的KEY值】** + + > 例如: webHook地址:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > + > 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + +3. **【告警通知】->【新增接收人】 ->【选择企业微信机器人通知方式】->【设置企业微信机器人KEY】-> 【确定】** + + ![email](/img/docs/help/alert-notice-7.png) + +4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** + + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + + ![email](/img/docs/help/alert-notice-4.png) + +### 企业微信机器人通知常见问题 + +1. 企业微信群未收到机器人告警通知 + +> 请排查在告警中心是否已有触发的告警信息 +> 请排查是否配置正确机器人KEY,是否已配置告警策略关联 + +其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/almalinux.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/almalinux.md new file mode 100644 index 0000000000..f09caa60a8 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/almalinux.md @@ -0,0 +1,114 @@ +--- +id: almalinux +title: 监控:AlmaLinux操作系统监控 +sidebar_label: AlmaLinux 操作系统 +keywords: [开源监控系统, 开源操作系统监控, AlmaLinux操作系统监控] +--- + +> 对AlmaLinux操作系统的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/api.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/api.md new file mode 100644 index 0000000000..f9f3d79cf9 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/api.md @@ -0,0 +1,36 @@ +--- +id: api +title: 监控:HTTP API +sidebar_label: HTTP API +keywords: [ 开源监控系统, 开源网站监控, HTTP API监控 ] +--- + +> 调用HTTP API接口,查看接口是否可用,对其响应时间等指标进行监测 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------------|-------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 网站对外提供的端口,http一般默认为80,https一般默认为443。 | +| 相对路径 | 网站地址除IP端口外的后缀路径,例如 `www.tancloud.io/console` 网站的相对路径为 `/console`。 | +| 请求方式 | 设置接口调用的请求方式:GET,POST,PUT,DELETE。 | +| 启用HTTPS | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443 | +| 用户名 | 接口Basic认证或Digest认证时使用的用户名 | +| 密码 | 接口Basic认证或Digest认证时使用的密码 | +| 请求Headers | HTTP 请求头 | +| 查询Params | HTTP查询参数,支持[时间表达式](time_expression) | +| Content-Type | 设置携带BODY请求体数据请求时的资源类型 | +| 请求BODY | 设置携带BODY请求体数据,PUT POST请求方式时有效,支持[时间表达式](time_expression) | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:summary + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| responseTime | ms毫秒 | 网站响应时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/apollo.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/apollo.md new file mode 100644 index 0000000000..4e4148b813 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/apollo.md @@ -0,0 +1,57 @@ +--- +id: apollo +title: 监控:Apollo配置中心 +sidebar_label: Apollo配置中心 +keywords: [ 开源监控系统, 开源中间件监控, Apollo配置中心监控 ] +--- + +> 通过调用 Apollo配置中心 Prometheus 接口对 Apollo配置中心服务的通用指标进行采集监控。 + +## 前置条件 + +1. 按照[部署文档](https://www.apolloconfig.com/#/en/deployment/quick-start)搭建好Apollo配置中心。 +2. 访问```http://${someIp:somePort}/prometheus```,查看是否能访问到metrics数据。 + 详情请参考:[Apollo 监控相关](https://www.apolloconfig.com/#/en/design/apollo-design?id=v-monitoring-related) +3. 注意⚠️:从1.5.0版本开始,Apollo服务端支持通过/prometheus暴露prometheus格式的metrics + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 端口 | Pulsar的webServiceProt值,默认为8080。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:基础信息指标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------|------|---------------| +| application_ready_time_seconds | 秒 | 应用从启动到就绪状态的耗时 | +| process_uptime_seconds | 秒 | 进程已运行的总时间 | +| process_cpu_usage | % | 当前进程的CPU使用率 | + +#### 指标集合:jvm + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------------------|------|------------------| +| system_cpu_usage | % | 系统CPU使用率 | +| system_load_average_1m | 无 | 系统最近一分钟平均负载 | +| jvm_memory_committed_bytes | MB | JVM已向操作系统申请的内存大小 | +| jvm_memory_used_bytes | MB | JVM当前实际使用的内存大小 | +| jvm_memory_max_bytes | MB | JVM可使用的最大内存限制 | +| jvm_gc_pause_seconds_count | 无 | JVM GC暂停事件的总次数 | +| jvm_gc_pause_seconds_sum | 无 | JVM GC暂停的总耗时 | +| jvm_memory_usage_after_gc_percent | 无 | JVM GC后的内存使用率 | + +#### 指标集合:系统资源 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------|------|--------------------| +| process_files_max_files | 无 | 允许进程打开的最大文件描述符数量限制 | +| process_files_open_files | 无 | 进程当前已打开的文件描述符数量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/bulletin.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/bulletin.md new file mode 100644 index 0000000000..78e4df2cf7 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/bulletin.md @@ -0,0 +1,48 @@ +--- +id: bulletin +title: 自定义看板 +sidebar_label: 自定义看板 +keywords: [ 看板, 自定义 ] +--- + +> 自定义监控看板,以表格形式展示某种监控的自选指标。 + +## 新增看板项 + +1. 点击工具栏上的`新增`按钮,打开看板创建弹窗。 + +2. 输入`看板名称`,选择`监控类型`,再选择关联的`监控任务名称`。 + + - `监控任务名称`为多选项,可在其搜索框中按**名称、标签键或标签值**进行筛选;每个选项还会以 `键:值` 标签的形式展示其标签。 + +3. 在`监控指标`树中勾选需要展示的指标。树按指标分组,勾选父节点即可一次性选中其下所有字段。 + +4. 点击`确定`按钮,即可完成自定义看板的创建。 + + ![new-bulletin](/img/docs/help/bulletin-1.png) + +## 编辑看板项 + +1. 在标签页中点击某个看板名称,将其设为当前看板。 + +2. 点击工具栏上的`...`(更多)按钮,选择`编辑`。弹窗会自动回填当前看板的名称、监控任务和已选指标。 + + - 编辑时`监控类型`不可修改。如需使用其他监控类型,请新建看板项。 + +3. 按需调整名称、监控任务或指标,然后点击`确定`保存。 + + ![edit-bulletin](/img/docs/help/bulletin-2.png) + +## 查看多个看板 + +1. 每个看板对应一个标签页,点击标签页中的看板名称,即可查看该看板的详细信息。 + + ![dashboard-bulletin](/img/docs/help/bulletin-3.png) + +## 删除看板项 + +1. 选中要删除的看板,点击工具栏上的`...`(更多)按钮,选择`删除看板项`,即可删除当前看板项。 + +2. 在同一个`...`菜单中选择`批量删除看板项`,即可选择并一次性删除多个看板项。 + + ![bulletin](/img/docs/help/bulletin-4.png) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/centos.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/centos.md new file mode 100644 index 0000000000..8292261fd6 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/centos.md @@ -0,0 +1,114 @@ +--- +id: centos +title: 监控:CentOS操作系统监控 +sidebar_label: CentOS 操作系统 +keywords: [开源监控系统, 开源操作系统监控, CentOS操作系统监控] +--- + +> 对CentOS操作系统的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号,默认为22。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/clickhouse.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/clickhouse.md new file mode 100644 index 0000000000..a82133f230 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/clickhouse.md @@ -0,0 +1,95 @@ +--- +id: clickhouse +title: 监控:Clickhouse数据库监控 +sidebar_label: Clickhouse数据库 +keywords: [开源监控系统, 开源数据库监控, Clickhouse数据库监控] +--- + +> 对Clickhouse数据库的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为8123。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:ping 可用性 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| responseTime | 无 | 响应时间 | + +#### 指标集合:system.metrics表的数据 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------|-------|------------------------------| +| Query | 无 | 正在执行的查询的数量 | +| Merge | 无 | 正在执行的后台合并的数量 | +| Move | 无 | 正在执行的后台移动的数量 | +| PartMutation | 无 | 表变更的次数 | +| ReplicatedFetch | 无 | 从副本收集的数据块数量 | +| ReplicatedSend | 无 | 发送到副本的数量块数量 | +| ReplicatedChecks | 无 | 检查一致性的数据块数量 | +| QueryPreempted | 无 | 停止或等待的查询数量 | +| TCPConnection | 无 | TCP连接数量 | +| HTTPConnection | 无 | HTTP连接数量 | +| OpenFileForRead | 无 | 打开的可读文件的数量 | +| OpenFileForWrite | 无 | 打开的可写文件的数量 | +| QueryThread | 无 | 查询处理的线程数量 | +| ReadonlyReplica | 无 | 处于只读状态的 Replicated table 的数量 | +| EphemeralNode | 无 | ZooKeeper 中保存的临时节点数 | +| ZooKeeperWatch | 无 | ZooKeeper事件订阅数 | +| StorageBufferBytes | Bytes | Buffer tables 中的字节数 | +| VersionInteger | 无 | ClickHouse 版本号 | +| RWLockWaitingReaders | 无 | 等待读表的读写锁的线程数量 | +| RWLockWaitingWriters | 无 | 等待写表的读写锁的线程数量 | +| RWLockActiveReaders | 无 | 在一个表的读写锁中持有读锁的线程数 | +| RWLockActiveWriters | 无 | 在一个表的读写锁中持有写锁的线程数 | +| GlobalThread | 无 | 全局线程池中的线程数 | +| GlobalThreadActive | 无 | 全局线程池中活跃的线程数 | +| LocalThread | 无 | 本地线程池中的线程数 | +| LocalThreadActive | 无 | 本地线程池中活跃的线程数 | + +#### 指标集合:system.events表的数据 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------------------|-------|------------------------------------------------------------------------------------------------| +| Query | 无 | 要解释和可能执行的查询数量。 不包括由于 AST 大小限制、配额限制或同时运行的查询数量限制而无法解析或被拒绝的查询。 可能包括 ClickHouse 本身发起的内部查询。 不计算子查询。 | +| SelectQuery | 无 | 可能执行的 Select 查询数 | +| InsertQuery | 无 | 可能执行的 Insert 查询数 | +| InsertedRows | 无 | 被插入到所有表中的行数 | +| InsertedBytes | Bytes | 被插入到所有表中的字节数 | +| FailedQuery | 无 | 执行失败的查询数量 | +| FailedSelectQuery | 无 | 执行失败的 Select 查询数量 | +| FileOpen | 无 | 文件打开数 | +| MergeTreeDataWriterRows | 无 | 写入 MergeTree 表的数据行数 | +| MergeTreeDataWriterCompressedBytes | Bytes | 压缩写入 MergeTree 表的数据字节数 | + +#### 指标集合:system.asynchronous_metrics表的数据 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------------------------|------|----------------------------------| +| AsynchronousMetricsCalculationTimeSpent | 无 | 异步指标计算花费的时间(秒) | +| jemalloc.arenas.all.muzzy_purged | 无 | 被清除的模糊(muzzy)页的数量 | +| jemalloc.arenas.all.dirty_purged | 无 | 被清除的脏 (dirty)页的数量 | +| BlockReadBytes_ram1 | 无 | ram1 块读取的字节数 | +| jemalloc.background_thread.run_intervals | 无 | jemalloc 后台线程的运行间隔数 | +| BlockQueueTime_nbd13 | 无 | nbd13 块队列等待时间 | +| jemalloc.background_thread.num_threads | 无 | jemalloc 后台线程的数量 | +| jemalloc.resident | 无 | jemalloc 分配器占用的物理内存大小(字节) | +| InterserverThreads | 无 | Interserver 线程数 | +| BlockWriteMerges_nbd7 | 无 | nbd7 块写合并数量 | +| MarkCacheBytes | 无 | StorageMergeTree 的 marks 的缓存大小 | +| MarkCacheFiles | 无 | StorageMergeTree 的 marks 的缓存文件数量 | +| MaxPartCountForPartition | 无 | partitions 中最大的活跃数据块的数量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/consul_sd.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/consul_sd.md new file mode 100644 index 0000000000..a673e4a9c8 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/consul_sd.md @@ -0,0 +1,108 @@ +--- +id: consul_sd +title: 监控:Consul服务发现监控 +sidebar_label: Consul服务发现 +keywords: [开源监控系统, 开源服务发现监控, Consul服务发现监控] +--- + +> HertzBeat 集成 Consul 注册中心,自动发现服务实例并为发现的实例创建监控任务。 + +## 概述 + +Consul 服务发现允许 HertzBeat 连接到您的 Consul 服务器并自动发现所有注册的服务实例。当新服务实例注册或现有实例下线时,HertzBeat 将自动创建或删除相应的监控任务,实现微服务环境下的自动化监控。 + +### 监控前操作 + +#### 部署 Consul 服务器 + +1. 根据 [Consul 官方文档](https://developer.hashicorp.com/consul/docs/fundamentals/install)部署 Consul 服务器。 +2. 确保 Consul 服务器可从 HertzBeat 访问。 +3. 验证您可以访问 Consul UI:`http://your-consul-server:8500/ui/` +4. 确保 Consul HTTP API 可访问(默认端口:8500) + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------------|-----------------------------------------------------| +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| Consul Host | Consul 服务器 IP 地址或域名。注意⚠️不带协议头(例如: https://, http://)。示例:`consul-server` 或 `192.168.1.100` | +| Consul 端口 | Consul 服务器对外提供的端口,默认为 8500 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 使用步骤 + +1. **创建服务发现监控** + - 在 HertzBeat Web 界面中,导航到 **监控** → **新增监控** + - 选择监控类型:**Consul服务发现** + - 填写基本配置参数 + +2. **配置监控模板** + - 创建服务发现监控后,需要指定一个监控模板 + - 模板定义了为发现的服务实例创建什么类型的监控 + - 例如:如果发现的实例是 HTTP 服务,可以选择 HTTP 监控模板 + - 常用模板类型:端口、HTTP、HTTPS、Ping 等 + +3. **自动发现** + - HertzBeat 会根据采集间隔定期查询 Consul 服务器 + - 为新注册的服务实例自动创建监控任务 + - 自动删除已下线服务实例的监控任务 + +4. **查看发现的实例** + - 在监控列表中,您可以看到所有自动创建的子监控任务 + - 每个子监控任务对应一个发现的服务实例 + +### 使用示例 + +假设您的 Consul 服务器运行在 `192.168.1.100:8500`,您希望自动监控其中注册的所有服务实例。 + +配置示例: + +- **任务名称**:`Consul-Service-Discovery` +- **Consul Host**:`192.168.1.100` +- **Consul 端口**:`8500` +- **采集间隔**:`60` 秒 +- **监控模板**:选择 `端口` 监控(检测实例可用性) + +配置完成后: + +1. HertzBeat 通过 HTTP API 连接到 Consul 服务器 +2. 获取所有已注册的服务实例 +3. 为每个实例自动创建端口监控(例如:`api-service-192.168.1.101:8080`) +4. 每 60 秒检查一次新注册或下线的服务,并相应地更新监控任务 + +### 注意事项 + +- **网络连通性**:确保 HertzBeat 可以访问 Consul 服务器地址和端口(默认:8500) +- **监控模板**:服务发现仅发现服务实例地址,您需要配置合适的监控模板来实际监控这些实例 +- **采集间隔**:建议最小间隔为 60 秒,避免对 Consul 服务器造成过多请求 +- **ACL 令牌**:如果 Consul 配置了 ACL(访问控制列表),可能需要配置相应的令牌 +- **服务健康状态**:Consul 服务发现会同时发现健康和不健康的实例 +- **数据中心**:默认发现本地数据中心的服务。如果需要发现特定数据中心的服务,可能需要额外配置 +- **实例命名**:自动创建的监控任务命名格式为:`{服务名}-{主机}:{端口}` + +### 采集指标 + +#### 指标集合:监控目标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|-------|---------------| +| 目标 | 无 | 发现的服务实例目标 | +| 主机 | 无 | 服务实例主机地址 | +| 端口 | 无 | 服务实例端口号 | + +### 适用场景 + +- **微服务架构**:自动监控 Consul 中注册的所有微服务实例 +- **服务网格**:监控使用 Consul Connect 服务网格的服务 +- **多数据中心**:监控多个 Consul 数据中心的服务实例 +- **动态伸缩**:自动适应因自动扩缩容而增减的服务实例 +- **健康检查**:结合 Consul 的健康检查机制监控服务健康状态 +- **服务治理**:集中管理 Consul 服务生态中所有服务的监控 + +### 与 Consul 功能的集成 + +- **服务健康**:Consul 服务发现可以利用 Consul 的健康检查信息 +- **服务标签**:从 Consul 发现的服务实例可能包含标签信息 +- **KV 存储**:可与 Consul KV 存储结合使用,实现更灵活的服务发现 +- **服务网格**:支持 Consul Connect 服务网格环境中的服务发现 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dahua.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dahua.md new file mode 100644 index 0000000000..d9452d3da3 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dahua.md @@ -0,0 +1,60 @@ +--- +id: dahua +title: 监控 大华设备 +sidebar_label: 大华 +keywords: [ monitor, dahua, 大华 ] +--- + +> 通过HTTP接口监控大华设备状态,获取设备健康数据。 + +## 监控配置参数 + +| 参数名称 | 参数帮助描述 | +| ----------- | ----------- | +| 监控Host | 被监控的对端IP或域名 | +| 监控名称 | 标识此监控的唯一名称 | +| 端口 | 网络请求端口,默认80 | +| 超时时间 | 请求超时时间,单位毫秒 | +| 用户名 | 设备登录用户名 | +| 密码 | 设备登录密码 | +| 启用HTTPS | 是否启用HTTPS协议 | +| 采集间隔 | 数据采集周期(≥30秒) | + +## 采集指标 + +### 网络信息 + +- 默认网卡 +- 域名 +- 主机名 +- 网卡 eth0 IP地址 +- 网卡 eth0 默认网关 +- 网卡 eth0 物理地址 +- 网卡 eth0 子网掩码 +- 网卡 eth0 MTU +- DNS服务器1/2 + +### 用户信息 + +- 客户端地址 +- 客户端用户 +- 客户端登录类型 +- 客户端登录时间 + +### 校时信息 + +- 校时服务器 +- 校时端口 +- 校时间隔 + +## 实现原理 + +通过大华设备HTTP接口获取数据: + +1. 网络信息:`/cgi-bin/configManager.cgi?action=getConfig&name=Network` + +2. 用户信息:`/cgi-bin/userManager.cgi?action=getActiveUserInfoAll` + +3. 校时信息:`/cgi-bin/configManager.cgi?action=getConfig&name=NTP` + +使用Digest认证方式,解析设备返回的配置数据格式。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/darwin.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/darwin.md new file mode 100644 index 0000000000..911f316272 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/darwin.md @@ -0,0 +1,115 @@ +--- +id: darwin +title: 监控:darwin操作系统监控 +sidebar_label: darwin 操作系统 +keywords: [开源监控系统, 开源操作系统监控, darwin操作系统监控] +--- + +> 对darwin操作系统的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号,默认为22。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率(待完善) | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 - 待完善 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | + +- darwin操作系统磁盘的其他指标采集待完善,当前版本不支持。 +- 可以使用其他工具或脚本来获取磁盘信息。 +- 未来版本将支持磁盘信息采集。 + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/db2.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/db2.md new file mode 100644 index 0000000000..8e8a355a15 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/db2.md @@ -0,0 +1,86 @@ +--- +id: db2 +title: 监控:DB2数据库监控 +sidebar_label: DB2数据库 +keywords: [ 开源监控系统, 开源数据库监控, DB2数据库监控 ] +--- + + +> 对 DB2 数据库的通用性能指标(表空间、会话状态、进程数、锁、慢查询等)进行采集监控 + +## 注意, 必须添加 DB2 jdbc 驱动 jar + +- 下载 DB2 jdbc 驱动 jar + 包,例如 [jcc.jar](https://repo1.maven.org/maven2/com/ibm/db2/jcc/11.5.9.0/jcc-11.5.9.0.jar) +- 将 jar 包复制到 `hertzbeat/ext-lib` 目录下 +- 重启 HertzBeat 服务 + +:::important 采集器包选择 +DB2 监控依赖 `ext-lib` 目录下的外置 JDBC 驱动加载能力。 + +- DB2 监控请使用 HertzBeat 主程序内置采集器,或 JVM 采集器安装包 +- 不要使用 Native 采集器安装包执行 DB2 监控 +::: + +### 配置参数 + +以下是 DB2 监控所需的配置参数: + +| 参数名称 | 参数帮助描述 | +|:-----------|:-----------------------------------------| +| **目标Host** | 被监控的 DB2 数据库服务器的 IPv4、IPv6 或域名 | +| **端口** | DB2 数据库对外提供的端口,默认为 `50000` | +| **数据库名** | 要连接的 DB2 数据库的名称 | +| **用户名** | 数据库连接用户名 | +| **密码** | 数据库连接密码 | +| **查询超时时间** | 设置 SQL 查询未响应数据时的超时时间,单位毫秒 (ms),默认 `6000` | +| **复用连接** | 是否复用数据库连接,布尔值,默认 `true` | +| **URL** | 数据库连接 URL,可选,配置后将覆盖上面配置的数据库名、用户名、密码等参数 | + +### 采集指标 + +#### 指标集合:基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|:-------------------|:-----|:-------| +| `database_version` | 无 | 数据库版本 | +| `instance_name` | 无 | 数据库实例名 | +| `status` | 无 | 实例状态 | +| `num_db` | 无 | 数据库数量 | + +#### 指标集合:表空间使用率 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|:------------------|:-------|:-------| +| `tablespace_name` | 无 | 表空间名 | +| `status` | 无 | 类型 | +| `total` | MB | 总容量 | +| `used` | MB | 已使用容量 | +| `free` | MB | 空闲容量 | +| `used_percentage` | 百分比(%) | 已用百分比 | + +#### 指标集合:会话状态 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|:--------------|:-----|:-----------| +| `status_type` | 无 | 会话状态类型 | +| `count` | 无 | 处于该状态的会话数量 | + +#### 指标集合:应用进程数 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|:----------------|:-----|:-------------| +| `process_count` | 无 | 总的应用进程数/会话总数 | + +#### 指标集合:锁 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|:----------------|:-----|:-------------| +| `waiting_locks` | 无 | 当前处于等待状态的锁数量 | + +#### 指标集合:慢查询 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|:---------------|:-----|:------------| +| `avg_exe_time` | ms | 平均执行时间 | +| `sql_text` | 无 | 慢查询的 SQL 文本 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/debian.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/debian.md new file mode 100644 index 0000000000..5b19bb4ed2 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/debian.md @@ -0,0 +1,114 @@ +--- +id: debian +title: 监控:Debian 系统监控 +sidebar_label: Debian 操作系统 +keywords: [开源监控系统, 操作系统监控, Debian监控] +--- + +> 对Debian系统的通用性能指标进行采集监控 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/deepseek.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/deepseek.md new file mode 100644 index 0000000000..8c79111629 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/deepseek.md @@ -0,0 +1,35 @@ +--- +id: deepseek +title: 监控:Deepseek 账户情况 +sidebar_label: Deepseek 账户情况 +keywords: [开源监控系统, 开源网络监控, Deepseek账户监控] +--- + +## 准备工作 + +### 获取会话密钥 + +登录 Deepseek 后台,访问 `https://platform.deepseek.com/api_keys` 页面,获取会话密钥。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-------|---------------------------------| +| 监控Host | 此处填写 api.deepseek.com 。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 会话密钥 | 即准备工作中获取的会话密钥。 | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:计费 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|--------|-----------| +| 货币 | 无 | 货币,人民币或美元 | +| 可用余额 | 人民币/美元 | 总的可用余额,包括赠金和充值余额 | +| 未过期的赠金余额 | 人民币/美元 | 未过期的赠金余额 | +| 充值的余额 | 人民币/美元 | 充值余额 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dm.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dm.md new file mode 100644 index 0000000000..7e5bc1e93e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dm.md @@ -0,0 +1,48 @@ +--- +id: dm +title: 监控:达梦数据库监控 +sidebar_label: 达梦数据库 +keywords: [开源监控系统, 开源数据库监控, 达梦数据库监控] +--- + +> 对DM达梦数据库的通用性能指标进行采集监控。支持DM8+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为5236。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|-----------| +| PORT_NUM | 无 | 数据库暴露服务端口 | +| CTL_PATH | 无 | 控制文件路径 | +| MAX_SESSIONS | 无 | 数据库最大连接数 | + +#### 指标集合:status + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|------------| +| status$ | 无 | DM数据库的开闭状态 | + +#### 指标集合:thread + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|---------------------------------| +| dm_sql_thd | 无 | 用于编写 dmsql dmserver 的线程 | +| dm_io_thd | 无 | IO线程,由IO_THR_GROUPS参数控制,默认为2个线程 | +| dm_quit_thd | 无 | 用于执行正常关闭数据库的线程 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dns.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dns.md new file mode 100644 index 0000000000..e012e347c2 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dns.md @@ -0,0 +1,72 @@ +--- +id: dns +title: 监控 DNS 服务器 +sidebar_label: DNS服务器 +keywords: [ 开源监控系统, 开源DNS监控工具, 监控DNS指标 ] +--- + +## 监控:DNS服务器 + +> 收集和监控DNS的常规性能指标。 + +**协议使用:DNS** + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|------------------------------------------------------------------| +| DNS服务器IP | 被监控的IPv4、IPv6。注意⚠️不包含协议头(例如:https://,http://)。 | +| 监控名称 | 标识此监控的名称,名称需要是唯一的。 | +| 端口 | DNS服务对外提供的端口,默认为53。 | +| 域名解析的地址 | 域名解析的地址。 | +| 连接超时时间 | 设置连接DNS服务器的超时时间,单位ms毫秒,默认6000毫秒。 | +| 查询类别 | DNS查询的类别. 可选的值包括 `IN`, `CHAOS`, `HESIOD`, `NONE`, 和 `ANY`。默认值:IN | +| 是否使用tcp协议 | 设置DNS查询是否使用tcp协议。 | +| 采集间隔 | 监控周期性数据采集的时间间隔,单位:秒,最小可设置为30秒。 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 用于更多关于标识和描述此监控的信息,用户可以在此处添加备注信息。 | + +### 采集指标 + +#### 指标集:Header + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------------| +| 响应时间 | 毫秒 | DNS服务器响应请求所需的时间 | +| 操作码 | 无 | 当前消息的类型 | +| 响应状态 | 无 | 响应的状态码 | +| 响应标志 | 无 | 响应标志 | +| 请求记录数 | 无 | 请求记录的数量 | +| 响应记录数 | 无 | 响应记录的数量 | +| 授权记录数 | 无 | 表示权威资源记录的数量 | +| 附加记录数 | 无 | 表示附加资源记录的数量 | + +### 指标集: Question + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|-----------------------------------| +| Section | 无 | 请求记录信息,其中包含查询的域名,资源类型,资源记录类,附加信息。 | + +### 指标集: Answer + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|----------------------------------------| +| Section0 | 无 | 请求响应信息,其中包含查询的域名,TTL,资源记录类,资源类型,查询的结果。 | + +> Answer 指标集最多会采集10条响应记录,指标名称从 Section0 到 Section9。 + +### 指标集: Authority + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|------------------------------------------------------------------| +| Section0 | 无 | 域名的SOA(Start of Authority,权威区域起始)记录,其中包含查询的域名,TTL,资源类型,资源记录类等信息。 | + +> Authority 指标集最多会采集10条响应记录,指标名称从 Section0 到 Section9。 + +### 指标集: Additional + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|-------------| +| Section0 | 无 | DNS查询的附加信息。 | + +> Additional 指标集最多会采集10条响应记录,指标名称从 Section0 到 Section9。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dns_sd.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dns_sd.md new file mode 100644 index 0000000000..0eabc3eda7 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dns_sd.md @@ -0,0 +1,223 @@ +--- +id: dns_sd +title: 监控:DNS服务发现监控 +sidebar_label: DNS服务发现 +keywords: [开源监控系统, 开源服务发现监控, DNS服务发现监控] +--- + +> HertzBeat 集成 DNS 服务,通过 DNS 记录自动发现服务实例并为发现的实例创建监控任务。 + +## 概述 + +DNS 服务发现允许 HertzBeat 通过查询 DNS 记录来发现服务实例。这是一种简单可靠的服务发现方法,利用标准 DNS 基础设施来查找服务实例。特别适用于使用 DNS SRV 记录或需要通过 DNS 发现服务的环境。 + +### 监控前操作 + +#### 配置 DNS 记录 + +确保您的 DNS 服务器已正确配置服务发现记录。不同的记录类型有不同的格式: + +1. **SRV 记录**:用于服务发现,包含服务主机和端口信息 +2. **A 记录**:返回 IPv4 地址 +3. **AAAA 记录**:返回 IPv6 地址 +4. **MX 记录**:邮件服务器记录 +5. **NS 记录**:名称服务器记录 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------------|-----------------------------------------------------| +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| DNS地址 | DNS 服务器地址。示例:`8.8.8.8` 或 `192.168.1.1` | +| DNS端口 | DNS 服务器端口,默认为 53 | +| 记录类型 | 要查询的 DNS 记录类型。选项:`SRV`、`A`、`AAAA`、`MX`、`NS` | +| 记录名称 | 要查询的 DNS 记录名称。示例:SRV 记录为 `_http._tcp.example.com` | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 使用步骤 + +1. **创建服务发现监控** + - 在 HertzBeat Web 界面中,导航到 **监控** → **新增监控** + - 选择监控类型:**DNS服务发现** + - 填写基本配置参数 + +2. **配置监控模板** + - 创建服务发现监控后,需要指定一个监控模板 + - 模板定义了为发现的服务实例创建什么类型的监控 + - 对于 SRV 记录,常用的模板包括端口、HTTP 等 + - 对于 A/AAAA 记录,可以使用 Ping 或端口监控 + +3. **自动发现** + - HertzBeat 会根据采集间隔定期查询 DNS 服务器 + - 为新发现的服务实例自动创建监控任务 + - 自动删除已消失服务实例的监控任务 + +4. **查看发现的实例** + - 在监控列表中,您可以看到所有自动创建的子监控任务 + - 每个子监控任务对应一个发现的服务实例 + +### 使用示例 + +#### 示例 1:SRV 记录发现 + +假设您的 Web 服务有一个 SRV 记录: + +- **SRV 记录**:`_http._tcp.example.com` +- **DNS 服务器**:`8.8.8.8` +- **预期发现**:自动发现所有 HTTP 服务实例 + +配置示例: + +- **任务名称**:`DNS-SRV-Discovery` +- **DNS地址**:`8.8.8.8` +- **DNS端口**:`53` +- **记录类型**:选择 `SRV` +- **记录名称**:`_http._tcp.example.com` +- **采集间隔**:`60` 秒 +- **监控模板**:选择 `端口` 监控(使用 SRV 记录中的端口) + +配置完成后: + +1. HertzBeat 查询 `_http._tcp.example.com` 的 SRV 记录 +2. 从 SRV 记录响应中提取主机和端口信息 +3. 为每个服务实例自动创建端口监控 + +#### 示例 2:A 记录发现 + +通过 A 记录发现服务实例: + +- **A 记录**:`services.example.com` +- 该域名可能解析到多个 IP 地址 + +配置示例: + +- **DNS地址**:`192.168.1.1`(内部 DNS 服务器) +- **DNS端口**:`53` +- **记录类型**:选择 `A` +- **记录名称**:`services.example.com` +- **监控模板**:选择 `Ping` 或 `端口` 监控 + +#### 示例 3:MX 记录发现 + +通过 MX 记录发现邮件服务器: + +- **DNS地址**:`8.8.8.8` +- **记录类型**:选择 `MX` +- **记录名称**:`example.com` +- **监控模板**:选择 `端口` 监控(端口 25) + +### DNS 记录类型 + +#### SRV 记录(推荐) + +SRV 记录是最常用的服务发现记录类型,包含服务名称、端口号和优先级信息。 + +格式:`_service._protocol.example.com` + +示例:`_http._tcp.example.com` + +典型的 SRV 记录响应包含: + +- 目标域名 +- 端口号 +- 优先级和权重 + +#### A 记录 + +A 记录将域名映射到 IPv4 地址。如果一个域名解析到多个 IP,则可以发现所有 IP。 + +示例:`services.example.com` → `192.168.1.10`、`192.168.1.11`、`192.168.1.12` + +#### AAAA 记录 + +AAAA 记录将域名映射到 IPv6 地址。 + +示例:`services.example.com` → `2001:db8::1` + +#### MX 记录 + +MX 记录指定域的邮件服务器,包含优先级信息。 + +示例:`example.com` → `mail.example.com` + +#### NS 记录 + +NS 记录指定域的名称服务器。 + +示例:`example.com` → `ns1.example.com` + +### 注意事项 + +- **DNS 服务器**:确保指定的 DNS 服务器可访问且包含服务发现记录 +- **记录名称**:记录名称必须准确,SRV 记录需要包含服务和协议前缀 +- **端口信息**: + - SRV 记录包含端口信息 + - A/AAAA 记录不包含端口信息,需要在监控模板中指定默认端口 +- **监控模板**:服务发现仅发现服务实例地址,您需要配置合适的监控模板来实际监控这些实例 +- **采集间隔**:建议最小间隔为 60 秒,避免过多的 DNS 查询 +- **DNS 缓存**:DNS 响应可能被缓存,实际更新频率取决于 DNS 记录的 TTL 值 +- **网络连通性**:确保 HertzBeat 可以访问指定的 DNS 服务器和端口(默认:53) +- **防火墙**:确保防火墙允许 DNS 查询流量(UDP/TCP 53) + +### 采集指标 + +#### 指标集合:监控目标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|-------|---------------| +| 目标 | 无 | 发现的服务实例目标 | +| 主机 | 无 | 服务实例主机地址 | +| 端口 | 无 | 服务实例端口号 | + +### 适用场景 + +- **Kubernetes Headless 服务**:通过 DNS 发现 Kubernetes Pod 实例 +- **云服务**:从云服务发现实例(AWS Route53、Azure DNS、GCP Cloud DNS) +- **传统 DNS**:使用现有 DNS 基础设施进行服务发现 +- **负载均衡**:发现所有后端服务器实例 +- **邮件服务器**:通过 MX 记录发现邮件服务器实例 +- **多环境**:使用不同 DNS 记录在不同环境中进行服务发现 + +### 常见 SRV 记录格式 + +不同服务使用不同的 SRV 记录格式: + +- **HTTP**:`_http._tcp.example.com` +- **HTTPS**:`_https._tcp.example.com` +- **LDAP**:`_ldap._tcp.example.com` +- **FTP**:`_ftp._tcp.example.com` +- **MySQL**:`_mysql._tcp.example.com` +- **PostgreSQL**:`_postgresql._tcp.example.com` + +### Kubernetes 集成 + +在 Kubernetes 集群中,可以使用 DNS 服务发现来发现 Pod 实例: + +1. **Headless 服务**:Kubernetes 为 headless 服务的每个 Pod 创建 DNS A 记录 +2. **服务发现**:使用 DNS 服务发现监控特定服务的所有 Pod + +示例: + +- **DNS地址**:Kubernetes 集群 DNS 服务 IP(通常是 `10.96.0.10`) +- **记录类型**:`A` +- **记录名称**:`my-service.default.svc.cluster.local` +- **监控模板**:`端口` 监控 + +### DNS 服务器示例 + +常用的 DNS 服务器: + +- **Google Public DNS**:`8.8.8.8`、`8.8.4.4` +- **Cloudflare DNS**:`1.1.1.1`、`1.0.0.1` +- **Quad9 DNS**:`9.9.9.9` +- **OpenDNS**:`208.67.222.222`、`208.67.220.220` +- **内部 DNS**:通常是企业内部 DNS 服务器地址 + +### 最佳实践 + +1. **使用 SRV 记录**:SRV 记录是推荐的服务发现方法,因为它包含完整的主机和端口信息 +2. **设置合理的 TTL**:设置适当的 DNS 记录 TTL 以平衡实时性能和 DNS 服务器负载 +3. **冗余配置**:配置多个 DNS 服务器以确保高可用性 +4. **监控**:定期检查 DNS 记录的有效性和可用性 +5. **安全性**:确保 DNS 查询安全,考虑使用 DNS over HTTPS (DoH) 或 DNS over TLS (DoT) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/docker.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/docker.md new file mode 100644 index 0000000000..0b81365780 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/docker.md @@ -0,0 +1,101 @@ +--- +id: docker +title: 监控:Docker 监控 +sidebar_label: Docker 容器监控 +keywords: [开源监控系统, 开源容器监控, Docker容器监控] +--- + +> 对Docker容器的通用性能指标进行采集监控。 + +## 监控前操作 + +如果想要监控 `Docker` 中的容器信息,则需要按照一下步骤打开端口,让采集请求获取到对应的信息。 + +**1、编辑docker.server文件:** + +```shell +vi /usr/lib/systemd/system/docker.service +``` + +找到 **[Service]** 节点,修改 ExecStart 属性,增加 `-H tcp://0.0.0.0:2375` + +```shell +ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -H tcp://0.0.0.0:2375 +``` + +这样相当于对外开放的是 **2375** 端口,当然也可以根据自己情况修改成其他的。 + +**2、重新加载Docker配置生效:** + +```shell +systemctl daemon-reload +systemctl restart docker +``` + +**注意:记得在服务器中打开 `2375` 端口号。** + +**3、如果上述方法不行则:** + +在服务器内部打开 `2375` 端口号。 + +```shell +firewall-cmd --zone=public --add-port=2375/tcp --permanent +firewall-cmd --reload +``` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为2375。 | +| 查询超时时间 | 设置获取Docker服务器API接口时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 器名称 | 一般是监控所有运行中的容器信息。 | +| 用户名 | 连接用户名,可选 | +| 密码 | 连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:system + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|--------------------------------| +| Name | 无 | 服务器名称 | +| version | 无 | docker本版号 | +| os | 无 | 服务器版本 例如:linux x86_64 | +| root_dir | 无 | docker文件夹目录 例如:/var/lib/docker | +| containers | 无 | 容器总数(在运行+未运行) | +| containers_running | 无 | 运行中的容器数目 | +| containers_paused | 无 | 暂停中的容器数目 | +| images | 无 | 容器景象的总数目。 | +| ncpu | 无 | NCPU | +| mem_total | MB | 占用的内存总大小 | +| system_time | 无 | 系统时间 | + +#### 指标集合:containers + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------------| +| id | 无 | Docker中容器的ID | +| name | 无 | Docker容器中的容器名称 | +| image | 无 | Docker容器使用的镜像 | +| command | 无 | Docker中的默认启动命令 | +| state | 无 | Docker中容器的运行状态 | +| status | 无 | Docker容器中的更新时间 | + +#### 指标集合:stats + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|--------------------| +| name | 无 | Docker容器中的名字 | +| available_memory | MB | Docker容器可以利用的内存大小 | +| used_memory | MB | Docker容器已经使用的内存大小 | +| memory_usage | 无 | Docker容器的内存使用率 | +| cpu_delta | 无 | Docker容器已经使用的CPU数量 | +| number_cpus | 无 | Docker容器可以使用的CPU数量 | +| cpu_usage | 无 | Docker容器CPU使用率 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dolphinscheduler.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dolphinscheduler.md new file mode 100644 index 0000000000..917dd9478f --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dolphinscheduler.md @@ -0,0 +1,106 @@ +--- +id: dolphinscheduler +title: 监控:Apache DolphinScheduler +sidebar_label: Apache DolphinScheduler +keywords: [ 开源监控系统, 监控 Apache DolphinScheduler ] +--- + +> 对 Apache DolphinScheduler 指标进行采集监控。 + +## 监控前操作 + +> 支持 Apache DolphinScheduler v3.3.0 或更高版本 + +您需在 Apache DolphinScheduler 中创建令牌。 + + +可参考 [API 调用](https://dolphinscheduler.apache.org/zh-cn/docs/3.2.2/guide/api/open-api) 创建一个新令牌,具体步骤如下: + +1. 登录 Apache DolphinScheduler 系统,点击 "安全中心",再点击左侧的 "令牌管理",点击 "令牌管理" 创建令牌。 +2. 选择 "失效时间" (Token 有效期),选择 "用户" (以指定的用户执行接口操作),点击 "生成令牌" ,拷贝令牌字符串,然后点击 "提交" 。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | DolphinScheduler开放的监控端口,默认值:12345。 | +| 启用HTTPS | 是否启用HTTPS。 | +| 令牌 | DolphinScheduler 的令牌字符串。 | +| 查询超时时间 | 设置查询未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +## 采集指标 + +### 指标集合:Master + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|--------|-----------------| +| host | 无 | 主机地址 | +| port | 无 | 端口 | +| serverStatus | 无 | 状态 | +| processId | 无 | 进程 ID | +| runningTime | 天 | 运行时间 | +| cpuUsage | 百分比(%) | 处理器使用量 | +| memoryUsage | 百分比(%) | 内存使用量 | +| diskUsage | 百分比(%) | 磁盘可用容量 | +| jvmCpuUsage | 百分比(%) | JVM CPU 使用量 | +| jvmMemoryUsage | 百分比(%) | JVM 内存 使用量 | +| jvmHeapUsed | 无 | JVM 已使用的堆内存大小 | +| jvmNonHeapUsed | 无 | JVM 已使用的非堆内存大小 | +| jvmHeapMax | 无 | JVM 配置的最大堆内存大小 | +| jvmNonHeapMax | 无 | JVM 配置的最大非堆内存大小 | + +### 指标集合:Worker + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|--------|-----------------| +| host | 无 | 主机地址 | +| port | 无 | 端口 | +| serverStatus | 无 | 状态 | +| processId | 无 | 进程 ID | +| runningTime | 天 | 运行时间 | +| cpuUsage | 百分比(%) | CPU使用率 | +| memoryUsage | 百分比(%) | 内存使用率 | +| diskUsage | 百分比(%) | 磁盘可用容量 | +| jvmCpuUsage | 百分比(%) | JVM CPU 使用量 | +| jvmMemoryUsage | 百分比(%) | JVM 内存 使用量 | +| jvmHeapUsed | 无 | JVM 已使用的堆内存大小 | +| jvmNonHeapUsed | 无 | JVM 已使用的非堆内存大小 | +| jvmHeapMax | 无 | JVM 配置的最大堆内存大小 | +| jvmNonHeapMax | 无 | JVM 配置的最大非堆内存大小 | +| workerHostWeight | 无 | 权重 | +| threadPoolUsage | 无 | 线程池使用量 | +| workerGroup | 无 | Worker 组 | + +### 指标集合:Alert Server + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|--------|-----------------| +| host | 无 | 主机地址 | +| port | 无 | 端口 | +| serverStatus | 无 | 状态 | +| processId | 无 | 进程 ID | +| runningTime | 天 | 运行时间 | +| cpuUsage | 百分比(%) | 处理器使用量 | +| memoryUsage | 百分比(%) | 内存使用量 | +| diskUsage | 百分比(%) | 磁盘可用容量 | +| jvmCpuUsage | 百分比(%) | JVM CPU 使用量 | +| jvmMemoryUsage | 百分比(%) | JVM 内存 使用量 | +| jvmHeapUsed | 无 | JVM 已使用的堆内存大小 | +| jvmNonHeapUsed | 无 | JVM 已使用的非堆内存大小 | +| jvmHeapMax | 无 | JVM 配置的最大堆内存大小 | +| jvmNonHeapMax | 无 | JVM 配置的最大非堆内存大小 | + +### 指标:数据库 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------|--------|-----------| +| dbType | 无 | 数据库类型 | +| state | 无 | 状态 | +| maxConnections | 无 | 最大连接数 | +| threadsConnections | 无 | 当前连接数 | +| threadsRunningConnections | 天 | 当前活跃连接数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/doris_be.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/doris_be.md new file mode 100644 index 0000000000..a2c3b683cf --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/doris_be.md @@ -0,0 +1,170 @@ +--- +id: doris_be +title: 监控:DORIS数据库BE监控 +sidebar_label: DORIS数据库BE +keywords: [开源监控系统, 开源数据库监控, DORIS数据库BE监控] +--- + +> 对DORIS数据库FE的通用性能指标进行采集监控。支持DORIS2.0.0。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|-----------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://) | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| 端口 | 数据库对外提供的端口,默认为8040 | +| 查询超时时间 | 设置连接未响应的超时时间,单位ms毫秒,默认3000毫秒 | +| 数据库名称 | 数据库实例名称,可选 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:doris_be_load_channel_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------------------| +| value | 无 | 当前打开的 load channel 个数 | + +#### 指标集合:doris_be_memtable_flush_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------------| +| value | 无 | memtable写入磁盘的个数累计值 | + +#### 指标集合:doris_be_plan_fragment_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------------------| +| value | 无 | 当前已接收的 fragment instance 的数量 | + +#### 指标集合:doris_be_process_thread_num + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------------------------------| +| value | 无 | BE 进程线程数。通过 `/proc/pid/task` 采集 | + +#### 指标集合:doris_be_query_scan_rows + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------------------------------------------------------------------| +| value | 无 | 读取行数的累计值。这里只统计读取 Olap 表的数据量。并且是 RawRowsRead(部分数据行可能被索引跳过,并没有真正读取,但仍会记录到这个值中) | + +#### 指标集合:doris_be_result_buffer_block_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------------------| +| value | 无 | 当前查询结果缓存中的 query 个数 | + +#### 指标集合:doris_be_send_batch_thread_pool_queue_size + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------------------| +| value | 无 | 导入时用于发送数据包的线程池的排队个数 | + +#### 指标集合:doris_be_tablet_base_max_compaction_score + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------------------------| +| value | 无 | 当前最大的 Base Compaction Score | + +#### 指标集合:doris_be_timeout_canceled_fragment_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|----------------------------------| +| value | 无 | 因超时而被取消的 fragment instance 数量累计值 | + +#### 指标集合:doris_be_load_rows + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------------| +| value | 无 | 通过 tablet sink 发送的行数累计 | + +#### 指标集合:doris_be_all_rowsets_num + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------------| +| value | 无 | 当前所有 rowset 的个数 | + +#### 指标集合:doris_be_all_segments_num + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------| +| value | 无 | 当前所有 segment 的个数 | + +#### 指标集合:doris_be_heavy_work_max_threads + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-------------------| +| value | 无 | brpc heavy线程池线程个数 | + +#### 指标集合:doris_be_light_work_max_threads + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-------------------| +| value | 无 | brpc light线程池线程个数 | + +#### 指标集合:doris_be_heavy_work_pool_queue_size + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------------------------------| +| value | 无 | brpc heavy线程池队列最大长度,超过则阻塞提交work | + +#### 指标集合:doris_be_light_work_pool_queue_size + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------------------------------| +| value | 无 | brpc light线程池队列最大长度,超过则阻塞提交work | + +#### 指标集合:doris_be_heavy_work_active_threads + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------------| +| value | 无 | brpc heavy线程池活跃线程数 | + +#### 指标集合:doris_be_light_work_active_threads + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------------| +| value | 无 | brpc light线程池活跃线程数 | + +#### 指标集合:doris_be_compaction_bytes_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|------------------------------| +| base | 字节 | Base Compaction 的数据量累计 | +| cumulative | 字节 | Cumulative Compaction 的数据量累计 | + +#### 指标集合:doris_be_disks_avail_capacity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------------------------------------| +| path | 无 | 指定数据目录 | +| value | 字节 | `{path="/path1/"}` 表示 `/path1` 目录所在磁盘的剩余空间 | + +#### 指标集合:doris_be_disks_total_capacity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------------------------------------| +| path | 无 | 指定数据目录 | +| value | 字节 | `{path="/path1/"}` 表示 `/path1` 目录所在磁盘的全部空间 | + +#### 指标集合:doris_be_local_bytes_read_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|----------------------------| +| value | 字节 | 由 `LocalFileReader` 读取的字节数 | + +#### 指标集合:doris_be_local_bytes_written_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|----------------------------| +| value | 字节 | 由 `LocalFileWriter` 写入的字节数 | + +#### 指标集合:doris_be_memory_allocated_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------------------------------| +| value | 字节 | BE 进程物理内存大小,取自 `/proc/self/status/VmRSS` | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/doris_fe.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/doris_fe.md new file mode 100644 index 0000000000..a1ff29c397 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/doris_fe.md @@ -0,0 +1,131 @@ +--- +id: doris_fe +title: 监控:DORIS数据库FE监控 +sidebar_label: DORIS数据库FE +keywords: [开源监控系统, 开源数据库监控, DORIS数据库FE监控] +--- + +> 对DORIS数据库FE的通用性能指标进行采集监控。支持DORIS2.0.0。 + +**使用协议:HTTP** + +## 监控前操作 + +查看 `fe/conf/fe.conf` 文件,获取 `http_port` 配置项的值,该值用作监控使用。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|-----------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://) | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| 端口 | 数据库对外提供的端口,默认为8030 , 取值自 `http_port` 配置项的值 | +| 查询超时时间 | 设置连接未响应的超时时间,单位ms毫秒,默认6000毫秒 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 绑定标签 | 您可以使用标签进行监控资源的分类管理, 例如给资源分别绑定生产环境、测试环境的标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:doris_fe_connection_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------------| +| value | 无 | 当前FE的MySQL端口连接数 | + +#### 指标集合:doris_fe_edit_log_clean + +不应失败,如失败,需人工介入 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------------| +| success | 无 | 清理历史元数据日志成功的次数 | +| failed | 无 | 清理历史元数据日志失败的次数 | + +#### 指标集合:doris_fe_edit_log + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|--------------| +| write | 无 | 元数据日志写入次数的计数 | +| read | 无 | 元数据日志读取次数的计数 | +| current | 无 | 元数据日志当前数量 | +| accumulated_bytes | 字节 | 元数据日志写入量的累计值 | +| current_bytes | 字节 | 元数据日志当前值 | + +#### 指标集合:doris_fe_image_clean + +不应失败,如失败,需人工介入 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|------------------| +| success | 无 | 清理历史元数据镜像文件成功的次数 | +| failed | 无 | 清理历史元数据镜像文件失败的次数 | + +#### 指标集合:doris_fe_image_write + +不应失败,如失败,需人工介入 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------------| +| success | 无 | 生成元数据镜像文件成功的次数 | +| failed | 无 | 生成元数据镜像文件失败的次数 | + +#### 指标集合:doris_fe_query_err + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|----------| +| value | 无 | 错误查询的累积值 | + +#### 指标集合:doris_fe_max_journal_id + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------------------------------------------------------------------------------------------------------------| +| value | 无 | 当前FE节点最大元数据日志ID。如果是Master FE,则是当前写入的最大ID,如果是非Master FE,则代表当前回放的元数据日志最大ID。用于观察多个FE之间的 id 是否差距过大。过大则表示元数据同步出现问题 | + +#### 指标集合:doris_fe_max_tablet_compaction_score + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------------------------------------------------------------------------------| +| value | 无 | 所有BE节点中最大的 compaction score 值。该值可以观测当前集群最大的 compaction score,以判断是否过高。如过高则可能出现查询或写入延迟 | + +#### 指标集合:doris_fe_qps + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------------------| +| value | 无 | 当前FE每秒查询数量(仅统计查询请求) | + +#### 指标集合:doris_fe_query_err_rate + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------| +| value | 无 | 每秒错误查询数 | + +#### 指标集合:doris_fe_report_queue_size + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------------------------------------------------------------| +| value | 无 | BE的各种定期汇报任务在FE端的队列长度,该值反映了汇报任务在 Master FE 节点上的阻塞程度,数值越大,表示FE处理能力不足 | + +#### 指标集合:doris_fe_rps + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------------------| +| value | 无 | 当前FE每秒请求数量(包含查询以及其他各类语句) | + +#### 指标集合:doris_fe_scheduled_tablet_num + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------------------------------------------------------------------------------| +| value | 无 | Master FE节点正在调度的 tablet 数量。包括正在修复的副本和正在均衡的副本,该数值可以反映当前集群,正在迁移的 tablet 数量。如果长时间有值,说明集群不稳定 | + +#### 指标集合:doris_fe_txn_status + +可以观测各个状态下导入事务的数量,来判断是否有堆积 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|---------| +| unknown | 无 | 未知 | +| prepare | 无 | 准备中 | +| committed | 无 | 已提交 | +| visible | 无 | 可见 | +| aborted | 无 | 已中止/已撤销 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dynamic_tp.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dynamic_tp.md new file mode 100644 index 0000000000..107b3b3981 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/dynamic_tp.md @@ -0,0 +1,101 @@ +--- +id: dynamic_tp +title: 监控:DynamicTp 线程池监控 +sidebar_label: DynamicTp线程池监控 +keywords: [开源监控系统, 开源中间件监控, DynamicTp线程池监控] +--- + +> 对DynamicTp actuator 暴露的线程池性能指标进行采集监控。 + +## 前提 + +1. 集成使用 `DynamicTp` + + `DynamicTp` 是Jvm语言的基于配置中心的轻量级动态线程池,内置监控告警功能,可通过SPI自定义扩展实现。 + + 集成使用,请参考文档 [快速接入](https://dynamictp.cn/guide/use/quick-start.html) + +2. 开启SpringBoot Actuator Endpoint 暴露出`DynamicTp`指标接口 + + ```yaml + management: + endpoints: + web: + exposure: + include: '*' + ``` + + 测试访问指标接口 `ip:port/actuator/dynamic-tp` 是否有响应json数据如下: + + ```json + [ + { + "poolName": "commonExecutor", + "corePoolSize": 1, + "maximumPoolSize": 1, + "queueType": "LinkedBlockingQueue", + "queueCapacity": 2147483647, + "queueSize": 0, + "fair": false, + "queueRemainingCapacity": 2147483647, + "activeCount": 0, + "taskCount": 0, + "completedTaskCount": 0, + "largestPoolSize": 0, + "poolSize": 0, + "waitTaskCount": 0, + "rejectCount": 0, + "rejectHandlerName": null, + "dynamic": false, + "runTimeoutCount": 0, + "queueTimeoutCount": 0 + }, + { + "maxMemory": "4 GB", + "totalMemory": "444 MB", + "freeMemory": "250.34 MB", + "usableMemory": "3.81 GB" + } + ] + ``` + +3. 在HertzBeat中间件监控下添加DynamicTp监控即可 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 应用服务对外提供的端口,默认为8080。 | +| 启用HTTPS | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443 | +| Base Path | 暴露接口路径前缀,默认 /actuator | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:thread_pool + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------|------|--------------------------| +| pool_name | 无 | 线程池名称 | +| core_pool_size | 无 | 核心线程数 | +| maximum_pool_size | 无 | 最大线程数 | +| queue_type | 无 | 任务队列类型 | +| queue_capacity | MB | 任务队列容量 | +| queue_size | 无 | 任务队列当前占用大小 | +| fair | 无 | 队列模式,SynchronousQueue会用到 | +| queue_remaining_capacity | MB | 任务队列剩余大小 | +| active_count | 无 | 活跃线程数 | +| task_count | 无 | 任务总数 | +| completed_task_count | 无 | 已完成任务数 | +| largest_pool_size | 无 | 历史最大线程数 | +| pool_size | 无 | 当前线程数 | +| wait_task_count | 无 | 等待执行任务数 | +| reject_count | 无 | 拒绝任务数 | +| reject_handler_name | 无 | 拒绝策略类型 | +| dynamic | 无 | 是否动态线程池 | +| run_timeout_count | 无 | 运行超时任务数 | +| queue_timeout_count | 无 | 等待超时任务数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/elasticsearch.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/elasticsearch.md new file mode 100644 index 0000000000..edb6515a8f --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/elasticsearch.md @@ -0,0 +1,63 @@ +--- +id: elasticsearch +title: 监控:ElasticSearch +sidebar_label: ElasticSearch +keywords: [ 开源监控系统, 监控ElasticSearch ] +--- + +> 对ElasticSearch的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | ElasticSearch开放的HTTP API端口,默认值:9200。 | +| 启用HTTPS | 是否启用HTTPS。 | +| 认证方式 | 连接ElasticSearch使用的认证方式,可选。 | +| 用户名 | 连接ElasticSearch的用户名,可选。 | +| 密码 | 连接ElasticSearch的密码,可选 | +| 查询超时时间 | 设置查询未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:health + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|----------| +| cluster_name | 无 | 集群名称 | +| status | 无 | 集群状态 | +| nodes | 无 | 集群节点数 | +| data_nodes | 无 | 数据节点数 | +| active_primary_shards | 无 | 主节点活跃分片数 | +| active_shards | 无 | 活跃分片数 | +| active_percentage | % | 分片健康度 | +| initializing_shards | 无 | 初始化分片数 | +| unassigned_shards | 无 | 未分配分片数 | + +#### 指标集合:nodes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|--------| +| total | 无 | 节点数 | +| successful | 无 | 在线节点数 | +| failed | 无 | 离线节点数 | + +#### 指标集合:nodes_detail + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|---------| +| node_name | 无 | 节点名称 | +| ip | 无 | IP地址 | +| cpu_load_average | 无 | CPU平均负载 | +| cpu_percent | % | CPU占用率 | +| heap_used | MB | 内存使用量 | +| heap_used_percent | % | 内存使用率 | +| heap_total | MB | 总内存 | +| disk_free | GB | 磁盘剩余容量 | +| disk_total | GB | 磁盘总容量 | +| disk_used_percent | % | 磁盘使用率 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/etcd.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/etcd.md new file mode 100644 index 0000000000..5a672fc08c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/etcd.md @@ -0,0 +1,65 @@ +--- +id: etcd +title: 监控:etcd 监控 +sidebar_label: etcd +keywords: [开源监控系统, 中间件监控, etcd监控] +--- + +> HertzBeat 通过采集 etcd 暴露的 Prometheus metrics 接口数据,对 etcd 键值存储进行监控。 +> +> 支持 etcd 3.4 及以上版本(数据库大小指标 `etcd_mvcc_db_total_size_in_bytes` 自 3.4 起替代旧的 `etcd_debugging_*` 命名)。 + +## 监控前操作 + +### 确认 HertzBeat 能访问 etcd 的 metrics 接口 + +etcd 会在客户端端口(默认 `2379`)的 `/metrics` 路径暴露 Prometheus 格式的指标。请确保 HertzBeat 能访问该地址: + +1. 若 etcd 仅监听 localhost,或客户端端口启用了双向 TLS,请通过 [`--listen-metrics-urls`](https://etcd.io/docs/latest/op-guide/configuration/) 配置独立的 metrics 监听地址。该地址提供 metrics 与健康检查端点;若不加 TLS 暴露,请仅限受信任网络访问。 +2. 从 HertzBeat 所在机器访问 `{metrics-host}:{metrics-port}/metrics`(默认为客户端端口 `2379`),确认能获取到 metrics 数据。 + +更多信息请参考 [etcd 监控文档](https://etcd.io/docs/latest/op-guide/monitoring/)。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|-----------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 端口 | metrics 接口端口,使用客户端 listener 时默认为 2379 | +| 查询超时时间 | HTTP请求超时时间,单位毫秒,默认6000 | +| 启用HTTPS | 是否使用 HTTPS 请求 metrics 接口 | +| 请求Headers | 可选的额外 HTTP 请求头 | +| 认证方式 | 若 metrics 接口在认证代理后面,可选 Basic/Digest 认证 | +| 用户名/密码 | 配置认证方式后使用的凭据 | + +### 采集指标 + +#### 指标集合:etcd_server_has_leader + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|------------------------------| +| hasLeader | 无 | 该 etcd 成员是否存在 raft 领导者(1有0无) | + +#### 指标集合:etcd_mvcc_db_total_size_in_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|-----------------| +| dbSize | MB | 物理分配的数据库总大小 | + +#### 指标集合:etcd_server_leader_changes_seen_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------| +| leaderChanges | 无 | 已观测到的领导者变更总次数 | + +#### 指标集合:process_cpu_seconds_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|------------------| +| cpuSeconds | 秒 | 累计用户与系统CPU使用时间 | + +#### 指标集合:process_resident_memory_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|---------| +| memory | MB | 进程常驻内存大小 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/euleros.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/euleros.md new file mode 100644 index 0000000000..f881d2e54f --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/euleros.md @@ -0,0 +1,114 @@ +--- +id: euleros +title: 监控:EulerOS操作系统监控 +sidebar_label: EulerOS 操作系统 +keywords: [ 开源监控系统, 开源操作系统监控, EulerOS操作系统监控 ] +--- + +> 对EulerOS操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/eureka_sd.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/eureka_sd.md new file mode 100644 index 0000000000..d6177f9f8e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/eureka_sd.md @@ -0,0 +1,94 @@ +--- +id: eureka_sd +title: 监控:Eureka服务发现监控 +sidebar_label: Eureka服务发现 +keywords: [开源监控系统, 开源服务发现监控, Eureka服务发现监控] +--- + +> HertzBeat 集成 Eureka 注册中心,自动发现服务实例并为发现的实例创建监控任务。 + +## 概述 + +Eureka 服务发现允许 HertzBeat 连接到您的 Eureka 服务器并自动发现所有注册的服务实例。当新服务实例注册或现有实例下线时,HertzBeat 将自动创建或删除相应的监控任务,实现微服务环境下的自动化监控。 + +### 监控前操作 + +#### 部署 Eureka 服务器 + +1. 根据 [Eureka 官方文档](https://spring.io/guides/gs/service-registration-and-discovery/)部署 Eureka 服务器。 +2. 确保 Eureka 服务器可从 HertzBeat 访问。 +3. 验证您可以访问 Eureka 控制台:`http://your-eureka-server:port/` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------------|-----------------------------------------------------| +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| Eureka服务发现地址 | Eureka 服务器地址。示例:`http://eureka-server:8761/eureka` | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 使用步骤 + +1. **创建服务发现监控** + - 在 HertzBeat Web 界面中,导航到 **监控** → **新增监控** + - 选择监控类型:**Eureka服务发现** + - 填写基本配置参数 + +2. **配置监控模板** + - 创建服务发现监控后,需要指定一个监控模板 + - 模板定义了为发现的服务实例创建什么类型的监控 + - 例如:如果发现的实例是 HTTP 服务,可以选择 HTTP 监控模板 + - 常用模板类型:端口、HTTP、HTTPS 等 + +3. **自动发现** + - HertzBeat 会根据采集间隔定期查询 Eureka 服务器 + - 为新注册的服务实例自动创建监控任务 + - 自动删除已下线服务实例的监控任务 + +4. **查看发现的实例** + - 在监控列表中,您可以看到所有自动创建的子监控任务 + - 每个子监控任务对应一个发现的服务实例 + +### 使用示例 + +假设您的 Eureka 服务器运行在 `http://192.168.1.100:8761/eureka`,您希望自动监控其中注册的所有服务实例。 + +配置示例: + +- **任务名称**:`Eureka-Service-Discovery` +- **Eureka服务发现地址**:`http://192.168.1.100:8761/eureka` +- **采集间隔**:`60` 秒 +- **监控模板**:选择 `端口` 监控(检测实例可用性) + +配置完成后: + +1. HertzBeat 连接到 Eureka 服务器 +2. 获取所有已注册的应用实例 +3. 为每个实例自动创建端口监控(例如:`USER-SERVICE-192.168.1.101:8080`) +4. 每 60 秒检查一次新注册或下线的服务,并相应地更新监控任务 + +### 注意事项 + +- **网络连通性**:确保 HertzBeat 可以访问 Eureka 服务器地址 +- **监控模板**:服务发现仅发现服务实例地址,您需要配置合适的监控模板来实际监控这些实例 +- **采集间隔**:建议最小间隔为 60 秒,避免对 Eureka 服务器造成过多请求 +- **权限要求**:Eureka 服务器默认不需要认证,但如果配置了认证,URL 需要包含用户名和密码 +- **实例命名**:自动创建的监控任务命名格式为:`{应用名称}-{主机}:{端口}` + +### 采集指标 + +#### 指标集合:监控目标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|-------|---------------| +| 目标 | 无 | 发现的服务实例目标 | +| 主机 | 无 | 服务实例主机地址 | +| 端口 | 无 | 服务实例端口号 | + +### 适用场景 + +- **微服务架构**:自动监控 Eureka 中注册的所有微服务实例 +- **动态伸缩**:自动适应因自动扩缩容而增减的服务实例 +- **统一监控**:集中管理微服务环境中所有服务的监控 +- **运维管理**:减少手动配置工作,提高运维效率 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/fedora.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/fedora.md new file mode 100644 index 0000000000..d8f360f561 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/fedora.md @@ -0,0 +1,114 @@ +--- +id: fedora +title: 监控:Fedora操作系统监控 +sidebar_label: Fedora 操作系统 +keywords: [ 开源监控系统, 开源操作系统监控, Fedora操作系统监控 ] +--- + +> 对Fedora操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号,默认为22。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/flink.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/flink.md new file mode 100644 index 0000000000..82c5bacef4 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/flink.md @@ -0,0 +1,35 @@ +--- +id: flink +title: 监控:Flink +sidebar_label: Flink 监控 +keywords: [开源监控系统, 开源 Flink 监控] +--- + +> 对 Flink 流引擎的通用指标进行测量监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 监控的端口 | +| 查询超时时间 | 设置JVM连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| SSL | 是否开启SSL(默认关闭) | +| 用户名 | 连接用户名 | +| 密码 | 连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:overview + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|----------| +| slots_total | 个 | 插槽总数 | +| slots_used | 个 | 已用插槽数 | +| task_total | 个 | 任务总数 | +| jobs_running | 个 | 正在运行的任务数 | +| jobs_failed | 个 | 已经失败的任务数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/flink_on_yarn.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/flink_on_yarn.md new file mode 100644 index 0000000000..2b759ab4c1 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/flink_on_yarn.md @@ -0,0 +1,143 @@ +--- +id: flink_on_yarn +title: 监控:Flink On Yarn +sidebar_label: Flink On Yarn 监控 +keywords: [开源监控系统, 开源 Flink On Yarn 监控] +--- + +> 对Yarn运行模式下的Flink流引擎的通用指标进行测量监控。 +> 监控指标对应的中文含义在本说明文档描述,页面监控显示的指标均为Flink原生指标没有翻译成中文,怕引发歧义。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| Yarn端口 | Yarn的端口,对应配置项:`yarn.resourcemanager.webapp.address`中的端口 | +| 查询超时时间 | 设置JVM连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 启动SSL | 是否启用SSL | +| 用户名 | 连接用户名 | +| 密码 | 连接密码 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:JobManager Metrics + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------------------------------------|------|-----------| +| Status.JVM.Memory.NonHeap.Committed | 字节 | 非堆内存的提交量 | +| Status.JVM.Memory.Mapped.TotalCapacity | 字节 | 映射内存的总容量 | +| Status.JVM.Memory.NonHeap.Used | 字节 | 非堆内存的使用量 | +| Status.JVM.Memory.Metaspace.Max | 字节 | 元空间的最大容量 | +| Status.JVM.GarbageCollector.G1_Old_Generation.Count | 字节 | 老年代垃圾收集次数 | +| Status.JVM.Memory.Direct.MemoryUsed | 字节 | 直接内存的使用量 | +| Status.JVM.Memory.Mapped.MemoryUsed | 字节 | 映射内存的使用量 | +| Status.JVM.GarbageCollector.G1_Young_Generation.Count | 字节 | 年轻代垃圾收集次数 | +| Status.JVM.Memory.Direct.TotalCapacity | 字节 | 直接内存的总容量 | +| Status.JVM.GarbageCollector.G1_Old_Generation.Time | 字节 | 老年代垃圾收集时间 | +| Status.JVM.Memory.Heap.Committed | 字节 | 堆内存的提交量 | +| Status.JVM.Memory.Mapped.Count | - | 映射内存的数量 | +| Status.JVM.Memory.Metaspace.Used | 字节 | 元空间的使用量 | +| Status.JVM.Memory.Direct.Count | - | 直接内存的数量 | +| Status.JVM.Memory.Heap.Used | 字节 | 堆内存的使用量 | +| Status.JVM.Memory.Heap.Max | 字节 | 堆内存的最大容量 | +| Status.JVM.GarbageCollector.G1_Young_Generation.Time | 字节 | 年轻代垃圾收集时间 | +| Status.JVM.Memory.NonHeap.Max | 字节 | 非堆内存的最大容量 | + +#### 指标集合:JobManager Config + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------------------|------|------------------------| +| internal.jobgraph-path | - | 内部作业图路径 | +| env.java.home | - | Java 环境路径 | +| classloader.check-leaked-classloader | - | 是否检查类加载器 | +| env.java.opts | - | Java 选项 | +| high-availability.cluster-id | - | 高可用性集群 ID | +| jobmanager.rpc.address | - | JobManager 的 RPC 地址 | +| jobmanager.memory.jvm-overhead.min | 字节 | JobManager 的 JVM 开销最小值 | +| jobmanager.web.port | 端口号 | JobManager 的 Web 端口 | +| webclient.port | 端口号 | Web 客户端端口 | +| execution.savepoint.ignore-unclaimed-state | - | 是否忽略未声明的状态 | +| io.tmp.dirs | 路径 | 临时文件目录 | +| parallelism.default | - | 默认并行度 | +| taskmanager.memory.fraction | - | TaskManager 内存占比 | +| taskmanager.numberOfTaskSlots | - | TaskManager 的任务槽数量 | +| yarn.application.name | - | Yarn 应用名称 | +| taskmanager.heap.mb | MB | TaskManager 堆内存大小 | +| taskmanager.memory.process.size | GB | TaskManager 进程内存大小 | +| web.port | 端口号 | Web 端口 | +| classloader.resolve-order | - | 类加载器解析顺序 | +| jobmanager.heap.mb | MB | JobManager 堆内存大小 | +| jobmanager.memory.off-heap.size | 字节 | JobManager 堆外内存大小 | +| state.backend.incremental | - | 状态后端是否增量 | +| execution.target | - | 执行目标 | +| jobmanager.memory.process.size | GB | JobManager 进程内存大小 | +| web.tmpdir | 路径 | Web 临时目录 | +| yarn.ship-files | 路径 | Yarn 传输文件 | +| jobmanager.rpc.port | 端口号 | JobManager 的 RPC 端口 | +| internal.io.tmpdirs.use-local-default | - | 是否使用本地默认临时目录 | +| execution.checkpointing.interval | 毫秒 | 检查点间隔 | +| execution.attached | - | 是否附加执行 | +| internal.cluster.execution-mode | - | 内部集群执行模式 | +| execution.shutdown-on-attached-exit | - | 是否在附加退出时关闭 | +| pipeline.jars | 路径 | 管道 JAR 文件 | +| rest.address | - | REST 地址 | +| state.backend | - | 状态后端类型 | +| jobmanager.memory.jvm-metaspace.size | 字节 | JobManager JVM 元空间大小 | +| $internal.deployment.config-dir | 路径 | 内部部署配置目录 | +| $internal.yarn.log-config-file | 路径 | 内部 Yarn 日志配置文件路径 | +| jobmanager.memory.heap.size | 字节 | JobManager 堆内存大小 | +| state.checkpoints.dir | 路径 | 状态检查点目录 | +| jobmanager.memory.jvm-overhead.max | 字节 | JobManager 的 JVM 开销最大值 | + +#### TaskManager + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------------------|------|-----------------------------------| +| Container ID | - | 容器 ID,用于唯一标识一个容器 | +| Path | - | 容器路径 | +| Data Port | 端口号 | 数据传输端口 | +| JMX Port | 端口号 | JMX(Java Management Extensions)端口 | +| Last Heartbeat | 时间戳 | 最后一次心跳时间 | +| All Slots | 数量 | 容器中所有任务槽的数量 | +| Free Slots | 数量 | 容器中空闲任务槽的数量 | +| totalResourceCpuCores | 核心数 | 容器总的CPU核心数 | +| totalResourceTaskHeapMemory | MB | 容器总的任务堆内存大小 | +| totalResourceManagedMemory | MB | 容器总的托管内存大小 | +| totalResourceNetworkMemory | MB | 容器总的网络内存大小 | +| freeResourceCpuCores | 核心数 | 容器中空闲的CPU核心数 | +| freeResourceTaskHeapMemory | MB | 容器中空闲的任务堆内存大小 | +| freeResourceTaskOffHeapMemory | MB | 容器中空闲的任务堆外内存大小 | +| freeResourceManagedMemory | MB | 容器中空闲的托管内存大小 | +| freeResourceNetworkMemory | MB | 容器中空闲的网络内存大小 | +| CPU Cores | 核心数 | CPU核心数 | +| Physical MEM | MB | 物理内存大小 | +| JVM Heap Size | MB | JVM堆内存大小 | +| Flink Managed MEM | MB | Flink管理的内存大小 | +| Framework Heap | MB | 框架堆内存大小 | +| Task Heap | MB | 任务堆内存大小 | +| Framework Off-Heap | MB | 框架堆外内存大小 | +| memoryConfigurationTaskOffHeap | Byte | 任务堆外内存配置 | +| Network | MB | 网络内存配置 | +| Managed Memory | MB | 托管内存配置 | +| JVM Metaspace | MB | JVM元空间大小 | +| JVM Overhead | MB | JVM开销 | +| memoryConfigurationTotalFlinkMemory | Byte | Flink总内存配置 | +| memoryConfigurationTotalProcessMemory | Byte | 进程总内存配置 | + +#### TaskManager Metrics + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------------------|------|----------------------| +| Status.Shuffle.Netty.TotalMemory | MB | Netty Shuffle 使用的总内存 | +| Status.Flink.Memory.Managed.Used | MB | Flink 管理的已用内存 | +| Status.JVM.Memory.Metaspace.Used | MB | JVM 元空间已使用的内存 | +| Status.JVM.Memory.Metaspace.Max | MB | JVM 元空间的最大内存 | +| Status.JVM.Memory.Heap.Used | MB | JVM 堆内存已使用的内存 | +| Status.JVM.Memory.Heap.Max | MB | JVM 堆内存的最大容量 | +| Status.Flink.Memory.Managed.Total | MB | Flink 管理的内存总量 | +| Status.Shuffle.Netty.UsedMemory | MB | Netty Shuffle 使用的内存 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/freebsd.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/freebsd.md new file mode 100644 index 0000000000..b05dcd5871 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/freebsd.md @@ -0,0 +1,96 @@ +--- +id: freebsd +title: 监控:FreeBSD操作系统监控 +sidebar_label: FreeBSD 操作系统 +keywords: [ 开源监控系统, 开源操作系统监控, FreeBSD操作系统监控 ] +--- + +> 对FreeBSD操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号,默认为22。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ftp.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ftp.md new file mode 100644 index 0000000000..ef5f6c61b9 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ftp.md @@ -0,0 +1,56 @@ +--- +id: ftp +title: 监控:FTP服务器 +sidebar_label: FTP服务器 +keywords: [ 开源监控系统, 开源FTP服务器监控工具, 监控FTP指标 ] +--- + +> 采集和监控FTP服务的通用指标 + +**协议使用:FTP** + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|--------------------------------------| +| 目标Host | 被监控的IPv4、IPv6。注意⚠️不包含协议头(例如:ftp://)。 | +| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | FTP服务端口,默认值:21。 | +| 目录 | FTP服务托管的目录。 | +| 超时时间 | 连接FTP服务器超时时间,默认值:1000毫秒。 | +| 用户名 | 连接FTP服务的用户名, 可选。 | +| 密码 | 连接FTP服务的密码,可选。 | +| 启用SFTP | 使用SFTP替代FTP;SFTP必须配置用户名和密码。 | +| SFTP主机密钥指纹 | 可信的SFTP服务器SHA-256指纹,每行一个或使用逗号分隔;除非显式跳过验证,否则必填。 | +| 跳过主机密钥验证 | **危险选项。** 仅应用于受控诊断;启用后无法验证SFTP服务器身份。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +## SFTP主机密钥验证 + +HertzBeat只接受已配置的SFTP主机密钥。请先获取服务器密钥,再通过服务器控制台、 +配置管理系统或管理员等可信渠道核对指纹。单独使用`ssh-keyscan`不能证明服务器身份。 + +```shell +ssh-keyscan -p 22 sftp.example.com > /tmp/sftp-host-keys +ssh-keygen -lf /tmp/sftp-host-keys -E sha256 +``` + +将核对后的`SHA256:...`填写到“SFTP主机密钥指纹”中。可以每行填写一个,也可以用 +逗号分隔。 + +计划轮换主机密钥时,先通过可信渠道核对新密钥,将旧、新指纹同时加入配置,再轮换 +服务器密钥;所有HertzBeat采集器都使用新密钥后,才能删除旧指纹。 + +SFTP监控和导入的配置必须至少固定一个指纹;只有操作员显式选择危险的跳过验证 +选项时才允许省略。HertzBeat不会自动启用该选项。 + +### 采集指标 + +#### 指标集合:概要 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|------------------| +| 活动状态 | 无 | 检查目录是否存在,且具有访问权限 | +| 响应时间 | ms | 连接FTP响应时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/fullsite.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/fullsite.md new file mode 100644 index 0000000000..6654737434 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/fullsite.md @@ -0,0 +1,34 @@ +--- +id: fullsite +title: 监控:全站监控 +sidebar_label: 全站监控 +keywords: [开源监控系统, 开源网站监控, SiteMap监控] +--- + +> 对网站的全部页面监测是否可用 +> 往往一个网站有多个不同服务提供的页面,我们通过采集网站暴露出来的网站地图SiteMap来监控全站。 +> 注意⚠️,此监控需您网站支持SiteMap。我们支持XML和TXT格式的SiteMap。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 网站对外提供的端口,http一般默认为80,https一般默认为443。 | +| 网站地图 | 网站SiteMap地图地址的相对路径,例如:/sitemap.xml。 | +| 启用HTTPS | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:summary + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|-----------------| +| url | 无 | 网页的URL路径 | +| statusCode | 无 | 请求此网页的响应HTTP状态码 | +| responseTime | ms毫秒 | 网站响应时间 | +| errorMsg | 无 | 请求此网站反馈的错误信息 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/grafana_dashboard.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/grafana_dashboard.md new file mode 100644 index 0000000000..de49c89823 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/grafana_dashboard.md @@ -0,0 +1,78 @@ +--- +id: grafana_dashboard +title: Grafana Dashboard +sidebar_label: Grafana历史图表 +keywords: [Grafana, 历史图表] +--- + +> `Grafana`是一个开源的可视化和分析平台,它可以帮助你轻松地创建、分享和监控仪表板。本文将介绍如何在`HertzBeat`中使用`Grafana`展示历史数据。 + +## 前提条件 + +- 我们推荐使用最新的`Grafana`版本,早期的版本可能不支持暴露 api。 +- `Grafana`服务已经启动,并配置好了账号密码。 +- `HertzBeat`服务已经启动,并配置好了`VictoriaMetrics`时序数据库(注意: `VictoriaMetrics`数据源是必须的)。 + +:::caution 注意 +`Grafana`只能展示`Prometheus`类型监控的历史数据,目前并不支持`HertzBeat`中`yml`定义的监控数据。 +::: + +### 启用Grafana可嵌入功能, 并配置匿名访问及权限角色 + +参考: [https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/](https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/), +修改配置文件`grafana.ini`中的配置项参数, +或者通过`docker`运行`Grafana`。 + +修改配置文件`grafana.ini`中的以下配置项参数: + +```ini +[auth.proxy] +enabled = true + +[auth.anonymous] +enabled = true +org_role = Admin + +[users] +viewers_can_edit = true + +[security] +allow_embedding = true +``` + +或者通过`docker`启动`Grafana`,使用以下命令: + +```bash +docker run -d -p 3000:3000 --name=grafana \ + -v "$PWD/data:/var/lib/grafana" \ + -e "GF_AUTH_PROXY_ENABLED=true" \ + -e "GF_AUTH_ANONYMOUS_ENABLED=true" \ + -e "GF_AUTH_ANONYMOUS_ORG_ROLE=Admin" \ + -e "GF_USERS_VIEWERS_CAN_EDIT=true" \ + -e "GF_SECURITY_ALLOW_EMBEDDING=true" \ + grafana/grafana:latest +``` + +### 在HertzBeat中配置Grafana + +在`HertzBeat`的配置文件`application.yml`中,配置`Grafana`数据源: + +```yaml +grafana: + enabled: true + url: http://127.0.0.1:3000 + username: admin + password: admin +``` + +### 在HertzBeat监控中上传Grafana监控模板json文件 + +在`HertzBeat`新建或编辑`Prometheus`类型监控时,点击启用Grafana模板,选择Grafana模板json文件上传。 +监控模板json文件可以在 [https://grafana.com/grafana/dashboards/](https://grafana.com/grafana/dashboards/) 下载。 +比如,在`HertzBeat`中新建一个关于`VictoriaMetrics`单节点的监控,然后打开 [https://grafana.com/grafana/dashboards/10229-victoriametrics-single-node/](https://grafana.com/grafana/dashboards/10229-victoriametrics-single-node/) ,点击右侧 `Download JSON`按钮,下载模板json文件。在`HertzBeat`监控中上传模板json文件,保存。 + ![grafana-1.png](/img/docs/help/grafana-1.png) + +### 查看Grafana历史图表 + +在`HertzBeat`监控页面,点击`Grafana`按钮,选择`Grafana`历史图表,选择监控模板,点击`查询`按钮,即可查看`Grafana`历史图表。 + ![grafana-2.png](/img/docs/help/grafana-2.png) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/greenplum.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/greenplum.md new file mode 100644 index 0000000000..1d32da0040 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/greenplum.md @@ -0,0 +1,55 @@ +--- +id: greenplum +title: 监控:GreenPlum 数据库监控 +sidebar_label: GreenPlum 数据库 +keywords: [开源监控系统, 开源数据库监控, GreenPlum 数据库监控] +--- + +> 对 GreenPlum 数据库的通用性能指标进行采集监控。支持 GreenPlum 6.23.0+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------| +| 监控Host | 被监控的 Host 地址。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为5432。 | +| 查询超时时间 | 设置 SQL 查询未响应数据时的超时时间,单位 ms 毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则 URL 里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|---------------| +| server_version | 无 | 数据库服务器的版本号 | +| port | 无 | 数据库服务器端暴露服务端口 | +| server_encoding | 无 | 数据库服务器端的字符集编码 | +| data_directory | 无 | 数据库存储数据盘地址 | +| max_connections | 连接数 | 数据库最大连接数 | + +#### 指标集合:state + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|-------------------------------------------------------------------------| +| name | 无 | 数据库名称,或 share-object 为共享对象。 | +| conflicts | 次数 | 由于与恢复冲突而在这个数据库中被取消的查询的数目 | +| deadlocks | 个数 | 在这个数据库中被检测到的死锁数 | +| blks_read | 次数 | 在这个数据库中被读取的磁盘块的数量 | +| blks_hit | 次数 | 磁盘块被发现已经在缓冲区中的次数,这样不需要一次读取(这只包括 GreenPlum 缓冲区中的命中,而不包括在操作系统文件系统缓冲区中的命中) | +| blk_read_time | ms | 在这个数据库中后端花费在读取数据文件块的时间 | +| blk_write_time | ms | 在这个数据库中后端花费在写数据文件块的时间 | +| stats_reset | 无 | 这些统计信息上次被重置的时间 | + +#### 指标集合:activity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------| +| running | 连接数 | 当前客户端连接数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/guide.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/guide.md new file mode 100644 index 0000000000..5790fab6c2 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/guide.md @@ -0,0 +1,144 @@ +--- +id: guide +title: 帮助中心 +sidebar_label: 帮助入门 +--- + +> 易用友好的实时监控工具,无需Agent,强大自定义监控能力。 +> 使用过程中的帮助文档,辅助信息。 + +## 🔬 监控服务 + +> 定时采集监控对端服务暴露的性能指标,提供可视化界面,处理数据供告警等服务调度。 +> 规划的监控类型:应用服务,数据库,操作系统,云原生,开源中间件 + +### 应用服务监控 + + 👉 [网站监测](website)
+ 👉 [HTTP API](api)
+ 👉 [PING连通性](ping)
+ 👉 [端口可用性](port)
+ 👉 [全站监控](fullsite)
+ 👉 [SSL证书有效期](ssl_cert)
+ 👉 [JVM虚拟机](jvm)
+ 👉 [SpringBoot2.0](springboot2)
+ 👉 [DNS服务器](dns)
+ 👉 [FTP服务器](ftp)
+ 👉 [Websocket](websocket)
+ 👉 [MQTT连接](mqtt)
+ +### 应用程序监控 + + 👉 [Linux进程](process)
+ 👉 [JVM虚拟机](jvm)
+ 👉 [SpringBoot2.0](springboot2)
+ 👉 [SpringBoot3.0](springboot3)
+ 👉 [DynamicTp线程池](dynamic_tp)
+ +### 数据库监控 + + 👉 [MYSQL数据库监控](mysql)
+ 👉 [MariaDB数据库监控](mariadb)
+ 👉 [PostgreSQL数据库监控](postgresql)
+ 👉 [SqlServer数据库监控](sqlserver)
+ 👉 [Oracle数据库监控](oracle)
+ 👉 [达梦数据库监控](dm)
+ 👉 [OpenGauss数据库监控](opengauss)
+ 👉 [IoTDB数据库监控](iotdb)
+ 👉 [TiDB数据库监控](tidb)
+ 👉 [MongoDB数据库监控](mongodb)
+ 👉 [NebulaGraph集群监控](nebulagraph_cluster)
+ +### 缓存监控 + + 👉 [Redis](redis)
+ 👉 [Memcached](memcached)
+ +### 操作系统监控 + + 👉 [Linux操作系统监控](linux)
+ 👉 [Windows操作系统监控](windows)
+ 👉 [Ubuntu操作系统监控](ubuntu)
+ 👉 [Centos操作系统监控](centos)
+ 👉 [FreeBSD操作系统监控](freebsd)
+ 👉 [RedHat操作系统监控](redhat)
+ 👉 [RockyLinux操作系统监控](rockylinux)
+ 👉 [EulerOS操作系统监控](euleros)
+ +### 中间件监控 + + 👉 [Zookeeper](zookeeper)
+ 👉 [Kafka](kafka)
+ 👉 [Tomcat](tomcat)
+ 👉 [ShenYu](shenyu)
+ 👉 [DynamicTp](dynamic_tp)
+ 👉 [RabbitMQ](rabbitmq)
+ 👉 [ActiveMQ](activemq)
+ 👉 [Jetty](jetty)
+ 👉 [Nacos](nacos)
+ +### 云原生监控 + + 👉 [Docker](docker)
+ 👉 [Kubernetes](kubernetes)
+ +### 大数据监控 + + 👉 [Clickhouse](clickhouse)
+ 👉 [ElasticSearch](elasticsearch)
+ 👉 [Flink](flink)
+ +### AI大模型监控 + + 👉 [OpenAi](openai)
+ +### 网络监控 + + 👉 [华为通用交换机](huawei_switch)
+ +### 服务器监控 + +## 💡 告警服务 + +> 更自由化的阈值告警配置,支持邮箱,短信,webhook,钉钉,企业微信,飞书机器人等告警通知。 +> 告警服务的定位是阈值准确及时触发,告警通知及时可达。 + +### 告警中心 + +> 已触发的告警信息中心,提供告警删除,告警处理,标记未处理,告警级别状态等查询过滤。 + +详见 👉 [告警中心](alarm_center) + +### 告警配置 + +> 指标阈值配置,提供表达式形式的指标阈值配置,可设置告警级别,触发次数,告警通知模板和是否启用,关联监控等功能。 + +详见 👉 [阈值告警](alert_threshold)
+   👉 [阈值表达式](alert_threshold_expr) + +### 告警收敛 + +> 通过分组收敛、告警抑制等功能合并相关告警,减少由一个事件引发的告警风暴,降低告警噪声,提升告警响应效率。 + +详见 👉 [分组收敛](alarm_group)
+   👉 [告警抑制](alarm_inhibit) + +### 告警通知 + +> 触发告警信息后,除了显示在告警中心列表外,还可以用指定方式(邮件钉钉微信飞书等)通知给指定接收人。 +> 告警通知提供设置不同类型的通知方式,如邮件接收人,企业微信机器人通知,钉钉机器人通知,飞书机器人通知。 +> 接收人设置后需要设置关联的告警通知策略,来配置哪些告警信息发给哪些接收人。 + + 👉 [配置邮箱通知](alert_email)
+ 👉 [配置 Webhook 通知](alert_webhook)
+ 👉 [配置 Telegram 通知](alert_telegram)
+ 👉 [配置 Discord 通知](alert_discord)
+ 👉 [配置 Slack 通知](alert_slack)
+ 👉 [配置企业微信机器人通知](alert_wework)
+ 👉 [配置钉钉机器人通知](alert_dingtalk)
+ 👉 [配置飞书机器人通知](alert_feishu)
+ 👉 [配置华为云SMN通知](alert_smn)
+ +### 插件 + + 👉 [插件](plugin)
diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/h2.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/h2.md new file mode 100644 index 0000000000..b5368c3014 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/h2.md @@ -0,0 +1,136 @@ +--- +id: h2 +title: H2 数据库 - 仅供测试,禁止生产环境使用 +sidebar_label: H2 数据库(仅供测试) +keywords: [开源监控工具, H2 数据库, 测试, 禁止生产环境, 安全警告] +--- + +> ⚠️ **严重安全警告**:H2 数据库**不适合生产环境**。它仅供本地测试和开发使用。在生产环境中使用 H2 会使您的服务器面临严重的安全漏洞。在使用 H2 之前,请仔细阅读本页面。 + +## 🔴 安全风险 - 使用前必读 + +### 什么是 H2 数据库? + +H2 是一个开源的 Java SQL 数据库。HertzBeat 内置 H2 作为**默认嵌入式数据库**,以便在无需单独安装数据库的情况下快速进行测试和评估。 + +### 为什么 H2 在生产环境中危险 + +H2 拥有一个叫做 `CREATE ALIAS` 的内置功能,允许在数据库查询中执行任意 Java 代码。这意味着: + +```sql +-- 极其危险的 H2 功能示例: +CREATE ALIAS EXEC AS $$ +String exec(String cmd) throws Exception { + Runtime.getRuntime().exec(cmd); + return null; +} +$$; + +-- 可以在服务器上执行 Shell 命令: +CALL EXEC('rm -rf /重要数据'); +``` + +如果您的 H2 数据库被恶意用户访问,他们可以: + +- **在 HertzBeat 服务器上执行任意 Shell 命令** +- **读取 HertzBeat 进程可访问的任何文件** +- **完全控制运行 HertzBeat 的服务器** +- **访问所有监控数据**,包括敏感凭据 + +📖 详细信息请参阅官方 [H2 安全文档](https://h2database.com/html/security.html)。 + +### 网络暴露风险 + +H2 可以以服务器模式运行,可能在网络上暴露数据库管理界面。默认情况下,H2 使用端口 **8082**(Web 控制台)和 **9092**(TCP 服务器)。如果这些端口可以从外部访问,任何用户都可以直接连接到您的数据库。 + +--- + +## ✅ H2 适合的场景 + +- **本地开发**:快速搭建评估 HertzBeat 功能 +- **自动化测试**:隔离环境中的 CI/CD 流水线 +- **演示展示**:向利益相关者展示 HertzBeat +- **学习了解**:在生产部署前了解 HertzBeat + +--- + +## 🚫 H2 不适合的场景 + +- 生产部署 +- 多用户环境 +- 含有敏感监控数据的系统 +- 可从互联网访问的 HertzBeat 实例 +- 需要跨重启数据持久化的环境 +- 高可用性部署 + +--- + +## 🔒 迁移到生产数据库 + +对于生产使用,请迁移到以下支持的数据库之一: + +### MySQL / MariaDB(推荐用于大多数部署) + +1. 安装 MySQL 5.7+ 或 MariaDB 10.5+ +2. 创建专用数据库和用户: + + ```sql + CREATE DATABASE hertzbeat; + CREATE USER 'hertzbeat'@'localhost' IDENTIFIED BY '强密码'; + GRANT ALL PRIVILEGES ON hertzbeat.* TO 'hertzbeat'@'localhost'; + FLUSH PRIVILEGES; + ``` + +3. 更新 `application.yml`: + + ```yaml + spring: + datasource: + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8 + username: hertzbeat + password: 强密码 + driver-class-name: com.mysql.cj.jdbc.Driver + ``` + +4. 下载 MySQL JDBC 驱动并放入 `ext-lib/` +5. 重启 HertzBeat + +### PostgreSQL(推荐用于企业部署) + +1. 安装 PostgreSQL 12+ +2. 创建数据库和用户: + + ```sql + CREATE USER hertzbeat WITH PASSWORD '强密码'; + CREATE DATABASE hertzbeat OWNER hertzbeat; + GRANT ALL PRIVILEGES ON DATABASE hertzbeat TO hertzbeat; + ``` + +3. 更新 `application.yml`: + +```yaml +spring: + datasource: + url: jdbc:postgresql://localhost:5432/hertzbeat + username: hertzbeat + password: 强密码 + driver-class-name: org.postgresql.Driver +``` + +--- + +## 📋 生产部署前安全检查清单 + +在任何非测试环境中部署 HertzBeat 之前,请验证: + +- [ ] H2 数据库已替换为 MySQL 或 PostgreSQL +- [ ] H2 Web 控制台已禁用 +- [ ] 数据库凭据强大且唯一 +- [ ] 数据库无法直接从互联网访问 +- [ ] HertzBeat 通过带 SSL 的反向代理运行 +- [ ] 监控凭据已加密且受访问控制保护 +- [ ] 已配置定期数据库备份 + +--- + +> **记住**:H2 的便利性是以安全为代价换来的。在任何实际环境中部署 HertzBeat 之前,请务必计划迁移到生产级数据库。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hadoop.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hadoop.md new file mode 100644 index 0000000000..911bff0eed --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hadoop.md @@ -0,0 +1,89 @@ +--- +id: hadoop +title: 监控:Hadoop +sidebar_label: Apache Hadoop +keywords: [开源监控系统, 开源JAVA监控, Hadoop的JVM虚拟机监控] +--- + +> 对Hadoop的JVM虚拟机的通用性能指标进行采集监控 + +**使用协议:JMX** + +## 监控前操作 +> +> 您需要在 Hadoop 应用开启 `JMX` 服务,HertzBeat 使用 JMX 协议对Hadoop中的 JVM 进行指标采集。 + +### Hadoop应用开启JMX协议步骤 + +应用启动时添加JVM参数 ⚠️注意可自定义暴露端口,对外IP + +- 1.进入hadoop-env.sh配置文件,在命令行终端输入以下命令: + +```shell +vi $HADOOP_HOME/etc/hadoop/hadoop-env.sh +``` + +- 2.添加如下参数,`` 为自定义暴露端口号。 + +```shell +export HADOOP_OPTS= "$HADOOP_OPTS +-Djava.rmi.server.hostname=对外ip地址 +-Dcom.sun.management.jmxremote.port=9999 +-Dcom.sun.management.jmxremote.ssl=false +-Dcom.sun.management.jmxremote.authenticate=false " +``` + +- 3.保存并退出,并在 $HADOOP_HOME/sbin 目录下执行 `start-all.sh` 重启服务。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置JVM连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 用户名 | JMX连接用户名 | +| 密码 | JMX连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:memory_pool + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| name | 无 | 指标名称 | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:code_cache (限JDK8及以下) + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:class_loading + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|----------| +| LoadedClassCount | 个 | 已加载类数量 | +| TotalLoadedClassCount | 个 | 历史已加载类总量 | +| UnloadedClassCount | 个 | 未加载类数量 | + +#### 指标集合:thread + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|-----------| +| TotalStartedThreadCount | 个 | 已经开始的线程数量 | +| ThreadCount | 个 | 线程数 | +| PeakThreadCount | 个 | 未加载类数量 | +| DaemonThreadCount | 个 | 守护进程数 | +| CurrentThreadUserTime | ms | 使用时间 | +| CurrentThreadCpuTime | ms | 使用CPU时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hbase_master.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hbase_master.md new file mode 100644 index 0000000000..6912712607 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hbase_master.md @@ -0,0 +1,59 @@ +--- +id: hbase_master +title: 监控:Hbase Master监控 +sidebar_label: Apache Hbase Master +keywords: [开源监控系统, 开源数据库监控, HbaseMaster监控] +--- + +> 对Hbase Master的通用性能指标进行采集监控 + +**使用协议:HTTP** + +## 监控前操作 + +查看 `hbase-site.xml` 文件,获取 `hbase.master.info.port` 配置项的值,该值用作监控使用。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 端口 | hbase master的端口号,默认为16010。即:`hbase.master.info.port`参数值 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:server + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------|------|-------------------------| +| numRegionServers | 无 | 当前存活的 RegionServer 个数 | +| numDeadRegionServers | 无 | 当前Dead的 RegionServer 个数 | +| averageLoad | 无 | 集群平均负载 | +| clusterRequests | 无 | 集群请求数量 | + +#### 指标集合:Rit + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|--------------| +| ritCount | 无 | 当前的 RIT 数量 | +| ritCountOverThreshold | 无 | 超过阈值的 RIT 数量 | +| ritOldestAge | ms | 最老的RIT的持续时间 | + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|--------------------| +| liveRegionServers | 无 | 当前活跃RegionServer列表 | +| deadRegionServers | 无 | 当前离线RegionServer列表 | +| zookeeperQuorum | 无 | Zookeeper列表 | +| masterHostName | 无 | Master节点 | +| BalancerCluster_num_ops | 无 | 集群负载均衡次数 | +| numActiveHandler | 无 | RPC句柄数 | +| receivedBytes | MB | 集群接收数据量 | +| sentBytes | MB | 集群发送数据量(MB) | +| clusterRequests | 无 | 集群总请求数量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hbase_regionserver.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hbase_regionserver.md new file mode 100644 index 0000000000..3bb7b892ef --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hbase_regionserver.md @@ -0,0 +1,93 @@ +--- +id: hbase_regionserver +title: 监控:Hbase RegionServer监控 +sidebar_label: Apache Hbase RegionServer +keywords: [开源监控系统, 开源数据库监控, RegionServer监控] +--- + +> 对Hbase RegionServer的通用性能指标进行采集监控 + +**使用协议:HTTP** + +## 监控前操作 + +查看 `hbase-site.xml` 文件,获取 `hbase.regionserver.info.port` 配置项的值,该值用作监控使用。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 端口 | hbase regionserver的端口号,默认为16030。即:`hbase.regionserver.info.port`参数值 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +> 所有指标名称均直接引用官方的字段,所以存在命名不规范。 + +#### 指标集合:server + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------------------|-------|-----------------------------------------| +| regionCount | 无 | Region数量 | +| readRequestCount | 无 | 重启集群后的读请求数量 | +| writeRequestCount | 无 | 重启集群后的写请求数量 | +| averageRegionSize | MB | 平均Region大小 | +| totalRequestCount | 无 | 全部请求数量 | +| ScanTime_num_ops | 无 | Scan 请求总量 | +| Append_num_ops | 无 | Append 请求量 | +| Increment_num_ops | 无 | Increment请求量 | +| Get_num_ops | 无 | Get 请求量 | +| Delete_num_ops | 无 | Delete 请求量 | +| Put_num_ops | 无 | Put 请求量 | +| ScanTime_mean | 无 | 平均 Scan 请求时间 | +| ScanTime_min | 无 | 最小 Scan 请求时间 | +| ScanTime_max | 无 | 最大 Scan 请求时间 | +| ScanSize_mean | bytes | 平均 Scan 请求大小 | +| ScanSize_min | 无 | 最小 Scan 请求大小 | +| ScanSize_max | 无 | 最大 Scan 请求大小 | +| slowPutCount | 无 | 慢操作次数/Put | +| slowGetCount | 无 | 慢操作次数/Get | +| slowAppendCount | 无 | 慢操作次数/Append | +| slowIncrementCount | 无 | 慢操作次数/Increment | +| slowDeleteCount | 无 | 慢操作次数/Delete | +| blockCacheSize | 无 | 缓存块内存占用大小 | +| blockCacheCount | 无 | 缓存块数量_Block Cache 中的 Block 数量 | +| blockCacheExpressHitPercent | 无 | 读缓存命中率 | +| memStoreSize | 无 | Memstore 大小 | +| FlushTime_num_ops | 无 | RS写磁盘次数/Memstore flush 写磁盘次数 | +| flushQueueLength | 无 | Region Flush 队列长度 | +| flushedCellsSize | 无 | flush到磁盘大小 | +| storeFileCount | 无 | Storefile 个数 | +| storeCount | 无 | Store 个数 | +| storeFileSize | 无 | Storefile 大小 | +| compactionQueueLength | 无 | Compaction 队列长度 | +| percentFilesLocal | 无 | Region 的 HFile 位于本地 HDFS Data Node的比例 | +| percentFilesLocalSecondaryRegions | 无 | Region 副本的 HFile 位于本地 HDFS Data Node的比例 | +| hlogFileCount | 无 | WAL 文件数量 | +| hlogFileSize | 无 | WAL 文件大小 | + +#### 指标集合:IPC + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------|------|--------------| +| numActiveHandler | 无 | 当前的 RIT 数量 | +| NotServingRegionException | 无 | 超过阈值的 RIT 数量 | +| RegionMovedException | ms | 最老的RIT的持续时间 | +| RegionTooBusyException | ms | 最老的RIT的持续时间 | + +#### 指标集合:JVM + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------|------|--------------------| +| MemNonHeapUsedM | 无 | 当前活跃RegionServer列表 | +| MemNonHeapCommittedM | 无 | 当前离线RegionServer列表 | +| MemHeapUsedM | 无 | Zookeeper列表 | +| MemHeapCommittedM | 无 | Master节点 | +| MemHeapMaxM | 无 | 集群负载均衡次数 | +| MemMaxM | 无 | RPC句柄数 | +| GcCount | MB | 集群接收数据量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hdfs_datanode.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hdfs_datanode.md new file mode 100644 index 0000000000..7057c221dd --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hdfs_datanode.md @@ -0,0 +1,56 @@ +--- +id: hdfs_datanode +title: 监控:Apache HDFS DataNode监控 +sidebar_label: Apache HDFS DataNode +keywords: [大数据监控系统, 分布式文件系统监控, Apache HDFS DataNode监控] +--- + +> HertzBeat 对 Apache HDFS DataNode 节点监控指标进行监控。 + +**使用协议:HTTP** + +## 监控前操作 + +获取 Apache HDFS DataNode 的 HTTP 监控端口。 取值:`dfs.datanode.http.address` + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|----------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。不带协议头。 | +| 端口 | Apache HDFS DataNode 的监控端口号,默认为50075。 | +| 查询超时时间 | 查询 Apache HDFS DataNode 的超时时间,单位毫秒,默认6000毫秒。 | +| 指标采集间隔 | 监控数据采集的时间间隔,单位秒,最小间隔为30秒。 | +| 是否探测 | 新增监控前是否先探测检查监控可用性。 | +| 描述备注 | 此监控的更多描述和备注信息。 | + +### 采集指标 + +#### 指标集合:FSDatasetState + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|-------------------| +| DfsUsed | GB | DataNode HDFS使用量 | +| Remaining | GB | DataNode HDFS剩余空间 | +| Capacity | GB | DataNode HDFS空间总量 | + +#### 指标集合:JvmMetrics + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------|------|-------------------------------| +| MemNonHeapUsedM | MB | JVM 当前已经使用的 NonHeapMemory 的大小 | +| MemNonHeapCommittedM | MB | JVM 配置的 NonHeapCommittedM 的大小 | +| MemHeapUsedM | MB | JVM 当前已经使用的 HeapMemory 的大小 | +| MemHeapCommittedM | MB | JVM HeapMemory 提交大小 | +| MemHeapMaxM | MB | JVM 配置的 HeapMemory 的大小 | +| MemMaxM | MB | JVM 运行时可以使用的最大内存大小 | +| ThreadsRunnable | 个 | 处于 RUNNABLE 状态的线程数量 | +| ThreadsBlocked | 个 | 处于 BLOCKED 状态的线程数量 | +| ThreadsWaiting | 个 | 处于 WAITING 状态的线程数量 | +| ThreadsTimedWaiting | 个 | 处于 TIMED WAITING 状态的线程数量 | + +#### 指标集合:runtime + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| StartTime | | 启动时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hdfs_namenode.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hdfs_namenode.md new file mode 100644 index 0000000000..1ac2cc63cb --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hdfs_namenode.md @@ -0,0 +1,92 @@ +--- +id: hdfs_namenode +title: 监控:Apache HDFS NameNode监控 +sidebar_label: Apache HDFS NameNode +keywords: [大数据监控系统, 分布式文件系统监控, Apache HDFS NameNode监控] +--- + +> HertzBeat 对 Apache HDFS NameNode 节点监控指标进行监控。 + +**使用协议:HTTP** + +## 监控前操作 + +获取 Apache HDFS NameNode 的 HTTP 监控端口。取值:`dfs.namenode.http-address` + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。不带协议头。 | +| 端口 | HDFS NameNode 的监控端口号,默认为50070。 | +| 查询超时时间 | 查询 HDFS NameNode 的超时时间,单位毫秒,默认6000毫秒。 | +| 指标采集间隔 | 监控数据采集的时间间隔,单位秒,最小间隔为30秒。 | +| 是否探测 | 新增监控前是否先探测检查监控可用性。 | +| 描述备注 | 此监控的更多描述和备注信息。 | + +### 采集指标 + +#### 指标集合:FSNamesystem + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------------|------|---------------------------------------------| +| CapacityTotal | | 集群存储总容量 | +| CapacityTotalGB | GB | 集群存储总容量 | +| CapacityUsed | | 集群存储已使用容量 | +| CapacityUsedGB | GB | 集群存储已使用容量 | +| CapacityRemaining | | 集群存储剩余容量 | +| CapacityRemainingGB | GB | 集群存储剩余容量 | +| CapacityUsedNonDFS | | 集群非 HDFS 使用容量 | +| TotalLoad | | 整个集群的客户端连接数 | +| FilesTotal | | 集群文件总数量 | +| BlocksTotal | | 总 BLOCK 数量 | +| PendingReplicationBlocks | | 等待被备份的块数量 | +| UnderReplicatedBlocks | | 副本数不够的块数量 | +| CorruptBlocks | | 坏块数量 | +| ScheduledReplicationBlocks | | 安排要备份的块数量 | +| PendingDeletionBlocks | | 等待被删除的块数量 | +| ExcessBlocks | | 多余的块数量 | +| PostponedMisreplicatedBlocks | | 被推迟处理的异常块数量 | +| NumLiveDataNodes | | 活的数据节点数量 | +| NumDeadDataNodes | | 已经标记为 Dead 状态的数据节点数量 | +| NumDecomLiveDataNodes | | 下线且 Live 的节点数量 | +| NumDecomDeadDataNodes | | 下线且 Dead 的节点数量 | +| NumDecommissioningDataNodes | | 正在下线的节点数量 | +| TransactionsSinceLastCheckpoint | | 从上次Checkpoint之后的事务数量 | +| LastCheckpointTime | | 上一次Checkpoint时间 | +| PendingDataNodeMessageCount | | DATANODE 的请求被 QUEUE 在 standby namenode 中的个数 | + +#### 指标集合:RPC + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|----------| +| ReceivedBytes | | 接收数据速率 | +| SentBytes | | 发送数据速率 | +| RpcQueueTimeNumOps | | RPC 调用速率 | + +#### 指标集合:runtime + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| StartTime | | 启动时间 | + +#### 指标集合:JvmMetrics + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------------|------|-------------------------------| +| MemNonHeapUsedM | MB | JVM 当前已经使用的 NonHeapMemory 的大小 | +| MemNonHeapCommittedM | MB | JVM 配置的 NonHeapCommittedM 的大小 | +| MemHeapUsedM | MB | JVM 当前已经使用的 HeapMemory 的大小 | +| MemHeapCommittedM | MB | JVM HeapMemory 提交大小 | +| MemHeapMaxM | MB | JVM 配置的 HeapMemory 的大小 | +| MemMaxM | MB | JVM 运行时可以使用的最大内存大小 | +| GcCountParNew | 次 | 新生代GC消耗时间 | +| GcTimeMillisParNew | 毫秒 | 新生代GC消耗时间 | +| GcCountConcurrentMarkSweep | 毫秒 | 老年代GC次数 | +| GcTimeMillisConcurrentMarkSweep | 个 | 老年代GC消耗时间 | +| GcCount | 个 | GC次数 | +| GcTimeMillis | 个 | GC消耗时间 | +| ThreadsRunnable | 个 | 处于 BLOCKED 状态的线程数量 | +| ThreadsBlocked | 个 | 处于 BLOCKED 状态的线程数量 | +| ThreadsWaiting | 个 | 处于 WAITING 状态的线程数量 | +| ThreadsTimedWaiting | 个 | 处于 TIMED WAITING 状态的线程数量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hikvision_isapi.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hikvision_isapi.md new file mode 100644 index 0000000000..1792d6647d --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hikvision_isapi.md @@ -0,0 +1,60 @@ +--- +id: hikvision_isapi +title: 监控 海康ISAPI +sidebar_label: 海康ISAPI +keywords: [ monitor, hikvision_isapi, 海康 ] +--- + +> 通过ISAPI接口监控海康威视设备状态,获取设备健康数据。 + +## 监控配置参数 + +| 参数名称 | 参数帮助描述 | +| ----------- | ----------- | +| 监控Host | 被监控的对端IP或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 网络请求端口,默认为80。 | +| 超时时间 | 设置超时时间,单位ms毫秒,默认5000毫秒。 | +| 用户名 | 海康设备登录用户名。 | +| 密码 | 海康设备登录密码。 | +| 启用HTTPS | 是否启用HTTPS,默认未启用。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | + +## 采集指标 + +### 系统信息 + +- 设备名称 +- 设备ID +- 固件版本 +- 设备型号 +- mac地址 + +### 设备状态 + +- CPU 利用率(%) +- 内存使用量(MB) +- 可用内存(MB) +- 缓存大小(MB) +- 网口1速度(Mbps) +- 网口2速度(Mbps) +- 启动时间 +- 运行时长 +- 上次校时时间 +- 上次校时时间差(s) +- 平均上传耗时(ms) +- 最大上传耗时(ms) +- 最小上传耗时(ms) +- 上次校时模式 +- 上次校时地址 +- 响应时间(ms) + +## 监控实现原理 + +通过海康威视设备的ISAPI接口获取设备信息和状态: + +1. 采集系统信息:`/ISAPI/System/deviceInfo` + +2. 采集设备状态:`/ISAPI/System/status` + +采用HTTP协议Digest认证方式访问接口,解析XML格式响应数据获取监控指标。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hive.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hive.md new file mode 100644 index 0000000000..8c4c51b39b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hive.md @@ -0,0 +1,76 @@ +--- +id: hive +title: 监控 Apache Hive +sidebar_label: Apache Hive +keywords: [开源监控工具, 开源 Apache Hive 监控工具, 监控 Apache Hive 指标] +--- + +> 收集和监控由 Apache Hive 提供的常规性能指标。 + +## 监控前操作 + +如果您想使用此监控类型监控 Apache Hive 的信息,您需要以远程模式启动您的 Hive Server2。 + +**1、启用元数据存储:** + +```shell +hive --service metastore & +``` + +**2. 启用 Hive Server2:** + +```shell +hive --service hiveserver2 & +``` + +### 配置参数 + +| 参数名称 | 参数描述 | +|----------|--------------------------------------------------------| +| 监控主机 | 被监控的目标 IPV4、IPV6 或域名。注意⚠️不要包含协议头(例如:https://,http://)。 | +| 监控名称 | 用于标识此监控的名称,需要保证唯一性。 | +| 端口 | 数据库提供的默认端口为 10002。 | +| 启用 HTTPS | 是否通过 HTTPS 访问网站,请注意⚠️当启用 HTTPS 时,需要将默认端口更改为 443 | +| 采集间隔 | 监控周期性采集数据的时间间隔,单位为秒,最小间隔为 30 秒。 | +| 是否探测 | 在新增监控前是否先进行可用性探测,只有探测成功才会继续新增或修改操作。 | +| 描述备注 | 用于添加关于监控的额外标识和描述信息。 | + +### 采集指标 + +#### 指标收集: 基本信息 + +| 指标名称 | 指标单位 | 指标描述 | +|--------|------|-----------------------------| +| 虚拟机名称 | 无 | 运行 HiveServer2 的虚拟机(VM)的名称。 | +| 虚拟机供应商 | 无 | 虚拟机的供应商或提供者。 | +| 虚拟机版本 | 无 | 虚拟机的版本。 | +| 允许持续时间 | 无 | HiveServer2 运行的持续时间。 | + +#### 指标收集: 环境信息 + +| 指标名称 | 指标单位 | 指标描述 | +|------------|------|--------------------------------| +| HTTPS代理端口号 | 无 | 用于 HTTPS 代理通信的端口号。 | +| 操作系统 | 无 | 运行 HiveServer2 的操作系统的名称。 | +| 操作系统版本 | 无 | 操作系统的版本。 | +| 操作系统架构 | 无 | 操作系统的架构。 | +| java运行环境 | 无 | HiveServer2 使用的 Java 运行时环境的名称。 | +| java运行环境版本 | 无 | Java 运行时环境的版本。 | + +#### 指标收集: 线程信息 + +| 指标名称 | 指标单位 | 指标描述 | +|--------|------|------------------------------| +| 线程数量 | None | HiveServer2 当前正在使用的线程数。 | +| 总启动线程数 | None | HiveServer2 启动以来启动的线程总数。 | +| 最高线程数 | None | HiveServer2 在任何给定时间使用的最高线程数。 | +| 守护线程数 | None | HiveServer2 当前活动的守护线程数。 | + +#### 指标收集: 代码缓存 + +| 指标名称 | 指标单位 | 指标描述 | +|------------|------|---------------| +| 内存池当前内存 | MB | 当前为内存池分配的内存量。 | +| 内存池初始内存 | MB | 内存池请求的初始内存量。 | +| 内存池可分配最大内存 | MB | 内存池可分配的最大内存量。 | +| 内存池内存使用量 | MB | 内存池已使用内存量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/http_sd.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/http_sd.md new file mode 100644 index 0000000000..ee5f470e80 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/http_sd.md @@ -0,0 +1,234 @@ +--- +id: http_sd +title: 监控:HTTP服务发现监控 +sidebar_label: HTTP服务发现 +keywords: [开源监控系统, 开源服务发现监控, HTTP服务发现监控] +--- + +> HertzBeat 集成自定义 HTTP API,自动发现服务实例并为发现的实例创建监控任务。 + +## 概述 + +HTTP 服务发现允许 HertzBeat 通过调用您的自定义 HTTP API 来发现服务实例。这是最灵活的服务发现方式,适用于任何可以通过 HTTP API 暴露服务实例信息的系统。您只需提供一个返回指定格式目标地址列表的 HTTP 端点即可。 + +### 监控前操作 + +#### 准备 HTTP API + +您需要提供或开发一个满足以下要求的 HTTP API: + +1. **HTTP 方法**:支持 GET 请求 +2. **响应格式**:返回 JSON 格式数组 +3. **响应结构**:必须是数组格式,每个元素包含 `target` 字段(注意是单数),该字段为字符串数组,每个字符串是一个服务实例地址,格式为 `host:port` +4. **可访问性**:该 API 必须可从 HertzBeat 访问 + +#### API 响应示例 + +```json +[ + { + "target": [ + "192.168.1.101:8080", + "192.168.1.102:8080", + "192.168.1.103:8080", + "api.example.com:443" + ] + } +] +``` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|------------------|-----------------------------------------------------| +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| 服务发现地址 | 用于服务发现的 HTTP API 地址,必须以 http:// 或 https:// 开头。示例:`http://api.example.com/services` | +| 认证方式 | 认证方式,可选值:`Bearer Token`、`Basic Auth`、`Digest Auth`。默认:无 | +| 访问令牌 | 当认证方式为 Bearer Token 时用于认证的令牌 | +| 用户名 | 当认证方式为 Basic Auth 或 Digest Auth 时用于认证的用户名 | +| 密码 | 当认证方式为 Basic Auth 或 Digest Auth 时用于认证的密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 使用步骤 + +1. **准备 HTTP API** + - 开发或配置一个返回服务实例列表的 API 端点 + - 确保 API 返回正确格式的 JSON 数据 + - 测试 API 的可访问性和响应格式 + +2. **创建服务发现监控** + - 在 HertzBeat Web 界面中,导航到 **监控** → **新增监控** + - 选择监控类型:**HTTP服务发现** + - 填写基本配置参数 + - 根据需要配置认证信息 + +3. **配置监控模板** + - 创建服务发现监控后,需要指定一个监控模板 + - 模板定义了为发现的服务实例创建什么类型的监控 + - 常用模板类型:端口、HTTP、HTTPS、Ping 等 + +4. **自动发现** + - HertzBeat 会根据采集间隔定期调用您的 HTTP API + - 为新发现的服务实例自动创建监控任务 + - 自动删除已消失服务实例的监控任务 + +### 使用示例 + +#### 示例 1:无需认证的 API + +假设您有一个服务管理 API: + +- **API 地址**:`http://service-manager.example.com/api/v1/services` +- **响应**: + + ```json + [ + { + "target": [ + "10.0.1.10:8080", + "10.0.1.11:8080", + "10.0.1.12:8080" + ] + } + ] + ``` + +配置示例: + +- **任务名称**:`HTTP-Service-Discovery` +- **服务发现地址**:`http://service-manager.example.com/api/v1/services` +- **认证方式**:留空(无需认证) +- **采集间隔**:`60` 秒 +- **监控模板**:选择 `端口` 监控 + +#### 示例 2:使用 Bearer Token 认证的 API + +如果您的 API 需要 Bearer Token 认证: + +- **API 地址**:`https://api.example.com/services` +- **认证方式**:`Bearer Token` +- **访问令牌**:`your-bearer-token-here` + +配置示例: + +- **任务名称**:`Secure-API-Discovery` +- **服务发现地址**:`https://api.example.com/services` +- **认证方式**:选择 `Bearer Token` +- **访问令牌**:输入您的令牌 +- **监控模板**:选择 `HTTP` 监控 + +#### 示例 3:使用 Basic 认证的 API + +如果您的 API 需要 Basic 认证: + +- **API 地址**:`http://api.internal.com/discover` +- **认证方式**:`Basic Auth` +- **用户名**:`admin` +- **密码**:`password123` + +配置示例: + +- **任务名称**:`Basic-Auth-Discovery` +- **服务发现地址**:`http://api.internal.com/discover` +- **认证方式**:选择 `Basic Auth` +- **用户名**:`admin` +- **密码**:`password123` +- **监控模板**:选择合适的模板 + +### 注意事项 + +- **响应格式**:API 响应必须是 JSON 数组格式,每个元素包含 `target` 字段(注意是单数,字符串数组) +- **地址格式**:每个目标地址应为 `host:port` 格式,例如: + - `192.168.1.100:8080` + - `api.example.com:443` + - `localhost:3000` +- **网络连通性**:确保 HertzBeat 可以访问 HTTP API 地址 +- **监控模板**:服务发现仅发现服务实例地址,您需要配置合适的监控模板来实际监控这些实例 +- **采集间隔**:根据 API 性能和服务变更频率设置合理的采集间隔 +- **认证方式**:根据您的 API 安全要求选择合适的认证方式 +- **HTTPS**:如果使用 HTTPS,确保 SSL 证书配置正确 +- **API 性能**:确保 API 能够快速响应,避免影响 HertzBeat 性能 +- **错误处理**:如果 API 返回错误或格式无效,HertzBeat 将保持当前监控任务不变 + +### 采集指标 + +#### 指标集合:监控目标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|-------|---------------| +| 目标 | 无 | 发现的服务实例目标 | +| 主机 | 无 | 服务实例主机地址 | +| 端口 | 无 | 服务实例端口号 | + +### 适用场景 + +- **自定义注册中心**:与您自己的服务注册系统集成 +- **云平台**:从云平台(AWS、GCP、Azure)发现服务 +- **CMDB**:与 CMDB 系统集成获取服务信息 +- **服务网关**:通过 API 网关发现服务实例 +- **容器平台**:从 Kubernetes API 或容器编排平台获取服务列表 +- **服务管理系统**:与现有服务管理平台集成 +- **多云环境**:统一管理不同云平台的服务发现 + +### 高级用法 + +#### 包含额外元数据的响应 + +虽然基本要求只是 `target` 字段,但您的 API 可以包含额外的元数据以供未来扩展使用: + +```json +[ + { + "target": [ + "192.168.1.10:8080" + ], + "labels": { + "env": "production", + "version": "1.0.0" + } + } +] +``` + +注意:目前仅使用 `target` 字段进行服务发现,但未来版本可能支持使用标签信息。 + +### API 实现示例 + +#### Spring Boot 示例 + +```java +@RestController +@RequestMapping("/api/v1") +public class ServiceDiscoveryController { + + @GetMapping("/services") + public List> getServices() { + List targets = Arrays.asList( + "192.168.1.10:8080", + "192.168.1.11:8080", + "192.168.1.12:8080" + ); + + Map response = new HashMap<>(); + response.put("target", targets); + return Collections.singletonList(response); + } +} +``` + +#### Node.js Express 示例 + +```javascript +app.get('/api/services', (req, res) => { + const targets = [ + '192.168.1.10:8080', + '192.168.1.11:8080', + '192.168.1.12:8080' + ]; + + res.json([{ + target: targets + }]); +}); +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/huawei_switch.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/huawei_switch.md new file mode 100644 index 0000000000..63eb516972 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/huawei_switch.md @@ -0,0 +1,53 @@ +--- +id: huawei_switch +title: 监控:华为通用交换机 +sidebar_label: 华为通用交换机 +keywords: [ 开源监控系统, 网络监控, 华为通用交换机监控 ] +--- + +> 对 华为交换机 的通用指标(可用性,系统信息,端口流量等)进行采集监控。 + +**使用协议:SNMP** + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | SNMP端口号,默认为161 | +| SNMP 版本 | 所使用的SNMP版本 | +| SNMP 团体字 | 用于SNMP v1 和 SNMP v2c,用于在SNMP Agent完成认证,字符串形式。团体名包括“read”和“write”两种,执行SNMP查询操作时,采用“read”团体名进行认证;执行SNMP设置操作时,则采用“write”团体名进行认证。 | +| SNMP username | 用于SNMP v3,MSG 用户名 | +| SNMP contextName | 用于SNMP v3,用于确定Context EngineID对被管理设备的MIB视图。 | +| SNMP authPassword | 用于SNMP v3,SNMP 认证密码 | +| authPassword 加密方式 | 用于SNMP v3,SNMP 认证算法 | +| SNMP privPassphrase | 用于SNMP v3,SNMP 加密密码 | +| privPassword 加密方式 | 用于SNMP v3,SNMP 加密算法 | +| 查询超时时间 | 设置查询未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 采集间隔 | 监控周期性采集数据的时间间隔,单位为秒,最小间隔为 30 秒。 | +| 描述备注 | 用于添加关于监控的额外标识和描述信息。 | + +### 采集指标 + +由于华为通用交换机可查询的指标过多,详细的指标可于[华为MIB查询平台](https://info.support.huawei.com/info-finder/tool/zh/enterprise/mib) +进行查询。 + +此文档仅介绍监控模板中查询的监控指标。 + +#### 指标集合:huawei_core + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ifIndex | 无 | 接口索引 该值大于零且全局唯一。 | +| ifDescr | 无 | 描述接口的字符串,应该包含制造商、产品名和接口软硬件的版本。 | +| ifMtu | octets | 最大传输单元。接口上可以传送的最大报文的大小。对于传输网络数据报的接口,这是接口可以传输的最大数据报的大小。 | +| ifSpeed | 比特/秒 | 估计的接口当前带宽。对于带宽无法改变或者无法准确估计的接口,该项为额定带宽值。 如果接口的带宽比该表项的值大,则该表项的值是其最大值(4,294,967,295),并且ifHighSpeed的值是接口的速率。对于没有速率概念的子层接口,该表项的值为零。 | +| ifInOctets | octets | 该接口入方向通过的总字节数,包括分桢的数据。在管理系统的重新初始化和ifCounterDiscontinuityTime项指定的时间内,该节点的值将出现不连续的情况。 | +| ifInDiscards | 无 | 入方向的被丢弃的报文个数,即使没有错误发生。也将阻止这些报文送往上层协议。 一个可能的原因是释放buffer的空间。在管理系统的重新初始化和ifCounterDiscontinuityTime项指定的时间内,该节点的值将出现不连续的情况。 | +| ifInErrors | 无 | 出错而不会被送往上层协议的报文/传输单元个数。在管理系统的重新初始化和ifCounterDiscontinuityTime项指定的时间内,该节点的值将出现不连续的情况。 | +| ifOutOctets | octets | 该接口出方向通过的总字节数,包括分桢的数据。在管理系统的重新初始化和ifCounterDiscontinuityTime项指定的时间内,该节点的值将出现不连续的情况。 | +| ifOutDiscards | 无 | 出方向的被丢弃的报文个数,即使没有错误发生。也将阻止这些报文发送。丢弃此类报文的一个可能原因是为了释放缓冲区空间。 在管理系统的重新初始化和ifCounterDiscontinuityTime项指定的时间内,该节点的值将出现不连续的情况。 | +| ifOutErrors | 无 | 对于面向数据包的接口,该节点表示由于错误而无法发送的数据包数量。对于面向字符或固定长度接口,该节点表示由于错误而无法传输的传输单元的数量。这种计数器的值可能在管理系统的重新初始化时会不连续,其他时间如ifCounterDiscontinuityTime的值。 | +| ifAdminStatus | 无 | 接口的理想状态。 testing(3)状态表示没有可操作的数据包通过。 当受管系统初始化时,全部接口开始于ifAdminStatus在down(2)状态。由于明确的管理动作或被管理的系统保留的每个配置信息,ifAdminStatus然后被更改为Up(1)或testing(3)状态(或保留在down(2)状态)。 | +| ifOperStatus | 无 | 当前接口的操作状态。testing(3)状态表示没有可操作的数据包可以通过。如果ifAdminStatus是down(2),则ifOperStatus应该是down(2)。 如果ifAdminStatus是改为up(1),则ifOperStatus应该更改为up(1)。如果接口准备好传输,接收网络流量; 它应该改为dormant(5)。如果接口正在等待外部动作(如串行线路等待传入连接); 它应该保持在down(2)状态,并且只有当有故障阻止它变成up(1)状态。 它应该留在notPresent(6)状态如果接口缺少(通常为硬件)组件。 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hugegraph.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hugegraph.md new file mode 100644 index 0000000000..11c9a91749 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/hugegraph.md @@ -0,0 +1,140 @@ +--- +id: hugegraph +title: 监控:HugeGraph监控 +sidebar_label: Apache HugeGraph +keywords: [开源监控系统, 开源数据库监控, HugeGraph监控] +--- + +> 对HugeGraph的通用性能指标进行采集监控 + +**使用协议:HTTP** + +## 监控前操作 + +查看 `rest-server.properties` 文件,获取 `restserver_port` 配置项的值,该值用作监控使用。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|---------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 端口 | HugeGraph restserver的端口号,默认为8080。即:`restserver_port`参数值 | +| 启动SSL | 使用使用SSL | +| Base Path | 基础路径,默认为: /metrics ,通常情况下不需要修改 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:gauges + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------|------|-----------------------| +| edge-hugegraph-capacity | 无 | 表示当前图中边的容量上限 | +| edge-hugegraph-expire | 无 | 表示边数据的过期时间 | +| edge-hugegraph-hits | 无 | 表示边数据缓存的命中次数 | +| edge-hugegraph-miss | 无 | 表示边数据缓存的未命中次数 | +| edge-hugegraph-size | 无 | 表示当前图中边的数量 | +| instances | 无 | 表示当前运行的HugeGraph实例数量 | +| schema-id-hugegraph-capacity | 无 | 表示图中schema ID的容量上限 | +| schema-id-hugegraph-expire | 无 | 表示schema ID数据的过期时间 | +| schema-id-hugegraph-hits | 无 | 表示schema ID数据缓存的命中次数 | +| schema-id-hugegraph-miss | 无 | 表示schema ID数据缓存的未命中次数 | +| schema-id-hugegraph-size | 无 | 表示当前图中schema ID的数量 | +| schema-name-hugegraph-capacity | 无 | 表示图中schema名称的容量上限 | +| schema-name-hugegraph-expire | 无 | 表示schema名称数据的过期时间 | +| schema-name-hugegraph-hits | 无 | 表示schema名称数据缓存的命中次数 | +| schema-name-hugegraph-miss | 无 | 表示schema名称数据缓存的未命中次数 | +| schema-name-hugegraph-size | 无 | 表示当前图中schema名称的数量 | +| token-hugegraph-capacity | 无 | 表示图中token的容量上限 | +| token-hugegraph-expire | 无 | 表示token数据的过期时间 | +| token-hugegraph-hits | 无 | 表示token数据缓存的命中次数 | +| token-hugegraph-miss | 无 | 表示token数据缓存的未命中次数 | +| token-hugegraph-size | 无 | 表示当前图中token的数量 | +| users-hugegraph-capacity | 无 | 表示图中用户的容量上限 | +| users-hugegraph-expire | 无 | 表示用户数据的过期时间 | +| users-hugegraph-hits | 无 | 表示用户数据缓存的命中次数 | +| users-hugegraph-miss | 无 | 表示用户数据缓存的未命中次数 | +| users-hugegraph-size | 无 | 表示当前图中用户的数量 | +| users_pwd-hugegraph-capacity | 无 | 表示users_pwd的容量上限 | +| users_pwd-hugegraph-expire | 无 | 表示users_pwd数据的过期时间 | +| users_pwd-hugegraph-hits | 无 | 表示users_pwd数据缓存的命中次数 | +| users_pwd-hugegraph-miss | 无 | 表示users_pwd数据缓存的未命中次数 | +| users_pwd-hugegraph-size | 无 | 表示当前图中users_pwd的数量 | +| vertex-hugegraph-capacity | 无 | 表示图中顶点的容量上限 | +| vertex-hugegraph-expire | 无 | 表示顶点数据的过期时间 | +| vertex-hugegraph-hits | 无 | 表示顶点数据缓存的命中次数 | +| vertex-hugegraph-miss | 无 | 表示顶点数据缓存的未命中次数 | +| vertex-hugegraph-size | 无 | 表示当前图中顶点的数量 | +| batch-write-threads | 无 | 表示批量写入操作时的线程数 | +| max-write-threads | 无 | 表示最大写入操作的线程数 | +| pending-tasks | 无 | 表示待处理的任务数 | +| workers | 无 | 表示当前工作线程的数量 | +| average-load-penalty | 无 | 表示平均加载延迟 | +| estimated-size | 无 | 表示估计的数据大小 | +| eviction-count | 无 | 表示被驱逐的数据条数 | +| eviction-weight | 无 | 表示被驱逐数据的权重 | +| hit-count | 无 | 表示缓存命中总数 | +| hit-rate | 无 | 表示缓存命中率 | +| load-count | 无 | 表示数据加载次数 | +| load-failure-count | 无 | 表示数据加载失败次数 | +| load-failure-rate | 无 | 表示数据加载失败率 | +| load-success-count | 无 | 表示数据加载成功次数 | +| long-run-compilation-count | 无 | 表示长时间运行的编译次数 | +| miss-count | 无 | 表示缓存未命中总数 | +| miss-rate | 无 | 表示缓存未命中率 | +| request-count | 无 | 表示总的请求次数 | +| total-load-time | 无 | 表示总的数据加载时间 | +| sessions | 无 | 表示当前的活动会话数量 | + +#### 指标集合:counters + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------------------------------------|------|------------------------------| +| GET-SUCCESS_COUNTER | 无 | 记录GET请求成功的次数 | +| GET-TOTAL_COUNTER | 无 | 记录GET请求的总次数 | +| favicon-ico-GET-FAILED_COUNTER | 无 | 记录获取favicon.ico失败的GET请求次数 | +| favicon-ico-GET-TOTAL_COUNTER | 无 | 记录获取favicon.ico的GET请求总次数 | +| graphs-HEAD-FAILED_COUNTER | 无 | 记录graphs资源的HEAD请求失败的次数 | +| graphs-HEAD-SUCCESS_COUNTER | 无 | 记录graphs资源的HEAD请求成功的次数 | +| graphs-HEAD-TOTAL_COUNTER | 无 | 记录graphs资源的HEAD请求的总次数 | +| graphs-hugegraph-graph-vertices-GET-SUCCESS_COUNTER | 无 | 记录获取HugeGraph图中顶点的GET请求成功的次数 | +| graphs-hugegraph-graph-vertices-GET-TOTAL_COUNTER | 无 | 记录获取HugeGraph图中顶点的GET请求的总次数 | +| metircs-GET-FAILED_COUNTER | 无 | 记录获取metrics失败的GET请求次数 | +| metircs-GET-TOTAL_COUNTER | 无 | 记录获取metrics的GET请求总次数 | +| metrics-GET-SUCCESS_COUNTER | 无 | 记录获取metrics成功的GET请求次数 | +| metrics-GET-TOTAL_COUNTER | 无 | 记录获取metrics的GET请求总次数 | +| metrics-gauges-GET-SUCCESS_COUNTER | 无 | 记录获取metrics gauges成功的GET请求次数 | +| metrics-gauges-GET-TOTAL_COUNTER | 无 | 记录获取metrics gauges的GET请求总次数 | + +#### 指标集合:system + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------------------------|------|--------------------------------| +| mem | 无 | 表示系统的总内存量 | +| mem_total | 无 | 表示系统的总内存量(与mem相同) | +| mem_used | 无 | 表示系统当前使用的内存量 | +| mem_free | 无 | 表示系统空闲的内存量 | +| mem_unit | 无 | 表示内存量的单位(如字节、千字节、兆字节等) | +| processors | 无 | 表示系统的处理器数量 | +| uptime | 无 | 表示系统运行时间,即从启动到现在的时间 | +| systemload_average | 无 | 表示系统的平均负载,反映了系统的繁忙程度 | +| heap_committed | 无 | 表示JVM堆内存的承诺大小,即保证可供JVM使用的堆内存大小 | +| heap_init | 无 | 表示JVM堆内存的初始大小 | +| heap_used | 无 | 表示JVM当前使用的堆内存大小 | +| heap_max | 无 | 表示JVM堆内存的最大可使用大小 | +| nonheap_committed | 无 | 表示JVM非堆内存的承诺大小 | +| nonheap_init | 无 | 表示JVM非堆内存的初始大小 | +| nonheap_used | 无 | 表示JVM当前使用的非堆内存大小 | +| nonheap_max | 无 | 表示JVM非堆内存的最大可使用大小 | +| thread_peak | 无 | 表示自JVM启动以来峰值线程数 | +| thread_daemon | 无 | 表示当前活跃的守护线程数 | +| thread_total_started | 无 | 表示自JVM启动以来总共启动过的线程数 | +| thread_count | 无 | 表示当前活跃的线程数 | +| garbage_collector_g1_young_generation_count | 无 | 表示G1垃圾收集器年轻代垃圾收集的次数 | +| garbage_collector_g1_young_generation_time | 无 | 表示G1垃圾收集器年轻代垃圾收集的总时间 | +| garbage_collector_g1_old_generation_count | 无 | 表示G1垃圾收集器老年代垃圾收集的次数 | +| garbage_collector_g1_old_generation_time | 无 | 表示G1垃圾收集器老年代垃圾收集的总时间 | +| garbage_collector_time_unit | 无 | 表示垃圾收集时间的单位(如毫秒、秒等) | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/iceberg.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/iceberg.md new file mode 100644 index 0000000000..b1fa308ab3 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/iceberg.md @@ -0,0 +1,76 @@ +--- +id: iceberg +title: 监控 Apache Iceberg +sidebar_label: Apache Iceberg +keywords: [开源监控工具, 开源 Apache Iceberg 监控工具, 监控 Apache Iceberg 指标] +--- + +> 收集和监控由 Apache Iceberg 提供的常规性能指标。 + +## 监控前操作 + +如果您想使用此监控类型监控 Apache Iceberg 的信息,您需要以远程模式启动您的 Hive Server2。 + +**1、启用元数据存储:** + +```shell +hive --service metastore & +``` + +**2. 启用 Hive Server2:** + +```shell +hive --service hiveserver2 & +``` + +### 配置参数 + +| 参数名称 | 参数描述 | +|----------|--------------------------------------------------------| +| 监控主机 | 被监控的目标 IPV4、IPV6 或域名。注意⚠️不要包含协议头(例如:https://,http://)。 | +| 监控名称 | 用于标识此监控的名称,需要保证唯一性。 | +| 端口 | 数据库提供的默认端口为 10002。 | +| 启用 HTTPS | 是否通过 HTTPS 访问网站,请注意⚠️当启用 HTTPS 时,需要将默认端口更改为 443 | +| 采集间隔 | 监控周期性采集数据的时间间隔,单位为秒,最小间隔为 30 秒。 | +| 是否探测 | 在新增监控前是否先进行可用性探测,只有探测成功才会继续新增或修改操作。 | +| 描述备注 | 用于添加关于监控的额外标识和描述信息。 | + +### 采集指标 + +#### 指标收集: 基本信息 + +| 指标名称 | 指标单位 | 指标描述 | +|--------|------|-----------------------------| +| 虚拟机名称 | 无 | 运行 HiveServer2 的虚拟机(VM)的名称。 | +| 虚拟机供应商 | 无 | 虚拟机的供应商或提供者。 | +| 虚拟机版本 | 无 | 虚拟机的版本。 | +| 允许持续时间 | 无 | HiveServer2 运行的持续时间。 | + +#### 指标收集: 环境信息 + +| 指标名称 | 指标单位 | 指标描述 | +|------------|------|--------------------------------| +| HTTPS代理端口号 | 无 | 用于 HTTPS 代理通信的端口号。 | +| 操作系统 | 无 | 运行 HiveServer2 的操作系统的名称。 | +| 操作系统版本 | 无 | 操作系统的版本。 | +| 操作系统架构 | 无 | 操作系统的架构。 | +| java运行环境 | 无 | HiveServer2 使用的 Java 运行时环境的名称。 | +| java运行环境版本 | 无 | Java 运行时环境的版本。 | + +#### 指标收集: 线程信息 + +| 指标名称 | 指标单位 | 指标描述 | +|--------|------|------------------------------| +| 线程数量 | None | HiveServer2 当前正在使用的线程数。 | +| 总启动线程数 | None | HiveServer2 启动以来启动的线程总数。 | +| 最高线程数 | None | HiveServer2 在任何给定时间使用的最高线程数。 | +| 守护线程数 | None | HiveServer2 当前活动的守护线程数。 | + +#### 指标收集: 代码缓存 + +| 指标名称 | 指标单位 | 指标描述 | +|------------|------|---------------| +| 内存池当前内存 | MB | 当前为内存池分配的内存量。 | +| 内存池初始内存 | MB | 内存池请求的初始内存量。 | +| 内存池可分配最大内存 | MB | 内存池可分配的最大内存量。 | +| 内存池内存使用量 | MB | 内存池已使用内存量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/idrac.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/idrac.md new file mode 100644 index 0000000000..d5494bded7 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/idrac.md @@ -0,0 +1,104 @@ +--- +id: idrac +title: Dell iDRAC 监控 +sidebar_label: 服务器监控 +keywords: [开源监控工具, 开源服务器监控, Dell iDRAC 监控] +--- + +> 使用 SNMP 协议收集和监控 Dell 服务器的通用性能指标。 + +**协议: SNMP** + +## 监控前准备 + +1. 目标 Dell 服务器支持 **SNMP 协议**。 +2. **iDRAC** (Integrated Dell Remote Access Controller) 已配置网络接口,允许访问 **SNMP 端口**。 +3. 已配置 **SNMP 团体字** 或 **用户凭证** 并分配了适当的 **权限**。 + +这些是您可以遵循的基本检查项,有关在 Dell iDRAC 上启用和配置 SNMP 的详细信息,您可以查阅 Dell 服务器的特定用户手册。 + +## 配置参数 + +| 参数名称 | 参数说明 | +| -------- |---------------------------------------------------------------------------------------------------| +| 目标Host | 被监控设备的 IPv4、IPv6 或域名。注意:不带协议头 (例如 https://, http://)。 | +| 端口 | 服务器 SNMP 端口号,默认为 161。 | +| SNMP 版本| 选择 SNMPv1、SNMPv2c 或 SNMPv3 | +| SNMP 团体字| SNMP v1 v2c 的团体字 | +| 用户名 | SNMP v3 的用户名 | +| Context Name| SNMP v3 的上下文名称 | +| 认证密码 | SNMP v3 的认证密码 | +| 认证加密 | SNMP v3 的认证加密方式 (MD5 或 SHA1) | +| 隐私密码 | SNMP v3 的隐私密码 | +| 隐私加密 | SNMP v3 的隐私加密方式 (DES 或 AES128) | + +### 采集的指标 + +#### 指标集: 系统状态 + +| 指标名称 | 单位 | 指标说明 | +| -------------------- | ---- | -------------------------------------------------- | +| 全局系统状态 | 无 | 系统的整体状态 | +| 系统前面板状态 | 无 | 系统 LCD 的状态 | +| 全局存储状态 | 无 | 存储子系统的整体状态 | +| 系统电源状态 | 无 | 系统的当前电源状态 | +| 系统运行时间 | 天 | 自系统上次开机以来的时间 | + +#### 指标集: 电源供应器 + +| 指标名称 | 单位 | 指标说明 | +| ----------- | ---- | -------------------------------------------------- | +| 索引 | 无 | 电源供应器的索引 | +| 名称 | 无 | 电源供应器的名称/位置 | +| 功率 | W | 电源供应器的输出功率 | +| 类型 | 无 | 电源供应器的类型 (线性、开关、电池等) | +| 状态 | 无 | 电源供应器的当前状态 | + +#### 指标集: 冷却设备 + +| 指标名称 | 单位 | 指标说明 | +| ----------- | ---- | -------------------------------------------------- | +| 索引 | 无 | 冷却设备的索引 | +| 名称 | 无 | 冷却设备的名称/位置 | +| 类型 | 无 | 冷却设备的类型 (风扇、鼓风机、热管等) | +| 转速 | RPM | 当前每分钟转速读数 | +| 状态 | 无 | 冷却设备的当前状态 | + +#### 指标集: 温度传感器 + +| 指标名称 | 单位 | 指标说明 | +| ----------- | ---- | -------------------------------------------------- | +| 索引 | 无 | 温度传感器的索引 | +| 名称 | 无 | 温度传感器的名称/位置 | +| 温度 | °C | 当前温度读数 | +| 状态 | 无 | 温度传感器的当前状态 | + +#### 指标集: 电压传感器 + +| 指标名称 | 单位 | 指标说明 | +| ----------- | ---- | -------------------------------------------------- | +| 索引 | 无 | 电压传感器的索引 | +| 名称 | 无 | 电压传感器的名称/位置 | +| 电压 | V | 当前电压读数 | +| 类型 | 无 | 电压类型 (3.3V, 5V, 12V 等) | +| 状态 | 无 | 电压传感器的当前状态 | + +#### 指标集: 内存设备 + +| 指标名称 | 单位 | 指标说明 | +| ----------- | ---- | -------------------------------------------------- | +| 索引 | 无 | 内存设备的索引 | +| 名称 | 无 | 内存设备的名称/位置 | +| 类型 | 无 | 内存类型 (DDR, DDR2, DDR3, DDR4 等) | +| 容量 | G | 内存设备的容量 | +| 状态 | 无 | 内存设备的当前状态 | + +#### 指标集: 处理器 + +| 指标名称 | 单位 | 指标说明 | +| ----------- | ---- | -------------------------------------------------- | +| 索引 | 无 | 处理器的索引 | +| 名称 | 无 | 处理器的名称/位置 | +| 频率 | MHz | 处理器的当前频率 | +| 家族 | 无 | 处理器家族 (Pentium, Xeon, Core i7 等) | +| 状态 | 无 | 处理器的当前状态 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/imap.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/imap.md new file mode 100644 index 0000000000..93459ebfbb --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/imap.md @@ -0,0 +1,47 @@ +--- +id: imap +title: 监控:邮箱详细信息监控 +sidebar_label: 邮箱信息监控 +keywords: [开源监控系统, 开源网络监控, 邮箱信息监控] +--- + +> IMAP,即Internet Message Access Protocol(互联网邮件访问协议),您可以通过这种协议从邮件服务器上获取邮箱的详细信息 +> 您可以点击`新建 QQ 邮箱监控`或`新建网易邮箱监控`并进行配置,或者选择`更多操作`,导入已有配置。 + +## 启用 IMAP 服务 + +如果您想使用此监控类型来监控您的邮箱信息,请先在您的邮箱上开启 IMAP 服务: + +以 QQ 邮箱为例 (其它邮箱类似): + +1. 进入`邮箱设置` +2. 在`常规`中找到开启 `IMAP/SMTP选项` +3. 在帮助中得到 IMAP 服务器域名,端口号,是否使用 SSL,以及授权码 +4. 使用以上信息在 HertzBeat 中进行配置,采集监控指标 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|:----------|--------------------------------------------------| +| 监控Host | IMAP 邮件服务器域名。注意⚠️不带协议头 (例如: https://, http://) 。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 启动 SSL | 是否启用 SSL。 | +| 端口 | 网站对外提供的端口。 | +| 连接超时时间 | 端口连接的等待超时时间,单位毫秒,默认6000毫秒。 | +| IMAP 邮箱地址 | 要进行监控的邮箱地址。 | +| 授权码 | 邮箱服务器提供的授权码。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +对邮箱中各文件夹信息进行采集(可自行配置自定义的文件夹),由于各文件夹采集的指标相同,以下只列出一组通用的指标集合 + +#### 指标集合:(邮箱中文件夹名称) + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|---------------| +| 邮件总数 | | 该文件夹下所有邮件数量 | +| 最近收到邮件总数 | | 该文件夹下最近收到邮件数量 | +| 未读邮件总数 | | 该文件夹下未读邮件数量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/influxdb.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/influxdb.md new file mode 100644 index 0000000000..0c77a7b54e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/influxdb.md @@ -0,0 +1,65 @@ +--- +id: influxdb +title: 监控:InfluxDB 数据库监控 +sidebar_label: InfluxDB 数据库 +keywords: [开源监控系统, 开源数据库监控, InfluxDB 数据库监控] +--- + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为8086。 | +| URL | 数据库连接URL,一般是由host拼接,不需要添加 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:influxdb 基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|--------| +| build_date | 无 | 创建日期 | +| os | 无 | 操作系统 | +| cpus | 无 | cpus | +| version | 无 | 版本号 | + +#### 指标集合:http 响应时间 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|---------| +| handler | 无 | handler | +| path | 无 | 路径 | +| response_code | 无 | 返回code | +| method | 无 | 请求方法 | +| user_agent | 无 | 用户代理 | +| status | 无 | 状态 | + +#### 指标集合:正在排队的 TSM 数 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|--------| +| bucket | 无 | 存储桶 | +| engine | 无 | 引擎类型 | +| id | 无 | 标识符 | +| level | 无 | 级别 | +| path | 无 | 数据文件路径 | + +#### 指标集合:HTTP写入请求的字节数量 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| endpoint | 无 | 终点 | +| org_id | 无 | 组织标识符 | +| status | 无 | 状态 | + +#### 指标集合:质量控制请求总数 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|--------| +| result | 无 | 结果 | +| org | 无 | 组织标识符 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/influxdb_promql.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/influxdb_promql.md new file mode 100644 index 0000000000..d9432fa808 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/influxdb_promql.md @@ -0,0 +1,61 @@ +--- +id: influxdb_promql +title: 监控:InfluxDB-PromQL +sidebar_label: InfluxDB-PromQL +keywords: [ 开源监控系统, InfluxDB监控,InfluxDB-PromQL监控 ] +--- + +> 使用 Prometheus PromQL 从 Prometheus 服务器中查询到 InfluxDB 的通用指标数据来进行监控。此方案适用于 Prometheus 已监控 InfluxDB,需要从 Prometheus 服务器抓取 InfluxDB 的监控数据。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Prometheus api 端口,默认值:9090。 | +| 相对路径 | Prometheus查询PromQL的URL,默认值:/api/v1/query。 | +| 请求方式 | 设置接口调用的请求方式:GET,POST,PUT,DELETE,默认值:GET。 | +| 启用HTTPS | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443。 | +| 用户名 | 接口Basic认证或Digest认证时使用的用户名。 | +| 密码 | 接口Basic认证或Digest认证时使用的密码。 | +| Content-Type | 设置携带BODY请求体数据请求时的资源类型。 | +| 请求BODY | 设置携带BODY请求体数据,PUT POST请求方式时有效。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:basic_influxdb_memstats_alloc + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|---------| +| instance | 无 | 指标所属实例 | +| timestamp | 无 | 采集指标时间戳 | +| value | 无 | 指标值 | + +#### 指标集合: influxdb_database_numMeasurements + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|---------| +| job | 无 | 指标名称 | +| instance | 无 | 指标所属实例 | +| database | 无 | 数据库名称 | +| timestamp | 无 | 采集指标时间戳 | +| value | 无 | 指标值 | + +#### 指标集合: influxdb_query_rate_seconds + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|---------| +| instance | 无 | 指标所属实例 | +| timestamp | 无 | 采集指标时间戳 | +| value | 无 | 指标值 | + +#### 指标集合: influxdb_queryExecutor_queriesFinished_10s + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|---------| +| instance | 无 | 指标所属实例 | +| timestamp | 无 | 采集指标时间戳 | +| value | 无 | 指标值 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/iotdb.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/iotdb.md new file mode 100644 index 0000000000..a46b3378fd --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/iotdb.md @@ -0,0 +1,120 @@ +--- +id: iotdb +title: 监控 Apache IoTDB 物联网时序数据库 +sidebar_label: IoTDB数据库 +keywords: [开源监控系统, 开源数据库监控, IoTDB数据库监控] +--- + +> 对 Apache IoTDB 物联网时序数据库的运行状态(JVM相关),内存任务集群等相关指标进行监测。 + +## 监控前操作 + +您需要在 IoTDB 开启`metrics`功能,他将提供 prometheus metrics 形式的接口数据。 + +开启`metrics`功能, 参考 [官方文档](https://iotdb.apache.org/zh/UserGuide/V0.13.x/Maintenance-Tools/Metric-Tool.html) + +主要如下步骤: + +1. metric 采集默认是关闭的,需要先到 `conf/iotdb-metric.yml` 中修改参数打开后重启 server + + ```text + # 是否启动监控模块,默认为false + enableMetric: true + + # 是否启用操作延迟统计 + enablePerformanceStat: false + + # 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB],IOTDB是默认关闭的。 + metricReporterList: + - JMX + - PROMETHEUS + + # 底层使用的metric架构,可选参数:[MICROMETER, DROPWIZARD] + monitorType: MICROMETER + + # 初始化metric的级别,可选参数: [CORE, IMPORTANT, NORMAL, ALL] + metricLevel: IMPORTANT + + # 预定义的指标集, 可选参数: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] + predefinedMetrics: + - JVM + - FILE + ``` + +2. 重启 IoTDB, 打开浏览器或者用curl 访问 [http://ip:9091/metrics](http://ip:9091/metrics), 就能看到metric数据了。 + +3. 在 HertzBeat 添加对应 IoTDB 监控即可。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | IoTDB指标接口对外提供的端口,默认为9091。 | +| 超时时间 | HTTP请求查询超时时间 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:cluster_node_status + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|-------------------------| +| name | 无 | 节点名称IP | +| status | 无 | 节点状态,1=online 2=offline | + +#### 指标集合:jvm_memory_committed_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------| +| area | 无 | heap内存或nonheap内存 | +| id | 无 | 内存区块 | +| value | MB | 当前向JVM申请的内存大小 | + +#### 指标集合:jvm_memory_used_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------| +| area | 无 | heap内存或nonheap内存 | +| id | 无 | 内存区块 | +| value | MB | JVM已使用内存大小 | + +#### 指标集合:jvm_threads_states_threads + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------| +| state | 无 | 线程状态 | +| count | 无 | 线程状态对应线程数量 | + +#### 指标集合:quantity 业务数据 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--|------|----------------| +| name | 无 | 业务名称 timeSeries/storageGroup/device/deviceUsingTemplate | +| type | 无 | 类型 total/normal/template/template | +| value | 无 | 当前时间timeSeries/storageGroup/device/激活了模板的device的数量 | + +#### 指标集合:cache_hit 缓存 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------------------------------| +| name | 无 | 缓存名称 chunk/timeSeriesMeta/bloomFilter | +| value | % | chunk/timeSeriesMeta缓存命中率,bloomFilter拦截率 | + +#### 指标集合:queue 任务队列 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|----------------------------------------------| +| name | 无 | 队列名称 compaction_inner/compaction_cross/flush | +| status | 无 | 状态 running/waiting | +| value | 无 | 当前时间任务数 | + +#### 指标集合:thrift_connections + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|-------------| +| name | 无 | 名称 | +| connection | 无 | thrift当前连接数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ipmi.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ipmi.md new file mode 100644 index 0000000000..d0b4eae602 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ipmi.md @@ -0,0 +1,53 @@ +--- +id: ipmi +title: IPMI2 监控 +sidebar_label: Server 监控 +keywords: [开源监控工具, 开源服务器监控, IPMI 监控] +--- + +> 使用 IPMI2 协议收集并监控服务器的一般性能指标。 + +**协议: IPMI** + +## 监控前操作 + +1. 目标服务器支持 **IPMI2 协议**。 +2. **BMC**(主板管理控制器)已配置了网络接口,允许访问 **IPMI 端口**。 +3. **用户账户**已配置,并为账户分配了适当的**权限**。 + +这些是基本检查项,关于启用和配置 IPMI over LAN 的详细信息,可以参考服务器制造商的具体使用手册。 + +## 配置参数 + +| 参数名称 | 参数描述 | +| -------------- | ------------------------------------------------------------------------------------------------- | +| 目标主机 | 被监控服务器的 IPv4、IPv6 地址或域名。注意:无需添加协议头(例如,https://, http://)。 | +| 端口 | 服务器 IPMI over LAN 的端口号,默认为 623。 | +| 用户名 | IPMI 用户名 | +| 密码 | IPMI 密码 | + +### 采集指标 + +#### 指标集合:Chassis + +| 指标名称 | 单位 | 指标描述 | +| ------------------ | ---- | ------------------------------------------------------------------------ | +| System Power | 无 | 当前电源状态,电源开启。 | +| Power Overload | 无 | 电源过载。系统因电源过载状况而关闭。 | +| Power Interlock | 无 | 电源联锁。 | +| Main Power Fault | 无 | 电源故障。在主电源子系统中检测到故障。 | +| Power Control Fault | 无 | 电源控制故障。控制器试图打开或关闭系统电源,但系统未进入所需状态。 | +| Power Restore Policy | 无 | 电源恢复策略。 | +| Last Power Event | 无 | 最后电源事件。 | +| Cooling/Fan Fault | 无 | 检测到冷却/风扇故障。 | +| Drive Fault | 无 | 硬盘故障。 | +| Front-Panel Lockout | 无 | 前面板锁定已激活(通过机箱按钮禁用电源关闭和重置功能)。 | + +#### 指标集合:Sensor + +| Metric Name | Unit | Metric Description | +| -------------- | ---- | -------------------------------------------- | +| Sensor ID | 无 | 传感器标识。 | +| Entity ID | 无 | 指示传感器正在监控或与传感器关联的物理实体。 | +| Sensor Type | 无 | 传感器类型。 | +| Sensor Reading | 无 | 传感器当前读数。 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/issue.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/issue.md new file mode 100644 index 0000000000..442c9732bb --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/issue.md @@ -0,0 +1,73 @@ +--- +id: issue +title: 常见问题 +sidebar_label: 常见问题 +--- + +## 监控常见问题 + +1. **页面反馈:monitor.host:监控Host必须是ipv4,ipv6或域名** + + > 如信息所示,输入的监控Host须是ipv4,ipv6或域名,不能携带协议头,例如协议头http + +2. **网站API等监控反馈statusCode:403或401,但对端服务本身无需认证,浏览器直接访问是OK** + + > 请排查是否是被防火墙拦截,如宝塔等默认设置了对请求header中`User-Agent=Apache-HttpClient`的拦截,若被拦截请删除此拦截规则。(v1.0.beat5版本已将user-agent模拟成浏览器此问题不存在) + +3. 安装包部署的hertzbeat下ping连通性监控异常 + 安装包安装部署的hertzbeat,对ping连通性监控不可用,但本地直接ping是可用的。 + + > 安装包部署需要配置java虚拟机root权限启动hertzbeat从而使用ICMP,若未启用root权限则是判断telnet对端7号端口是否开通 + > docker安装默认启用无此问题 + > 详见 [https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address](https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address) + +4. 配置了k8s监控,但是实际监控时间并未按照正确间隔时间执行 + 请参考下面几点排查问题: + + > 一:首先查看hertzbeat的错误日志,如果出现了'desc: SQL statement too long, check maxSQLLength config',信息 + > 二:需要调整tdengine配置文件,可在服务器创建taos.cfg文件,调整# max length of an SQL : maxSQLLength 654800,然后重启tdengine,需要加入配置文件的挂载 + > 三:如果遇到了重启tdengine失败,需要调整挂载数据文件中的配置,见 .../taosdata/dnode/dnodeEps.json,中dnodeFqdn调整为启动失败的dockerId即可,然后docker restart tdengine + +5. 配置http api监控,用于进行业务接口探测,确保业务可以用,另外接口有进行token鉴权校验,"Authorization:Bearer eyJhbGciOiJIUzI1....",配置后测试,提示“StatusCode 401”。服务端应用收到的token为"Authorization:Bearer%20eyJhbGciOiJIUzI1....",hertzbeat对空格进行转义为“%20”,服务器没有转义导致鉴权失败,建议转义功能作为可选项。 + +6. 单个采集器的任务上限是多少? + + > 在当前版本中,启用虚拟线程后,单个 collector 默认可并发执行 `512` 个采集任务。 + > 这个默认值刻意高于旧版按 CPU 推导出来的线程池上限,目的是让单独部署的 HertzBeat 节点先尽量承载更多阻塞型采集任务,再决定是否扩容额外 collector。 + > 当运行时超出已配置的 collector 并发上限时,会报错提示 "the worker pool is full, reject this metrics task,put in queue again"。 + > 你可以在 `application.yml` 里通过 `hertzbeat.vthreads.collector.max-concurrent-jobs` 调整这个限制。 + > 如果单机仍然无法承载当前任务量,再建议增加新的 collector,并设置为 public 模式,让 HertzBeat 自动做任务分发。 + +### Docker部署常见问题 + +1. **MYSQL,TDENGINE和HertzBeat都Docker部署在同一主机上,HertzBeat使用localhost或127.0.0.1连接数据库失败** + 此问题本质为Docker容器访问宿主机端口连接失败,由于docker默认网络模式为Bridge模式,其通过localhost访问不到宿主机。 + + > 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP + > 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` + +2. **按照流程部署,访问 [http://ip:1157/](http://ip:1157/) 无界面** + 请参考下面几点排查问题: + + > 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 + > 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 + +3. **日志报错TDengine连接或插入SQL失败** + + > 一:排查配置的数据库账户密码是否正确,数据库是否创建 + > 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter + +### 安装包部署常见问题 + +1. **按照流程部署,访问 [http://ip:1157/](http://ip:1157/) 无界面** + 请参考下面几点排查问题: + + > 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 + > 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 + +2. **日志报错TDengine连接或插入SQL失败** + + > 一:排查配置的数据库账户密码是否正确,数据库是否创建 + > 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jenkins.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jenkins.md new file mode 100644 index 0000000000..6c219a1f18 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jenkins.md @@ -0,0 +1,78 @@ +--- +id: jenkins +title: 监控:Jenkins +sidebar_label: Jenkins +keywords: [ 开源监控系统, CI/CD, DevOps, Jenkins监控 ] +--- + +> 通过调用 Jenkins Prometheus Plugin 对 Jenkins 的通用指标进行采集监控。 + +## 前置条件 + +1. 按照[部署文档](https://www.jenkins.io/doc/book/installing/)搭建好Jenkins相关服务。 +2. 需要安装[插件](https://www.jenkins.io/doc/book/managing/plugins/) + 已用来访问暴露的指标信息,可参考[prometheus-plugin](https://plugins.jenkins.io/prometheus/)。 +3. 对外暴露指标的地址是```/prometheus```,查看是否能访问到metrics数据。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 端口 | Jenkins Prot值,默认为8080。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:系统信息指标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------------|------|----------------| +| default_jenkins_uptime | 毫秒 | Jenkins 运行时间 | +| default_jenkins_up | 无 | Jenkins 是否存活 | +| default_jenkins_version_info | 无 | Jenkins 版本信息 | +| jenkins_health_check_score | 无 | Jenkins 健康检查分值 | + +#### 指标集合:jvm + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------|------|---------------| +| vm_uptime_milliseconds | 毫秒 | JVM 运行时间 | +| system_cpu_load | 无 | 系统负载 | +| vm_count | 无 | JVM 线程总数 | +| vm_memory_heap_max | MB | JVM可使用的最大内存限制 | +| vm_memory_heap_used | MB | JVM 当前使用的内存大小 | + +#### 指标集合:基础信息指标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------------------|------|-------------| +| jenkins_project_count_value | 无 | 项目数量 | +| jenkins_project_enabled_count_value | 无 | 已启用的项目数量 | +| jenkins_queue_size_value | 无 | 构建队列中的任务数量 | +| jenkins_node_online_value | 无 | 当前在线的构建节点数量 | + +#### 指标集合:执行器信息指标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------------|------|------------| +| default_jenkins_executors_available | 无 | 可用的执行器数量 | +| default_jenkins_executors_busy | 无 | 忙碌的执行器数量 | +| default_jenkins_executors_connecting | 无 | 正在连接的执行器数量 | + +#### 指标集合:任务信息指标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------------------------------------------|-----------------------------|-----------------| +| jenkins_job_count_value | 无 | 作业数量 | +| default_jenkins_builds_duration_milliseconds_summary_sum | 毫秒 | 任务构建时长汇总 | +| default_jenkins_builds_last_build_duration_milliseconds | 毫秒 | 最近一次构建的构建时间 | +| default_jenkins_builds_success_build_count_total | 无 | 构建成功次数 | +| default_jenkins_builds_failed_build_count_total | 无 | 构建失败次数 | +| default_jenkins_builds_unstable_build_count_total | 无 | 不稳定构建次数 | +| default_jenkins_builds_total_build_count_total | 无 | 总构建次数(不包括未构建状态) | +| default_jenkins_builds_last_build_result_ordinal | 0=成功,1=不稳定,2=失败,3=未构建,4=已中止 | 任务构建状态(最近一次构建) | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jetty.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jetty.md new file mode 100644 index 0000000000..3561a8e156 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jetty.md @@ -0,0 +1,94 @@ +--- +id: jetty +title: 监控:Jetty应用服务器 +sidebar_label: Jetty应用服务器 +keywords: [开源监控系统, 开源中间件监控, Jetty应用服务器监控] +--- + +> 对Jetty应用服务器的通用性能指标进行采集监控 + +**使用协议:JMX** + +## 监控前操作 +> +> 您需要在 JVM 应用开启 `JMX` 服务,HertzBeat 使用 JMX 协议对 JVM 进行指标采集。 + +### Jetty应用服务器开启JMX协议步骤 + +[参考官方文档](https://www.eclipse.org/jetty/documentation/jetty-10/operations-guide/index.html#og-jmx-remote) + +1. 在 Jetty 启动 JMX JMX-REMOTE 模块 + + ```shell + java -jar $JETTY_HOME/start.jar --add-module=jmx + java -jar $JETTY_HOME/start.jar --add-module=jmx-remote + ``` + + 命令执行成功会创建出 ``JETTY_BASE`/start.d/jmx-remote.ini` 配置文件 + +2. 编辑 ``JETTY_BASE`/start.d/jmx-remote.ini` 配置文件,修改 JMX 的 IP 端口等参数。 + + **`localhost` 需修改为对外暴露 IP** + + ```text + ## The host/address to bind the RMI server to. + # jetty.jmxremote.rmiserverhost=localhost + + ## The port the RMI server listens to (0 means a random port is chosen). + # jetty.jmxremote.rmiserverport=1099 + + ## The host/address to bind the RMI registry to. + # jetty.jmxremote.rmiregistryhost=localhost + + ## The port the RMI registry listens to. + # jetty.jmxremote.rmiregistryport=1099 + + ## The host name exported in the RMI stub. + -Djava.rmi.server.hostname=localhost + ``` + +3. 重启 Jetty Server 即可。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置JVM连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 用户名 | JMX连接用户名 | +| 密码 | JMX连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:memory_pool + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| name | 无 | 指标名称 | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:class_loading + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|----------| +| LoadedClassCount | 个 | 已加载类数量 | +| TotalLoadedClassCount | 个 | 历史已加载类总量 | +| UnloadedClassCount | 个 | 未加载类数量 | + +#### 指标集合:thread + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|-----------| +| TotalStartedThreadCount | 个 | 已经开始的线程数量 | +| ThreadCount | 个 | 线程数 | +| PeakThreadCount | 个 | 未加载类数量 | +| DaemonThreadCount | 个 | 守护进程数 | +| CurrentThreadUserTime | ms | 使用时间 | +| CurrentThreadCpuTime | ms | 使用CPU时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jvm.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jvm.md new file mode 100644 index 0000000000..cf4c8155f6 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/jvm.md @@ -0,0 +1,80 @@ +--- +id: jvm +title: 监控:JVM虚拟机监控 +sidebar_label: JVM虚拟机 +keywords: [开源监控系统, 开源JAVA监控, JVM虚拟机监控] +--- + +> 对JVM虚拟机的通用性能指标进行采集监控 + +**使用协议:JMX** + +## 监控前操作 +> +> 您需要在 JVM 应用开启 `JMX` 服务,HertzBeat 使用 JMX 协议对 JVM 进行指标采集。 + +### JVM应用开启JMX协议步骤 + +应用启动时添加JVM参数 ⚠️注意可自定义暴露端口,对外IP + +参考文档: [https://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote](https://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote) + +```shell +-Djava.rmi.server.hostname=对外ip地址 +-Dcom.sun.management.jmxremote.port=9999 +-Dcom.sun.management.jmxremote.ssl=false +-Dcom.sun.management.jmxremote.authenticate=false +``` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置JVM连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 用户名 | JMX连接用户名 | +| 密码 | JMX连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:memory_pool + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| name | 无 | 指标名称 | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:code_cache (限JDK8及以下) + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:class_loading + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|----------| +| LoadedClassCount | 个 | 已加载类数量 | +| TotalLoadedClassCount | 个 | 历史已加载类总量 | +| UnloadedClassCount | 个 | 未加载类数量 | + +#### 指标集合:thread + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|-----------| +| TotalStartedThreadCount | 个 | 已经开始的线程数量 | +| ThreadCount | 个 | 线程数 | +| PeakThreadCount | 个 | 未加载类数量 | +| DaemonThreadCount | 个 | 守护进程数 | +| CurrentThreadUserTime | ms | 使用时间 | +| CurrentThreadCpuTime | ms | 使用CPU时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka.md new file mode 100644 index 0000000000..7c2d2d461b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka.md @@ -0,0 +1,95 @@ +--- +id: kafka +title: 监控:Kafka监控 +sidebar_label: Apache Kafka 监控 +keywords: [开源监控系统, 开源消息中间件监控, Kafka监控] +--- + +> 对Kafka的通用性能指标进行采集监控 + +**使用协议:JMX** + +## 监控前操作 +> +> 您需要在 Kafka 开启 `JMX` 服务,HertzBeat 使用 JMX 协议对 Kafka 进行指标采集。 + +1. 安装部署 Kafka 服务 + +2. 修改 Kafka 启动脚本 + + 修改 Kafka 安装目录下的启动脚本 `/bin/kafka-server-start.sh` + 在脚本正文(即非注释行)的第一行前添加如下内容, ⚠️注意替换您自己的端口和对外 IP 地址 + + ```shell + export JMX_PORT=9999; + export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"; + + # 这是最后一行本来就存在的 + # exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@" + ``` + +3. 重启 Kafka 服务 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置Kafka连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 用户名 | JMX连接用户名 | +| 密码 | JMX连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:server_info + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|---------| +| Version | 无 | Kafka版本 | +| StartTimeMs | ms | 运行时间 | +| CommitId | 无 | 版本提交ID | + +#### 指标集合:code_cache + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:active_controller_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------| +| Value | 个 | 活跃监控器数量 | + +#### 指标集合:broker_partition_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------| +| Value | 个 | 分区数量 | + +#### 指标集合:broker_leader_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------| +| Value | 个 | 领导者数量 | + +#### 指标集合:broker_handler_avg_percent 请求处理器空闲率 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|----------|---------| +| EventType | 无 | 类型 | +| RateUnit | 具体情况具体分析 | 单位 | +| Count | 个 | 数量 | +| OneMinuteRate | % | 一分钟处理率 | +| FiveMinuteRate | % | 五分钟处理率 | +| MeanRate | 无 | 平均处理率 | +| FifteenMinuteRate | 无 | 十五分钟处理率 | + +> 其他指标见文知意,欢迎贡献一起优化文档。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka_client.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka_client.md new file mode 100644 index 0000000000..09cc73224e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka_client.md @@ -0,0 +1,57 @@ +--- +id: kafka_client +title: 监控:Kafka监控(基于客户端) +sidebar_label: Apache Kafka 监控(基于客户端) +keywords: [开源监控系统, 开源消息中间件监控, Kafka监控] +--- + +> 对Kafka的通用指标进行采集监控 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 监控Port | 被监控的服务端口。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:topic_list + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|---------| +| TopicName | 无 | 主题名称 | + +#### 指标集合:topic_detail + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| TopicName | 无 | 主题名称 | +| PartitionNum | 无 | 分区数量 | +| PartitionLeader | 无 | 分区领导者 | +| BrokerHost | 无 | Broker主机 | +| BrokerPort | 无 | Broker端口 | +| ReplicationFactorSize | 无 | 复制因子大小 | +| ReplicationFactor | 无 | 复制因子 | + +#### 指标集合:topic_offset + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|---|--------| +| TopicName | 无 | 主题名称 | +| PartitionNum | 无 | 分区号 | +| earliest | 无 | 最早偏移量 | +| latest | 无 | 最新偏移量 | + +#### 指标集合:consumer_detail + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|-------| +| GroupId | 无 | 消费者组ID | +| group_member_num | 无 | 消费者实例数量| +| Subscribed Topic Name | 无 | 订阅主题名称 | +| offset_of_each_partition | 无 | 各分区偏移量 | +| Lag | 无 | 落后偏移量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka_promql.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka_promql.md new file mode 100644 index 0000000000..20abfb62e2 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kafka_promql.md @@ -0,0 +1,56 @@ +--- +id: kafka_promql +title: 监控:Kafka-PromQL +sidebar_label: Kafka-PromQL +keywords: [ 开源监控系统,开源中间件监控, Kafka监控,Kafka-PromQL监控 ] +--- + +> 使用 Prometheus PromQL 从 Prometheus 服务器中查询到 Kafka 的通用指标数据来进行监控。此方案适用于 Prometheus 已监控 Kafka,需要从 Prometheus 服务器抓取 Kafka 的监控数据。 + +## 前置条件 + +1. 部署 kafka; +2. 部署 kafka_exporter; +3. 通过 prometheus 采集 kafka_exporter暴露的监控指标; + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Prometheus api 端口,默认值:9090。 | +| 相对路径 | Prometheus查询PromQL的URL,默认值:/api/v1/query。 | +| 请求方式 | 设置接口调用的请求方式:GET,POST,PUT,DELETE,默认值:GET。 | +| 启用HTTPS | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443。 | +| 用户名 | 接口Basic认证或Digest认证时使用的用户名。 | +| 密码 | 接口Basic认证或Digest认证时使用的密码。 | +| Content-Type | 设置携带BODY请求体数据请求时的资源类型。 | +| 请求BODY | 设置携带BODY请求体数据,PUT POST请求方式时有效。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:kafka_brokers + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| __name__ | 无 | 指标名称 | +| instance | 无 | 指标所属实例 | +| timestamp | 无 | 采集指标时间戳 | +| value | 无 | 指标值 | + +#### 指标集合: kafka_topic_partitions + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| __name__ | 无 | 指标名称 | +| instance | 无 | 指标所属实例 | +| timestamp | 无 | 采集指标时间戳 | +| value | 无 | 指标值 | + +### HertzBeat支持的其他Kafka监控方式 + +1. kafka启用了JMX监控,可以使用 [Kafka](kafka) 监控; +2. kafka集群部署kafka_exporter暴露的监控指标,可以参考 [Prometheus任务](prometheus) 配置Prometheus采集任务监控kafka。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kingbase.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kingbase.md new file mode 100644 index 0000000000..cee0008e84 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kingbase.md @@ -0,0 +1,55 @@ +--- +id: kingbase +title: 监控:Kingbase数据库监控 +sidebar_label: Kingbase数据库 +keywords: [开源监控系统, 开源数据库监控, Kingbase数据库监控] +--- + +> 对Kingbase数据库的通用性能指标进行采集监控。支持Kingbase V8R6+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为5432。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|---------------| +| server_version | 无 | 数据库服务器的版本号 | +| port | 无 | 数据库服务器端暴露服务端口 | +| server_encoding | 无 | 数据库服务器端的字符集编码 | +| data_directory | 无 | 数据库存储数据盘地址 | +| max_connections | 连接数 | 数据库最大连接数 | + +#### 指标集合:state + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|------------------------------------------------------------------------| +| name | 无 | 数据库名称,或share-object为共享对象。 | +| conflicts | 次数 | 由于与恢复冲突而在这个数据库中被取消的查询的数目 | +| deadlocks | 个数 | 在这个数据库中被检测到的死锁数 | +| blks_read | 次数 | 在这个数据库中被读取的磁盘块的数量 | +| blks_hit | 次数 | 磁盘块被发现已经在缓冲区中的次数,这样不需要一次读取(这只包括 Kingbase 缓冲区中的命中,而不包括在操作系统文件系统缓冲区中的命中) | +| blk_read_time | ms | 在这个数据库中后端花费在读取数据文件块的时间 | +| blk_write_time | ms | 在这个数据库中后端花费在写数据文件块的时间 | +| stats_reset | 无 | 这些统计信息上次被重置的时间 | + +#### 指标集合:activity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------| +| running | 连接数 | 当前客户端连接数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kubernetes.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kubernetes.md new file mode 100644 index 0000000000..ad09004f8e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/kubernetes.md @@ -0,0 +1,102 @@ +--- +id: kubernetes +title: 监控:Kubernetes 监控 +sidebar_label: Kubernetes 监控 +keywords: [开源监控系统, 开源Kubernetes监控] +--- + +> 对kubernetes的通用性能指标进行采集监控。 + +## 监控前操作 + +如果想要监控 `Kubernetes` 中的信息,则需要获取到可访问Api Server的授权TOKEN,让采集请求获取到对应的信息。 + +参考获取token步骤 + +### 方式一 + +1. 创建service account并绑定默认cluster-admin管理员集群角色 + + ```kubectl create serviceaccount dashboard-admin -n kube-system``` + +2. 用户授权 + + ```shell + kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin + kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' + kubectl describe secret {secret} -n kube-system + ``` + +### 方式二 + +```shell +kubectl create serviceaccount cluster-admin + +kubectl create clusterrolebinding cluster-admin-manual --clusterrole=cluster-admin --serviceaccount=default:cluster-admin + +kubectl create token --duration=1000h cluster-admin + +``` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-------------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| APiServer端口 | K8s APiServer端口,默认6443 | +| token | 授权Access Token | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:nodes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|--------| +| node_name | 无 | 节点名称 | +| is_ready | 无 | 节点状态 | +| capacity_cpu | 无 | CPU容量 | +| allocatable_cpu | 无 | 已分配CPU | +| capacity_memory | 无 | 内存容量 | +| allocatable_memory | 无 | 已分配内存 | +| creation_time | 无 | 节点创建时间 | +| uid | 无 | UUID 唯一标识符 | + +#### 指标集合:namespaces + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-------------| +| namespace | 无 | namespace名称 | +| status | 无 | 状态 | +| creation_time | 无 | 创建时间 | +| uid | 无 | UUID 唯一标识符 | + +#### 指标集合:pods + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|----------------| +| pod | 无 | pod名称 | +| namespace | 无 | pod所属namespace | +| status | 无 | pod状态 | +| restart | 无 | 重启次数 | +| host_ip | 无 | 所在主机IP | +| pod_ip | 无 | pod ip | +| creation_time | 无 | pod创建时间 | +| start_time | 无 | pod启动时间 | +| uid | 无 | UUID 唯一标识符 | + +#### 指标集合:services + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|--------------------------------------------------------| +| service | 无 | service名称 | +| namespace | 无 | service所属namespace | +| type | 无 | service类型 ClusterIP NodePort LoadBalancer ExternalName | +| cluster_ip | 无 | cluster ip | +| selector | 无 | tag selector匹配 | +| creation_time | 无 | 创建时间 | +| uid | 无 | UUID 唯一标识符 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/linux.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/linux.md new file mode 100644 index 0000000000..11ffcdf2ca --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/linux.md @@ -0,0 +1,114 @@ +--- +id: linux +title: 监控:Linux操作系统监控 +sidebar_label: Linux 操作系统 +keywords: [开源监控系统, 开源操作系统监控, Linux操作系统监控] +--- + +> 对Linux操作系统的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号,默认为22。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/linux_script.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/linux_script.md new file mode 100644 index 0000000000..d16afe5a2e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/linux_script.md @@ -0,0 +1,101 @@ +--- +id: linux_script +title: 监控:使用脚本监控 Linux 操作系统 +sidebar_label: 使用脚本监控 Linux 操作系统 +keywords: [开源监控系统, 开源网络监控, 使用脚本监控 Linux 操作系统] +--- + +## 准备工作 +> +> 若要监控本机,部署 HertzBeat 即可,若要监控其他主机,需在目标主机上部署采集器,部署采集器可参考[此链接](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package)的第 5 步。 +> 如果使用 Docker 安装采集器,则会导致采集器监控不到宿主机上的进程信息,因为 Docker 容器在一个独立的环境中运行,每个容器都有自己的进程空间。 +> 在创建监控任务选择采集器时,需选择目标主机上对应的采集器。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|:-------|---------------------------------|---| +| 监控 Host | 被监控的对端 IPV4,IPV6 或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 系统启动时间 | + +#### 指标集合:cpu + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|-----------------------| +| info | 无 | CPU 型号 | +| cores | 核数 | CPU 内核数量 | +| interrupt | 个数 | CPU 中断数量 | +| load | 无 | CPU 最近 1/5/15 分钟的平均负载 | +| context_switch | 个数 | 当前上下文切换数量 | +| usage | % | CPU 使用率 | + +#### 指标集合:memory + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:disk + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 块数 | 磁盘总数 | +| partition_num | 分区数 | 分区总数 | +| block_write | 块数 | 写入磁盘的总块数 | +| block_read | 块数 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:interface + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | byte | 入站数据流量(bytes) | +| transmit_bytes | byte | 出站数据流量(bytes) | + +#### 指标集合:disk_free + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:CPU 占用率前10的程序 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|---------| +| id | 无 | 进程 id | +| cpu | % | cpu 占用率 | +| ws | % | 内存占用率 | +| command | 无 | 执行的命令 | + +#### 指标集合:内存占用率前10的程序 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|---------| +| id | 无 | 进程 id | +| cpu | % | cpu 占用率 | +| ws | % | 内存占用率 | +| command | 无 | 执行的命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/lmstudio.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/lmstudio.md new file mode 100644 index 0000000000..7238bbb90e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/lmstudio.md @@ -0,0 +1,49 @@ +--- +id: lmstudio +title: 监控:LM Studio +sidebar_label: LM Studio +keywords: [ 开源监控系统, 开源网络监控, LM Studio监控, 本地大模型监控 ] +--- + +## 准备工作 +> +> 确保 LM Studio 服务已启动并开启了 REST API。 +> 默认情况下,LM Studio 监听 `localhost:1234`。 + +### 注意事项 + +> 1. HertzBeat 需要能够访问 LM Studio 服务器,请确保目标主机和端口可达。 +> 2. 默认情况下,LM Studio 不要求对 API 请求进行身份验证。要启用身份验证,以便仅接受带有有效 API + 令牌的请求,请在“开发者页面”>“服务器设置”中切换开关。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|:----------|:----------------------------------------| +| 目标Host | LM Studio 服务器的 IP 地址或域名。默认:`localhost`。 | +| 端口 | LM Studio REST API 的端口。默认:`1234`。 | +| 启用HTTPS | 是否启用 HTTPS。 | +| API Token | API 认证令牌 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:模型列表 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|:--------|:-----|:---------------------| +| 模型标识 | 无 | 模型唯一标识符 | +| 模型名称 | 无 | 可读的模型名称 | +| 模型类型 | 无 | 模型类别:llm 或 embedding | +| 发布者 | 无 | 模型创建者标识 | +| 架构 | 无 | 模型架构(如 gemma3、llama) | +| 量化方式 | 无 | 量化方法(如 Q4_0、F16) | +| 量化位数 | 无 | 每权重的量化位数 | +| 模型大小 | MB | 模型文件大小 | +| 参数量 | 无 | 参数数量(如 7B、270M) | +| 最大上下文长度 | 无 | 最大 token 上下文窗口 | +| 模型格式 | 无 | 模型文件格式(gguf、mlx) | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_integration.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_integration.md new file mode 100644 index 0000000000..6e5af7b36b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_integration.md @@ -0,0 +1,210 @@ +--- +id: log_integration +title: 日志集成 (Beta) +sidebar_label: 日志集成 (Beta) +keywords: [开源监控, 日志集成, 日志管理, 多源日志] +--- + +> HertzBeat 的日志集成模块旨在实现对来自不同第三方日志系统和可观测性平台的日志数据进行统一接收、标准化处理。作为一个集中式"日志中心",HertzBeat 能够高效地接入外部系统的日志信息,并提供实时日志监控与分析能力。 + +:::warning +日志集成功能目前处于 Beta(实验性)阶段,可能存在潜在缺陷和局限性。该功能正在积极开发和迭代中。 +::: + +:::warning 从 1.8.x 升级?接收路径已变更 +1.8.x 的接收端点 `POST /api/logs/otlp/v1/logs`(以及 `POST /api/logs/ingest/otlp`)已由 `POST /api/otlp/v1/logs` 取代,请更新所有指向 HertzBeat 的 OpenTelemetry Collector / SDK exporter 的 `logs_endpoint`。1.9.x 仍保留旧路径作为 deprecated 别名(响应带 `Deprecation: true`,HertzBeat 日志会打印告警),2.0 将移除。查询侧的 `/api/logs/**`、`/api/traces/**`、`/api/ingestion/otlp/**` 已迁移到 `/api/observability/**`,没有别名。完整的新旧路径对照表见[版本升级指南](../start/upgrade)。 +::: + +:::info HertzBeat 1.9.0 过渡版本 +指标、日志和链路统一通过 `/api/otlp/v1/{signal}` 接收,并通过 `/api/observability/**` 查询。该版本不会根据遥测数据创建或绑定 Entity;外部 OTLP 三信号表也与 HertzBeat 自身遥测表分开存储。 +::: + +## 核心能力 + +- **多源日志接入**:支持从 OpenTelemetry、Filebeat、Vector、Loki 等主流平台接收日志数据 +- **日志格式标准化**:将来自不同平台的日志数据转换为 HertzBeat 内部统一格式,便于后续处理和分析 +- **实时日志处理**:提供实时日志流处理能力,支持日志数据的即时存储和分发 +- **智能日志分析**:提供日志搜索、过滤等分析功能 + +### 已支持的日志来源 + +HertzBeat 当前已支持以下协议进行日志数据接入: + +- **OTLP**:支持标准的 OpenTelemetry 日志协议 (OTLP) HTTP 格式,可直接接收来自 OpenTelemetry Collector 和各种支持 OTLP 的应用程序的日志数据。 +- **更多协议支持**:HertzBeat 正在积极扩展其日志集成支持,包括 Filebeat、Vector、Loki 等。如果暂时没有找到你需要的集成,活跃的社区也可以协助你添加。 + +你可以通过 HertzBeat 的"日志集成"界面查看具体的接入方式和配置示例。 + +![log_integration](/img/docs/help/log_integration_cn.png) + +## OpenTelemetry OTLP 协议接入 + +### 接口端点 + +HertzBeat 提供以下接口用于接收 OTLP 日志数据: + +```text +POST /api/otlp/v1/logs +``` + +### OTLP/gRPC 端点 + +启用 GreptimeDB 存储时,HertzBeat 同时会启动一个 OTLP/gRPC 监听器,接收指标、日志与链路。凭证与 HTTP 端点一致,同样使用 `Authorization: Bearer {token}`。 + +```text +{hertzbeat_host}:14317 +``` + +所有部署方式下都是这一个端口——Docker 镜像原样发布,不存在"容器内一个、宿主上另一个"的换算。 + +这里刻意没有使用 OpenTelemetry 标准的 4317:同机的 OTel Collector、Jaeger 或 Tempo 通常已经占着该端口,而已发布端口一旦冲突,容器会直接起不来。HertzBeat 的 OTLP/HTTP 同样走自有端口,因此这个选择与产品其余部分是一致的,并非特例。 + +如果确实想用 4317,或想关闭该监听器,可在 `application.yml` 中配置,或使用对应的环境变量(同时记得把 `docker-compose.yaml` 里的端口映射改成一致): + +```yaml +hertzbeat: + otlp: + grpc: + enabled: ${HERTZBEAT_OTLP_GRPC_ENABLED:true} + host: ${HERTZBEAT_OTLP_GRPC_HOST:0.0.0.0} + port: ${HERTZBEAT_OTLP_GRPC_PORT:14317} +``` + +若端口无法绑定,HertzBeat 会记录错误并在没有 gRPC 接收能力的情况下继续启动,`/api/otlp/v1` 上的 OTLP/HTTP 不受影响。 + +### 请求配置 + +#### 请求头 + +- `Content-Type`: `application/json` 或 `application/x-protobuf` +- `Authorization`: `Bearer {token}` + +#### 请求体格式 + +支持标准的 OTLP JSON-Protobuf 格式日志数据或者 Binary Protobuf 格式日志数据: + +```json +{ + "resourceLogs": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "my-service" + } + }, + { + "key": "service.version", + "value": { + "stringValue": "1.0.0" + } + } + ] + }, + "scopeLogs": [ + { + "scope": { + "name": "my-logger", + "version": "1.0.0" + }, + "logRecords": [ + { + "timeUnixNano": "1640995200000000000", + "severityNumber": 9, + "severityText": "INFO", + "body": { + "stringValue": "This is a log message" + }, + "attributes": [ + { + "key": "user.id", + "value": { + "stringValue": "12345" + } + } + ], + "traceId": "12345678901234567890123456789012", + "spanId": "1234567890123456" + } + ] + } + ] + } + ] +} +``` + +### 配置示例 + +#### OpenTelemetry Collector 配置 + +在 OpenTelemetry Collector 的配置文件中添加 HertzBeat 作为日志导出目标: + +```yaml +exporters: + otlphttp: + logs_endpoint: http://{hertzbeat_host}:1157/api/otlp/v1/logs + compression: none + encoding: json + headers: + Authorization: "Bearer {token}" + +service: + pipelines: + logs: + receivers: [otlp] + processors: [batch] + exporters: [otlphttp] +``` + +### 日志数据格式说明 + +#### 核心字段 + +- **timeUnixNano**: 日志时间戳(纳秒精度) +- **severityNumber**: 日志级别数值(1-24,对应 TRACE 到 FATAL) +- **severityText**: 日志级别文本(如 "INFO", "ERROR" 等) +- **body**: 日志消息内容 +- **attributes**: 日志属性键值对 +- **traceId**: 链路追踪 ID(可选) +- **spanId**: 跨度 ID(可选) + +#### 资源属性 + +通过 `resource.attributes` 可以设置应用程序和环境信息: + +- `service.name`: 服务名称 +- `service.version`: 服务版本 +- `deployment.environment`: 部署环境(dev/test/prod) +- `host.name`: 主机名 + +### 配置验证 + +1. **配置日志发送端**:在外部系统中配置发送 OTLP 日志到 HertzBeat 指定接口 +2. **查看接收日志**:在 HertzBeat 实时日志模块中查看接收到的日志数据 +3. **验证数据完整性**:验证日志数据格式、时间戳、属性等信息是否正确 + +![log_stream](/img/docs/help/log_stream_cn.png) + +### 常见问题 + +#### 日志发送失败 + +- **网络连接问题**:确保HertzBeat服务地址可以被外部系统访问 +- **请求头错误**:验证请求头 Content-Type 设置为 `application/json` + +#### 日志格式错误 + +- **OTLP格式**:确保发送的是标准 OTLP JSON-Protobuf 或 Binary Protobuf 格式 +- **时间戳格式**:检查时间戳格式是否为纳秒精度的Unix时间戳 +- **日志级别**:验证 severityNumber 值范围(1-24) +- **数据类型**:确保各字段的数据类型符合OTLP规范 + +### 相关资源 + +- [OpenTelemetry 日志规范](https://opentelemetry.io/docs/specs/otel/logs/) +- [OpenTelemetry Collector 配置指南](https://opentelemetry.io/docs/collector/configuration/) + +如需了解更多日志集成方式或遇到技术问题,欢迎通过 [GitHub Issues](https://github.com/apache/hertzbeat/issues) 与社区交流。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_manage.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_manage.md new file mode 100644 index 0000000000..e5c78a3d99 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_manage.md @@ -0,0 +1,117 @@ +--- +id: log_manage +title: 日志管理 (Beta) +sidebar_label: 日志管理 (Beta) +keywords: [开源监控, 日志管理, 日志查询, 日志统计, 日志删除] +--- + +> HertzBeat 的日志管理功能提供了完整的日志数据管理能力,包括日志查询、统计分析、批量删除等操作。用户可以通过多种过滤条件精确查找日志,查看详细的统计图表,并对不需要的日志数据进行清理。 + +:::warning +日志管理功能目前处于 Beta(实验性)阶段,可能存在潜在缺陷和局限性。该功能正在积极开发和迭代中。 +::: + +## 前置要求 + +**在使用日志管理功能之前,必须先配置支持日志存储的数据库。** + +## 功能概览 + +在 HertzBeat 界面中,进入"日志" -> "日志管理"页面,你将看到一个功能完整的日志管理界面。 + +![log_manage](/img/docs/help/log_manage_cn.png) + +## 日志查询功能 + +### 过滤条件 + +日志管理支持以下过滤条件进行精确查询: + +| 过滤条件 | 字段名称 | 数据类型 | 用途说明 | 示例值 | 使用场景 | +|---------|---------|---------|---------|--------|---------| +| **时间范围** | `timestamp` | 日期时间 | 指定查询的时间窗口 | `2024-01-01 00:00:00` 至 `2024-01-02 00:00:00` | 问题时段定位、性能分析 | +| **跟踪ID** | `traceId` | 字符串 | 分布式系统请求链路跟踪 | `1234567890abcdef` | 链路追踪、请求流程分析 | +| **跨度ID** | `spanId` | 字符串 | 跟踪中特定操作标识 | `abcdef1234567890` | 微服务调用分析 | +| **日志级别编号** | `severityNumber` | 数字 | OpenTelemetry 标准级别 | `1-24` | 按数字级别过滤 | +| **日志级别文本** | `severityText` | 字符串 | 人类可读的日志级别 | `ERROR`、`WARN`、`INFO` | 按级别快速筛选 | + +### 可视化分析图表 + +可视化分析图表包括基础统计指标图与聚合统计图,点击显示统计按钮可展开查看。 + +![log_manage_chart](/img/docs/help/log_manage_chart_cn.png) + +#### 基础统计指标 + +| 统计指标 | 含义说明 | 应用价值 | 异常阈值参考 | +|---------|---------|---------|-------------| +| **总日志数** | 符合查询条件的日志总量 | 评估系统活跃度和数据规模 | 突然增减超过50%需关注 | +| **FATAL 日志数** | 致命错误级别日志统计 | 识别系统严重故障 | 任何FATAL日志都需立即处理 | +| **ERROR 日志数** | 错误级别日志统计 | 监控系统异常情况 | 超过总日志5%需要关注 | +| **WARN 日志数** | 警告级别日志统计 | 发现潜在问题和性能瓶颈 | 持续增长趋势需要分析 | +| **INFO 日志数** | 信息级别日志统计 | 了解系统正常运行状态 | 占比应为日志主体 | +| **DEBUG 日志数** | 调试级别日志统计 | 开发调试和问题排查 | 生产环境应控制数量 | + +#### 聚合统计图 + +| 图表名称 | 图表类型 | 展示内容 | 主要用途 | 包含指标/级别 | +|---------|---------|---------|---------|-------------| +| **日志级别分布图** | 饼图 | 不同日志级别的数量分布 | 快速了解日志日志级别分布情况 | FATAL、ERROR、WARN、INFO、DEBUG | +| **跟踪覆盖率图** | 饼图 | 带有跟踪信息的日志比例 | 分析系统跟踪覆盖情况 | 带 Trace ID 的日志数量
带 Span ID 的日志数量
同时带 Trace 和 Span 的日志数量
无跟踪信息的日志数量 | +| **日志趋势图** | 时间线图 | 按小时统计的日志数量变化趋势 | 分析日志产生的时间模式和异常峰值 | 时间粒度:小时级别统计
分析维度:时间模式识别、异常峰值检测 | + +### 列显示配置 + +点击"列设置"按钮可以自定义表格显示的列: + +- **时间**:日志生成时间戳 +- **观察时间**:日志被观察到的时间 +- **日志级别**:日志级别标签 +- **日志内容**:主要消息内容 +- **属性**:日志附加属性信息 +- **资源**:资源相关信息 +- **Trace ID**:分布式跟踪标识 +- **Span ID**:操作跨度标识 +- **Trace 标记**:跟踪标记信息 +- **instrumentation scope 信息**:instrumentation scope 信息 +- **丢弃计数**:丢弃的属性数量 + +## 日志详情查看 + +点击表格中的任意日志条目可打开详情弹窗: + +![log_manage](/img/docs/help/log_manage_log_details_cn.png) + +### 基本信息区域 + +- **日志级别**:显示级别标签和颜色标识 +- **时间戳**:格式化显示的详细时间 +- **跟踪ID**:完整的分布式跟踪标识符 +- **跨度ID**:完整的操作跨度标识符 + +### 完整JSON数据 + +- **原始数据**:显示日志条目的完整 JSON 格式 +- **复制功能**:支持一键复制到剪贴板 +- **格式化显示**:JSON 数据进行了格式化处理便于阅读 + +## 批量删除功能 + +1. **选择日志**:通过表格左侧的复选框选择需要删除的日志 +2. **全选功能**:使用表头的复选框可以全选当前页面的日志 +3. **批量删除**:点击"批量删除"按钮删除选中的日志 +4. **删除计数**:按钮上显示当前选中的日志数量 + +## 故障排除 + +### 无法查看日志 + +**症状**:页面显示"无数据"或加载失败 +**解决方案**: + +1. 检查是否已正确配置时序数据库 +2. 确认数据库服务正常运行 +3. 验证数据库连接配置是否正确 +4. 检查是否有日志数据写入数据库 + +如需了解更多日志管理功能或遇到技术问题,欢迎通过 [GitHub Issues](https://github.com/apache/hertzbeat/issues) 与社区交流。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_stream.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_stream.md new file mode 100644 index 0000000000..6dfbc2e75d --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/log_stream.md @@ -0,0 +1,91 @@ +--- +id: log_stream +title: 日志流 (Beta) +sidebar_label: 日志流 (Beta) +keywords: [开源监控, 日志流, 实时日志, 日志过滤] +--- + +> HertzBeat 的日志流功能提供了实时查看和过滤日志数据的能力,包括实时日志监控、多维度过滤、日志详情查看等操作。用户可以实时监控系统日志,并根据不同条件进行精确过滤,快速定位问题和分析系统状态。 + +:::warning +日志流功能目前处于 Beta(实验性)阶段,可能存在潜在缺陷和局限性。该功能正在积极开发和迭代中。 +::: + +## 功能概览 + +在 HertzBeat 界面中,进入"日志" -> "日志流"页面,你将看到一个功能完整的实时日志监控界面。 + +![log_stream](/img/docs/help/log_stream_cn.png) + +## 实时日志查看 + +### 日志显示 + +- **实时更新**:新日志会自动显示在列表顶部,带有高亮动画效果 +- **日志计数**:界面显示当前加载的日志条数(最多保留1000条) +- **级别标识**:根据 OpenTelemetry 规范,不同日志级别用不同颜色标识: + - 灰色:TRACE(1-4) + - 蓝色:DEBUG(5-8) + - 绿色:INFO(9-12) + - 橙色:WARN(13-16) + - 红色:ERROR(17-20) + - 火山红:FATAL(21-24) + +### 显示控制 + +- **暂停/恢复**:点击暂停按钮可暂停新日志的显示,再次点击恢复 +- **清除日志**:清空当前显示的所有日志条目 +- **滚动到顶部**:快速回到最新日志的位置 +- **自动滚动**: 系统默认自动滚动到最新日志,当用户手动滚动到其他位置时,自动滚动会暂停,点击"滚动到顶部"按钮或滑动到顶部可重新启用自动滚动 + +## 日志过滤 + +点击"显示过滤器"按钮展开过滤配置区域,支持以下过滤条件: + +| 过滤条件 | 字段名称 | 数据类型 | 用途说明 | 示例值 | 使用场景 | +|---------|---------|---------|---------|--------|---------| +| **日志级别编号** | `severityNumber` | 数字 | OpenTelemetry 标准级别 | `9` | 按数字级别精确过滤 | +| **日志级别文本** | `severityText` | 字符串 | 人类可读的日志级别 | `ERROR`、`WARN`、`INFO` | 按级别快速筛选 | +| **跟踪ID** | `traceId` | 字符串 | 分布式系统请求链路跟踪 | `1234567890abcdef` | 链路追踪、请求流程分析 | +| **跨度ID** | `spanId` | 字符串 | 跟踪中特定操作标识 | `abcdef1234567890` | 微服务调用分析 | + +## 日志详情查看功能 + +点击任意日志条目可打开详情弹窗,提供完整的日志信息展示: + +![log_entry_details](/img/docs/help/log_stream_log_entry_details.png) + +### 基本信息区域 + +- **日志级别**:显示级别标签和颜色标识 +- **时间戳**:格式化显示的详细时间 +- **跟踪ID**:完整的分布式跟踪标识符 +- **跨度ID**:完整的操作跨度标识符 + +### 完整JSON数据 + +- **原始数据**:显示日志条目的完整 JSON 格式 +- **复制功能**:支持一键复制到剪贴板 +- **格式化显示**:JSON 数据进行了格式化处理便于阅读 + +## 故障排除 + +### 连接问题 + +**症状**:显示"已断开"状态 +**解决方案**: + +- 检查网络连接 +- 确认 HertzBeat 服务正常运行 +- 检查浏览器是否支持 SSE + +### 无日志显示 + +**症状**:连接正常但无日志显示 +**解决方案**: + +- 检查是否有日志数据发送到 HertzBeat +- 验证过滤器设置是否过于严格 +- 确认日志格式符合预期 + +如需了解更多日志流功能或遇到技术问题,欢迎通过 [GitHub Issues](https://github.com/apache/hertzbeat/issues) 与社区交流。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/macos.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/macos.md new file mode 100644 index 0000000000..d4a0f24555 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/macos.md @@ -0,0 +1,116 @@ +--- +id: macos +title: 监控:macOS 操作系统监控 +sidebar_label: macOS 操作系统 +keywords: [开源监控系统, 开源操作系统监控, macOS 操作系统监控] +--- + +> 对 macOS 操作系统的通用性能指标进行采集监控。 + +## 监控前操作 + +请参考 [允许远程电脑访问你的 Mac](https://support.apple.com/guide/mac-help/allow-a-remote-computer-to-access-your-mac-mchlp1066/mac) 开启远程登录 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号,默认为22。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +## 采集指标 + +### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| usage | % | CPU使用率 | + +### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mariadb.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mariadb.md new file mode 100644 index 0000000000..3ab3c1aede --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mariadb.md @@ -0,0 +1,69 @@ +--- +id: mariadb +title: 监控:MariaDB数据库监控 +sidebar_label: MariaDB数据库 +keywords: [开源监控系统, 开源数据库监控, MariaDB数据库监控] +--- + +> 对MariaDB数据库的通用性能指标进行采集监控。支持MariaDB5+。 + +## 驱动选择说明 + +MariaDB 现在和 MySQL 一样支持自动分流: + +- 如果在 `ext-lib` 中放入了 `mysql-connector-j`,JVM 采集器或主程序内置采集器会自动优先走 JDBC。 +- 如果没有放入 `mysql-connector-j`,HertzBeat 会自动切换到内置的 MySQL 兼容查询引擎,不需要额外复制 JAR。 +- 每次增删 `ext-lib` 里的驱动后,都需要重启 HertzBeat 或独立 JVM 采集器。 + +:::important 采集器包选择 +MariaDB 监控现在既支持 JVM 部署,也支持 Native 部署。 + +- 主程序内置采集器或 JVM 采集器安装包:当 `ext-lib` 中存在 `mysql-connector-j` 时会自动优先走 JDBC +- Native 采集器安装包:在不依赖 `ext-lib` 时可直接使用内置查询引擎 +- 如果你明确需要运行时 `ext-lib` JDBC 加载能力,请选择 JVM 采集器安装包 +::: + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为3306。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|------------| +| version | 无 | 数据库版本 | +| port | 无 | 数据库暴露服务端口 | +| datadir | 无 | 数据库存储数据盘地址 | +| max_connections | 无 | 数据库最大连接数 | + +#### 指标集合:status + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|------------------| +| threads_created | 无 | MariaDB已经创建的总连接数 | +| threads_connected | 无 | MariaDB已经连接的连接数 | +| threads_cached | 无 | MariaDB当前缓存的连接数 | +| threads_running | 无 | MariaDB当前活跃的连接数 | + +#### 指标集合:innodb + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------|------|-------------------------| +| innodb_data_reads | 无 | innodb平均每秒从文件中读取的次数 | +| innodb_data_writes | 无 | innodb平均每秒从文件中写入的次数 | +| innodb_data_read | KB | innodb平均每秒钟读取的数据量,单位为KB | +| innodb_data_written | KB | innodb平均每秒钟写入的数据量,单位为KB | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mcp_server.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mcp_server.md new file mode 100644 index 0000000000..8cf7027b12 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mcp_server.md @@ -0,0 +1,153 @@ +--- +id: mcp_server +title: MCP 服务器 +sidebar_label: MCP 服务器 +keywords: [MCP, StreamabelHttp, 流式传输, 服务器] +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +本页面介绍如何连接到 HertzBeat MCP 服务器。当您启动 HertzBeat 服务器时,MCP 服务器会自动在默认端口 1157 上启动。 + +## 概述 + +- 提供 StreamabelHttp 协议的 MCP服务器。 +- 专为 MCP 集成和消费流式事件的客户端而设计。 + +### 连接到 MCP 服务器 + +确保 HertzBeat 服务器已启动并正在运行。如果您使用的端口不是 1157,请相应地替换以下内容: + +- URL: `http://your-hertzbeat-server-host:1157/api/mcp` + +### 身份验证 + +您必须使用以下方法之一对每个请求进行身份验证: + +- JWT Bearer 令牌 + + - 请求头: `Authorization: Bearer ` + +注意:您可以在 HertzBeat Web UI 的日志集成或告警集成页面点击生成 JWT 令牌。 + +- 基本身份验证 + - 请求头: `Authorization: Basic ` + +### MCP 配置 + + + + +Claude Code 使用一个全局配置文件 `~/.claude.json` 来管理 MCP 服务器,你可以通过 CLI 或直接编辑这个文件来添加 HertzBeat MCP: + +方式一: 使用 CLI 快速创建: + +```bash +claude mcp add -s user -t http hertzbeat-mcp http://your-hertzbeat-server-host:1157/api/mcp --header "Authorization: Bearer your_jwt_key" +``` + +方式二:打开 `~/.claude.json`,在顶层的 `mcpServers` 下添加 HertzBeat MCP 配置。 + +Basic auth: + +```jsonc +{ + "mcpServers": { + "hertzbeat-mcp": { + "type": "sse", + "url": "http://your-hertzbeat-server-host:1157/api/mcp", + "headers": { + "Authorization": "Basic " + } + } + } +} +``` + +JWT bearer: + +```jsonc +{ + "mcpServers": { + "hertzbeat-mcp": { + "type": "sse", + "url": "http://your-hertzbeat-server-host:1157/api/mcp", + "headers": { + "Authorization": "Bearer " + } + } + } +} +``` + +保存 `~/.claude.json` 后,重启或重新加载 Claude Code,让新的 MCP 配置生效。 + + + + +Cursor 使用配置文件 `.cursor/mcp.json` 来管理 MCP 服务器,在用户目录或者项目目录下创建或者编辑这个文件: + +Basic auth: + +```json +{ + "hertzbeat-mcp": { + "url": "http://your-hertzbeat-server-host:1157/api/mcp", + "headers": { + "Authorization": "Basic " + } + } +} +``` + +JWT bearer: + +```json +{ + "hertzbeat-mcp": { + "url": "http://your-hertzbeat-server-host:1157/api/mcp", + "headers": { + "Authorization": "Bearer " + } + } +} +``` + +After saving, reload MCP in Cursor or restart the editor. + + + + +### 可用工具 + +#### 监控管理工具 + +- **query_monitors**: 查询现有/已配置的监控器,支持全面的过滤、分页和状态概览。支持按 ID、类型、状态、主机、标签进行过滤和排序。 +- **add_monitor**: 向 HertzBeat 添加新的监控目标,支持全面配置。处理每种监控器类型的不同参数要求。 +- **list_monitor_types**: 列出所有可添加到 HertzBeat 的监控器类型。显示所有支持的监控器类型及其显示名称。 +- **get_monitor_additional_params**: 获取特定监控器类型所需的参数定义。显示添加监控器时需要的参数。 + +#### 指标数据工具 + +- **query_realtime_metrics**: 获取特定监控器的实时指标数据。返回当前指标值,包括 CPU、内存、磁盘使用率等。 +- **get_historical_metrics**: 获取用于分析和趋势的历史指标数据。返回指定时间范围内指定指标的时间序列数据。 +- **get_warehouse_status**: 检查指标存储仓库系统的状态。返回指标存储是否可操作和可访问。 + +#### 告警管理工具 + +- **query_alerts**: 查询告警,支持全面的过滤和分页选项。支持按告警类型(单个/组)、状态(触发/已解决)、搜索词进行过滤和排序。 +- **get_alerts_summary**: 获取告警摘要统计信息,包括总数、状态分布和所有监控器的优先级分解。 + +#### 告警规则定义工具 + +- **create_alert_rule**: 基于应用层次结构和用户需求创建 HertzBeat 告警规则。支持阈值、字段条件和全面的告警配置。 +- **list_alert_rules**: 列出现有的告警规则,支持过滤选项。显示已配置的阈值和告警定义,支持搜索和分页。 +- **get_alert_rule_details**: 获取特定告警规则的详细信息。显示完整的阈值配置和规则设置。 +- **toggle_alert_rule**: 启用或禁用告警规则。允许激活或停用特定规则的阈值监控。 +- **get_apps_metrics_hierarchy**: 获取所有可用应用及其指标的层次结构,用于告警规则创建。返回带有字段参数的结构化 JSON 数据。 +- **bind_monitors_to_alert_rule**: 将监控器绑定到告警规则。将特定监控器与告警规则关联以启用监控和告警。 + +### 注意事项 + +- 如果连接断开,请使用相同的请求头重新连接。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/memcached.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/memcached.md new file mode 100644 index 0000000000..624e821ea0 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/memcached.md @@ -0,0 +1,67 @@ +--- +id: memcached +title: 监控 Memcached +sidebar_label: Memcached +keywords: [ 开源监控工具, 开源 Memcached 监控工具, 监控 memcached 指标 ] +--- + +> 收集并监控 Memcached 的一般性能指标。 + +**协议使用:Memcached** + +```text +默认的 YML 配置适用于 Memcached 的版本为 1.4.15。 +您需要使用 stats 命令查看您的 Memcached 可以监控的参数。 +``` + +**1、通过 stats、stats setting、stats settings 等命令获取可用的参数指标。** + +```shell +# telnet ip port +[root@server ~]# telnet localhost 11211 +Trying ::1... +Connected to localhost. +Escape character is '^]'. +stats +STAT pid 15168 +STAT uptime 11691 +STAT time 1702569246 +STAT version 1.4.15 +... +``` + +**帮助文档: [https://www.runoob.com/memcached/memcached-stats.html](https://www.runoob.com/memcached/memcached-stats.html)** + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|------|---------------------------------------------------| +| 监控主机 | 被监控的 IPV4、IPV6 或域名。注意⚠️不带协议头(例如:https://,http://) | +| 监控名称 | 标识此监控的名称。名称需要唯一 | +| 端口 | Memcached 提供的端口 | +| 采集间隔 | 监控周期性数据采集的间隔时间,单位:秒,最小可设置间隔为 30 秒 | +| 是否检测 | 添加监控前是否检测并检查可用性。仅在检测成功后才会继续添加和修改操作 | +| 描述备注 | 有关标识和描述此监控的更多信息,用户可以在此备注信息 | + +### 采集指标 + +#### 指标集:server_info + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|-------------------| +| pid | 无 | Memcache 服务器进程 ID | +| uptime | s | 服务器已运行的秒数 | +| version | 无 | Memcache 版本 | +| curr_connections | 无 | 当前连接数 | +| auth_errors | 无 | 认证失败次数 | +| threads | 无 | 当前线程数 | +| item_size | byte | 条目大小 | +| item_count | 无 | 条目数量 | +| curr_items | 无 | 当前存储的数据总数 | +| total_items | 无 | 自启动以来存储的数据总数 | +| bytes | byte | 当前存储占用的字节数 | +| cmd_get | 无 | Get 命令请求数 | +| cmd_set | 无 | Set 命令请求数 | +| cmd_flush | 无 | Flush 命令请求数 | +| get_misses | 无 | Get 命令未命中次数 | +| delete_misses | 无 | Delete 命令未命中次数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/modbus.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/modbus.md new file mode 100644 index 0000000000..3824a63a5e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/modbus.md @@ -0,0 +1,80 @@ +--- +id: modbus +title: Monitoring Modbus +sidebar_label: Modbus Monitor +keywords: [ open source monitoring tool, Modbus监控 ] +--- + +> Modbus 服务的响应等相关指标进行监测。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------------|-----------------------------------------------------------| +| Modbus服务的Host | 被监控的Modbus的IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Modbus网络的端口。 | +| slaveId | Modbus网络中从机设备ID。 | +| 保持寄存器地址 | 用于对监控资源进行分类管理。 | +| 线圈寄存器地址 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | +| 超时 | 允许收集响应时间 | + +### 采集指标 + +#### 指标集合:holding-register + +1. 参数数量需要与参数中线圈寄存器地址的总数量一样 +2. 参数别名格式: holding-register:m 或 holding-register:m-n + +参数示例: + +线圈寄存器地址: + +```text +1,2[3] +``` + +参数别名名称: + +```yaml +aliasFields: + - responseTime + - holding-register:0 + - holding-register:1-0 + - holding-register:1-1 + - holding-register:1-2 +``` + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|---------------------| +| 响应时间 | 毫秒 | Modbus服务器响应请求所需的时间。 | +| 保持寄存器参数 | | 模拟量输出设定值 | + +#### 指标集合:coil + +1. 参数数量需要与参数中线圈寄存器地址的总数量一样 +2. 参数别名格式: coil:m 或 coil:m-n + +参数示例: + +线圈寄存器地址: + +```text +1,2[3] +``` + +参数别名名称: + +```yaml +aliasFields: + - responseTime + - coil:0 + - coil:1-0 + - coil:1-1 + - coil:1-2 +``` + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|---------------------| +| 响应时间 | 毫秒 | Modbus服务器响应请求所需的时间。 | +| 线圈状态 | | 线圈状态 (0或1) | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mongodb.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mongodb.md new file mode 100644 index 0000000000..5c277c6795 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mongodb.md @@ -0,0 +1,95 @@ +--- +id: mongodb +title: 监控:MongoDB数据库 +sidebar_label: MongoDB数据库 +keywords: [ 开源监控系统, 开源数据库监控, MongoDB数据库监控 ] +--- + +> 对MongoDB数据库的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为27017。 | +| 用户名 | MongoDB用户名,可选。 | +| 密码 | MongoDB密码,可选。 | +| 数据库 | 数据库名称 | +| 认证数据库 | 存储用户凭据的数据库名称。 | +| 连接超时时间 | 设置连接MongoDB未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:构建信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|-------------------------| +| version | 无 | MongoDB版本信息 | +| gitVersion | 无 | 源代码git版本 | +| sysInfo | 无 | 系统信息 | +| loaderFlags | 无 | 加载器标志 | +| compilerFlags | 无 | 编译器标志 | +| allocator | 无 | MongoDB所使用的内存分配器 | +| javascriptEngine | 无 | MongoDB所使用的JavaScript引擎 | + +#### 指标集合:服务器文档 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| deleted | 无 | 已删除数 | +| inserted | 无 | 已插入数 | +| returned | 无 | 已返回数 | +| updated | 无 | 已更新数 | + +#### 指标集合:服务器操作 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|-------------------| +| scanAndOrder | 无 | 执行查询时需要扫描并进行排序的次数 | +| writeConflicts | 无 | 写冲突的次数 | + +#### 指标集合: 服务器_ttl + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|-------------------------------| +| deletedDocuments | 无 | 删除的过期文档数量 | +| passes | 无 | TTL清理过程的总传递次数,每次传递会检查并删除过期的文档 | + +#### 指标集合:系统信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|-----------------------| +| currentTime | 无 | 当前时间 | +| hostname | 无 | 主机名 | +| cpuAddrSize | MB | CPU的地址位数 | +| memSizeMB | MB | 内存大小(MB) | +| memLimitMB | MB | MongoDB进程的内存限制(MB) | +| numCores | 无 | CPU 核数 | +| cpuArch | 无 | CPU 架构 | +| numaEnabled | 无 | 是否启用了NUMA(非一致性内存访问)架构 | + +#### 指标集合:操作系统信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|--------| +| type | 无 | 操作系统类型 | +| name | 无 | 操作系统名称 | +| version | 无 | 版本号 | + +#### 指标集合:额外信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|----------------------| +| versionString | 无 | 版本 | +| libcVersion | 无 | 标准库版本 | +| kernelVersion | 无 | 内核版本 | +| cpuFrequencyMHz | 无 | CPU 频率(兆赫兹) | +| cpuFeatures | 无 | CPU的特性列表,包括支持的指令集和特性 | +| pageSize | 无 | 内存页大小 | +| numPages | 无 | 内存页数量 | +| maxOpenFiles | 无 | 系统中允许打开的最大文件数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mongodb_atlas.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mongodb_atlas.md new file mode 100644 index 0000000000..2770ac9735 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mongodb_atlas.md @@ -0,0 +1,77 @@ +--- +id: mongodb_atlas +title: 监控:MongoDB Atlas 数据库 +sidebar_label: MongoDB Atlas 数据库 +keywords: [ 开源监控系统, 开源数据库监控, MongoDB Atlas 数据库监控 ] +--- + +> 对MongoDB Atlas 数据库的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 用户名 | MongoDB用户名,可选。 | +| 密码 | MongoDB密码,可选。 | +| 数据库 | 数据库名称 | +| 认证数据库 | 存储用户凭据的数据库名称。 | +| 连接超时时间 | 设置连接MongoDB未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 集群模式 | MongoDB Atlas集群取值为:mongodb-atlas | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:构建信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|-------------------------| +| version | 无 | MongoDB版本信息 | +| gitVersion | 无 | 源代码git版本 | +| sysInfo | 无 | 系统信息 | +| allocator | 无 | MongoDB所使用的内存分配器 | +| javascriptEngine | 无 | MongoDB所使用的JavaScript引擎 | + +#### 指标集合:服务器文档 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|-------------| +| delete | 无 | 已删除数 | +| insert | 无 | 已插入数 | +| update | 无 | 更新数 | +| query | 无 | 查询数 | +| getmore | 无 | 光标中剩余文档的请求数 | +| command | 无 | 执行命令操作的总数 | + +#### 指标集合:网络操作 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|-------------------| +| Bytes In | 无 | 执行查询时需要扫描并进行排序的次数 | +| Bytes Out | 无 | 写冲突的次数 | +| Request Num | 无 | 请求数 | + +#### 指标集合: 连接信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------|------|-----------| +| Current Connections | 无 | 当前正在进行连接数 | +| Available Connections | 无 | 可用连接数 | +| Total Created Connections | 无 | 创建的连接总数 | + +#### 指标集合:数据库统计 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|-------|----------| +| Database Name | 无 | 数据库名称 | +| Collections | 无 | 集合数 | +| Views | 无 | 视图数 | +| Objects | 无 | 文档数 | +| Document Avg Size | Bytes | 文档平均大小 | +| Document Size | Bytes | 文档大小 | +| Storage Size | Bytes | 使用存储空间大小 | +| Indexes | 无 | 索引数 | +| Index Size | Bytes | 索引大小 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mqtt.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mqtt.md new file mode 100644 index 0000000000..5ca78a84de --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mqtt.md @@ -0,0 +1,43 @@ +--- +id: mqtt +title: 监控:MQTT 连接 +sidebar_label: MQTT 连接 +keywords: [ 开源监控系统, MQTT连接监控 ] +--- + +> 对MQTT连接状态进行监控,支持 MQTT5 和 MQTT3.1.1 协议。 + +**协议使用:mqtt** + +:::tip +为了检测是否可以正常订阅主题,HertzBeat 会订阅主题,然后立即取消订阅;为了检测是否可以正常推送消息,HertzBeat 会推送一条测试消息到主题(如果测试消息参数为空则不作检测)。 +请确保这些操作不会对你的系统产生影响。 +::: + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|---------------------------------------------------------| +| MQTT的Host | 被监控的对端 IPV4,IPV6 或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | MQTT 服务开放端口,默认为1883。 | +| 协议版本 | MQTT 协议版本,支持 MQTT5 和 MQTT3.1.1。 | +| 连接超时时间 | 连接超时时间,单位ms毫秒,默认6000毫秒。 | +| 客户端ID | MQTT 客户端 ID,默认为 `hertzbeat-mqtt-client`。 | +| 主题 | 监控的主题。 | +| 测试消息 | 测试主题是否可以正常推送消息使用的消息内容。(可选,如果为空则 `canPublish` 一直为false ) | +| 用户名 | MQTT 认证用户名(可选)。 | +| 密码 | MQTT 认证密码(可选)。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:概要 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|---------------| +| responseTime | 无 | 响应时间 | +| canPublish | 无 | 是否可以正常推送消息到主题 | +| canDescribe | 无 | 主题是否可以正常被订阅 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mysql.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mysql.md new file mode 100644 index 0000000000..2939f28f60 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/mysql.md @@ -0,0 +1,70 @@ +--- +id: mysql +title: 监控:MYSQL数据库监控 +sidebar_label: MYSQL数据库 +keywords: [开源监控系统, 开源数据库监控, Mysql数据库监控] +--- + +> 对MYSQL数据库的通用性能指标进行采集监控。支持MYSQL5+。 + +## 驱动选择说明 + +HertzBeat 现在支持两条 MySQL 查询链路: + +- 如果在 `ext-lib` 中放入了 `mysql-connector-j`,JVM 采集器或主程序内置采集器会自动优先走 JDBC。 +- 如果没有放入 `mysql-connector-j`,HertzBeat 会自动切换到内置 MySQL 查询引擎,不需要额外复制 JAR。 +- 每次增删 `ext-lib` 里的驱动后,都需要重启 HertzBeat 或独立 JVM 采集器。 +- 自动分流只检查 `ext-lib`。如果你想显式指定链路,可以配置 `hertzbeat.collector.mysql.query-engine=jdbc`、`r2dbc` 或 `auto`。 + +:::important 采集器包选择 +MySQL 监控现在既支持 JVM 部署,也支持 Native 部署。 + +- 主程序内置采集器或 JVM 采集器安装包:当 `ext-lib` 中存在 `mysql-connector-j` 时会自动优先走 JDBC +- Native 采集器安装包:在不依赖 `ext-lib` 时可直接使用内置 MySQL 查询引擎 +- 如果你明确需要运行时 `ext-lib` JDBC 加载能力,请选择 JVM 采集器安装包 +::: + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为3306。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|------------| +| version | 无 | 数据库版本 | +| port | 无 | 数据库暴露服务端口 | +| datadir | 无 | 数据库存储数据盘地址 | +| max_connections | 无 | 数据库最大连接数 | + +#### 指标集合:status + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|----------------| +| threads_created | 无 | MySql已经创建的总连接数 | +| threads_connected | 无 | MySql已经连接的连接数 | +| threads_cached | 无 | MySql当前缓存的连接数 | +| threads_running | 无 | MySql当前活跃的连接数 | + +#### 指标集合:innodb + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------|------|-------------------------| +| innodb_data_reads | 无 | innodb平均每秒从文件中读取的次数 | +| innodb_data_writes | 无 | innodb平均每秒从文件中写入的次数 | +| innodb_data_read | KB | innodb平均每秒钟读取的数据量,单位为KB | +| innodb_data_written | KB | innodb平均每秒钟写入的数据量,单位为KB | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nacos.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nacos.md new file mode 100644 index 0000000000..63f526d1a4 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nacos.md @@ -0,0 +1,94 @@ +--- +id: nacos +title: 监控:Nacos分布式监控 +sidebar_label: Nacos分布式 +keywords: [开源监控系统, 中间件监控, Nacos分布式监控] +--- + +> 通过调用 Nacos Metrics 接口对 Nacos 注册配置中心服务的通用指标进行采集监控。 + +## 监控前操作 + +### 搭建Nacos集群暴露metrics数据 + +1. 按照[部署文档](https://nacos.io/zh-cn/docs/deployment.html)搭建好Nacos集群。 +2. 配置application.properties文件,暴露metrics数据。 + + ```properties + management.endpoints.web.exposure.include=* + ``` + +3. 访问```{ip}:8848/nacos/actuator/prometheus```,查看是否能访问到metrics数据。 + +更多信息请参考[Nacos 监控手册](https://nacos.io/zh-cn/docs/monitor-guide.html)。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|------------------------------------------------------| +| 服务器Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| Nacos服务端口 | Nacos服务对外提供的端口,默认为8848。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:jvm + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------------|------|----------------| +| system_cpu_usage | 无 | CPU使用率 | +| system_load_average_1m | 无 | load | +| jvm_memory_used_bytes | 字节 | 内存使用字节,包含各种内存区 | +| jvm_memory_max_bytes | 字节 | 内存最大字节,包含各种内存区 | +| jvm_gc_pause_seconds_count | 无 | gc次数,包含各种gc | +| jvm_gc_pause_seconds_sum | 秒 | gc耗时,包含各种gc | +| jvm_threads_daemon | 无 | 线程数 | + +#### 指标集合:Nacos + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------------------------|------|-----------------------------| +| http_server_requests_seconds_count | 秒 | http请求次数,包括多种(url,方法,code) | +| http_server_requests_seconds_sum | 秒 | http请求总耗时,包括多种(url,方法,code) | +| nacos_timer_seconds_sum | 秒 | Nacos config水平通知耗时 | +| nacos_timer_seconds_count | 无 | Nacos config水平通知次数 | +| nacos_monitor`{name="longPolling"}` | 无 | Nacos config长连接数 | +| nacos_monitor`{name="configCount"}` | 无 | Nacos config配置个数 | +| nacos_monitor`{name="dumpTask"}` | 无 | Nacos config配置落盘任务堆积数 | +| nacos_monitor`{name="notifyTask"}` | 无 | Nacos config配置水平通知任务堆积数 | +| nacos_monitor`{name="getConfig"}` | 无 | Nacos config读配置统计数 | +| nacos_monitor`{name="publish"}` | 无 | Nacos config写配置统计数 | +| nacos_monitor`{name="ipCount"}` | 无 | Nacos naming ip个数 | +| nacos_monitor`{name="domCount"}` | 无 | Nacos naming域名个数(1.x 版本) | +| nacos_monitor`{name="serviceCount"}` | 无 | Nacos naming域名个数(2.x 版本) | +| nacos_monitor`{name="failedPush"}` | 无 | Nacos naming推送失败数 | +| nacos_monitor`{name="avgPushCost"}` | 秒 | Nacos naming平均推送耗时 | +| nacos_monitor`{name="leaderStatus"}` | 无 | Nacos naming角色状态 | +| nacos_monitor`{name="maxPushCost"}` | 秒 | Nacos naming最大推送耗时 | +| nacos_monitor`{name="mysqlhealthCheck"}` | 无 | Nacos naming mysql健康检查次数 | +| nacos_monitor`{name="httpHealthCheck"}` | 无 | Nacos naming http健康检查次数 | +| nacos_monitor`{name="tcpHealthCheck"}` | 无 | Nacos naming tcp健康检查次数 | + +#### 指标集合:Nacos 异常 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------------------------------------|------|--------------------------------| +| nacos_exception_total`{name="db"}` | 无 | 数据库异常 | +| nacos_exception_total`{name="configNotify"}` | 无 | Nacos config水平通知失败 | +| nacos_exception_total`{name="unhealth"}` | 无 | Nacos config server之间健康检查异常 | +| nacos_exception_total`{name="disk"}` | 无 | Nacos naming写磁盘异常 | +| nacos_exception_total`{name="leaderSendBeatFailed"}` | 无 | Nacos naming leader发送心跳异常 | +| nacos_exception_total`{name="illegalArgument"}` | 无 | 请求参数不合法 | +| nacos_exception_total`{name="nacos"}` | 无 | Nacos请求响应内部错误异常(读写失败,没权限,参数错误) | + +#### 指标集合:client + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------------------------|------|--------------------------| +| nacos_monitor`{name="subServiceCount"}` | 无 | 订阅的服务数 | +| nacos_monitor`{name="pubServiceCount"}` | 无 | 发布的服务数 | +| nacos_monitor`{name="configListenSize"}` | 无 | 监听的配置数 | +| nacos_client_request_seconds_count | 无 | 请求的次数,包括多种(url,方法,code) | +| nacos_client_request_seconds_sum | 秒 | 请求的总耗时,包括多种(url,方法,code) | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nacos_sd.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nacos_sd.md new file mode 100644 index 0000000000..42ed58fbcc --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nacos_sd.md @@ -0,0 +1,99 @@ +--- +id: nacos_sd +title: 监控:Nacos服务发现监控 +sidebar_label: Nacos服务发现 +keywords: [开源监控系统, 开源服务发现监控, Nacos服务发现监控] +--- + +> HertzBeat 集成 Nacos 注册中心,自动发现服务实例并为发现的实例创建监控任务。 + +## 概述 + +Nacos 服务发现允许 HertzBeat 连接到您的 Nacos 服务器并自动发现所有注册的服务实例。当新服务实例注册或现有实例下线时,HertzBeat 将自动创建或删除相应的监控任务,实现微服务环境下的自动化监控。 + +### 监控前操作 + +#### 部署 Nacos 服务器 + +1. 根据 [Nacos 官方文档](https://nacos.io/zh-cn/docs/quick-start.html)部署 Nacos 服务器。 +2. 确保 Nacos 服务器可从 HertzBeat 访问。 +3. 验证您可以访问 Nacos 控制台:`http://your-nacos-server:8848/nacos/` +4. 默认凭证:用户名 `nacos`,密码 `nacos` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------------------|-----------------------------------------------------| +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| Nacos服务发现Host | Nacos 服务器 IP 地址或域名。注意⚠️不带协议头(例如: https://, http://)。示例:`nacos-server` 或 `192.168.1.100` | +| Nacos服务发现Port | Nacos 服务器对外提供的端口,默认为 8848 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 使用步骤 + +1. **创建服务发现监控** + - 在 HertzBeat Web 界面中,导航到 **监控** → **新增监控** + - 选择监控类型:**Nacos服务发现** + - 填写基本配置参数 + +2. **配置监控模板** + - 创建服务发现监控后,需要指定一个监控模板 + - 模板定义了为发现的服务实例创建什么类型的监控 + - 例如:如果发现的实例是 HTTP 服务,可以选择 HTTP 监控模板 + - 常用模板类型:端口、HTTP、HTTPS 等 + +3. **自动发现** + - HertzBeat 会根据采集间隔定期查询 Nacos 服务器 + - 为新注册的服务实例自动创建监控任务 + - 自动删除已下线服务实例的监控任务 + +4. **查看发现的实例** + - 在监控列表中,您可以看到所有自动创建的子监控任务 + - 每个子监控任务对应一个发现的服务实例 + +### 使用示例 + +假设您的 Nacos 服务器运行在 `192.168.1.100:8848`,您希望自动监控其中注册的所有服务实例。 + +配置示例: + +- **任务名称**:`Nacos-Service-Discovery` +- **Nacos服务发现Host**:`192.168.1.100` +- **Nacos服务发现Port**:`8848` +- **采集间隔**:`60` 秒 +- **监控模板**:选择 `端口` 监控(检测实例可用性) + +配置完成后: + +1. HertzBeat 连接到 Nacos 服务器 +2. 获取所有已注册的服务实例(包括健康和不健康的实例) +3. 为每个实例自动创建端口监控(例如:`user-service-192.168.1.101:8080`) +4. 每 60 秒检查一次新注册或下线的服务,并相应地更新监控任务 + +### 注意事项 + +- **网络连通性**:确保 HertzBeat 可以访问 Nacos 服务器地址和端口 +- **监控模板**:服务发现仅发现服务实例地址,您需要配置合适的监控模板来实际监控这些实例 +- **采集间隔**:建议最小间隔为 60 秒,避免对 Nacos 服务器造成过多请求 +- **命名空间**:默认发现 public 命名空间下的服务。如果需要发现特定命名空间的服务,可能需要单独配置 +- **健康检查**:Nacos 服务发现会发现所有实例,包括不健康的实例 +- **实例命名**:自动创建的监控任务命名格式为:`{服务名}-{主机}:{端口}` + +### 采集指标 + +#### 指标集合:监控目标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|-------|---------------| +| 目标 | 无 | 发现的服务实例目标 | +| 主机 | 无 | 服务实例主机地址 | +| 端口 | 无 | 服务实例端口号 | + +### 适用场景 + +- **Spring Cloud Alibaba**:自动监控 Nacos 中注册的所有微服务实例 +- **动态伸缩**:自动适应因自动扩缩容而增减的服务实例 +- **统一监控**:集中管理微服务环境中所有服务的监控 +- **多环境管理**:管理开发、测试、生产环境中的服务 +- **服务治理**:结合 Nacos 服务治理能力实现全面的服务管理 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nebulagraph.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nebulagraph.md new file mode 100644 index 0000000000..7e877f2300 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nebulagraph.md @@ -0,0 +1,121 @@ +--- +id: nebulaGraph +title: 监控 NebulaGraph 数据库 +sidebar_label: NebulaGraph 数据库 +keywords: [ 开源监控工具, 开源 NebulaGraph 监控工具, 监控 NebulaGraph 指标 ] +--- + +> 收集和监控 NebulaGraph 的常规性能指标。 + +**使用协议:nebulaGraph** + +```text +监控分为两个部分,nebulaGraph_stats 和 rocksdb_stats。 +nebulaGraph_stats 是 NebulaGraph 的统计信息,rocksdb_stats 是 RocksDB 的统计信息。 +``` + +**1、通过 stats 和 rocksdb stats 接口获取可用参数。** + +1.1、如果只需要获取 nebulaGraph_stats,需要确保可以访问 stats,否则会出现错误。 + +默认端口是 19669,访问地址为 [http://ip:19669/stats](http://ip:19669/stats) + +1.2、如果需要获取 rocksdb stats 的附加参数,需要确保可以访问 rocksdb stats,否则会报错。 + +首次连接 NebulaGraph 时,必须先注册 Storage 服务,以便正确查询数据。 + +**有帮助文档:[https://docs.nebula-graph.com.cn/3.4.3/4.deployment-and-installation/connect-to-nebula-graph/](https://docs.nebula-graph.com.cn/3.4.3/4.deployment-and-installation/connect-to-nebula-graph/)** + +**[https://docs.nebula-graph.com.cn/3.4.3/2.quick-start/3.quick-start-on-premise/3.1add-storage-hosts/](https://docs.nebula-graph.com.cn/3.4.3/2.quick-start/3.quick-start-on-premise/3.1add-storage-hosts/)** + +默认端口是 19779,访问地址为:[http://ip:19779/rocksdb_stats](http://ip:19779/rocksdb_stats) + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|-------------|--------------------------------------------------------------------| +| 监控主机 | 被监控的 IPV4、IPV6 或域名。注意⚠️没有协议头(例如:https://、http://) | +| 监控名称 | 识别此监控的名称。名称需要唯一 | +| graphPort | Nebula Graph 提供的 Graph 服务的端口 | +| timePeriod | 可以是 5 秒、60 秒、600 秒或 3600 秒,分别表示最近 5 秒、最近 1 分钟、最近 10 分钟和最近 1 小时的时间段 | +| storagePort | Nebula Graph 提供的 Storage 服务的端口 | +| 超时 | 允许收集响应时间 | +| 收集间隔 | 监控周期性数据收集的间隔时间,单位:秒,最小可设置的间隔为 30 秒 | +| 是否检测 | 是否检测和验证添加监控之前的可用性。只有检测成功后,添加和修改操作才会继续进行 | +| 描述备注 | 用于识别和描述此监控的更多信息,用户可以在此处记录信息 | + +### 收集指标 + +#### 指标集:nebulaGraph_stats + +指标太多,相关链接如下 +**[https://docs.nebula-graph.com.cn/3.4.3/6.monitor-and-metrics/1.query-performance-metrics/](https://docs.nebula-graph.com.cn/3.4.3/6.monitor-and-metrics/1.query-performance-metrics/)** + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------------------------------------------------|------|--------| +| 达到内存水位线的语句的数量(rate) | | | +| 达到内存水位线的语句的数量(sum) | | | +| 服务端主动回收的过期的会话数量(rate) | | | +| 服务端主动回收的过期的会话数量(sum) | | | +| 慢查询延迟时间(avg) | | | +| 慢查询延迟时间(p75) | | | +| 慢查询延迟时间(p95) | | | +| 慢查询延迟时间(p99) | | | +| 慢查询延迟时间(p999) | | | +| 查询延迟时间(avg) | | | +| 查询延迟时间(p75) | | | +| 查询延迟时间(p95) | | | +| 查询延迟时间(p99) | | | +| 查询延迟时间(p999) | | | +| 因用户名密码错误导验证失败的会话数量(rate) | | | +| 因用户名密码错误导验证失败的会话数量(sum) | | | +| 查询次数(rate) | | | +| 查询次数(sum) | | | +| 排序(Sort)算子执行时间(rate) | | | +| 排序(Sort)算子执行时间(sum) | | | +| Graphd 服务发给 Storaged 服务的 RPC 请求失败的数量(rate) | | | +| Graphd 服务发给 Storaged 服务的 RPC 请求失败的数量(sum) | | | +| 登录验证失败的会话数量(rate) | | | +| 登录验证失败的会话数量(sum) | | | +| 查询报错语句数量(rate) | | | +| 查询报错语句数量(sum) | | | +| 被终止的查询数量(rate) | | | +| 被终止的查询数量(sum) | | | +| 因查询错误而导致的 Leader 变更的次数(rate) | | | +| 因查询错误而导致的 Leader 变更的次数(sum) | | | +| Graphd 服务发给 Metad 服务的 RPC 请求数量(rate) | | | +| Graphd 服务发给 Metad 服务的 RPC 请求数量(sum) | | | +| 慢查询次数(rate) | | | +| 慢查询次数(sum) | | | +| 活跃的会话数的变化数(sum) | | | +| 活跃的查询语句数的变化数(sum) | | | +| Graphd 服务接收的语句数(rate) | | | +| Graphd 服务接收的语句数(sum) | | | +| 聚合(Aggregate)算子执行时间(rate) | | | +| 聚合(Aggregate)算子执行时间(sum) | | | +| 优化器阶段延迟时间(avg) | | | +| 优化器阶段延迟时间(p75) | | | +| 优化器阶段延迟时间(p95) | | | +| 优化器阶段延迟时间(p99) | | | +| 优化器阶段延迟时间(p999) | | | +| Graphd 服务发给 Metad 的 RPC 请求失败的数量(rate) | | | +| Graphd 服务发给 Metad 的 RPC 请求失败的数量(sum) | | | +| 索引扫描(IndexScan)算子执行时间(rate) | | | +| 索引扫描(IndexScan)算子执行时间(sum) | | | +| 服务端建立过的会话数量(rate) | | | +| 服务端建立过的会话数量(sum) | | | +| 因为超过FLAG_OUT_OF_MAX_ALLOWED_CONNECTIONS参数导致的验证登录的失败的会话数量(rate) | | | +| 因为超过FLAG_OUT_OF_MAX_ALLOWED_CONNECTIONS参数导致的验证登录的失败的会话数量(sum) | | | +| Graphd 服务发给 Storaged 服务的 RPC 请求数量(rate) | | | +| Graphd 服务发给 Storaged 服务的 RPC 请求数量(sum) | | | + +#### 指标集:rocksdb_stats + +指标太多,相关链接如下 +**[https://docs.nebula-graph.com.cn/3.4.3/6.monitor-and-metrics/2.rocksdb-statistics/](https://docs.nebula-graph.com.cn/3.4.3/6.monitor-and-metrics/2.rocksdb-statistics/)** + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------------|------|------------------------| +| rocksdb.backup.read.bytes | | 备份 RocksDB 数据库期间读取的字节数 | +| rocksdb.backup.write.bytes | | 指标名称 | +| ... | | ... | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nebulagraph_cluster.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nebulagraph_cluster.md new file mode 100644 index 0000000000..82c4dbdbb1 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nebulagraph_cluster.md @@ -0,0 +1,91 @@ +--- +id: nebulagraph_cluster +title: 监控:NebulaGraph集群监控 +sidebar_label: NebulaGraph集群 +keywords: [ 开源监控系统, 开源数据库监控, 开源图数据库监控, NebulaGraph集群监控 ] +--- + +> 对NebulaGraph集群的基础信息、节点,任务等进行监控。 + +**协议使用:ngql** + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| graph端口 | graph服务开放的端口,默认为9669。 | +| 连接超时时间 | 连接graph服务超时时间,单位ms毫秒,默认6000毫秒。 | +| 用户名 | 数据库连接用户名。 | +| 密码 | 数据库连接密码。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:基础信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|---------| +| responseTime | 无 | 响应时间 | +| charset | 无 | 字符集 | +| collation | 无 | 字符集排序规则 | + +#### 指标集合:Session + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------|------|------------| +| session | 无 | session的数量 | +| running_query_count | 无 | 正在执行的查询的数量 | + +#### 指标集合:后台任务 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------------| +| queue_jobs | 无 | 等待中的后台任务 | +| running_jobs | 无 | 正在执行的后台任务的数量 | + +#### 指标集合:节点信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------|------|-----------------| +| total_storage_node | 无 | storage节点的数量 | +| offline_storage_node | 无 | 离线的storage节点的数量 | +| total_meta_node | 无 | meta节点的数量 | +| offline_meta_node | 无 | 离线的meta节点的数量 | +| total_graph_node | 无 | graph节点数量 | +| offline_graph_node | 无 | 离线graph节点数量 | + +#### 指标集合:Storage节点 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|---------------------| +| host | 无 | 节点地址 | +| port | 无 | 端口 | +| status | 无 | 状态 (ONLINE/OFFLINE) | +| leaderCount | 无 | 当前节点leader分片的数量 | +| leaderDistribution | 无 | 当前节点leader分片分布 | +| partitionDistribution | 无 | 当前节点上分片分布 | +| version | 无 | 版本 | + +#### 指标集合:Meta节点 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|---------------------| +| host | 无 | 节点地址 | +| port | 无 | 端口 | +| status | 无 | 状态 (ONLINE/OFFLINE) | +| version | 无 | 版本 | + +#### 指标集合:Graph节点 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|---------------------| +| host | 无 | 节点地址 | +| port | 无 | 端口 | +| status | 无 | 状态 (ONLINE/OFFLINE) | +| version | 无 | 版本 | + +> 如果需要自定义监控模板采集NebulaGraph集群的数据,请参考: [NGQL自定义监控](../advanced/extend-ngql.md) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nginx.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nginx.md new file mode 100644 index 0000000000..b6189d6c06 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nginx.md @@ -0,0 +1,154 @@ +--- +id: nginx +title: 监控 Nginx +sidebar_label: Nginx 监控 +keywords: [开源监控工具, 开源Java监控工具, 监控Nginx指标] +--- + +> 收集和监控 Nginx 的常规性能指标。 + +**使用的协议:Nginx** + +## 需要启用 Nginx 的 `ngx_http_stub_status_module` 和 `ngx_http_reqstat_module` 监控模块 + +如果你想使用这种监控方式监控 'Nginx' 的信息,你需要修改你的 Nginx 配置文件以启用监控模块。 + +### 启用 ngx_http_stub_status_module + +1. 检查是否已添加 `ngx_http_stub_status_module` + + ```shell + nginx -V + ``` + + 查看是否包含 `--with-http_stub_status_module`,如果没有则需要重新编译安装 Nginx。 + +2. 编译安装 Nginx, 添加 `ngx_http_stub_status_module` 模块 + + 下载 Nginx 并解压,在目录下执行 + + ```shell + ./configure --prefix=/usr/local/nginx --with-http_stub_status_module + + make && make install + ``` + +3. 修改 Nginx 配置文件 + + 修改 `nginx.conf` 文件,添加监控模块暴露端点,如下配置: + + ```shell + # modify nginx.conf + server { + listen 80; # port + server_name localhost; + location /nginx-status { + stub_status on; + access_log on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } + } + ``` + +4. 重新加载 Nginx + + ```shell + nginx -s reload + ``` + +5. 在浏览器访问 `http://localhost/nginx-status` 即可查看 Nginx 监控状态信息。 + +### 启用 `ngx_http_reqstat_module` + +1. 安装 `ngx_http_reqstat_module` 模块 + + ```shell + # install `ngx_http_reqstat_module` + wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip + + unzip ngx_req_status.zip + + patch -p1 < ../ngx_req_status-master/write_filter.patch + + ./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master + + make -j2 + + make install + ``` + +2. 修改 Nginx 配置文件 + + 修改 `nginx.conf` 文件,添加状态模块暴露端点,如下配置: + + ```shell + # modify nginx.conf + http { + req_status_zone server_name $server_name 256k; + req_status_zone server_addr $server_addr 256k; + + req_status server_name server_addr; + + server { + location /req-status { + req_status_show on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } + } + } + ``` + +3. 重新加载 Nginx + + ```shell + nginx -s reload + ``` + +4. 在浏览器访问 `http://localhost/req-status` 即可查看 Nginx 监控状态信息。 + + +**参考文档: [https://blog.csdn.net/weixin_55985097/article/details/116722309](https://blog.csdn.net/weixin_55985097/article/details/116722309)** + +**⚠️注意监控模块的端点路径为 `/nginx-status` `/req-status`** + +### 配置参数 + +| 参数名 | 参数描述 | +|--------|-----------------------------------------------------| +| 监控主机 | 被监控的 IPV4、IPV6 或域名。注意⚠️不需要协议头部(例如:https://,http://) | +| 监控名称 | 标识此监控的名称。名称需要唯一 | +| 端口 | Nginx 提供的端口 | +| 超时时间 | 允许收集响应时间 | +| 收集间隔时间 | 监控周期性数据收集的间隔时间,单位为秒,最小可设置的间隔时间为30秒 | +| 是否检测 | 是否在添加监控之前检测和确认监控的可用性。只有在检测成功后,添加和修改操作才会继续进行 | +| 描述备注 | 用户可以在此处注明有关标识和描述此监控的更多信息 | + +### 收集指标 + +#### 指标收集:nginx_status + +| 指标名称 | 指标单位 | 指标描述 | +|-------|------|------------| +| 接收连接数 | | 已接受的连接 | +| 处理连接数 | | 成功处理的连接 | +| 活动连接数 | | 当前活动连接 | +| 丢弃连接数 | | 丢弃的连接 | +| 请求连接数 | | 客户端请求 | +| 读连接数 | | 正在执行读操作的连接 | +| 写连接数 | | 正在执行写操作的连接 | +| 等待连接数 | | 等待连接 | + +#### 指标集:req_status + +| 指标名称 | 指标单位 | 指标描述 | +|---------|------|---------| +| 分组类别 | | 分组类别 | +| 分组名称 | | 分组名称 | +| 最大并发连接数 | | 最大并发连接数 | +| 最大带宽 | kb | 最大带宽 | +| 总流量 | kb | 总流量 | +| 总请求数 | | 总请求数 | +| 当前并发连接数 | | 当前并发连接数 | +| 当前带宽 | kb | 当前带宽 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ntp.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ntp.md new file mode 100644 index 0000000000..0806232cee --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ntp.md @@ -0,0 +1,41 @@ +--- +id: ntp +title: 监控 NTP 服务器 +sidebar_label: NTP 服务器 +keywords: [ open source monitoring tool, open source NTP monitoring tool, monitoring NTP metrics ] +--- + +NTP监控的中文文档如下: + +## NTP监控 + +> 收集和监控NTP的常规性能指标。 + +**协议使用:NTP** + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|------|--------------------------------------------------| +| 监控主机 | 被监控的IPv4、IPv6或域名。注意⚠️不包含协议头(例如:https://,http://) | +| 监控名称 | 标识此监控的名称。名称需要是唯一的 | +| 采集间隔 | 监控周期性数据采集的时间间隔,单位:秒,最小可设置为30秒 | +| 是否检测 | 是否在添加监控之前检测和检查监控的可用性。只有在检测成功后,添加和修改操作才会继续进行 | +| 描述备注 | 用于更多关于标识和描述此监控的信息,用户可以在此处添加备注信息 | + +### 采集指标 + +#### 指标集:概要 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|--------------------------| +| 响应时间 | 毫秒 | NTP服务器响应请求所需的时间。 | +| 时间 | 毫秒 | NTP服务器报告的当前时间。 | +| 日期 | | 与NTP服务器报告的当前时间对应的日期。 | +| 偏移量 | 毫秒 | NTP服务器的时钟与客户端时钟之间的时间差。 | +| 延迟 | 毫秒 | 请求到达NTP服务器并返回响应所需的时间。 | +| 版本号 | | 服务器使用的NTP协议的版本号。 | +| 模式 | | NTP服务器的操作模式,如客户端、服务器或广播。 | +| 层级 | | NTP服务器的层级,表示其与参考时钟的距离。 | +| 参考ID | | 指示NTP服务器使用的参考时钟或时间源的标识符。 | +| 精度 | | NTP服务器时钟的精度,表示其准确性。 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nvidia.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nvidia.md new file mode 100644 index 0000000000..3e4bbcad6a --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/nvidia.md @@ -0,0 +1,37 @@ +--- +id: nvidia +title: 监控:NVIDIA 监控 +sidebar_label: NVIDIA 监控 +keywords: [开源监控系统, NVIDIA监控] +--- + +> 对 NVIDIA 操作系统的通用性能指标进行采集监控。 +> NVIDIA 监控需要用到 nvidia-smi 命令,nvidia-smi 是与 NVIDIA GPU 驱动程序一起安装的。所以在监控 NVIDIA 时,我们需要安装 NVIDIA GPU 驱动程序。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------| +| 监控Host | 被监控的对端 IPV4,IPV6 或 域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH 对外提供的端口,默认为22。 | +| 用户名 | SSH 连接用户名,可选 | +| 密码 | SSH 连接密码,可选 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|--------| +| index | 无 | 显卡索引 | +| name | 无 | 显卡名称 | +| utilization.gpu[%] | 无 | GPU利用率 | +| utilization.memory[%] | 无 | 显存利用率 | +| memory.total[MiB] | 无 | 总显存 | +| memory.used[MiB] | 无 | 已用显存 | +| memory.free[MiB] | 无 | 空闲显存 | +| temperature.gpu | 无 | 显卡温度 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/oceanbase.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/oceanbase.md new file mode 100644 index 0000000000..bdc6898b5f --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/oceanbase.md @@ -0,0 +1,69 @@ +--- +id: oceanbase +title: 监控:OceanBase 数据库监控 +sidebar_label: OceanBase 数据库 +keywords: [开源监控系统, 开源数据库监控, OceanBase 数据库监控] +--- + +> 对 OceanBase 数据库的通用性能指标进行采集监控。支持 OceanBase 4.0+。 + +## 驱动选择 + +OceanBase 现在和 MySQL 兼容查询路径一样会自动分流: + +- 如果 `ext-lib` 中放入了 `mysql-connector-j`,JVM 采集器或主程序内置采集器会自动优先走 JDBC。 +- 如果没有放入 `mysql-connector-j`,HertzBeat 会自动切换到内置的 MySQL 兼容查询引擎,不需要额外复制 JAR。 +- 在 `ext-lib` 中新增或删除 JAR 后,请重启 HertzBeat 或独立 JVM 采集器。 + +:::important 采集器包选择 +OceanBase 监控现在同样支持 JVM 和 Native 两种部署方式。 + +- 主程序内置采集器或 JVM 采集器安装包:当 `ext-lib` 中存在 `mysql-connector-j` 时会自动优先走 JDBC +- Native 采集器安装包:在不依赖 `ext-lib` 时可直接使用内置的 MySQL 兼容查询引擎 +- 如果你明确需要运行时 `ext-lib` JDBC 加载能力,仍然请选择 JVM 采集器安装包 +::: + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端 IPV4,IPV6 或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为2881。 | +| 查询超时时间 | 设置 SQL 查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接 URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|------------| +| version | 无 | 数据库版本 | +| port | 无 | 数据库暴露服务端口 | +| datadir | 无 | 数据库存储数据盘地址 | +| max_connections | 无 | 数据库最大连接数 | + +#### 指标集合:status + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|----------------| +| threads_created | 无 | OceanBase 已经创建的总连接数 | +| threads_connected | 无 | OceanBase 已经连接的连接数 | +| threads_cached | 无 | OceanBase 当前缓存的连接数 | +| threads_running | 无 | OceanBase 当前活跃的连接数 | + +#### 指标集合:innodb + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------|------|-------------------------| +| innodb_data_reads | 无 | innodb 平均每秒从文件中读取的次数 | +| innodb_data_writes | 无 | innodb 平均每秒从文件中写入的次数 | +| innodb_data_read | KB | innodb 平均每秒钟读取的数据量,单位为 KB | +| innodb_data_written | KB | innodb 平均每秒钟写入的数据量,单位为 KB | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ollama.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ollama.md new file mode 100644 index 0000000000..02b0d92133 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ollama.md @@ -0,0 +1,57 @@ +--- +id: ollama +title: 监控:Ollama 本地大模型服务 +sidebar_label: Ollama +keywords: [ 开源监控系统, 开源LLM监控, Ollama监控 ] +--- + +> HertzBeat 对 Ollama 本地大模型服务的版本信息、已安装模型列表和运行中模型进行采集监控。 + +## 准备工作 + +确保 Ollama 已运行且 API 可访问。默认情况下,Ollama 监听端口为 `11434`。 + +如果 Ollama 运行在远程服务器上,可能需要设置 `OLLAMA_HOST` 环境变量为 `0.0.0.0` 以允许外部访问。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------------------| +| 监控Host | 被监控的 Ollama 服务的对端 IPV4、IPV6 或域名。注意:不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Ollama 服务监听的端口,默认为 11434。 | +| SSL连接 | 是否通过 HTTPS 连接 Ollama 服务。 | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 密钥 | 要直接访问 ollama.com 的 API密钥 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:版本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|----------------| +| 版本 | 无 | Ollama 服务的版本号。 | + +#### 指标集合:已安装模型 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|-----------------------| +| 模型名称 | 无 | 已安装模型的名称。 | +| 模型大小 | MB | 模型文件的大小。 | +| 参数规模 | 无 | 模型的参数规模(如 7B、13B)。 | +| 量化级别 | 无 | 模型的量化级别(如 Q4_0、Q8_0)。 | +| 模型家族 | 无 | 模型所属家族(如 llama、qwen)。 | +| 格式 | 无 | 模型格式(如 gguf)。 | +| 修改时间 | 无 | 模型最后修改时间。 | + +#### 指标集合:运行中模型 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|--------------| +| 模型名称 | 无 | 运行中模型的名称。 | +| 模型大小 | MB | 模型在内存中的大小。 | +| VRAM占用 | MB | 模型占用的显存大小。 | +| 过期时间 | 无 | 模型从内存中卸载的时间。 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/openai.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/openai.md new file mode 100644 index 0000000000..b5fe15dcb8 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/openai.md @@ -0,0 +1,83 @@ +--- +id: openai +title: 监控:OpenAI 账户情况 +sidebar_label: OpenAI 账户情况 +keywords: [开源监控系统, 开源网络监控, OpenAI账户监控] +--- + +## 准备工作 + +### 获取会话密钥 +> +> 1. 打开 Chrome 浏览器的网络请求界面 +> `Mac: cmd + option + i` +> `Windows: ctrl + shift + i` +> 2. 访问 [https://platform.openai.com/usage](https://platform.openai.com/usage) +> 3. 找到 [https://api.openai.com/dashboard/billing/usage](https://api.openai.com/dashboard/billing/usage) 请求 +> 4. 找到请求头中 Authorization 字段,并复制 `Bearer` 之后的内容。例如: `sess-123456` + +### 注意事项 + +> 1. 请确保 HertzBeat 可以具备外网访问能力。若不确定可以通过在 HertzBeat 中创建对 openai.com 的 HTTP API 监控进行探测尝试。 +> 2. 监控周期应至少大于 120 秒,避免发送的请求过于频繁,导致返回状态码 429 (太多请求)。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|----------|--------------------------------| +| 监控Host | 此处填写 api.openai.com 。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 会话密钥 | 即准备工作中获取的会话密钥。 | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:信用额度授予 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|--------|---------| +| 总授予额度 | 美元 ($) | 总授予额度 | +| 总使用额度 | 美元 ($) | 总使用额度 | +| 总可用额度 | 美元 ($) | 总可用额度 | +| 总付费可用额度 | 美元 ($) | 总付费可用额度 | + +#### 指标集合:模型花费 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|--------|--------| +| 模型名称 | 无 | 模型名称 | +| 花费 | 美元 ($) | 花费 | + +#### 指标集合:订阅计费 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|--------|--------------| +| 是否有支付方式 | 无 | 是否有支付方式 | +| 订阅是否已取消 | 无 | 订阅是否已取消 | +| 订阅取消时间 | 无 | 订阅取消时间 | +| 订阅是否拖欠 | 无 | 订阅是否拖欠 | +| 一定时间内最大使用量限制 | 次 | 一定时间内最大使用量限制 | +| 最大使用量限制 | 次 | 最大使用量限制 | +| 系统硬限制使用量 | 次 | 系统硬限制使用量 | +| 软限制费用 | 美元 ($) | 软限制费用 | +| 硬限制费用 | 美元 ($) | 硬限制费用 | +| 系统硬限制费用 | 美元 ($) | 系统硬限制费用 | +| 订阅计划 | 无 | 订阅计划 | +| 是否是主要订阅 | 无 | 是否是主要订阅 | +| 结算机制 | 无 | 结算机制 | +| 是否符合拖欠资格 | 无 | 是否符合拖欠资格 | +| 最大余额 | 美元 ($) | 最大余额 | +| 是否符合自动充值资格 | 无 | 是否符合自动充值资格 | +| 是否启用自动充值 | 无 | 是否启用自动充值 | +| 自动充值阈值 | 美元 ($) | 自动充值阈值 | +| 自动充值金额 | 美元 ($) | 自动充值金额 | +| 信用等级 | 无 | 信用等级 | +| 账户名称 | 无 | 账户名称 | +| 采购号 | 无 | 采购号 | +| 账单邮箱 | 无 | 账单邮箱 | +| 税务ID | 无 | 税务ID | +| 结算地址 | 无 | 结算地址 | +| 业务地址 | 无 | 业务地址 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/opengauss.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/opengauss.md new file mode 100644 index 0000000000..fc749543e0 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/opengauss.md @@ -0,0 +1,55 @@ +--- +id: opengauss +title: 监控:OpenGauss数据库监控 +sidebar_label: OpenGauss数据库 +keywords: [开源监控系统, 开源数据库监控, OpenGauss数据库监控] +--- + +> 对PostgreSQL数据库的通用性能指标进行采集监控。支持PostgreSQL 10+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为5432。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|---------------| +| server_version | 无 | 数据库服务器的版本号 | +| port | 无 | 数据库服务器端暴露服务端口 | +| server_encoding | 无 | 数据库服务器端的字符集编码 | +| data_directory | 无 | 数据库存储数据盘地址 | +| max_connections | 连接数 | 数据库最大连接数 | + +#### 指标集合:state + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------------------------------------------------------------| +| name | 无 | 数据库名称,或share-object为共享对象。 | +| conflicts | 次数 | 由于与恢复冲突而在这个数据库中被取消的查询的数目 | +| deadlocks | 个数 | 在这个数据库中被检测到的死锁数 | +| blks_read | 次数 | 在这个数据库中被读取的磁盘块的数量 | +| blks_hit | 次数 | 磁盘块被发现已经在缓冲区中的次数,这样不需要一次读取(这只包括 PostgreSQL 缓冲区中的命中,而不包括在操作系统文件系统缓冲区中的命中) | +| blk_read_time | ms | 在这个数据库中后端花费在读取数据文件块的时间 | +| blk_write_time | ms | 在这个数据库中后端花费在写数据文件块的时间 | +| stats_reset | 无 | 这些统计信息上次被重置的时间 | + +#### 指标集合:activity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------| +| running | 连接数 | 当前客户端连接数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/opensuse.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/opensuse.md new file mode 100644 index 0000000000..c739513200 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/opensuse.md @@ -0,0 +1,114 @@ +--- +id: opensuse +title: 监控:OpenSUSE操作系统监控 +sidebar_label: OpenSUSE 操作系统 +keywords: [开源监控系统, 开源操作系统监控, OpenSUSE操作系统监控] +--- + +> 对OpenSUSE操作系统的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/oracle.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/oracle.md new file mode 100644 index 0000000000..da1af2db73 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/oracle.md @@ -0,0 +1,179 @@ +--- +id: oracle +title: 监控:ORACLE数据库监控 +sidebar_label: ORACLE数据库 +keywords: [开源监控系统, 开源数据库监控, Oracle数据库监控] +--- + +> 对ORACLE数据库的通用性能指标进行采集监控。 + +## 注意, 必须添加 ORACLE jdbc 驱动 jar + +- 下载 ORACLE jdbc 驱动 jar 包,例如 [ojdbc8.jar](https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar) [oracle-i18n](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar) +- 将 jar 包复制到 `hertzbeat/ext-lib` 目录下。 +- 重启 HertzBeat 服务。 + +:::important 采集器包选择 +Oracle 监控依赖 `ext-lib` 目录下的外置 JDBC 驱动加载能力。 + +- Oracle 监控请使用 HertzBeat 主程序内置采集器,或 JVM 采集器安装包 +- 不要使用 Native 采集器安装包执行 Oracle 监控 +::: + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为1521。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选。如果使用 sys 用户,可填写成"sys as sysdba" | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|---------| +| database_version | 无 | 数据库版本 | +| hostname | 无 | 主机名称 | +| instance_name | 无 | 数据库实例名称 | +| startup_time | 无 | 数据库启动时间 | +| status | 无 | 数据库状态 | + +#### 指标集合:表空间 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|---------| +| file_id | 无 | 文件ID | +| file_name | 无 | 文件名称 | +| tablespace_name | 无 | 所属表空间名称 | +| status | 无 | 状态 | +| bytes | MB | 大小 | +| blocks | 块 | 区块数量 | + +#### 指标集合:会话总数 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------| +| count | 无 | 总数 | + +#### 指标集合:活动会话 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------| +| count | 无 | 总数 | + +#### 指标集合:后台会话 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------| +| count | 无 | 总数 | + +#### 指标集合:连接 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| username | 无 | 用户名 | +| count | 无 | 总数 | + +#### 指标集合:性能 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|---------------------------------------| +| qps | QPS | I/O Requests per Second 每秒IO请求数量 | +| tps | TPS | User Transaction Per Sec 每秒用户事物处理数量 | +| mbps | MBPS | I/O Megabytes per Second 每秒 I/O 兆字节数量 | + +#### 指标集合:表空间百分比 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|--------|--------| +| tablespace_name | 无 | 表空间名 | +| total | 无 | 全部 | +| used | 无 | 已用 | +| free | 无 | 空闲 | +| used_percentage | 百分比(%) | 已用百分比 | +| free_percentage | 百分比(%) | 空闲百分比 | + +#### 指标集合:进程 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|--------| +| process_count | 无 | 进程数 | + +#### 指标集合:事务 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| commits | t/s | 提交数 | +| rollbacks | t/s | 回滚数 | + +#### 指标集合:等待 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------|--------|-----------| +| concurrent_wait_time | 毫秒(ms) | 并发等待时间 | +| commit_wait_time | 毫秒(ms) | 提交等待时间 | +| app_wait_time | 毫秒(ms) | 应用等待时间 | +| network_wait_time | 毫秒(ms) | 网络等待时间 | +| system_io_wait_time | 毫秒(ms) | 系统I/O等待时间 | +| user_io_wait_time | 毫秒(ms) | 用户I/O等待时间 | +| configure_wait_time | 毫秒(ms) | 配置等待时间 | +| scheduler_wait_time | 毫秒(ms) | 调度等待时间 | + +#### 指标集合:CPU 状态 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|--------| +| type | 无 | 类型 | +| num | 无 | 数量 | + +#### 指标集合:内存状态 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|--------| +| type | 无 | 类型 | +| num | 无 | 数量 | + +#### 指标集合:缓存命中率 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------|------|----------| +| lib_cache_hit_ratio | 无 | 库缓存命中率 | +| buffer_cache_hit_ratio | 无 | 缓冲区缓存命中率 | + +#### 指标集合:慢查询 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------| +| sql_id | 无 | sql 主键 | +| child_number | 无 | 子编号 | +| executions | 次 | 执行数 | +| per_secs | 秒 | 每秒执行数 | +| cpu_secs | 秒 | 每秒 CPU | +| buffer_gets | 无 | 获得的缓冲区 | +| disk_reads | 无 | 磁盘读取 | +| fetches | 无 | 获取数量 | +| parse_calls | 无 | 解析调用 | +| optimizer_cost | 无 | 优化器成本 | +| sql_text | 无 | SQL 文本 | + +#### 指标集合:用户信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------|------|------------------------------| +| username | 无 | 用户名 | +| account_status | 无 | 账号状态 | +| lock_date | 无 | 如果账户状态为 LOCKED,则显示锁定账户的日期和时间 | +| expiry_date | 无 | 密码的失效时间 | +| expiry_seconds | 秒 | 密码剩余有效时间,小于 0 表示已失效 | +| created | 无 | 创建时间 | +| authentication_type | 无 | 认证类型 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ping.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ping.md new file mode 100644 index 0000000000..7c1d8abe63 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ping.md @@ -0,0 +1,36 @@ +--- +id: ping +title: 监控:PING连通性 +sidebar_label: PING连通性 +keywords: [开源监控系统, 开源网络监控, 网络PING监控] +--- + +> 对对端HOST地址进行PING操作,判断其连通性 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|----------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| Ping超时时间 | 设置PING未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:summary + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| responseTime | ms毫秒 | 网站响应时间 | + +### 常见问题 + +1. 安装包部署的hertzbeat下ping连通性监控异常 + 安装包安装部署的hertzbeat,对ping连通性监控不可用,但本地直接ping是可用的。 + +> 安装包部署需要配置java虚拟机root权限启动hertzbeat从而使用ICMP,若未启用root权限则是判断telnet对端7号端口是否开通 +> docker安装默认启用无此问题 +> 详见 [https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address](https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/plugin.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/plugin.md new file mode 100644 index 0000000000..ea13661861 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/plugin.md @@ -0,0 +1,115 @@ +--- +id: plugin +title: 自定义插件(Beta) +sidebar_label: 自定义插件(Beta) +--- + +## 简介 + +当前`HertzBeat`在使用中,只有在告警后通过通知功能与外部系统产生交互,插件功能支持让用户在 `HertzBeat` 生命周期的各个阶段增加自定义操作。如在告警后执行`sql`、`shell`脚本等操作,在采集到监控数据后发送到其他的系统等。 +用户按照自定义插件的流程开发插件并打包后,将打包后的文件通过 `插件管理` - `上传插件` 功能,上传并启用插件即可在不重启`HertzBeat`的情况下增加自定义功能。 + +:::warning +在当前版本中,自定义插件作为一个测试功能,可能会有一些限制和不稳定性,后续版本可能会重构插件功能。` +::: + +### 支持的插件类型 + +1. `Post-Alert`插件 + - 作用:在告警后执行自定义操作 + - 实现接口:`org.apache.hertzbeat.plugin.PostAlertPlugin` +2. `Post-Collect`插件 + - 作用:在采集后执行自定义操作 + - 实现接口:`org.apache.hertzbeat.plugin.PostCollectPlugin` + +:::tip +为了保证插件功能清晰,易于管理,我们建议且只支持一个插件中只包含一种插件类型接口的一个实现。 +::: + +如需在采集、启动程序等时机设置触发方法,请在`https://github.com/apache/hertzbeat/issues/new/choose` 提`Task` + +### 开发步骤 (以实现一个告警后插件为例) + +1. 拉取主分支代码 `git clone https://github.com/apache/hertzbeat.git` ,定位到`plugin`模块的 + `Plugin`接口。 + ![plugin-1.png](/img/docs/help/plugin-1.png) +2. 在`org.apache.hertzbeat.plugin.impl`目录下(如果没有请自行创建), 新建一个 `org.apache.hertzbeat.plugin.PostAlertPlugin` 实现类,如`org.apache.hertzbeat.plugin.impl.DemoPlugin`,在实现类中接收`Alert` + 类作为参数,实现`execute`方法,逻辑由用户自定义,这里我们简单打印一下对象。 + + ```java + package org.apache.hertzbeat.plugin.impl; + + import org.apache.hertzbeat.common.entity.alerter.Alert; + import org.apache.hertzbeat.common.entity.plugin.PluginContext; + import org.apache.hertzbeat.plugin.PostAlertPlugin; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + + + public class DemoPlugin implements PostAlertPlugin { + + private static final Logger log = LoggerFactory.getLogger(DemoPlugin.class); + + @Override + public void execute(Alert alert, PluginContext pluginContext) { + log.info("DemoPlugin alert: {}", alert); + log.info("DemoPlugin pluginContext: {}", pluginContext); + } + } + ``` + +3. 在 `META-INF/services/org.apache.hertzbeat.plugin.PostAlertPlugin` (如果没有请自行创建) 文件中增加接口实现类的全限定名,每个实现类全限定名单独成行。 + + ```shell + org.apache.hertzbeat.plugin.impl.DemoPluginImpl + ``` + +4. 打包 `hertzbeat-plugin` 模块。 + + ```shell + cd plugin + mvn package + ``` + +5. 通过 `插件管理`-`上传插件` 功能,上传以 `-jar-with-lib.jar` 结尾的插件包,启用插件即可在告警后执行自定义操作。 + +### 定义插件参数 + +插件功能支持自定义参数,并且在使用插件时可以通过`插件管理` - `编辑参数` 功能填写插件运行时需要的参数。 +下面以定义一个包含两个参数的插件为例,详细介绍定义插件参数的流程: + +1. 在 `define` 目录下增加参数定义文件 ,注意参数定义文件必须是名称为 define 开头的 yml 文件,例如 `define-demo.yml`; +2. 在 `define-demo.yml` 中定义参数,如下所示: + + ```yaml + params: + - field: host + # name-param field display i18n name + name: + zh-CN: 目标 Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: text + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + ``` + +3. 在插件逻辑中使用参数 + + ```java + @Override + public void execute(Alert alert, PluginContext pluginContext) { + log.info("param host:{}",pluginContext.getString("host")); + log.info("param port:{}",pluginContext.getInteger("port")); + } + ``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/pop3.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/pop3.md new file mode 100644 index 0000000000..4bc618c6d6 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/pop3.md @@ -0,0 +1,46 @@ +--- +id: pop3 +title: 监控POP3 +sidebar_label: POP3监控 +keywords: [开源监控工具,开源Java监控工具,监控POP3指标] +--- + +> 收集和监控POP3的常规性能指标。 + +**使用的协议:POP3** + +## 启用POP3服务 + +如果您想使用此监控类型来监控"POP3"的信息,请在您的邮件服务器上开启POP3服务。 + +**1、开启POP3服务:** + +```text +以qq邮箱为例【其它邮箱类似】: + 1. 点击`设置`选项 + 2. 选择`账号` + 3. 找到开启SMTP/POP3/IMAP选项,并开启 + 4. 得到POP3服务器域名,端口号,以及授权码【开启SMTP/POP3/IMAP服务后,qq邮箱提供】 + 5. 通过POP3服务器域名,端口号,qq邮箱账号以及授权码连接POP3服务器,采集监控指标 +``` + +### 配置参数 + +| 参数名 | 参数描述 | +|--------|-----------------------------------------------------| +| 监控主机 | 被监控的 IPV4、IPV6 或域名。注意⚠️不需要协议头部(例如:https://,http://) | +| 监控名称 | 标识此监控的名称。名称需要唯一 | +| 端口 | POP3 提供的端口 | +| 超时时间 | 允许收集响应时间 | +| 收集间隔时间 | 监控周期性数据收集的间隔时间,单位为秒,最小可设置的间隔时间为30秒 | +| 是否检测 | 是否在添加监控之前检测和确认监控的可用性。只有在检测成功后,添加和修改操作才会继续进行 | +| 描述备注 | 用户可以在此处注明有关标识和描述此监控的更多信息 | + +### 采集指标 + +#### 指标集:email_status + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------| +| 邮件数量 | | 邮件数量 | +| 邮箱总大小 | kb | 邮箱中邮件的总大小 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/port.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/port.md new file mode 100644 index 0000000000..0fd77b05b7 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/port.md @@ -0,0 +1,28 @@ +--- +id: port +title: 监控:端口可用性 +sidebar_label: TCP 端口可用性 +keywords: [开源监控系统, 开源网络监控, TCP 端口可用性监控] +--- + +> 判断对端服务暴露端口是否可用,进而判断对端服务是否可用,采集响应时间等指标进行监测 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 网站对外提供的端口,http一般默认为80,https一般默认为443。 | +| 连接超时时间 | 端口连接的等待超时时间,单位毫秒,默认3000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:summary + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| responseTime | ms毫秒 | 网站响应时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/postgresql.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/postgresql.md new file mode 100644 index 0000000000..578c876297 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/postgresql.md @@ -0,0 +1,67 @@ +--- +id: postgresql +title: 监控:PostgreSQL数据库监控 +sidebar_label: PostgreSQL数据库 +keywords: [开源监控系统, 开源数据库监控, PostgreSQL数据库监控] +--- + +> 对PostgreSQL数据库的通用性能指标进行采集监控。支持PostgreSQL 10+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为5432。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|---------------| +| server_version | 无 | 数据库服务器的版本号 | +| port | 无 | 数据库服务器端暴露服务端口 | +| server_encoding | 无 | 数据库服务器端的字符集编码 | +| data_directory | 无 | 数据库存储数据盘地址 | +| max_connections | 连接数 | 数据库最大连接数 | + +#### 指标集合:state + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------------------------------------------------------------| +| name | 无 | 数据库名称,或share-object为共享对象。 | +| conflicts | 次数 | 由于与恢复冲突而在这个数据库中被取消的查询的数目 | +| deadlocks | 个数 | 在这个数据库中被检测到的死锁数 | +| blks_read | 次数 | 在这个数据库中被读取的磁盘块的数量 | +| blks_hit | 次数 | 磁盘块被发现已经在缓冲区中的次数,这样不需要一次读取(这只包括 PostgreSQL 缓冲区中的命中,而不包括在操作系统文件系统缓冲区中的命中) | +| blk_read_time | ms | 在这个数据库中后端花费在读取数据文件块的时间 | +| blk_write_time | ms | 在这个数据库中后端花费在写数据文件块的时间 | +| stats_reset | 无 | 这些统计信息上次被重置的时间 | + +#### 指标集合:activity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------| +| running | 连接数 | 当前客户端连接数 | + +#### 指标集合:users + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|----------------------| +| usename | 无 | 数据库用户名 | +| usesysid | 无 | 用户系统ID | +| usecreatedb | 无 | 用户是否可以创建数据库(Y/N) | +| usesuper | 无 | 用户是否为超级用户(Y/N) | +| valuntil | 无 | 密码过期时间(时间戳) | +| days_left | 天 | 密码剩余有效天数 | +| account_status | 无 | 账号状态(OPEN/EXPIRED) | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/prestodb.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/prestodb.md new file mode 100644 index 0000000000..a2216cdcbd --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/prestodb.md @@ -0,0 +1,78 @@ +--- +id: presto +title: 监控:PrestoDB 数据库 +sidebar_label: PrestoDB 数据库 +keywords: [ 开源监控系统, 开源数据库监控, Presto数据库监控 ] +--- + +> 对PrestoDB Atlas 的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 被监控的平台端口。 | +| 启用HTTPS | 是否启用 PrestoDB API 的 HTTPS 访问。 | +| 认证方式 | 可选的 HTTP 认证方式,支持 `Basic Auth` 和 `Digest Auth`。 | +| 用户名 | 启用 `Basic Auth` 或 `Digest Auth` 后使用的用户名。 | +| 密码 | 启用 `Basic Auth` 或 `Digest Auth` 后使用的密码。 | +| 连接超时时间 | 设置连接PrestoDB未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:集群状态 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------| +| activeWorkers | 无 | 活跃节点数 | +| runningQueries | 无 | 运行中的查询数 | +| queuedQueries | 无 | 队列中的查询数 | +| blockedQueries | 无 | 阻塞的查询数 | +| runningDrivers | 无 | 运行中的驱动数 | +| runningTasks | 无 | 运行中的任务数 | + +#### 指标集合:节点信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|----------------| +| uri | 无 | 节点链接 | +| recentRequests | 无 | 最近一段时间内的请求数量 | +| recentFailures | 无 | 最近一段时间内的失败请求数量 | +| recentSuccesses | 无 | 最近一段时间内的成功请求数量 | +| lastRequestTime | 无 | 最近一次请求的时间 | +| lastResponseTime | 无 | 最近一次响应的时间 | +| age | 无 | 持续时间 | +| recentFailureRatio | 无 | 最近一段时间内的失败 | + +#### 指标集合:节点状态 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|----------| +| nodeId | 无 | 节点ID | +| nodeVersion | 无 | 节点版本 | +| environment | 无 | 环境 | +| coordinator | 无 | 是否为协调节点 | +| uptime | 无 | 正常运行时间 | +| externalAddress | 无 | 外部地址 | +| internalAddress | 无 | 内部地址 | +| processors | 无 | 处理器数量 | +| processCpuLoad | 无 | 进程CPU负载 | +| systemCpuLoad | 无 | 系统CPU负载 | +| heapUsed | MB | 已使用堆内存 | +| heapAvailable | MB | 可用堆内存 | +| nonHeapUsed | MB | 请已使用非堆内存 | + +#### 指标集合: 任务查询 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|--------| +| taskId | 无 | 任务ID | +| version | 无 | 版本 | +| state | 无 | 状态 | +| self | 无 | 自身 | +| lastHeartbeat | 无 | 最后心跳时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/process.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/process.md new file mode 100644 index 0000000000..cd21bece38 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/process.md @@ -0,0 +1,87 @@ +--- +id: process +title: 监控:Linux 进程监控 +sidebar_label: Process +keywords: [开源监控系统, 操作系统进程监控, 进程监控] +--- + +> 对Linux系统进程基础信息进行采集监控,包括进程的 CPU使用率、内存使用率、物理内存、IO 等监控 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux系统的ssh端口,默认: 22 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次回去信息都会创建一个连接 | +| 用户名 | 服务器用户名 | +| 密码 | 服务器密码 | +| 进程名称 | 需要监控的进程名称或进程部分名称 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需私钥 | + +### 采集指标 + +#### 指标集合:进程基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|--------| +| PID | 无 | 进程ID | +| User | 无 | 用户 | +| CPU | 无 | CPU使用率 | +| MEM | 无 | 内存使用率 | +| rss | 无 | 物理内存 | +| cmd | 无 | 运行命令 | + +#### 指标集合:内存使用信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|--------| +| PID | 无 | 进程ID | +| detail | 无 | 详细监控指标 | + +包含的指标: + +- 虚拟内存峰值 +- 当前虚拟内存使用 +- 锁定内存 +- 固定内存 +- 物理内存峰值 +- 当前物理内存使用 +- 数据段大小 +- 堆栈大小 +- 代码大小 +- 共享库大小 +- 页表项大小 + +#### 指标集合:其他监控信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|-----------| +| PID | 无 | 进程ID | +| path | 无 | 执行路径 | +| date | 无 | 启动时间 | +| fd_count | 无 | 打开文件描述符数量 | + +#### 指标集合:IO + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|--------| +| PID | 无 | 进程ID | +| metric | 无 | 监控指标名称 | +| value | 无 | 监控指标值 | + +包含的指标: + +- rchar(进程从磁盘或其他文件读取的总字节数) +- wchar(进程写入到磁盘或其他文件的总字节数) +- syscr(进程发起的读取操作的次数) +- syscw(进程发起的写入操作的次数) +- read_bytes(进程从磁盘实际读取的字节数) +- write_bytes(进程写入到磁盘的实际字节数) +- cancelled_write_bytes(进程写入到磁盘的实际字节数) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/prometheus.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/prometheus.md new file mode 100755 index 0000000000..dac054eb2b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/prometheus.md @@ -0,0 +1,41 @@ +--- +id: prometheus +title: 监控:Prometheus任务监控 +sidebar_label: Prometheus任务监控 +keywords: [ 开源监控系统, Prometheus协议监控 ] +--- + +> 采集支持Prometheus协议的应用的指标数据。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(例如: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 监控HTTP端口。 | +| 端点路径 | 监控HTTP接口的路径,注意⚠️需要从 `/` 开始。 | +| 查询超时时间 | 设置采集数据超时时间,单位ms毫秒,默认6000毫秒。 | +| 启用HTTPS | 采集数据是否启用HTTPS,可选,默认值:否 | +| 请求Headers | 访问监控HTTP接口请求头信息,可选。 | +| 查询Params | 访问监控HTTP接口查询参数信息,可选。 | +| Content-Type | HTTP请求的ContentType,可选。 | +| 请求BODY | 请求体,可选。 | +| 认证方式 | 认证方式,可选值包括:`Basic Auth`,`Digest Auth`,可选。 | +| 用户名 | 用户名,可选。 | +| 密码 | 密码,可选。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 使用示例 + +应用暴露的监控地址为:`http://127.0.0.1:8080/actuator/prometheus` + +可以使用如下配置: + +- 目标Host:`127.0.0.1` +- 端口:`8080` +- 端点路径:`/actuator/prometheus` + +其余设置保持默认。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/pulsar.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/pulsar.md new file mode 100644 index 0000000000..459ac1ff26 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/pulsar.md @@ -0,0 +1,72 @@ +--- +id: pulsar +title: 监控:Pulsar监控 +sidebar_label: Apache Pulsar +keywords: [开源监控系统, 开源数据库监控, Pulsar监控] +--- + +> 对Pulsar的通用性能指标进行采集监控 + +**使用协议:HTTP** + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 端口 | Pulsar的webServiceProt值,默认为8080。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:版本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| Version Info | 无 | 版本信息 | + +#### 指标集合:process_start_time_seconds + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|--------| +| Process Start Time | 无 | 进程启动时间 | + +#### 指标集合:process_open_fds + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|----------| +| Open File Descriptors | 无 | 打开的文件描述符 | + +#### 指标集合:process_max_fds + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------|------|---------| +| Max File Descriptors | 无 | 最大文件描述符 | + +#### 指标集合: jvm_memory_pool_allocated_bytes_total + +Java虚拟机(JVM)中特定内存池已分配的内存字节数。在Pulsar中,这通常指的是用于各种目的的JVM内存(如堆内存、非堆内存等)中已经分配出去的内存量。 + +#### 指标集合:jvm_memory_pool_used_bytes + +与allocated_bytes不同,这个指标会显示实际使用的内存,而不仅仅是分配的内存。 + +#### 指标集合:jvm_memory_pool_committed_bytes + +JVM中特定内存池已承诺的内存字节数。在JVM中,承诺的内存是指虚拟机保证可供应用程序使用的内存量,通常这部分内存会被操作系统锁定,以减少交换或垃圾回收的可能性。 + +#### 指标集合:jvm_memory_pool_max_bytes + +JVM中特定内存池可分配的最大内存字节数。这是该内存池允许的最大内存限制,有助于设置内存使用的上限。 + +#### 指标集合:pulsar_broker_publish_latency + +Broker端消息发布延迟 + +#### 指标集合:pulsar_metadata_store_ops_latency_ms_bucket + +Broker端元数据存储操作延迟 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/push.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/push.md new file mode 100644 index 0000000000..8ffdd385f7 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/push.md @@ -0,0 +1,130 @@ +--- +id: push +title: 监控:推送方式监控 +sidebar_label: 推送方式监控 +keywords: [开源监控系统, 开源推送监控, 推送方式指标监控] +--- + +> HertzBeat 默认以主动采集方式定时拉取目标指标。推送方式监控反转了这一模型——由您的应用将 Prometheus 格式的指标推送至 HertzBeat,适用于短生命周期任务、批处理作业或位于防火墙内部的服务。 + +## 工作原理 + +1. HertzBeat 暴露一个兼容 Prometheus Pushgateway 协议的推送端点。 +2. 您的应用以 **Prometheus 文本格式** 将指标 POST 到该端点,需指定 `job` 名称和 `instance` 名称。 +3. 对于首次推送的新 `job`/`instance` 组合,HertzBeat 将自动为其创建一个监控实例。 +4. 后续推送将持续更新该监控实例下存储的指标数据。 + +## 推送端点 + +```http +POST http://{hertzbeat-host}:{port}/api/push/prometheus/job/{job}/instance/{instance} +Content-Type: text/plain +``` + +| 路径参数 | 说明 | 示例 | +|---|---|---| +| `{hertzbeat-host}` | HertzBeat 服务器地址 | `127.0.0.1` | +| `{port}` | HertzBeat HTTP 端口(默认 `1157`) | `1157` | +| `{job}` | 应用逻辑名称(仅允许字母、数字和下划线 `_`) | `my_app` | +| `{instance}` | 该 job 下的实例标识(仅允许字母、数字和下划线 `_`) | `server_1` | + +## 指标格式 + +请求体须遵循 **Prometheus 文本格式**,每行(非注释、非空行)定义一个采样点: + +```promtail +# HELP http_requests_total 处理的 HTTP 请求总数 +# TYPE http_requests_total counter +http_requests_total{method="GET",status="200"} 1234 +http_requests_total{method="POST",status="200"} 56 + +# HELP cpu_usage_percent 当前 CPU 使用率 +# TYPE cpu_usage_percent gauge +cpu_usage_percent 72.5 + +# HELP memory_used_bytes 当前内存使用量 +# TYPE memory_used_bytes gauge +memory_used_bytes 536870912 +``` + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---|---| +| 推送模块 Host | 您的应用将指标推送到的 HertzBeat 服务器地址,默认:`127.0.0.1` | +| 端口 | HertzBeat HTTP 端口,默认:`1157` | +| 监控数据字段 | 定义 HertzBeat 需要接收的指标字段名及其类型(数值 / 字符串) | + +## 示例:Shell(curl) + +```bash +curl -X POST \ + http://localhost:1157/api/push/prometheus/job/my_app/instance/server_1 \ + -H 'Content-Type: text/plain' \ + --data-binary @- << 'EOF' +# HELP cpu_usage_percent 当前 CPU 使用率 +# TYPE cpu_usage_percent gauge +cpu_usage_percent{core="0"} 45.2 +cpu_usage_percent{core="1"} 38.7 + +# HELP memory_used_bytes 当前内存使用量 +# TYPE memory_used_bytes gauge +memory_used_bytes 1073741824 +EOF +``` + +## 示例:Python + +```python +import requests + +def push_metrics(host: str, port: int, job: str, instance: str, body: str) -> None: + url = f"http://{host}:{port}/api/push/prometheus/job/{job}/instance/{instance}" + response = requests.post(url, data=body, headers={"Content-Type": "text/plain"}) + response.raise_for_status() + +metrics_body = """\ +# HELP request_duration_seconds 请求耗时 +# TYPE request_duration_seconds gauge +request_duration_seconds{endpoint="/api/v1/users"} 0.023 +""" + +push_metrics("localhost", 1157, "my_app", "server_1", metrics_body) +``` + +## 示例:Java + +```java +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; + +String body = """ + # HELP jvm_memory_used_bytes JVM 堆内存当前使用量 + # TYPE jvm_memory_used_bytes gauge + jvm_memory_used_bytes 134217728 + """; + +HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create("http://localhost:1157/api/push/prometheus/job/my_app/instance/server_1")) + .header("Content-Type", "text/plain") + .POST(HttpRequest.BodyPublishers.ofString(body)) + .build(); + +HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); +``` + +## 常见问题 + +1. **响应提示 `Request not matched`** + `{job}` 和 `{instance}` 路径参数仅允许字母、数字和下划线(`[a-zA-Z0-9_]`),不支持连字符、点号或斜杠。 + +2. **指标推送成功但仪表盘未显示数据** + HertzBeat 监控实例中配置的字段名称须与推送体中的指标名称或标签名称完全一致(区分大小写)。 + +3. **推送被拒绝且未自动创建监控** + HertzBeat 对可自动创建的推送监控数量有上限(默认 10,000 个)。达到上限后,来自未知 `job`/`instance` 组合的推送将被拒绝,但已存在的监控可正常接收数据。 + +4. **请求体过大** + 单次推送请求默认限制为 5 MB 且最多 10,000 个采样点,请将较大的数据载荷拆分为多次请求发送。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rabbitmq.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rabbitmq.md new file mode 100644 index 0000000000..6918bca5b0 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rabbitmq.md @@ -0,0 +1,125 @@ +--- +id: rabbitmq +title: 监控 RabbitMQ 消息中间件 +sidebar_label: RabbitMQ消息中间件 +keywords: [开源监控系统, 开源消息中间件监控, RabbitMQ消息中间件监控] +--- + +> 对 RabbitMQ 消息中间件的运行状态,节点,队列等相关指标进行监测。 + +## 监控前操作 +> +> HertzBeat 使用 RabbitMQ Management 的 Rest Api 对 RabbitMQ 进行指标数据采集。 +> 故需要您的 RabbitMQ 环境开启 Management 插件 + +1. 开启 Management 插件,或使用自开启版本 + + ```shell + rabbitmq-plugins enable rabbitmq_management + ``` + +2. 浏览器访问 [http://ip:15672/](http://ip:15672/) ,默认账户密码 `guest/guest`. 成功登录即开启成功。 + +3. 在 HertzBeat 添加对应 RabbitMQ 监控即可,参数使用 Management 的 IP 端口,默认账户密码。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | RabbitMQ Management 对外提供的HTTP端口,默认为15672。 | +| 用户名 | 接口Basic认证时使用的用户名 | +| 密码 | 接口Basic认证时使用的密码 | +| 超时时间 | HTTP请求查询超时时间 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:overview + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|--------------------------| +| product_version | 无 | 产品版本 | +| product_name | 无 | 产品名称 | +| rabbitmq_version | 无 | rabbitmq 版本 | +| management_version | 无 | rabbitmq management 插件版本 | +| erlang_version | 无 | erlang 版本 | +| cluster_name | 无 | 集群名称 | +| rates_mode | 无 | rates模式 | + +#### 指标集合:object_totals + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|-----------------| +| channels | 无 | channels的总数量 | +| connections | 无 | connections的总数量 | +| consumers | 无 | consumers的总数量 | +| exchanges | 无 | exchanges的总数量 | +| queues | 无 | queues的总数量 | + +#### 指标集合:nodes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|-------------------------------| +| name | 无 | The node name | +| type | 无 | The node type | +| running | 无 | Running state | +| os_pid | 无 | Pid in OS | +| mem_limit | MB | Memory usage high watermark | +| mem_used | MB | Total amount of memory used | +| fd_total | 无 | File descriptors available | +| fd_used | 无 | File descriptors used | +| sockets_total | 无 | Sockets available | +| sockets_used | 无 | Sockets used | +| proc_total | 无 | Erlang process limit | +| proc_used | 无 | Erlang processes used | +| disk_free_limit | GB | Free disk space low watermark | +| disk_free | GB | Free disk space | +| gc_num | 无 | GC runs | +| gc_bytes_reclaimed | MB | Bytes reclaimed by GC | +| context_switches | 无 | Context_switches num | +| io_read_count | 无 | 总共读操作的数量 | +| io_read_bytes | KB | 总共读入磁盘数据大小 | +| io_read_avg_time | ms | 读操作平均时间,毫秒为单位 | +| io_write_count | 无 | 磁盘写操作总量 | +| io_write_bytes | KB | 写入磁盘数据总量 | +| io_write_avg_time | ms | 每个磁盘写操作的平均时间,毫秒为单位 | +| io_seek_count | 无 | seek操作总量 | +| io_seek_avg_time | ms | seek操作的平均时间,毫秒单位 | +| io_sync_count | 无 | fsync操作的总量 | +| io_sync_avg_time | ms | fsync操作的平均时间,毫秒为单位 | +| connection_created | 无 | connection created num | +| connection_closed | 无 | connection closed num | +| channel_created | 无 | channel created num | +| channel_closed | 无 | channel closed num | +| queue_declared | 无 | queue declared num | +| queue_created | 无 | queue created num | +| queue_deleted | 无 | queue deleted num | +| connection_closed | 无 | connection closed num | + +#### 指标集合:queues + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------------|------|--------------------------------------------------------------------------------------------------------------------------------------| +| name | 无 | The name of the queue with non-ASCII characters escaped as in C. | +| node | 无 | The queue on the node name | +| state | 无 | The state of the queue. Normally "running", but may be `{syncing, message_count}` if the queue is synchronising. | +| type | 无 | Queue type, one of: quorum, stream, classic. | +| vhost | 无 | vhost path | +| auto_delete | 无 | Whether the queue will be deleted automatically when no longer used | +| policy | 无 | Effective policy name for the queue. | +| consumers | 无 | Number of consumers. | +| memory | B | Bytes of memory allocated by the runtime for the queue, including stack, heap and internal structures. | +| messages_ready | 无 | Number of messages ready to be delivered to clients | +| messages_unacknowledged | 无 | Number of messages delivered to clients but not yet acknowledged | +| messages | 无 | Sum of ready and unacknowledged messages (queue depth) | +| messages_ready_ram | 无 | Number of messages from messages_ready which are resident in ram | +| messages_persistent | 无 | Total number of persistent messages in the queue (will always be 0 for transient queues) | +| message_bytes | B | Sum of the size of all message bodies in the queue. This does not include the message properties (including headers) or any overhead | +| message_bytes_ready | B | Like message_bytes but counting only those messages ready to be delivered to clients | +| message_bytes_unacknowledged | B | Like message_bytes but counting only those messages delivered to clients but not yet acknowledged | +| message_bytes_ram | B | Like message_bytes but counting only those messages which are currently held in RAM | +| message_bytes_persistent | B | Like message_bytes but counting only those messages which are persistent | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redhat.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redhat.md new file mode 100644 index 0000000000..24a7aa285c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redhat.md @@ -0,0 +1,114 @@ +--- +id: redhat +title: 监控:RedHat操作系统监控 +sidebar_label: RedHat 操作系统 +keywords: [ 开源监控系统, 开源操作系统监控, RedHat操作系统监控 ] +--- + +> 对RedHat操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号,默认为22。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redis.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redis.md new file mode 100644 index 0000000000..46d8454be7 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redis.md @@ -0,0 +1,239 @@ +--- +id: redis +title: 监控:REDIS数据库监控 +sidebar_label: Redis 数据库 +keywords: [开源监控系统, 开源数据库监控, Redis数据库监控] +--- + +> 对REDIS数据库的通用性能指标进行采集监控。支持REDIS1.0+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | redis对外提供的端口,默认为6379,sentinel节点默认26379 | +| 超时时间 | 设置redis info 查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:server + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------|------|-----------------------------------------------| +| redis_version | 无 | Redis 服务器版本 | +| redis_git_sha1 | 无 | Git SHA1 | +| redis_git_dirty | 无 | Git dirty flag | +| redis_build_id | 无 | redis 构建的id | +| redis_mode | 无 | redis模式(包括standalone, sentinel, cluster) | +| os | 无 | Redis 服务器的宿主操作系统 | +| arch_bits | 无 | 架构(32 或 64 位) | +| multiplexing_api | 无 | Redis使用的事件循环机制 | +| atomicvar_api | 无 | Redis使用的原子 API | +| gcc_version | 无 | 用于编译Redis服务器的GCC编译器版本 | +| process_id | 无 | 服务器进程的PID | +| process_supervised | 无 | 受监管系统(包括:upstart、systemd、unknown、no) | +| run_id | 无 | 标识Redis服务器的随机值(由Sentinel和Cluster使用) | +| tcp_port | 无 | TCP/IP侦听端口 | +| server_time_usec | 无 | 微秒级精度的基于时间的系统时间 | +| uptime_in_seconds | 无 | 自Redis服务器启动后的秒数 | +| uptime_in_days | 无 | 自Redis服务器启动后的天数 | +| hz | 无 | 服务器的当前频率设置,redis相关定时任务的执行频率(如清除过期key,关闭超时客户端) | +| configured_hz | 无 | 服务器配置的频率设置 | +| lru_clock | 无 | 时钟每分钟递增,用于LRU管理 | +| executable | 无 | 服务器可执行文件的路径 | +| config_file | 无 | 配置文件的路径 | +| io_threads_active | 无 | 指示I/O线程是否处于活动状态的标志 | +| shutdown_in_milliseconds | 无 | 复制副本在完成关闭序列之前赶上复制的最长剩余时间。此字段仅在停机期间出现。 | + +#### 指标集合:clients + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------------|------|--------------------------------------------------------------------------------| +| connected_clients | 无 | 客户端连接数(不包括来自副本的连接) | +| cluster_connections | 无 | 群集总线使用的套接字数量的近似值 | +| maxclients | 无 | maxclients配置指令的值。这是connected_clients、connected_slave和cluster_connections之和的上限。 | +| client_recent_max_input_buffer | byte | 当前客户端连接中最大的输入缓冲区 | +| client_recent_max_output_buffer | byte | 当前客户端连接中最大的输出缓冲区 | +| blocked_clients | 无 | 阻塞呼叫挂起的客户端数(BLPOP、BRPOP、BRPOPLPUSH、BLMOVE、BZPOPMIN、BZPOPMAX) | +| tracking_clients | 无 | 正在跟踪的客户端数(CLIENT TRACKING) | +| clients_in_timeout_table | 无 | 客户端超时表中的客户端数 | + +#### 指标集合:memory + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------|----------|-----------------------------------------------------------------------------------------------| +| used_memory | byte | Redis使用其分配器(标准libc、jemalloc或tcmalloc等替代分配器)分配的总字节数 | +| used_memory_human | GB/MB/KB | 上一个值的人类可读表示 | +| used_memory_rss | byte | 操作系统看到的Redis分配的字节数(也称为驻留集大小)。这是top(1)和ps(1)等工具报告的数字 | +| used_memory_rss_human | GB/MB/KB | 上一个值的人类可读值 | +| used_memory_peak | byte | Redis消耗的峰值内存(字节) | +| used_memory_peak_human | GB/MB/KB | 上一个值的人类可读值 | +| used_memory_peak_perc | 无 | used_memory_peak 与used_memory百分比 | +| used_memory_overhead | byte | 服务器分配用于管理其内部数据结构的所有开销的字节总和 | +| used_memory_startup | byte | Redis在启动时消耗的初始内存量(字节) | +| used_memory_dataset | byte | 数据集的字节大小(used_memory - used_memory_overhead) | +| used_memory_dataset_perc | 无 | 已用内存数据集占净内存使用量的百分比(used_memory_dataset / (used_memory - used_memory_startup)) | +| allocator_allocated | byte | 从分配器分配的总字节数,包括内部碎片。通常与使用的内存相同 | +| allocator_active | byte | 分配器活动页中的总字节数,包括外部碎片 | +| allocator_resident | byte | 分配器中驻留的总字节数(RSS),包括可释放到操作系统的页面(通过MEMORY PURGE或仅等待) | +| total_system_memory | byte | Redis主机的内存总量 | +| total_system_memory_human | GB/MB/KB | 上一个值的人类可读值 | +| used_memory_lua | byte | Lua引擎使用的字节数 | +| used_memory_lua_human | KB | 上一个值的人类可读值 | +| used_memory_scripts | byte | 缓存Lua脚本使用的字节数 | +| used_memory_scripts_human | GB/MB/KB | 上一值的人类可读值 | +| number_of_cached_scripts | 无 | 缓存的lua脚本数量 | +| maxmemory | byte | maxmemory配置指令的值 | +| maxmemory_human | GB/MB/KB | 上一个值的人类可读值 | +| maxmemory_policy | 无 | 当达到maxmemory时的淘汰策略 | +| allocator_frag_ratio | 无 | allocator_active 和 allocator_allocated之间的比率这是真实(外部)碎片度量(不是mem_fragmentation_ratio) | +| allocator_frag_bytes | byte | allocator_active 和 allocator_allocated 之间的差值。 | +| allocator_rss_ratio | | 从操作系统角度看, 内存分配器碎片比例 | +| allocator_rss_bytes | byte | allocator_resident 和 allocator_active之间的差值 | +| rss_overhead_ratio | 无 | used_memory_rss和allocator_resident之间的比率,这包括与分配器或堆无关的RSS开销 | +| rss_overhead_bytes | byte | used_memory_rss和allocator_resident之间的增量 | +| mem_fragmentation_ratio | 无 | used_memory_rss和used_memory之间的比率,注意,这不仅包括碎片,还包括其他进程开销(请参阅allocator_* metrics),以及代码、共享库、堆栈等开销。 | +| mem_fragmentation_bytes | byte | used_memory_rss和used_memory之间的增量。注意,当总碎片字节较低(几兆字节)时,高比率(例如1.5及以上)不是问题的表现 | +| mem_not_counted_for_evict | byte | 不应驱逐的内存大小,以字节为单位。这基本上是瞬时复制和AOF缓冲区。 | +| mem_replication_backlog | byte | 复制backlog的内存大小, 以字节为单位 | +| mem_clients_slaves | 无 | 副本客户端使用的内存-从Redis 7.0开始,副本缓冲区与复制积压工作共享内存,因此当副本不触发内存使用增加时,此字段可以显示0。 | +| mem_clients_normal | 无 | 普通客户端使用的内存 | +| mem_aof_buffer | 无 | 用于AOF和AOF重写缓冲区的临时大小 | +| mem_allocator | 无 | 内存分配器,在编译时选择。 | +| active_defrag_running | 无 | 启用activedefrag时,这表示碎片整理当前是否处于活动状态,以及它打算使用的CPU百分比。 | +| lazyfree_pending_objects | 无 | 等待释放的对象数(使用ASYNC选项调用UNLINK或FLUSHDB和FLUSHOLL) | +| lazyfreed_objects | 无 | 已延迟释放的对象数。 | + +#### 指标集合:persistence + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------------|--------|-----------------------------------------------------------------------------------------------------| +| loading | 无 | 服务器是否正在进行持久化 0 - 否 1 -是 | +| current_cow_size | byte | 运行子fork时写入时复制内存的大小(以字节为单位) | +| current_cow_size_age | second | current_cow_size值的年龄(以秒为单位) | +| current_fork_perc | 无 | 当前fork进程的百分比,对于AOF和RDB的fork,它是current_save_keys_processed占current_save_keys_total的百分比 | +| current_save_keys_processed | 无 | 当前保存操作处理的key的数量 | +| current_save_keys_total | 无 | 当前保存操作开始时的key的数量 | +| rdb_changes_since_last_save | 无 | 离最近一次成功生成rdb文件,写入命令的个数,即有多少个写入命令没有持久化 | +| rdb_bgsave_in_progress | 无 | 服务器是否正在创建rdb文件 0 - 否 1 - 是 | +| rdb_last_save_time | second | 最近一次创建rdb文件的时间戳,单位秒 | +| rdb_last_bgsave_status | 无 | 最近一次rdb持久化是否成功 ok 成功 | +| rdb_last_bgsave_time_sec | second | 最近一次成功生成rdb文件耗时秒数 | +| rdb_current_bgsave_time_sec | 无 | 如果服务器正在创建rdb文件,那么这个字段记录的就是当前的创建操作已经耗费的秒数 | +| rdb_last_cow_size | 无 | RDB过程中父进程与子进程相比执行了多少修改(包括读缓冲区,写缓冲区,数据修改等) | +| aof_enabled | 无 | 是否开启了AOF 0 - 否 1 - 是 | +| aof_rewrite_in_progress | 无 | 标识aof的rewrite操作是否在进行中 0 - 否 1- 是 | +| aof_rewrite_scheduled | 无 | rewrite任务计划,当客户端发送bgrewriteaof指令,如果当前rewrite子进程正在执行,那么将客户端请求的bgrewriteaof变为计划任务,待aof子进程结束后执行rewrite | +| aof_last_rewrite_time_sec | 无 | 最近一次aof rewrite耗费的时长 | +| aof_current_rewrite_time_sec | second | 如果rewrite操作正在进行,则记录所使用的时间,单位秒 | +| aof_last_bgrewrite_status | 无 | 上次 bgrewrite aof 操作的状态 ok 成功 | +| aof_last_write_status | 无 | 上次aof写入状态 | +| aof_last_cow_size | 无 | AOF过程中父进程与子进程相比执行了多少修改(包括读缓冲区,写缓冲区,数据修改等) | +| module_fork_in_progress | 无 | 指示fork模块正在进行的标志 | +| module_fork_last_cow_size | 无 | 上一次fork操作期间写入时复制内存的字节大小 | + +#### 指标集合:stats + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------|------|----------------------------------------------------| +| total_connections_received | 无 | 服务器接受的连接总数 | +| total_commands_processed | 无 | 服务器处理的命令总数 | +| instantaneous_ops_per_sec | 无 | 每秒处理的命令数 | +| total_net_input_bytes | byte | 从网络读取的字节总数 | +| total_net_output_bytes | byte | 写入网络的总字节数 | +| instantaneous_input_kbps | KB/S | 网络每秒的读取速率(KB/秒) | +| instantaneous_output_kbps | KB/S | 网络每秒的写入速率(KB/秒) | +| rejected_connections | 无 | 由于maxclients限制而拒绝的连接数 | +| sync_full | 无 | 具有副本的完整重新同步数 | +| sync_partial_ok | 无 | 接受的部分重新同步请求数 | +| sync_partial_err | 无 | 被拒绝的部分重新同步请求数 | +| expired_keys | 无 | 过期的key总数 | +| expired_stale_perc | 无 | 可能过期key的百分比 | +| expired_time_cap_reached_count | 无 | 活动过期周期提前停止的次数 | +| expire_cycle_cpu_milliseconds | 无 | 活动到期周期所花费的累计时间 | +| evicted_keys | 无 | 由于最大内存限制而收回key的数量 | +| keyspace_hits | 无 | 在主dict 中成功查找key的次数 | +| keyspace_misses | 无 | 在主dict 中未查到key的次数 | +| pubsub_channels | 无 | 客户端使用 pub/sub 频道的总和 | +| pubsub_patterns | 无 | 客户端使用 pub/sub 模式的全局数量 | +| latest_fork_usec | 无 | 最后一次fork操作的持续时间(以微秒为单位) | +| total_forks | 无 | 自服务器启动以来的fork操作总数 | +| migrate_cached_sockets | 无 | 为MIGRATE目的打开的socket数量 | +| slave_expires_tracked_keys | 无 | trace key 到期的数量(仅适用于可写副本) | +| active_defrag_hits | 无 | 主动碎片整理命中次数 | +| active_defrag_misses | 无 | 主动碎片整理未命中次数 | +| active_defrag_key_hits | 无 | 主动碎片整理key命中次数 | +| active_defrag_key_misses | 无 | 主动碎片整理key未命中次数 | +| tracking_total_keys | 无 | key 查询的总数 | +| tracking_total_items | 无 | item查询的总数 | +| tracking_total_prefixes | 无 | 前缀查询的总数 | +| unexpected_error_replies | 无 | 意外错误回复数,即AOF加载或复制中的错误类型 | +| total_error_replies | 无 | 发出的错误回复总数,即被拒绝的命令(命令执行之前的错误)和失败的命令(在命令执行过程中的错误)的总和 | +| dump_payload_sanitizations | 无 | 参考sanitize-dump-payload配置 | +| total_reads_processed | 无 | 正在读取的请求数 | +| total_writes_processed | 无 | 正在写入的请求数 | +| io_threaded_reads_processed | 无 | 正在读取的线程数 | +| io_threaded_writes_processed | 无 | 正在写入的线程数 | + +#### 指标集合:replication + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------|------|-------------------------------------------------------------------------------------| +| role | 无 | 节点角色 master 主节点 slave 从节点 | +| connected_slaves | 无 | 连接的从节点数 | +| master_failover_state | 无 | 正在进行的故障切换的状态(如果有) | +| master_replid | 无 | 实例启动的随机字符串 | +| master_replid2 | 无 | 故障切换后用于PSYNC的辅助复制ID | +| master_repl_offset | 无 | 主从同步偏移量 | +| second_repl_offset | 无 | 接受从服务ID的最大偏移量 | +| repl_backlog_active | 无 | 表示从服务挤压处于活动状态 | +| repl_backlog_size | byte | 从服务积压缓冲区的总大小(字节) | +| repl_backlog_first_byte_offset | 无 | 复制缓冲区里偏移量的大小 | +| repl_backlog_histlen | 无 | 此值等于 master_repl_offset - repl_backlog_first_byte_offset,该值不会超过repl_backlog_size的大小 | + +#### 指标集合:cpu + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------|------|------------------------| +| used_cpu_sys | 无 | Redis主进程在内核态所占用CPU时钟总和 | +| used_cpu_user | 无 | Redis主进程在用户态所占用CPU时钟总和 | +| used_cpu_sys_children | 无 | Redis子进程在内核态所占用CPU时钟总和 | +| used_cpu_user_children | 无 | Redis子进程在用户态所占用CPU时钟总和 | +| used_cpu_sys_main_thread | 无 | Redis服务器主线程消耗的内核CPU | +| used_cpu_user_main_thread | 无 | Redis服务器主线程消耗的用户CPU | + +#### 指标集合:errorstats + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|-----------| +| errorstat_ERR | 无 | 错误累计出现的次数 | +| errorstat_MISCONF | 无 | | + +#### 指标集合:cluster + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|--------------------| +| cluster_enabled | 无 | 集群是否开启 0 - 否 1 - 是 | + +#### 指标集合:commandstats + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|---------------------------------------------------------------------------------------------------------------------------| +| cmdstat_set | 无 | set命令的统计信息,calls: 累计调用该命令的次数;usec: 调用该命令的累计耗时,单位微秒;usec_per_call: 调用该命令的平均耗时;rejected_call: 拒绝执行的次数;failed_calls: 调用失败的次数 | +| cmdstat_get | 无 | get命令的统计信息 | +| cmdstat_setnx | 无 | setnx命令的统计信息 | +| cmdstat_hset | 无 | hset命令的统计信息 | +| cmdstat_hget | 无 | hget命令的统计信息 | +| cmdstat_lpush | 无 | lpush命令的统计信息 | +| cmdstat_rpush | 无 | rpush命令的统计信息 | +| cmdstat_lpop | 无 | lpop命令的统计信息 | +| cmdstat_rpop | 无 | rpop命令的统计信息 | +| cmdstat_llen | 无 | llen命令的统计信息 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redis_cluster.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redis_cluster.md new file mode 100644 index 0000000000..7d20acff06 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/redis_cluster.md @@ -0,0 +1,166 @@ +--- +id: redis_cluster +title: 监控:Redis Cluster 数据库监控 +sidebar_label: Redis Cluster数据库 +keywords: [开源监控系统, 开源数据库监控, RedisCluster数据库监控] +--- + +## Pre-monitoring operations + +1. 创建一个空目录, 然后在目录下添加以下两个文件. + + *redis.config* + + ```properties + port 6379 + cluster-enabled yes + cluster-config-file nodes.conf + cluster-node-timeout 5000 + appendonly yes + bind 0.0.0.0 + protected-mode no + + ``` + + *docker-compose.yml* + + ```yml + services: + redis-master-1: + image: redis:latest + container_name: redis-master-1 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "1000:6379" + + redis-master-2: + image: redis:latest + container_name: redis-master-2 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "2000:6379" + + redis-master-3: + image: redis:latest + container_name: redis-master-3 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "3000:6379" + + redis-slave-1: + image: redis:latest + container_name: redis-slave-1 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "1001:6379" + + redis-slave-2: + image: redis:latest + container_name: redis-slave-2 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "2001:6379" + + redis-slave-3: + image: redis:latest + container_name: redis-slave-3 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "3001:6379" + + networks: + default: + external: + name: hertzbeat-redis-cluster + ``` + +2. 查看所有容器的 IP 地址,搭建 Redis 集群时需要用到这些. + + ```bash + docker-compose up -d + docker network inspect hertzbeat-redis-cluste + ``` + + ```json + "Containers": { + "187b879f73c473b3cbb82ff95f668e65af46115ddaa27f3ff1a712332b981531": { + ... + "Name": "redis-slave-2", + "IPv4Address": "192.168.117.6/24", + ... + }, + "45e22b64c82e51857fc104436cdd6cc0c5776ad10a2e4b9d8e52e36cfb87217e": { + ... + "Name": "redis-master-3", + "IPv4Address": "192.168.117.3/24 + ... + }, + "57838ae37956f8af181f9a131eb011efec332b9ed3d49480f59d8962ececf288": { + ... + "Name": "redis-master-2", + "IPv4Address": "192.168.117.7/24", + ... + }, + "94478d14bd950bcde533134870beb89b392515843027a0595af56dd1e3305a76": { + ... + "Name": "redis-master-1", + "IPv4Address": "192.168.117.4/24", + ... + }, + "ad055720747e7fc430ba794d5321723740eeb345c280073e4292ed4302ff657c": { + ... + "Name": "redis-slave-3", + "IPv4Address": "192.168.117.2/24", + ... + }, + "eddded1ac4c7528640ba0c6befbdaa48faa7cb13905b934ca1f5c69ab364c725": { + ... + "Name": "redis-slave-1", + "IPv4Address": "192.168.117.5/24", + ... + } + }, + ``` + +3. 进入容器, 然后构建集群. + + ```bash + docker exec -it redis-master-1 /bin/bash + ``` + + ```bash + redis-cli --cluster create \ + 192.168.117.4:6379 \ + 192.168.117.7:6379 \ + 192.168.117.3:6379 \ + 192.168.117.5:6379 \ + 192.168.117.6:6379 \ + 192.168.117.2:6379 \ + --cluster-replicas 1 + ``` + +4. 最终的效果. + + 添加监控节点时填入所需要的参数. + + ![HertzBeat](/img/docs/help/redis-cluster-add.png) + + 最终的效果. + + ![HertzBeat](/img/docs/help/redis-cluster-view.png) + +### Configuration Parameters + + 查看 [REDIS](https://hertzbeat.apache.org/docs/help/redis) 文档. diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/risc-v.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/risc-v.md new file mode 100644 index 0000000000..2b9d6e15ab --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/risc-v.md @@ -0,0 +1,93 @@ +--- +id: risc-v +title: HertzBeat 在 RISC-V 架构环境中运行 +sidebar_label: RISC-V +keywords: [ 开源监控系统, RISC-V架构, RISC-V 运行 HertzBeat ] +--- + +> 如何搭建 RISC-V 环境,并使 HertzBeat 在 RISC-V 架构环境中运行。 + +## RISC-V 环境搭建 + +确保你的 RISC-V 开发环境已正确配置,包括拥有兼容 RISC-V 的设备或模拟器。这里采用在 Ubuntu 环境上搭建 QEMU 模拟器的方式,来模拟 RISC-V 架构。 + +**1. 安装 QEMU 以及软件包** + +```shell +sudo apt update +sudo apt install opensbi qemu-system-misc u-boot-qemu +``` + +**2. 下载 RISC-V 架构的 Ubuntu 镜像** + +下载地址:```https://ubuntu.com/download/risc-v``` +选择 `QEMU模拟器` , 下载需要的版本。 + +** 3. 在 QEMU 上安装 Ubuntu + +> 使用 QEMU 启动 Ubuntu,模拟 RISC-V 架构。一些参数,如启动、设置磁盘大小等可以灵活设置。 + +```shell +# 解压镜像 +xz -dk ubuntu-24.04.2-preinstalled-server-riscv64.img.xz +# 也可自定义扩大磁盘 +qemu-img resize -f raw ubuntu-24.04-preinstalled-server-riscv64.img +5G +# 使用 u-boot-qemu 启动虚拟机 +qemu-system-riscv64 \ + -machine virt -nographic -m 2048 -smp 4 \ + -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \ + -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \ + -device virtio-rng-pci \ + -drive file=ubuntu-24.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio +``` + +等待控制台输出完毕后,使用用户 Ubuntu 和默认密码 Ubuntu 登录;系统会要求您选择一个新密码。详细可参考:[Ubuntu官网文档](https://canonical-ubuntu-boards.readthedocs-hosted.com/en/latest/how-to/qemu-riscv/) + +## 安装并配置支持 RISC-V 架构的 JDK + +> 在启动的镜像中配置支持 RISC-V 架构的 JDK,这里选用 Temurin JDK 25。 + +**1. 下载 Temurin JDK** + +下载地址:```https://adoptium.net/zh-CN/temurin/releases``` + +**2. 配置 JDK 环境** + +> 根据下载的版本不同,做适当更改 + +```shell +# 安装工具 +sudo apt update +sudo apt install -y tar wget + +# 创建安装目录 +sudo mkdir -p /usr/lib/jvm +# 解压到系统目录 +sudo tar -xzf OpenJDK25U-jdk_riscv64_linux_hotspot_.tar.gz -C /usr/lib/jvm + +# 编辑环境变量,添加以下内容 +sudo nano /etc/profile.d/java.sh +export JAVA_HOME=$(find /usr/lib/jvm -maxdepth 1 -type d -name 'jdk-25*' | head -n 1) +export PATH=$JAVA_HOME/bin:$PATH + +# 使配置生效 +source /etc/profile.d/java.sh + +# 验证安装 +java -version +``` + +## 运行 HertzBeat + +> 在 [HertzBeat官网](https://hertzbeat.apache.org/zh-cn/docs/download/) 下载安装包,并按照官网部署教程运行即可,以 1.7.2 版本为例。 + +```shell +cd apache-hertzbeat-1.7.2-incubating-bin/bin/ +./startup.sh +``` + +> 注意事项: +> +> 1. 请将 `OpenJDK25U-jdk_riscv64_linux_hotspot_.tar.gz` 替换为您实际下载的 JDK 文件名。 +> 2. 确保模拟器具备网络访问能力,以下载 HertzBeat。 +> 3. 若遇到问题,请检查磁盘权限和 Java 环境路径配置。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rocketmq.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rocketmq.md new file mode 100644 index 0000000000..968d5c9558 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rocketmq.md @@ -0,0 +1,48 @@ +--- +id: rocketmq +title: 监控 Apache RocketMQ 消息中间件 +sidebar_label: RocketMQ消息中间件 +keywords: [ 开源监控系统, 开源中间件监控, RocketMQ消息中间件监控 ] +--- + +> 对 RocketMQ 消息中间件的broker,消费者等相关指标进行监测。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|------------------------------------------------| +| 注册中心Host | RocketMQ注册中心的IPV4,IPV6(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 注册中心端口。 | +| accessKey | accessKey。 | +| secretKey | secretKey。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:集群 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|------------| +| BrokerId | 无 | Broker唯一ID | +| Address | 无 | Broker地址 | +| Version | 无 | 版本 | +| Producer_Message_TPS | 无 | 生产消息TPS | +| Consumer_Message_TPS | 无 | 消费消息TPS | +| Yesterday_Produce_Count | 无 | 昨天生产消息数 | +| Yesterday_Consume_Count | 无 | 昨天消费消息数 | +| Today_Produce_Count | 无 | 今天生产消息数 | +| Today_Consume_Count | 无 | 今天消费消息数 | + +#### 指标集合:消费者 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|--------| +| Consumer_group | 无 | 消费者组 | +| Client_quantity | 无 | 客户端数量 | +| Message_model | 无 | 消息模式 | +| Consume_type | 无 | 消费类型 | +| Consume_tps | 无 | 消费TPS | +| Delay | 无 | 延迟 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rockylinux.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rockylinux.md new file mode 100644 index 0000000000..7dcf8cf261 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/rockylinux.md @@ -0,0 +1,114 @@ +--- +id: rockylinux +title: 监控:Rocky Linux操作系统监控 +sidebar_label: Rocky Linux 操作系统 +keywords: [ 开源监控系统, 开源操作系统监控, Rocky Linux操作系统监控 ] +--- + +> 对Rocky Linux操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/seatunnel.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/seatunnel.md new file mode 100644 index 0000000000..f6ef4f2a60 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/seatunnel.md @@ -0,0 +1,99 @@ +--- +id: seatunnel +title: 监控:SeaTunnel +sidebar_label: SeaTunnel +keywords: [ 开源监控系统, 监控SeaTunnel ] +--- + +> 对 SeaTunnel 指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------|------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | SeaTunnel开放的监控端口,默认值:5801。 | +| 启用HTTPS | 是否启用HTTPS。 | +| 查询超时时间 | 设置查询未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:集群概览 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|----------| +| projectVersion | 无 | 项目版本 | +| gitCommitAbbrev | 无 | Git提交编号 | +| totalSlot | 无 | 总槽位数 | +| unassignedSlot | 无 | 未分配槽位数 | +| runningJobs | 无 | 运行中任务数 | +| finishedJobs | 无 | 已完成任务数 | +| failedJobs | 无 | 失败任务数 | +| cancelledJobs | 无 | 取消任务数 | +| workers | 无 | Worker数 | + +#### 指标集合:线程信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|--------| +| threadName | 无 | 线程名称 | +| threadId | 无 | 线程ID | +| threadState | 无 | 线程状态 | +| stackTrace | 无 | 堆栈信息 | + +#### 指标集合:节点监控 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|------------| +| isMaster | 无 | 是否主节点 | +| host | 无 | IP地址 | +| port | 无 | 端口 | +| processors | 无 | 处理器数 | +| physical.memory.total | 无 | 物理内存总量 | +| physical.memory.free | 无 | 物理内存可用 | +| swap.space.total | 无 | 交换空间总量 | +| swap.space.free | 无 | 交换空间可用 | +| heap.memory.used | 无 | 堆内存已用 | +| heap.memory.free | 无 | 堆内存可用 | +| heap.memory.total | 无 | 堆内存总量 | +| heap.memory.max | 无 | 堆内存最大 | +| heap.memory.used/total | 无 | 堆内存使用率 | +| heap.memory.used/max | 无 | 堆内存使用率最大 | +| minor.gc.count | 无 | 垃圾回收次数 | +| minor.gc.time | 无 | 垃圾回收时间 | +| major.gc.count | 无 | Major垃圾回收次数 | +| major.gc.time | 无 | Major垃圾回收时间 | +| load.process | 无 | 进程负载 | +| load.system | 无 | 系统负载 | +| load.systemAverage | 无 | 系统平均负载 | +| thread.count | 无 | 线程数 | +| thread.peakCount | 无 | 线程峰值 | +| cluster.timeDiff | 无 | 集群时间差 | +| event.q.size | 无 | 事件队列大小 | +| executor.q.async.size | 无 | 异步执行队列大小 | +| executor.q.client.size | 无 | 客户端执行队列大小 | +| executor.q.client.query.size | 无 | 客户端查询队列大小 | +| executor.q.client.blocking.size | 无 | 客户端阻塞队列大小 | +| executor.q.query.size | 无 | 查询队列大小 | +| executor.q.scheduled.size | 无 | 定时执行队列大小 | +| executor.q.io.size | 无 | IO队列大小 | +| executor.q.system.size | 无 | 系统执行队列大小 | +| executor.q.operations.size | 无 | 操作队列大小 | +| executor.q.priorityOperation.size | 无 | 优先操作队列大小 | +| operations.completed.count | 无 | 完成操作次数 | +| executor.q.mapLoad.size | 无 | 映射加载队列大小 | +| executor.q.mapLoadAllKeys.size | 无 | 映射加载所有键大小 | +| executor.q.cluster.size | 无 | 集群执行队列大小 | +| executor.q.response.size | 无 | 响应队列大小 | +| operations.running.count | 无 | 正在运行的操作数量 | +| operations.pending.invocations.percentage | 无 | 待处理调用百分比 | +| operations.pending.invocations.count | 无 | 待处理调用数量 | +| proxy.count | 无 | 代理数量 | +| clientEndpoint.count | 无 | 客户端端点数量 | +| connection.active.count | 无 | 活动连接数 | +| client.connection.count | 无 | 客户端连接数 | +| connection.count | 无 | 总连接数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/security_model.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/security_model.md new file mode 100644 index 0000000000..7a2e8872bf --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/security_model.md @@ -0,0 +1,51 @@ +--- +id: security_model +title: 安全模型 +sidebar_label: 安全模型 +--- + +:::tip +Apache HertzBeat™ 是一个高可扩展的系统,其提供用户大量的自定义能力,用户可以通过自定义监控模板,自定义监控器,自定义插件等来对平台增强。在这种情况下,安全性是非常重要的。 +本文档将介绍 Apache HertzBeat™ 的安全模型。 +这里的安全模型主要涉及用户在扩展过程中需要注意的安全边界,以及如何保证用户的自定义不会对系统造成安全隐患。 +::: + +> 下面的用户指系统已认证用户,无论什么角色。 + +## 用户权限安全 + +Apache HertzBeat™ 使用 [Sureness](https://github.com/dromara/sureness) 来支撑系统用户安全。 + +使用 Sureness 提供的 `sureness.yml` 来配置用户账户,角色,API资源等,强烈建议初始用户修改账户密码,具体参考 [账户权限管理](../start/account-modify) + +请注意角色权限功能正在完善中,请勿使用角色来控制用户权限,所有用户均拥有管理权限。 + +## 监控模板安全 + +Apache HertzBeat™ 提供了监控模板功能,用户可以通过配置自定义监控模板和自定义脚本来定义监控规则。 + +监控模版内包含 `SQL` `SHELL` `JMX` `URL` `API` 等脚本和其它内容,当用户自定义监控模版时需要自行保证模版内容的安全性,避免包含恶意代码等。 + +## 自定义插件安全 + +Apache HertzBeat™ 支持用户上传自定义代码插件在多个系统的生命周期下运行,用户需要自行保证自定义插件代码的安全性。 + +## 自定义采集器安全 + +Apache HertzBeat™ 支持用户自定义采集器来个性化采集监控指标等,用户需要自行保证自定义采集器的安全性。 + +## 自定义URL等参数安全 + +Apache HertzBeat™ 提供自定义参数配置能力,所有被授权配置 URL 等参数的用户都被认为是高度信任的,并且期望他们可以触发某些行为。 + +## 其它自定义下的安全约束 + +Apache HertzBeat™ 提供多种系统扩展方式和自定义能力,用户在使用过程中需注意自定义的安全性。当然所有扩展能力都是需在认证用户范围。 + +---- + +## Reporting a Vulnerability + +Please do not file GitHub issues for security vulnerabilities as they are public! + +To report a new vulnerability you have discovered please follow the [ASF vulnerability reporting process](https://apache.org/security/#reporting-a-vulnerability). diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/shenyu.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/shenyu.md new file mode 100644 index 0000000000..40710bb398 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/shenyu.md @@ -0,0 +1,129 @@ +--- +id: shenyu +title: 监控 Apache ShenYu API网关 +sidebar_label: ShenYu网关监控 +keywords: [开源监控系统, 开源消息中间件监控, ShenYu网关监控监控] +--- + +> 对 ShenYu 网关的运行状态(JVM相关),请求响应等相关指标进行监测。 + +## 监控前操作 + +您需要在 ShenYu 网关开启`metrics`插件,暴露对应的 prometheus metrics 接口。 + +开启插件, 参考 [官方文档](https://shenyu.apache.org/zh/docs/plugin-center/observability/metrics-plugin) + +主要如下两步骤: + +1. 在网关的 pom.xml 文件中添加 metrics 的依赖。 + + ```xml + + org.apache.shenyu + shenyu-spring-boot-starter-plugin-metrics + ${project.version} + + ``` + +2. 在网关的配置yaml文件中编辑如下内容: + + ```yaml + shenyu: + metrics: + enabled: true #设置为 true 表示开启 + name : prometheus + host: 127.0.0.1 #暴露的ip + port: 8090 #暴露的端口 + jmxConfig: #jmx配置 + props: + jvm_enabled: true #开启jvm的监控指标 + ``` + +最后重启访问网关指标接口 `http://ip:8090` 响应 prometheus 格式数据即可。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 网关指标接口对外提供的端口,默认为8090。 | +| 超时时间 | HTTP请求响应超时时间 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:shenyu_request_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-------------------| +| value | 无 | 收集ShenYu网关的所有请求数量 | + +#### 指标集合:shenyu_request_throw_created + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-------------------| +| value | 无 | 收集ShenYu网关的异常请求数量 | + +#### 指标集合:process_cpu_seconds_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------------| +| value | 无 | 用户和系统CPU总计所用的秒数 | + +#### 指标集合:process_open_fds + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-------------| +| value | 无 | 打开的文件描述符的数量 | + +#### 指标集合:process_max_fds + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|---------------| +| value | 无 | 打开的文件描述符的最大数量 | + +#### 指标集合:jvm_info + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------| +| runtime | 无 | JVM 版本信息 | +| vendor | 无 | JVM 版本信息 | +| version | 无 | JVM 版本信息 | + +#### 指标集合:jvm_memory_bytes_used + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------| +| area | 无 | JVM 内存区域 | +| value | MB | 给定 JVM 内存区域的已用大小 | + +#### 指标集合:jvm_memory_pool_bytes_used + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------------| +| pool | 无 | JVM 内存池 | +| value | MB | 给定 JVM 内存池的已用大小 | + +#### 指标集合:jvm_memory_pool_bytes_committed + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|------------------| +| pool | 无 | JVM 内存池 | +| value | MB | 给定 JVM 内存池的已提交大小 | + +#### 指标集合:jvm_memory_pool_bytes_max + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-----------------| +| pool | 无 | JVM 内存池 | +| value | MB | 给定 JVM 内存池的最大大小 | + +#### 指标集合:jvm_threads_state + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|-------------| +| state | 无 | 线程状态 | +| value | 无 | 对应线程状态的线程数量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/smtp.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/smtp.md new file mode 100644 index 0000000000..70e7570265 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/smtp.md @@ -0,0 +1,40 @@ +--- +id: smtp +title: SMTP 邮件服务器监控 +sidebar_label: SMTP 监控 +keywords: [ open source monitoring tool, open source SMTP monitoring tool, monitoring SMTP metrics ] +--- + +> 收集和监控 SMTP 邮件服务器的常规性能指标。 + +```text +通过 SMTP 的 hello 命令确定服务器是否可用 +``` + +> 详见 [https://datatracker.ietf.org/doc/html/rfc821#page-13](https://datatracker.ietf.org/doc/html/rfc821#page-13) + +**协议使用:SMTP** + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------|---------------------------------------------------| +| 监控主机 | 被监控的 IPV4、IPV6 或域名。注意⚠️无需协议头(例如:https://、http://) | +| 监控名称 | 标识此监控的名称。名称需要保持唯一 | +| 端口 | SMTP 提供的端口号 | +| 电子邮件 | 您的电子邮件名称,用于 hello 命令的参数 | +| 超时时间 | 允许的收集响应时间 | +| 收集间隔 | 监视定期数据收集的间隔时间,单位:秒,最小可设置的间隔为 30 秒 | +| 是否检测可用性 | 是否在添加监控之前检测和验证监控的可用性。只有在检测成功后,才会继续进行添加和修改操作 | +| 描述备注 | 用于标识和描述此监控的更多信息,用户可以在此处添加备注信息 | + +### 收集的指标 + +#### 指标集:概要 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|-------------------| +| 响应时间 | 毫秒 | SMTP 服务器响应请求所需的时间 | +| 响应状态 | | 响应状态 | +| SMTP 服务器标语 | | SMTP 服务器的标语 | +| helo 命令返回信息 | | helo 命令返回的响应信息 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/spark.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/spark.md new file mode 100644 index 0000000000..9a99544ec8 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/spark.md @@ -0,0 +1,114 @@ +--- +id: spark +title: 监控 Spark +sidebar_label: Spark 监控 +keywords: [开源监控工具,开源Java spark监控工具,监控spark指标] +--- + +> 收集和监控Spark的一般性能指标。 + +**使用协议:JMX** + +## Spark App启用JMX协议步骤 + +1. 应用启动时添加Spark参数 ⚠️注意可自定义暴露端口,对外IP + +参考文档: [https://spark.apache.org/docs/latest/spark-standalone.html](https://spark.apache.org/docs/latest/spark-standalone.html) + +**监控配置spark的监控主要分为Master、Worker、driver、executor监控。Master和Worker的监控在spark集群运行时即可监控,Driver和Executor的监控需要针对某一个app来进行监控。** +**如果都要监控,需要根据以下步骤来配置** + +## 第一步 + +**修改$SPARK_HOME/conf/spark-env.sh,添加以下语句:** + +```shell +# JMX Port to use +SPARK_DAEMON_JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" + +# export SPARK_DAEMON_JAVA_OPTS="$SPARK_DAEMON_JAVA_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT " +export SPARK_DAEMON_JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8712 " +``` + +语句中有$JMX_PORT,这个的值可以自定义,也可以获取一个随机数作为端口号。 +如果端口自定义为一个具体的值,而 spark 的 Master 和其中之一的 Worker 在同一台机器上,会出现端口冲突的情况。 + +## 第二步 + +**vim $SPARK_HOME/conf/metrics.properties 添加如下内容** + +```shell +*.sink.jmx.class=org.apache.spark.metrics.sink.JmxSink +master.source.jvm.class=org.apache.spark.metrics.source.JvmSource +worker.source.jvm.class=org.apache.spark.metrics.source.JvmSource +driver.source.jvm.class=org.apache.spark.metrics.source.JvmSource +executor.source.jvm.class=org.apache.spark.metrics.source.JvmSource +``` + +## 第三步 + +**vim $SPARK_HOME/conf/spark-defaults.conf,添加以下项为driver和executor设置监控端口,在有程序运行的情况下,此端口会被打开。** + +```shell +spark.metrics.conf /opt/bigdata/spark/conf/metrics.properties +spark.driver.extraJavaOptions -XX:+PrintGCDetails -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.mana +gement.jmxremote.port=8712 + +spark.executor.extraJavaOptions -XX:+PrintGCDetails -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.mana +gement.jmxremote.port=8711 +``` + +在spark的Master和Worker正常运行以及spark-submit提交了一个程序的情况下,可以从linux中查询出端口号码。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| Monitoring name | 标识此监控的名称。名称必须是唯一的 | +| Port | JMX提供的端口 | +| Username | JMX连接用户名,可选 | +| Password | JMX连接密码,可选 | +| Collection interval | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| Whether to detect | 添加监控前是否检测和检查监控的可用性。检测成功后,添加和修改操作才会继续进行 | +| Description remarks | 有关识别和描述此监视的更多信息,用户可以在这里记录信息 | + +### 采集指标 + +#### 指标集合:memory_pool + +| 指标名称 | 指标单位 | 指标描述 | +|-----------|------|-------| +| name | | 指标名称 | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大值 | +| used | kb | 已使用 | + +#### Metrics Set:code_cache (仅支持 JDK8) + +| 指标名称 | 指标单位 | 指标描述 | +|-------------|-------------|-------------------------| +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大值 | +| used | kb | 已使用 | + +#### 指标集合:class_loading + +| 指标名称 | 指标单位 | 指标描述 | +|-----------------------|-------------|--------------------------| +| LoadedClassCount | | 已加载类数量 | +| TotalLoadedClassCount | | 历史已加载类总量 | +| UnloadedClassCount | | 未加载类数量 | + +#### 指标集合:thread + +| 指标名称 | 指标单位 | 指标描述 | +|-------------------------|-------------|----------------------------| +| TotalStartedThreadCount | | 已经开始的线程数量 | +| ThreadCount | | 线程数 | +| PeakThreadCount | | 未加载类数量 | +| DaemonThreadCount | | 守护进程数 | +| CurrentThreadUserTime | ms | 使用时间 | +| CurrentThreadCpuTime | ms | 使用CPU时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/spring_gateway.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/spring_gateway.md new file mode 100644 index 0000000000..a1bf913d44 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/spring_gateway.md @@ -0,0 +1,90 @@ +--- +id: spring_gateway +title: 监控 Spring Cloud Gateway +sidebar_label: Spring Cloud Gateway +keywords: [开源监控工具, 开源 Spring Cloud Gateway 监控工具, 监控 Spring Cloud Gateway 指标] +--- + +> 收集和监控 SpringBoot Actuator 提供的常规性能指标。 + +## 监控前操作 + +如果您想使用此监控类型监控 `Spring Cloud Gateway` 的信息,您需要集成您的 `Spring Cloud Gateway` 应用程序并启用 SpringBoot Actuator。 + +**1、添加 POM .XML 依赖:** + +```xml + + org.springframework.boot + spring-boot-starter-actuator + +``` + +**2. 修改 YML 配置以暴露度量接口:** + +```yaml +management: + endpoint: + gateway: + enabled: true + env: + show-values: ALWAYS + endpoints: + web: + exposure: + include: "*" +``` + +### 配置参数 + +| 参数名称 | 参数描述 | +|----------|--------------------------------------------------------| +| 监控主机 | 被监控的目标 IPV4、IPV6 或域名。注意⚠️不要包含协议头(例如:https://,http://)。 | +| 监控名称 | 用于标识此监控的名称,需要保证唯一性。 | +| 端口 | 数据库提供的默认端口为 8080。 | +| 启用 HTTPS | 是否通过 HTTPS 访问网站,请注意⚠️当启用 HTTPS 时,需要将默认端口更改为 443 | +| 采集间隔 | 监控周期性采集数据的时间间隔,单位为秒,最小间隔为 30 秒。 | +| 是否探测 | 在新增监控前是否先进行可用性探测,只有探测成功才会继续新增或修改操作。 | +| 描述备注 | 用于添加关于监控的额外标识和描述信息。 | + +### 采集指标 + +#### 指标收集: 健康状态 + +| 指标名称 | 指标单位 | 指标描述 | +|------|------|-------------------------| +| 服务状态 | 无 | 服务健康状态: UP(正常),Down(异常) | + +#### 指标收集: 环境信息 + +| 指标名称 | 指标单位 | 指标描述 | +|---------|------|----------------------------------------------| +| profile | 无 | 应用程序运行的配置环境: prod(生产环境),dev(开发环境),test(测试环境) | +| 端口号 | 无 | 应用程序暴露的端口 | +| 操作系统 | 无 | 运行操作系统 | +| 操作系统架构 | 无 | 运行操作系统的架构 | +| JDK供应商 | 无 | JDK 供应商 | +| JVM版本 | 无 | JVM 版本 | + +#### 指标收集: 线程信息 + +| 指标名称 | 指标单位 | 指标描述 | +|------|------|-------------| +| 状态 | 无 | 线程状态 | +| 数量 | 无 | 线程状态对应的线程数量 | + +#### 指标收集: 内存使用情况 + +| 指标名称 | 指标单位 | 指标描述 | +|------|------|------------| +| 内存空间 | 无 | 内存空间名称 | +| 内存占用 | MB | 此空间占用的内存大小 | + +#### 指标收集: 路由信息 + +| 指标名称 | 指标单位 | 指标描述 | +|-------|------|---------| +| 路由id | 无 | 路由 ID | +| 匹配规则 | 无 | 路由匹配规则 | +| 资源标识符 | 无 | 服务资源标识符 | +| 优先级 | 无 | 此路由的优先级 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/springboot2.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/springboot2.md new file mode 100644 index 0000000000..d39b67d3ef --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/springboot2.md @@ -0,0 +1,96 @@ +--- +id: springboot2 +title: 监控:SpringBoot2.0 监控 +sidebar_label: SpringBoot2.0 监控 +keywords: [开源监控系统, 开源消息中间件监控, SpringBoot2.0 监控] +--- + +> 对SpringBoot2.0 actuator 暴露的通用性能指标进行采集监控。 + +## 监控前操作 + +如果想要通过此监控类型监控 `SpringBoot` 中的信息,则需要您的SpringBoot应用集成并开启SpringBoot Actuator。 + +**1、添加POM.XML依赖:** + +```xml + + org.springframework.boot + spring-boot-starter-actuator + +``` + +**2、修改YML配置暴露指标接口:** + +```yaml +management: + endpoints: + web: + exposure: + include: '*' + enabled-by-default: on +``` + +*注意:如果你的项目里还引入了认证相关的依赖,比如springboot-security,那么SpringBoot Actuator暴露出的接口可能会被拦截,此时需要你手动放开这些接口,以springboot-security为例,需要在SecurityConfig配置类中加入以下代码:* + +```java +public class SecurityConfig extends WebSecurityConfigurerAdapter{ + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception{ + httpSecurity + // 配置要放开的接口 ----------------------------------- + .antMatchers("/actuator/**").permitAll() + .antMatchers("/metrics/**").permitAll() + .antMatchers("/trace").permitAll() + .antMatchers("/heapdump").permitAll() + // 。。。 + // 其他接口请参考:https://blog.csdn.net/JHIII/article/details/126601858 ----------------------------------- + } +} +``` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 应用服务对外提供的端口,默认为8080。 | +| 启用HTTPS | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443 | +| Base Path | 暴露接口路径前缀,默认 /actuator | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:health + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|-----------------| +| status | 无 | 服务健康状态: UP,Down | + +#### 指标集合:environment + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------|------|----------------------------| +| profile | 无 | 应用运行profile: prod,dev,test | +| port | 无 | 应用暴露端口 | +| os | 无 | 运行所在操作系统 | +| os_arch | 无 | 运行所在操作系统架构 | +| jdk_vendor | 无 | jdk vendor | +| jvm_version | 无 | jvm version | + +#### 指标集合:threads + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|--------------| +| state | 无 | 线程状态 | +| number | 无 | 此线程状态对应的线程数量 | + +#### 指标集合:memory_used + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|-----------| +| space | 无 | 内存空间名称 | +| mem_used | MB | 此空间占用内存大小 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/springboot3.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/springboot3.md new file mode 100644 index 0000000000..58f1942cf0 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/springboot3.md @@ -0,0 +1,91 @@ +--- +id: springboot3 +title: 监控:SpringBoot3.0 监控 +sidebar_label: SpringBoot3.0 监控 +keywords: [开源监控系统, 开源消息中间件监控, SpringBoot3.0 监控] +--- + +> 对SpringBoot3.0 actuator 暴露的通用性能指标进行采集监控。 + +## 监控前操作 + +如果想要通过此监控类型监控 `SpringBoot` 中的信息,则需要您的SpringBoot应用集成并开启SpringBoot Actuator。 + +**1、添加POM.XML依赖:** + +```xml + + org.springframework.boot + spring-boot-starter-actuator + +``` + +**2、修改YML配置暴露指标接口:** + +```yaml +management: + endpoints: + web: + exposure: + include: '*' + enabled-by-default: on +``` + +*注意:如果你的项目里还引入了认证相关的依赖,比如springboot-security,那么SpringBoot Actuator暴露出的接口可能会被拦截,此时需要你手动放开这些接口,以springboot-security为例,需要在SecurityConfig配置类中加入以下代码:* + +```java +public class SecurityConfig extends WebSecurityConfigurerAdapter{ + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception{ + httpSecurity + // 配置要放开的接口 ----------------------------------- + .antMatchers("/actuator/**").permitAll() + .antMatchers("/metrics/**").permitAll() + .antMatchers("/trace").permitAll() + .antMatchers("/heapdump").permitAll() + // ... + // 其他接口请参考:https://blog.csdn.net/JHIII/article/details/126601858 ----------------------------------- + } +} +``` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 应用服务对外提供的端口,默认为8080。 | +| 启动SSL | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443。 | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:可用性 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| responseTime | ms | 响应时间 | + +#### 指标集合:线程 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------------| +| state | 无 | 线程状态 | +| size | 无 | 此线程状态对应的线程数量 | + +#### 指标集合:内存使用 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|-----------| +| space | 无 | 内存空间名称 | +| mem_used | MB | 此空间占用内存大小 | + +#### 指标集合:健康状态 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------|------|-----------------| +| status | 无 | 服务健康状态: UP,Down | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/sqlserver.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/sqlserver.md new file mode 100644 index 0000000000..7e7a07367d --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/sqlserver.md @@ -0,0 +1,76 @@ +--- +id: sqlserver +title: 监控:SqlServer数据库监控 +sidebar_label: SqlServer数据库 +keywords: [开源监控系统, 开源数据库监控, SqlServer数据库监控] +--- + +> 对SqlServer数据库的通用性能指标进行采集监控。支持SqlServer 2017+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为1433。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------------------------------------------------| +| machine_name | 无 | 运行服务器实例的 Windows 计算机名称 | +| server_name | 无 | 与Windows实例关联的服务器和实例信息SQL Server | +| version | 无 | 实例的版本,SQL Server,格式为"major.minor.build.revision" | +| edition | 无 | 已安装的 实例的产品SQL Server版本 | +| start_time | 无 | 数据库启动时间 | + +#### 指标集合:performance_counters + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------|------|-------------------------------------------------------------------------------------| +| database_pages | 无 | Database pages, 已获得的页面数(缓冲池) | +| target_pages | 无 | Target pages, 缓冲池必须的理想页面数 | +| page_life_expectancy | s,秒 | Page life expectancy, 数据页在缓冲池中驻留的时间,这个时间一般会大于 300 | +| buffer_cache_hit_ratio | % | Buffer cache hit ratio, 数据库缓冲池高速缓冲命中率,被请求的数据在缓冲池中被找到的概率,一般会大于 80% 才算正常,否则可能是缓冲池容量太小 | +| checkpoint_pages_sec | 无 | Checkpoint pages/sec, 检查点每秒写入磁盘的脏页个数,如果数据过高,证明缺少内存容量 | +| page_reads_sec | 无 | Page reads/sec, 缓存池中每秒读的页数 | +| page_writes_sec | 无 | Page writes/sec, 缓存池中每秒写的页数 | + +#### 指标集合:connection + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|---------| +| user_connection | 无 | 已连接的会话数 | + +### 常见问题 + +1. SSL连接问题修复 + +jdk版本:jdk11 +问题描述:SQL Server2019使用SA用户连接报错 +错误信息: + +```text +The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:xxxxxxxxxxxxxxxxx +``` + +问题截图: +![issue](https://user-images.githubusercontent.com/38679717/206621658-c0741d48-673d-45ff-9a3b-47d113064c12.png) + +解决方案: +添加`SqlServer`监控时使用高级设置,自定义JDBC URL,拼接的jdbc url后面加上参数配置,```;encrypt=true;trustServerCertificate=true;```这个参数true表示无条件信任server端返回的任何根证书。 + +样例:```jdbc:sqlserver://127.0.0.1:1433;DatabaseName=demo;encrypt=true;trustServerCertificate=true;``` + +参考文档:[microsoft pkix-path-building-failed-unable-to-find-valid-certification](https://techcommunity.microsoft.com/t5/azure-database-support-blog/pkix-path-building-failed-unable-to-find-valid-certification/ba-p/2591304) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ssl_cert.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ssl_cert.md new file mode 100644 index 0000000000..df76992733 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ssl_cert.md @@ -0,0 +1,33 @@ +--- +id: ssl_cert +title: 监控:SSL证书监控 +sidebar_label: SSL证书监控 +keywords: [开源监控系统, 开源网站监控, SSL证书监控监控] +--- + +> 对网站的SSL证书过期时间,响应时间等指标进行监测 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|-------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 网站对外提供的端口,https一般默认为443。 | +| 相对路径 | 网站地址除IP端口外的后缀路径,例如 `www.tancloud.io/console` 网站的相对路径为 `/console`。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:certificate + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|----------| +| subject | 无 | 证书名称 | +| expired | 无 | 是否过期 | +| start_time | 无 | 有效期开始时间 | +| start_timestamp | ms毫秒 | 有效期开始时间戳 | +| end_time | 无 | 过期时间 | +| end_timestamp | ms毫秒 | 过期时间戳 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/starrocks_be.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/starrocks_be.md new file mode 100644 index 0000000000..966f3d7804 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/starrocks_be.md @@ -0,0 +1,112 @@ +--- +id: starrocks_be +title: 监控:StarRocks数据库BE监控 +sidebar_label: StarRocks数据库BE +keywords: [开源监控系统, 开源数据库监控, StarRocks数据库BE监控] +--- + +> 对StarRocks数据库BE的通用性能指标进行采集监控。支持 StarRocks 2.4.0 及其之后版本。 + +**使用协议:HTTP** + +## 监控前操作 + +查看 `be/conf/be.conf` 文件,获取 `http_port` 配置项的值,该值用作监控使用。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://) | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| 端口 | 数据库对外提供的端口,默认为8040,取值自 `http_port` 配置项的值 | +| 查询超时时间 | 设置连接未响应的超时时间,单位ms毫秒,默认6000毫秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +> 更多指标请参考StarRocks官网:[通用监控指标](https://docs.mirrorship.cn/zh/docs/administration/management/monitoring/metrics/)。 + +#### 指标集合:starrocks_be_cpu + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | /proc/stat 返回的 CPU 使用信息 | + +#### 指标集合:starrocks_be_disks_state + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 磁盘的状态。1 表示磁盘正在使用,0 表示磁盘未被使用 | + +#### 指标集合:starrocks_be_tablet_base_max_compaction_score + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 此 BE 中各 Tablet 的最高 Base Compaction Score | + +#### 指标集合:starrocks_be_tablet_cumulative_max_compaction_score + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 此 BE 中各 Tablet 的最高 Cumulative Compaction Score | + +#### 指标集合:starrocks_be_engine_requests_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | BE 和 FE 之间各种请求的总数,包括 CREATE TABLE、Publish Version 和 Tablet Clone | + +#### 指标集合:starrocks_be_max_disk_io_util_percent + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | % | 最大磁盘 I/O 利用率百分比 | + +#### 指标集合:starrocks_be_disks_avail_capacity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | MB | 磁盘的可用容量 | + +#### 指标集合:starrocks_be_disks_data_used_capacity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | MB | 每个磁盘(由存储路径表示)的已用容量 | + +#### 指标集合:starrocks_be_load_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 字节 | 总导入字节数 | + +#### 指标集合:starrocks_be_load_rows + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 总导入行数 | + +#### 指标集合:starrocks_be_process_mem_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | MB | 此进程使用的内存 | + +#### 指标集合:starrocks_be_jemalloc_allocated_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | MB | jemalloc 已分配的总字节数 | + +#### 指标集合:starrocks_be_network_receive_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 字节 | 通过网络接收的总字节数 | + +#### 指标集合:starrocks_be_network_send_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 字节 | 通过网络发送的字节数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/starrocks_fe.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/starrocks_fe.md new file mode 100644 index 0000000000..ef4729ee4b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/starrocks_fe.md @@ -0,0 +1,136 @@ +--- +id: starrocks_fe +title: 监控:StarRocks数据库FE监控 +sidebar_label: StarRocks数据库FE +keywords: [开源监控系统, 开源数据库监控, StarRocks数据库FE监控] +--- + +> 对StarRocks数据库FE的通用性能指标进行采集监控。支持 StarRocks 2.4.0 及其之后版本。 + +**使用协议:HTTP** + +## 监控前操作 + +查看 `fe/conf/fe.conf` 文件,获取 `http_port` 配置项的值,该值用作监控使用。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://) | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| 端口 | 数据库对外提供的端口,默认为8030,取值自 `http_port` 配置项的值 | +| 查询超时时间 | 设置连接未响应的超时时间,单位ms毫秒,默认6000毫秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +> 更多指标请参考StarRocks官网:[通用监控指标](https://docs.mirrorship.cn/zh/docs/administration/management/monitoring/metrics/)。 + +#### 指标集合:jvm_heap_size_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 字节 | JVM堆内存大小 | + +#### 指标集合:jvm_non_heap_size_bytes + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 字节 | JVM非堆内存大小 | + +#### 指标集合:jvm_thread + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | JVM线程数量 | + +#### 指标集合:starrocks_fe_query_err + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 查询失败数量 | + +#### 指标集合:starrocks_fe_query_latency_ms + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 毫秒 | 查询响应时间 | + +#### 指标集合:starrocks_fe_edit_log_write + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 字节/秒 | FE编辑日志写入速率 | + +#### 指标集合:starrocks_fe_load_add + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 新增加载任务数量 | + +#### 指标集合:starrocks_fe_load_finished + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 完成加载任务数量 | + +#### 指标集合:starrocks_fe_job + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | FE作业状态 | + +#### 指标集合:starrocks_fe_tablet_max_compaction_score + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 节点上最高的 Compaction Score | + +#### 指标集合:starrocks_fe_meta_log_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 未做 Checkpoint 的 Edit Log 数量,该值在 100000 以内为合理 | + +#### 指标集合:starrocks_fe_query_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 查询总数 | + +#### 指标集合:starrocks_fe_request_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 请求总数 | + +#### 指标集合:starrocks_fe_txn_reject + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 事务拒绝数 | + +#### 指标集合:starrocks_fe_txn_begin + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 事务开始数 | + +#### 指标集合:starrocks_fe_txn_success + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 事务成功数 | + +#### 指标集合:starrocks_fe_txn_failed + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | 事务失败数 | + +#### 指标集合:starrocks_fe_connection_total + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|---------|------------| +| value | 无 | FE连接总数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/status.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/status.md new file mode 100644 index 0000000000..bbb55bd3c9 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/status.md @@ -0,0 +1,73 @@ +--- +id: status +title: 状态页面 +sidebar_label: 状态页面 +keywords: [开源监控系统, 开源网站监控, 状态页面] +--- + +利用 HertzBeat 快速构建强大的状态页面,轻松向用户传达您产品服务的实时状态。例如,Github 的服务状态页 [https://www.githubstatus.com](https://www.githubstatus.com)。 + +支持状态页组件状态和监控状态联动同步,提供故障事件维护管理机制等功能。提高您的透明度和专业度,增强用户信任,降低沟通成本。 + +## 1. 设置组织信息 + +需要填写的字段如下: + +| 字段名称 | 字段说明 | 举例 | +|------|----------------------------------------|---------------------------------------------------------------------------------------------------| +| 组织名称 | 组织的名称 | HertzBeat | +| 组织介绍 | 组织的详细介绍 | Apache HertzBeat™ 是一个易用友好的开源实时监控告警系统,无需 Agent,高性能集群,兼容 Prometheus,提供强大的自定义监控和状态页构建能力。 | +| 网站链接 | 组织网站的 URL,便于访问者获取更多信息 | [https://hertzbeat.apache.org/](https://hertzbeat.apache.org/) | +| 标志图片 | 组织官方标志或 Logo 的图片文件路径或 URL,建议使用 .svg 格式 | [https://hertzbeat.apache.org/zh-cn/img/hertzbeat-logo.svg](https://hertzbeat.apache.org/zh-cn/img/hertzbeat-logo.svg) | +| 反馈地址 | 接收问题反馈的地址 | [https://github.com/apache/hertzbeat/issues](https://github.com/apache/hertzbeat/issues) | +| 主题颜色 | 状态页面的主色调。 | 在页面中点击选择 | + +填写完组织信息后,点击 `确定`。 + +![HertzBeat](/img/docs/help/status-3.png) + +## 2. 新增组件 + +新增组件后,状态页面将显示组件的状态信息。 + +点击 `新增组件` 添加需要监控的组件,并填写以下字段: + +| 字段名称 | 字段说明 | 举例 | +|----------|-------------------------------------------------------------|-------------------------------------| +| 服务组件 | 组件服务名称 | 开发环境 ElasticSearch | +| 组件描述 | 组件服务的详细描述信息 | 开发环境,ElasticSearch (ip:192.168.1.1) | +| 服务状态统计方式 | 计算组件服务状态的方式。
自动计算:根据组件监控的状态自动计算显示状态。
手动设置:手动配置组件状态。 | 自动计算 / 手动设置 二选一 | +| 匹配标签 | 状态计算关联标签,使用标签关联的所有监控可用性状态数据来计算组件服务状态。 | 在页面选择组件的标签 | + +### 设置状态统计时间 + +> 提示:服务状态默认每 300 秒统计一次。 + +修改 `application.yml`: + +```yaml +status: + calculate: + interval: 60 +``` + +![HertzBeat](/img/docs/help/status-4.png) + +## 3. 维护事件 + +当事件发生时,可以在状态页面发布通知。 + +点击 `发布事件` + +![HertzBeat](/img/docs/help/status-1.png) + +| 字段名称 | 字段说明 | 举例 | +|------|---------------------------------------------|----------------------------------------------------------------------| +| 事件名称 | 事件的标题,应简洁明了地反映事件的核心内容。 | "服务器宕机事件 - 2023 年 4 月 5 日" | +| 影响组件 | 选择受此事件影响的组件。 | 在页面中选择 | +| 过程状态 | 设置事件当前状态,便于追踪处理进度。可选值:调查中 / 已确认 / 观察中 / 已修复 | 已确认 | +| 发布消息 | 向相关方传达的正式通知,包括事件详情、影响评估和应对措施。 | Dear All,开发环境异常,开发人员正在紧急处理,预计两小时内修复。请耐心等待,如有紧急事项请联系 Tom:130xxxx0000! | + +> 提示:可以多次发布消息,及时向团队汇报当前状态。 + +![HertzBeat](/img/docs/help/status-2.png) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/synology_nas.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/synology_nas.md new file mode 100644 index 0000000000..5d6acb3e40 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/synology_nas.md @@ -0,0 +1,127 @@ +--- +id: synology_nas +title: 监控:群晖 NAS +sidebar_label: 群晖 NAS +keywords: [ 开源监控系统, 服务器监控, 群晖 NAS 监控 ] +--- + +> 对 群晖 NAS 的通用指标进行采集监控。 + +**使用协议:SNMP** + +## 监控前操作 + +请参考 [SNMP](https://kb.synology.cn/zh-cn/DSM/help/DSM/AdminCenter/system_snmp) 设置 SNMP 服务。目前支持的协议为 SNMPv1、SNMPv2c 以及 SNMPv3。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | SNMP端口号,默认为161 | +| SNMP 版本 | 所使用的SNMP版本 | +| SNMP 团体字 | 用于SNMP v1 和 SNMP v2c,用于在SNMP Agent完成认证,字符串形式。团体名包括“read”和“write”两种,执行SNMP查询操作时,采用“read”团体名进行认证;执行SNMP设置操作时,则采用“write”团体名进行认证。 | +| SNMP username | 用于SNMP v3,MSG 用户名 | +| SNMP contextName | 用于SNMP v3,用于确定Context EngineID对被管理设备的MIB视图。 | +| SNMP authPassword | 用于SNMP v3,SNMP 认证密码 | +| authPassword 加密方式 | 用于SNMP v3,SNMP 认证算法 | +| SNMP privPassphrase | 用于SNMP v3,SNMP 加密密码 | +| privPassword 加密方式 | 用于SNMP v3,SNMP 加密算法 | +| 查询超时时间 | 设置查询未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| 采集间隔 | 监控周期性采集数据的时间间隔,单位为秒,最小间隔为 30 秒。 | +| 描述备注 | 用于添加关于监控的额外标识和描述信息。 | + +## 采集指标 + +由于可查询的指标过多,详细的指标可在官网的 [SNMP MIB指南](https://kb.synology.cn/zh-cn/DG/Synology_DiskStation_MIB_Guide) 进行查询。 + +此文档仅介绍监控模板中查询的监控指标。 + +### 指标集合:系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|-----------| +| modelName | 无 | NAS 的型号名称 | +| serialNumber | 无 | 型号序列号 | +| version | 无 | DSM 的版本 | +| controllerNumber | 无 | 控制器编号 | + +### 指标集合:状态 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|-----------------------------| +| powerStatus | 无 | 电源状态,如果电源出现故障则返回错误 | +| systemFanStatus | 无 | 系统风扇状态,如果系统风扇发生故障则返回错误 | +| cpuFanStatus | 无 | CPU 风扇状态,如果 CPU 风扇发生故障则返回错误 | +| systemStatus | 无 | 系统分区状态 | +| thermalStatus | 无 | 散热状态,如果散热状态异常 | +| temperature | 无 | NAS 的温度 | +| cpuUtilization | 百分比 | 利用率 (%) 是用户和系统 CPU 使用率的总和 | +| memUtilization | 百分比 | 利用率 (%) 是内存使用率的总和 | + +### 指标集合:硬盘 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|----------------------| +| diskID | 无 | DSM 中的硬盘名称 | +| diskModel | 无 | 硬盘型号 | +| diskType | 无 | 硬盘类型如 SATA、SSD | +| diskStatus | 无 | 当前硬盘状态 | +| diskTemperature | 无 | 硬盘温度 | +| diskRole | 无 | 硬盘在系统中的作用 | +| diskRetry | 无 | 每个硬盘连接重试次数 | +| diskBadSector | 无 | 每个硬盘 I/O 坏扇区的计数 | +| diskIdentifyFail | 无 | 每个硬盘名称的计数失败 | +| diskRemainLife | 无 | 每个硬盘的预计剩余寿命 | +| diskName | 无 | 不同 DSM 版本中保留相同值的硬盘名称 | +| diskHealthStatus | 无 | 当前硬盘运行状况 | + +### 指标集合:RAID状态 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|------------------------------------| +| raidName | 无 | RAID 的名称 | +| raidStatus | 无 | RAID 状态 | +| raidFreeSize | 无 | 卷/硬盘组的可用容量 | +| raidTotalSize | 无 | 卷/硬盘组的总大小 | +| raidHotspareCnt | 无 | 可保护 RAID 的 hotspare 硬盘总数,小于 0 表示错误 | + +### 指标集合:S.M.A.R.T + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------|------|---------------| +| diskSMARTInfoDevName | 无 | SMART 信息所属的硬盘 | +| diskSMARTAttrName | 无 | SMART 信息属性的名称 | +| diskSMARTAttrId | 无 | SMART 属性 ID 号 | +| diskSMARTAttrCurrent | 无 | SMART 属性当前值 | +| diskSMARTAttrWorst | 无 | SMART 属性最差值 | +| diskSMARTAttrThreshold | 无 | SMART 属性阈值 | +| diskSMARTAttrRaw | 无 | SMART 属性原始值 | +| diskSMARTAttrStatus | 无 | SMART 信息的状态 | + +### 指标集合:存储空间 I/O + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|----------------------| +| spaceIODevice | 无 | 装载此存储空间的设备名称 | +| spaceIOReads | 无 | 自启动以来从此存储空间进行的读取访问次数 | +| spaceIOWrites | 无 | 自启动以来对此存储空间的写入访问次数 | +| spaceIOLA | 百分比 | 卷中硬盘的负载率 | +| spaceIOLA1 | 百分比 | 卷中硬盘的1分钟平均负载率 | +| spaceIOLA5 | 百分比 | 卷中硬盘的5分钟平均负载率 | +| spaceIOLA15 | 百分比 | 卷中硬盘的15分钟平均负载率 | +| spaceUUID | 无 | 卷的 UUID | + +### 指标集合:硬盘 I/O + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|--------------------| +| storageIODevice | 无 | 设备的名称 | +| storageIOReads | 无 | 自启动以来从此设备进行的读取访问次数 | +| storageIOWrites | 无 | 自启动以来对此设备进行的写入访问次数 | +| storageIOLA | 百分比 | 硬盘负载率 | +| storageIOLA1 | 百分比 | 硬盘的1分钟平均负载率 | +| storageIOLA5 | 百分比 | 硬盘的5分钟平均负载率 | +| storageIOLA15 | 百分比 | 硬盘的15分钟平均负载率 | +| storageIODeviceSerial | 无 | 序列号 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tdengine_promql.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tdengine_promql.md new file mode 100644 index 0000000000..f4f8245737 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tdengine_promql.md @@ -0,0 +1,92 @@ +--- +id: tdengine_promql +title: 监控:TDengine-PromQL +sidebar_label: TDengine-PromQL +keywords: [ 开源监控系统,开源中间件监控, TDengine监控,TDengine-PromQL监控 ] +--- + +> 使用 Prometheus PromQL 从 Prometheus 服务器中查询到 TDengine 的通用指标数据来进行监控。此方案适用于 Prometheus 已监控 +> TDengine,需要从 Prometheus 服务器抓取 TDengine 的监控数据。 + +## 前置条件 + +1. 部署 TDengine; +2. 部署 taosKeeper;注意⚠️安装 TDengine 官方安装包的同时会自动安装 taosKeeper + 详情请参考:[taosKeeper](https://docs.taosdata.com/3.4.1/reference/components/taoskeeper/); +3. 通过 prometheus 采集 TDengine taosKeeper 暴露的监控指标; + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Prometheus api 端口,默认值:9090。 | +| 相对路径 | Prometheus查询PromQL的URL,默认值:/api/v1/query。 | +| 请求方式 | 设置接口调用的请求方式:GET,POST,PUT,DELETE,默认值:GET。 | +| 启用HTTPS | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443。 | +| 用户名 | 接口Basic认证或Digest认证时使用的用户名。 | +| 密码 | 接口Basic认证或Digest认证时使用的密码。 | +| Content-Type | 设置携带BODY请求体数据请求时的资源类型。 | +| 请求BODY | 设置携带BODY请求体数据,PUT POST请求方式时有效。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:基础信息指标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------------|------|---------| +| taos_cluster_info_first_ep | 无 | 第一个端点 | +| taos_cluster_info_version | 无 | 版本信息 | +| taos_cluster_info_master_uptime | 天 | 主节点运行时间 | + +#### 指标集合:节点数量指标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------------|------|--------------| +| taos_cluster_info_dnodes_total | 无 | dnode 总数 | +| taos_cluster_info_dnodes_alive | 无 | 存活的 dnode 数量 | +| taos_cluster_info_mnodes_total | 无 | mnode 总数 | +| taos_cluster_info_mnodes_alive | 无 | 存活的 mnode 数量 | +| taos_cluster_info_vgroups_total | 无 | 虚拟组总数 | +| taos_cluster_info_vgroups_alive | 无 | 存活的虚拟组数量 | +| taos_cluster_info_vnodes_total | 无 | 虚拟节点总数 | +| taos_cluster_info_vnodes_alive | 无 | 存活的虚拟节点数量 | + +### 指标集合:数据库和表统计 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------------------|------|--------| +| taos_cluster_info_dbs_total | 无 | 数据库总数 | +| taos_cluster_info_tbs_total | 无 | 表总数 | +| taos_cluster_info_connections_total | 天 | 总连接数 | + +### 指标集合:Dnode 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------|--------------------------------------|----------------------------| +| taos_d_info_status | ready 表示正常、offline 表示下线、unknown 表示未知 | dnode 状态 | +| taos_dnodes_info_uptime | 秒 | 该 dnode 的启动时间 | +| taos_dnodes_info_cpu_engine | 无 | 该 dnode 的进程所使用的 CPU 百分比 | +| taos_dnodes_info_cpu_system | 无 | 该 dnode 所在节点的系统使用的 CPU 百分比 | +| taos_dnodes_info_mem_engine | KB | 该 dnode 的进程所使用的内存 | +| taos_dnodes_info_mem_system | KB | 该 dnode 所在节点的系统所使用的内存 | +| taos_dnodes_info_disk_total | Byte | 该 dnode 所在节点的磁盘总容量 | +| taos_dnodes_info_disk_used | Byte | 该 dnode 所在节点的磁盘已使用的容量 | +| taos_dnodes_info_io_write_disk | Byte/s | 该 dnode 所在节点的磁盘 io 写入速率 | +| taos_dnodes_info_io_read_disk | Byte/s | 该 dnode 所在节点的磁盘 io 读取速率 | + +### 指标集合:taosadapter 相关 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------------|------|--------| +| taos_adapter_requests_total | 无 | 总请求数 | +| taos_adapter_requests_success | 无 | 成功的请求数 | +| taos_adapter_requests_fail | 无 | 失败的请求数 | +| taos_adapter_requests_query | 无 | 查询请求数 | + +### HertzBeat支持的其他 TDengine 监控方式 + +1.通过taosKeeper暴露的监控指标,可以参考 [Prometheus任务](prometheus) 配置Prometheus采集任务监控 TDengine。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tidb.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tidb.md new file mode 100644 index 0000000000..b223b98d5d --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tidb.md @@ -0,0 +1,62 @@ +--- +id: tidb +title: 监控:TiDB数据库监控 +sidebar_label: TiDB数据库 +keywords: [开源监控系统, 开源数据库监控, TiDB数据库监控] +--- + +> 使用 HTTP 和 JDBC 协议对 TiDB 的通用性能指标进行采集监控。 + +## 驱动选择 + +TiDB 监控里的 HTTP 部分保持不变,SQL 查询部分现在和 MySQL 一样会自动分流: + +- 如果 `ext-lib` 中放入了 `mysql-connector-j`,JVM 采集器或主程序内置采集器会对 SQL 查询指标自动优先走 JDBC。 +- 如果没有放入 `mysql-connector-j`,HertzBeat 会对 SQL 查询指标自动切换到内置的 MySQL 兼容查询引擎,不需要额外复制 JAR。 +- 在 `ext-lib` 中新增或删除 JAR 后,请重启 HertzBeat 或独立 JVM 采集器。 + +:::important 采集器包选择 +TiDB 默认模板同时包含 HTTP 指标和 MySQL 兼容 SQL 查询。 + +- HTTP 指标集合不受 JDBC 驱动选择影响 +- 内置 SQL 查询引擎已经可以在不放 `mysql-connector-j` 的情况下采集默认 TiDB `basic` 指标集合 +- 如果你明确把 `mysql-connector-j` 放进 `ext-lib`,JVM 采集器或主程序内置采集器仍会对 SQL 查询路径优先走 JDBC +::: + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------|------------------------------------------------------------------------------------------------------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| Service端口 | TiDB数据库对外提供用于状态报告的端口,默认为10080。 | +| PD端口 | TiDB数据库的PD端口,默认为2379。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。 | +| JDBC端口 | TiDB数据库对外提供用于客户端请求的端口,默认为4000。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| JDBC URL | 数据库使用[JDBC驱动的](https://docs.pingcap.com/zh/tidb/stable/dev-guide-connect-to-tidb#jdbc)连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +监控模板将从TiDB系统变量表中检索监控指标,用户可以自行检索[TiDB系统变量表](https://docs.pingcap.com/zh/tidb/stable/system-variables)以查询所需信息或其他系统变量。 + +除此之外,TiDB也提供默认监控指标表,见[Metrics Schema](https://docs.pingcap.com/zh/tidb/stable/metrics-schema)与[METRICS_SUMMARY](https://docs.pingcap.com/zh/tidb/stable/information-schema-metrics-summary),用户可以根据需求自行添加检索式。 + +由于可以被监控的指标过多,下文仅介绍监控模板中所查询的指标。 + +#### 指标集合:系统变量 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|------------------------------------------------------------------------------------------------------------------| +| version | 无 | MySQL 的版本和 TiDB 的版本,例如 '8.0.11-TiDB-v7.5.1' | +| version_comment | 无 | TiDB 版本号的其他信息,例如 'TiDB Server (Apache License 2.0) Community Edition, MySQL 8.0 compatible' | +| version_compile_machine | 无 | 运行 TiDB 的 CPU 架构的名称 | +| version_compile_os | 无 | TiDB 所在操作系统的名称 | +| max_connections | 无 | 该变量表示 TiDB 中同时允许的最大客户端连接数,用于资源控制。默认情况下,该变量值为 0 表示不限制客户端连接数。当本变量的值大于 0 且客户端连接数到达此值时,TiDB 服务端将会拒绝新的客户端连接。 | +| datadir | 无 | 数据存储的位置,位置可以是本地路径 /tmp/tidb。如果数据存储在 TiKV 上,则可以是指向 PD 服务器的路径。变量值的格式为 `${pd-ip}:${pd-port}`,表示 TiDB 在启动时连接到的 PD 服务器。 | +| port | 无 | 使用 MySQL 协议时 tidb-server 监听的端口。 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/time_expression.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/time_expression.md new file mode 100644 index 0000000000..7f1bdd58f4 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/time_expression.md @@ -0,0 +1,67 @@ +--- +id: time_expression +title: 时间表达式 +sidebar_label: 时间表达式 +keywords: [ 动态时间,时间表达式 ] +--- + +## 简介 + +HertzBeat支持使用表达式计算监控采集时的相对时间,支持更加灵活的在监控模板中定义时间。 + +### 语法 + +```shell +${FORMATTER [{ + | - }`` ``]} +``` + +- `FORMATTER` : 决定表达式计算的结果的格式 +- `DURATION` : 时间段大小,正整数 +- `TIME_UNIT` : 时间段单位 + +### 支持的格式化类型 + +> 示例输出以当前时间为 `2022-04-24 02:40:00.123` + +| 名称 | 描述 | 示例 | +|--------------|----------------------------|---------------------| +| @now | 格式化为 `yyyy-MM-dd HH:mm:ss` | 2022-04-24 02:40:00 | +| @date | 格式化为 `yyyy-MM-dd` | 2022-04-24 | +| @timestamp10 | 返回10位时间戳 | 1650768000 | +| @timestamp | 返回13位时间戳 | 1650768000000 | +| @time | 格式化为 `HH:mm:ss` | 02:40:00 | +| @year | 格式化为 `yyyy` | 2022 | +| @month | 格式化为 `MM` | 04 | +| @day | 格式化为 `dd` | 24 | +| @hour | 格式化为 `HH` | 02 | +| @minute | 格式化为 `mm` | 40 | +| @millisecond | 格式化为 `SSS` | 123 | +| @second | 格式化为 `ss` | 00 | + +### 支持的时间单位 + +| 名称 | 描述 | +|----|----| +| y | 年 | +| M | 月 | +| d | 日 | +| H | 小时 | +| m | 分钟 | +| s | 秒 | +| w | 周 | + +#### 在哪里可以使用 + +- HTTP协议监控类型的请求路径(URL) +- HTTP协议监控类型的请求参数 +- HTTP协议监控类型的请求头 +- HTTP协议监控类型的请求体 + +#### 使用示例 + +1. 简单表达式 + - `${@now}` 获取当前时间,并格式化为 `yyyy-MM-dd HH:mm:ss` + - `${@time+1H}` 计算当前时间一小时之后的时间,并格式化为 `HH:mm:ss` + - `${@time+1H+15m+30s}` 计算当前时间一小时15分钟30秒之后的时间,并格式化为 `HH:mm:ss` +2. 复杂表达式模板(如果内置的格式化器无法满足需要,可以组合使用多个表达式) + - `${@year}年${@month}月${@day}日`,获取当前日期并按照 yyyy年MM月dd日格式返回 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tomcat.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tomcat.md new file mode 100644 index 0000000000..f20a5a76fa --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/tomcat.md @@ -0,0 +1,76 @@ +--- +id: tomcat +title: 监控:Tomcat监控 +sidebar_label: Tomcat监控 +keywords: [开源监控系统, 开源网站监控, Tomcat监控] +--- + +> 对Tomcat的通用性能指标进行采集监控 + +**使用协议:JMX** + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置Tomcat连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 用户名 | JMX连接用户名 | +| 密码 | JMX连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:memory_pool + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| name | 无 | 指标名称 | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:code_cache + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:class_loading + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|----------| +| LoadedClassCount | 个 | 已加载类数量 | +| TotalLoadedClassCount | 个 | 历史已加载类总量 | +| UnloadedClassCount | 个 | 未加载类数量 | + +#### 指标集合:thread + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------|------|-----------| +| TotalStartedThreadCount | 个 | 已经开始的线程数量 | +| ThreadCount | 个 | 线程数 | +| PeakThreadCount | 个 | 未加载类数量 | +| DaemonThreadCount | 个 | 守护进程数 | +| CurrentThreadUserTime | ms | 使用时间 | +| CurrentThreadCpuTime | ms | 使用CPU时间 | + +### Tomcat开启JMX协议步骤 + +1. 搭建好tomcat后,进入tomcat下的bin目录,修改catalina.sh文件 注意⚠️替换IP地址 + +2. vim catalina.sh + +```aidl +CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=10.1.1.52 -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" +``` + + +参考: [https://blog.csdn.net/weixin_41924764/article/details/108694239](https://blog.csdn.net/weixin_41924764/article/details/108694239) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ubuntu.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ubuntu.md new file mode 100644 index 0000000000..7af31345e3 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/ubuntu.md @@ -0,0 +1,163 @@ +--- +id: ubuntu +title: 监控:Ubuntu操作系统监控 +sidebar_label: Ubuntu 操作系统 +keywords: [开源监控系统, 开源操作系统监控, Ubuntu监控] +--- + +> 对Ubuntu操作系统的通用性能指标进行采集监控。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|---------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Linux SSH对外提供的端口,默认为22。 | +| 超时时间 | 设置连接的超时时间,单位ms毫秒,默认6000毫秒。 | +| 复用连接 | 设置SSH连接是否复用,默认为:false。为false每次获取信息都会创建一个连接 | +| 使用代理 | 设置是否通过代理连接,默认为false。 | +| 用户名 | SSH连接用户名,可选 | +| 密码 | SSH连接密码,可选 | +| 采集器 | 配置此监控使用哪台采集器调度采集 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 绑定标签 | 用于对监控资源进行分类管理 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | +| 私钥 | 连接服务器所需的私钥 | +| 密钥短语 | 用于加密 SSH 私钥的密码短语(Passphrase)。如果私钥在生成时设置了密码短语,则必须填写此字段才能解密并使用私钥进行认证。 | +| 代理主机 | 代理服务器的地址,支持 IPV4、IPV6或域名。若使用 SSH 代理跳转访问目标主机,需填写代理服务器的地址。 | +| 代理端口 | 代理服务器的端口号。 | +| 代理用户名 | 连接代理服务器时所需的认证用户名。 | +| 代理密码 | 连接代理服务器时所需的认证密码。 | +| 代理主机私钥 | 连接代理服务器时所需的私钥。 | + +### 采集指标 + +#### 指标集合:系统基本信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | +| uptime | 无 | 启动时间 | + +#### 指标集合:CPU 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|--------------------| +| info | 无 | CPU型号 | +| cores | 无 | CPU内核数量 | +| interrupt | 无 | CPU中断数量 | +| load | 无 | CPU最近1/5/15分钟的平均负载 | +| context_switch | 无 | 当前上下文切换数量 | +| usage | % | CPU使用率 | + +#### 指标集合:内存信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|----------| +| total | Mb | 总内存容量 | +| used | Mb | 用户程序内存量 | +| free | Mb | 空闲内存容量 | +| buff_cache | Mb | 缓存占用内存 | +| available | Mb | 剩余可用内存容量 | +| usage | % | 内存使用率 | + +#### 指标集合:磁盘信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|-----------| +| disk_num | 无 | 磁盘总数 | +| partition_num | 无 | 分区总数 | +| block_write | 无 | 写入磁盘的总块数 | +| block_read | 无 | 从磁盘读出的块数 | +| write_rate | iops | 每秒写磁盘块的速率 | + +#### 指标集合:网卡信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------------| +| interface_name | 无 | 网卡名称 | +| receive_bytes | Byte | 入站数据流量(bytes) | +| transmit_bytes | Byte | 出站数据流量(bytes) | + +#### 指标集合:文件系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------|------|---------| +| filesystem | 无 | 文件系统的名称 | +| used | Mb | 已使用磁盘大小 | +| available | Mb | 可用磁盘大小 | +| usage | % | 使用率 | +| mounted | 无 | 挂载点目录 | + +#### 指标集合:Top10 CPU进程 + +统计进程使用CPU的Top10进程。统计信息包括:进程ID、CPU占用率、内存占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| cpu_usage | % | CPU占用率 | +| mem_usage | % | 内存占用率 | +| command | 无 | 执行命令 | + +#### 指标集合:Top10 内存进程 + +统计进程使用内存的Top10进程。统计信息包括:进程ID、内存占用率、CPU占用率、执行命令。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| pid | 无 | 进程ID | +| mem_usage | % | 内存占用率 | +| cpu_usage | % | CPU占用率 | +| command | 无 | 执行命令 | + +#### 其他指标集合:所有核心的平均CPU温度 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|-----------| +| avg_cpu_temp | C | 所有核心的平均温度 | + +* 注意:此指标信息依赖硬件传感器的监测工具(lm-sensors),请确认Ubuntu操作系统可以正常获取监测信息,可根据需要补充如下指标采集配置 + +```yaml +metrics: + - name: avg_cpu_temp + i18n: + zh-CN: 所有核心的平均CPU温度 + en-US: Average CPU Temperature Across All Cores + priority: 4 + fields: + - field: avg_cpu_temp + type: 1 + label: true + unit: 'C' + i18n: + zh-CN: 所有核心的平均温度 + en-US: Average Temp All Cores + protocol: ssh + ssh: + host: ^_^host^_^ + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + privateKey: ^_^privateKey^_^ + privateKeyPassphrase: ^_^privateKeyPassphrase^_^ + timeout: ^_^timeout^_^ + reuseConnection: ^_^reuseConnection^_^ + script: sensors | grep "^Core\s[0-9\d+\:]" | awk '{print $3}' | sed "s/°C/\ /g" | awk '{ total += $1; count++ } END { print total/count }' + parseType: oneRow + # whether to use proxy server for ssh connection + useProxy: ^_^useProxy^_^ + # ssh proxy host: ipv4 domain + proxyHost: ^_^proxyHost^_^ + # ssh proxy port + proxyPort: ^_^proxyPort^_^ + # ssh proxy username + proxyUsername: ^_^proxyUsername^_^ + # ssh proxy password + proxyPassword: ^_^proxyPassword^_^ + # ssh proxy private key + proxyPrivateKey: ^_^proxyPrivateKey^_^ +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/udp_port.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/udp_port.md new file mode 100644 index 0000000000..438d4c32a8 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/udp_port.md @@ -0,0 +1,31 @@ +--- +id: udp_port +title: 监控:UDP 端口可用性监控 +sidebar_label: UDP 端口可用性 +keywords: [开源监控系统, 开源网络监控, UDP 端口可用性监控] +--- + +> UDP 是面向无连接的传输层协议,其端口可用性状态我们通过在应用层发送请求报文获得响应来判断,配置信息我们需要填充能使对端响应的应用层16进制报文内容。建议使用wireshark抓包来获取发送报文内容。 +> 您可以点击`新建 UDP端口可用性`并进行配置,或者选择`更多操作`,导入已有配置。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|:-------|--------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头 (例如: https://, http://) 。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 网站对外提供的端口。 | +| 连接超时时间 | 端口连接的等待超时时间,单位毫秒,默认6000毫秒。 | +| 发送报文内容 | 能使对端响应的应用层16进制报文内容。 | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:概要 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|---------|--------| +| 响应时间 | 毫秒 (ms) | 网站响应时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/uniview.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/uniview.md new file mode 100644 index 0000000000..97cf025f29 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/uniview.md @@ -0,0 +1,47 @@ +--- +id: uniview +title: 监控 宇视设备 +sidebar_label: 宇视 +keywords: [ monitor, uniview, 宇视 ] +--- + +> 通过HTTP接口监控宇视设备状态,获取设备健康数据。 + +## 监控配置参数 + +| 参数名称 | 参数帮助描述 | +| ----------- | ----------- | +| 监控Host | 设备IP/域名 | +| 监控名称 | 唯一标识名称 | +| 端口 | 默认80端口 | +| 超时时间 | 毫秒级超时设置 | +| 用户名 | 认证用户名 | +| 密码 | 认证密码 | +| 启用HTTPS | HTTPS开关 | +| 采集间隔 | ≥30秒采集周期 | + +## 采集指标 + +### 系统信息 + +- 设备名称 +- 序列号 +- 固件版本 +- 设备型号 + +### 校时信息 + +- NTP服务器IP +- 校时端口 +- 同步间隔 +- 校时启用状态 + +## 实现原理 + +通过宇视HTTP API接口: + +1. 系统信息:`/LAPI/V1.0/System/DeviceInfo` + +2. 校时信息:`/LAPI/V1.0/System/Time/NTP` + +使用Digest认证,解析JSON格式响应数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/valkey.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/valkey.md new file mode 100644 index 0000000000..62e3469882 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/valkey.md @@ -0,0 +1,239 @@ +--- +id: valkey +title: 监控:Valkey 数据库监控 +sidebar_label: Valkey 数据库 +keywords: [开源监控系统, 开源数据库监控, Valkey 数据库监控] +--- + +> 对 Valkey 数据库的通用性能指标进行采集监控。支持 Valkey 7.0+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Valkey 对外提供的端口,默认为6379,sentinel节点默认26379 | +| 超时时间 | 设置 Valkey info 查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:server + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------|------|-----------------------------------------------| +| valkey_version | 无 | Valkey 服务器版本 | +| valkey_git_sha1 | 无 | Git SHA1 | +| valkey_git_dirty | 无 | Git dirty flag | +| valkey_build_id | 无 | Valkey 构建的id | +| valkey_mode | 无 | Valkey 模式(包括standalone, sentinel, cluster) | +| os | 无 | Valkey 服务器的宿主操作系统 | +| arch_bits | 无 | 架构(32 或 64 位) | +| multiplexing_api | 无 | Valkey 使用的事件循环机制 | +| atomicvar_api | 无 | Valkey 使用的原子 API | +| gcc_version | 无 | 用于编译 Valkey 服务器的GCC编译器版本 | +| process_id | 无 | 服务器进程的PID | +| process_supervised | 无 | 受监管系统(包括:upstart、systemd、unknown、no) | +| run_id | 无 | 标识 Valkey 服务器的随机值(由Sentinel和Cluster使用) | +| tcp_port | 无 | TCP/IP侦听端口 | +| server_time_usec | 无 | 微秒级精度的基于时间的系统时间 | +| uptime_in_seconds | 无 | 自 Valkey 服务器启动后的秒数 | +| uptime_in_days | 无 | 自 Valkey 服务器启动后的天数 | +| hz | 无 | 服务器的当前频率设置,valkey 相关定时任务的执行频率(如清除过期key,关闭超时客户端) | +| configured_hz | 无 | 服务器配置的频率设置 | +| lru_clock | 无 | 时钟每分钟递增,用于LRU管理 | +| executable | 无 | 服务器可执行文件的路径 | +| config_file | 无 | 配置文件的路径 | +| io_threads_active | 无 | 指示I/O线程是否处于活动状态的标志 | +| shutdown_in_milliseconds | 无 | 复制副本在完成关闭序列之前赶上复制的最长剩余时间。此字段仅在停机期间出现。 | + +#### 指标集合:clients + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------------|------|--------------------------------------------------------------------------------| +| connected_clients | 无 | 客户端连接数(不包括来自副本的连接) | +| cluster_connections | 无 | 群集总线使用的套接字数量的近似值 | +| maxclients | 无 | maxclients配置指令的值。这是connected_clients、connected_slave和cluster_connections之和的上限。 | +| client_recent_max_input_buffer | byte | 当前客户端连接中最大的输入缓冲区 | +| client_recent_max_output_buffer | byte | 当前客户端连接中最大的输出缓冲区 | +| blocked_clients | 无 | 阻塞呼叫挂起的客户端数(BLPOP、BRPOP、BRPOPLPUSH、BLMOVE、BZPOPMIN、BZPOPMAX) | +| tracking_clients | 无 | 正在跟踪的客户端数(CLIENT TRACKING) | +| clients_in_timeout_table | 无 | 客户端超时表中的客户端数 | + +#### 指标集合:memory + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------|----------|-----------------------------------------------------------------------------------------------| +| used_memory | byte | valkey 使用其分配器(标准libc、jemalloc或tcmalloc等替代分配器)分配的总字节数 | +| used_memory_human | GB/MB/KB | 上一个值的人类可读表示 | +| used_memory_rss | byte | 操作系统看到的 valkey 分配的字节数(也称为驻留集大小)。这是top(1)和ps(1)等工具报告的数字 | +| used_memory_rss_human | GB/MB/KB | 上一个值的人类可读值 | +| used_memory_peak | byte | valkey 消耗的峰值内存(字节) | +| used_memory_peak_human | GB/MB/KB | 上一个值的人类可读值 | +| used_memory_peak_perc | 无 | used_memory_peak 与used_memory百分比 | +| used_memory_overhead | byte | 服务器分配用于管理其内部数据结构的所有开销的字节总和 | +| used_memory_startup | byte | valkey 在启动时消耗的初始内存量(字节) | +| used_memory_dataset | byte | 数据集的字节大小(used_memory - used_memory_overhead) | +| used_memory_dataset_perc | 无 | 已用内存数据集占净内存使用量的百分比(used_memory_dataset / (used_memory - used_memory_startup)) | +| allocator_allocated | byte | 从分配器分配的总字节数,包括内部碎片。通常与使用的内存相同 | +| allocator_active | byte | 分配器活动页中的总字节数,包括外部碎片 | +| allocator_resident | byte | 分配器中驻留的总字节数(RSS),包括可释放到操作系统的页面(通过MEMORY PURGE或仅等待) | +| total_system_memory | byte | valkey 主机的内存总量 | +| total_system_memory_human | GB/MB/KB | 上一个值的人类可读值 | +| used_memory_lua | byte | Lua引擎使用的字节数 | +| used_memory_lua_human | KB | 上一个值的人类可读值 | +| used_memory_scripts | byte | 缓存Lua脚本使用的字节数 | +| used_memory_scripts_human | GB/MB/KB | 上一值的人类可读值 | +| number_of_cached_scripts | 无 | 缓存的lua脚本数量 | +| maxmemory | byte | maxmemory配置指令的值 | +| maxmemory_human | GB/MB/KB | 上一个值的人类可读值 | +| maxmemory_policy | 无 | 当达到maxmemory时的淘汰策略 | +| allocator_frag_ratio | 无 | allocator_active 和 allocator_allocated之间的比率这是真实(外部)碎片度量(不是mem_fragmentation_ratio) | +| allocator_frag_bytes | byte | allocator_active 和 allocator_allocated 之间的差值。 | +| allocator_rss_ratio | | 从操作系统角度看, 内存分配器碎片比例 | +| allocator_rss_bytes | byte | allocator_resident 和 allocator_active之间的差值 | +| rss_overhead_ratio | 无 | used_memory_rss和allocator_resident之间的比率,这包括与分配器或堆无关的RSS开销 | +| rss_overhead_bytes | byte | used_memory_rss和allocator_resident之间的增量 | +| mem_fragmentation_ratio | 无 | used_memory_rss和used_memory之间的比率,注意,这不仅包括碎片,还包括其他进程开销(请参阅allocator_* metrics),以及代码、共享库、堆栈等开销。 | +| mem_fragmentation_bytes | byte | used_memory_rss和used_memory之间的增量。注意,当总碎片字节较低(几兆字节)时,高比率(例如1.5及以上)不是问题的表现 | +| mem_not_counted_for_evict | byte | 不应驱逐的内存大小,以字节为单位。这基本上是瞬时复制和AOF缓冲区。 | +| mem_replication_backlog | byte | 复制backlog的内存大小, 以字节为单位 | +| mem_clients_slaves | 无 | 副本客户端使用的内存-从 valkey 7.0开始,副本缓冲区与复制积压工作共享内存,因此当副本不触发内存使用增加时,此字段可以显示0。 | +| mem_clients_normal | 无 | 普通客户端使用的内存 | +| mem_aof_buffer | 无 | 用于AOF和AOF重写缓冲区的临时大小 | +| mem_allocator | 无 | 内存分配器,在编译时选择。 | +| active_defrag_running | 无 | 启用activedefrag时,这表示碎片整理当前是否处于活动状态,以及它打算使用的CPU百分比。 | +| lazyfree_pending_objects | 无 | 等待释放的对象数(使用ASYNC选项调用UNLINK或FLUSHDB和FLUSHOLL) | +| lazyfreed_objects | 无 | 已延迟释放的对象数。 | + +#### 指标集合:persistence + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------------|--------|-----------------------------------------------------------------------------------------------------| +| loading | 无 | 服务器是否正在进行持久化 0 - 否 1 -是 | +| current_cow_size | byte | 运行子fork时写入时复制内存的大小(以字节为单位) | +| current_cow_size_age | second | current_cow_size值的年龄(以秒为单位) | +| current_fork_perc | 无 | 当前fork进程的百分比,对于AOF和RDB的fork,它是current_save_keys_processed占current_save_keys_total的百分比 | +| current_save_keys_processed | 无 | 当前保存操作处理的key的数量 | +| current_save_keys_total | 无 | 当前保存操作开始时的key的数量 | +| rdb_changes_since_last_save | 无 | 离最近一次成功生成rdb文件,写入命令的个数,即有多少个写入命令没有持久化 | +| rdb_bgsave_in_progress | 无 | 服务器是否正在创建rdb文件 0 - 否 1 - 是 | +| rdb_last_save_time | second | 最近一次创建rdb文件的时间戳,单位秒 | +| rdb_last_bgsave_status | 无 | 最近一次rdb持久化是否成功 ok 成功 | +| rdb_last_bgsave_time_sec | second | 最近一次成功生成rdb文件耗时秒数 | +| rdb_current_bgsave_time_sec | 无 | 如果服务器正在创建rdb文件,那么这个字段记录的就是当前的创建操作已经耗费的秒数 | +| rdb_last_cow_size | 无 | RDB过程中父进程与子进程相比执行了多少修改(包括读缓冲区,写缓冲区,数据修改等) | +| aof_enabled | 无 | 是否开启了AOF 0 - 否 1 - 是 | +| aof_rewrite_in_progress | 无 | 标识aof的rewrite操作是否在进行中 0 - 否 1- 是 | +| aof_rewrite_scheduled | 无 | rewrite任务计划,当客户端发送bgrewriteaof指令,如果当前rewrite子进程正在执行,那么将客户端请求的bgrewriteaof变为计划任务,待aof子进程结束后执行rewrite | +| aof_last_rewrite_time_sec | 无 | 最近一次aof rewrite耗费的时长 | +| aof_current_rewrite_time_sec | second | 如果rewrite操作正在进行,则记录所使用的时间,单位秒 | +| aof_last_bgrewrite_status | 无 | 上次 bgrewrite aof 操作的状态 ok 成功 | +| aof_last_write_status | 无 | 上次aof写入状态 | +| aof_last_cow_size | 无 | AOF过程中父进程与子进程相比执行了多少修改(包括读缓冲区,写缓冲区,数据修改等) | +| module_fork_in_progress | 无 | 指示fork模块正在进行的标志 | +| module_fork_last_cow_size | 无 | 上一次fork操作期间写入时复制内存的字节大小 | + +#### 指标集合:stats + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------|------|----------------------------------------------------| +| total_connections_received | 无 | 服务器接受的连接总数 | +| total_commands_processed | 无 | 服务器处理的命令总数 | +| instantaneous_ops_per_sec | 无 | 每秒处理的命令数 | +| total_net_input_bytes | byte | 从网络读取的字节总数 | +| total_net_output_bytes | byte | 写入网络的总字节数 | +| instantaneous_input_kbps | KB/S | 网络每秒的读取速率(KB/秒) | +| instantaneous_output_kbps | KB/S | 网络每秒的写入速率(KB/秒) | +| rejected_connections | 无 | 由于maxclients限制而拒绝的连接数 | +| sync_full | 无 | 具有副本的完整重新同步数 | +| sync_partial_ok | 无 | 接受的部分重新同步请求数 | +| sync_partial_err | 无 | 被拒绝的部分重新同步请求数 | +| expired_keys | 无 | 过期的key总数 | +| expired_stale_perc | 无 | 可能过期key的百分比 | +| expired_time_cap_reached_count | 无 | 活动过期周期提前停止的次数 | +| expire_cycle_cpu_milliseconds | 无 | 活动到期周期所花费的累计时间 | +| evicted_keys | 无 | 由于最大内存限制而收回key的数量 | +| keyspace_hits | 无 | 在主dict 中成功查找key的次数 | +| keyspace_misses | 无 | 在主dict 中未查到key的次数 | +| pubsub_channels | 无 | 客户端使用 pub/sub 频道的总和 | +| pubsub_patterns | 无 | 客户端使用 pub/sub 模式的全局数量 | +| latest_fork_usec | 无 | 最后一次fork操作的持续时间(以微秒为单位) | +| total_forks | 无 | 自服务器启动以来的fork操作总数 | +| migrate_cached_sockets | 无 | 为MIGRATE目的打开的socket数量 | +| slave_expires_tracked_keys | 无 | trace key 到期的数量(仅适用于可写副本) | +| active_defrag_hits | 无 | 主动碎片整理命中次数 | +| active_defrag_misses | 无 | 主动碎片整理未命中次数 | +| active_defrag_key_hits | 无 | 主动碎片整理key命中次数 | +| active_defrag_key_misses | 无 | 主动碎片整理key未命中次数 | +| tracking_total_keys | 无 | key 查询的总数 | +| tracking_total_items | 无 | item查询的总数 | +| tracking_total_prefixes | 无 | 前缀查询的总数 | +| unexpected_error_replies | 无 | 意外错误回复数,即AOF加载或复制中的错误类型 | +| total_error_replies | 无 | 发出的错误回复总数,即被拒绝的命令(命令执行之前的错误)和失败的命令(在命令执行过程中的错误)的总和 | +| dump_payload_sanitizations | 无 | 参考sanitize-dump-payload配置 | +| total_reads_processed | 无 | 正在读取的请求数 | +| total_writes_processed | 无 | 正在写入的请求数 | +| io_threaded_reads_processed | 无 | 正在读取的线程数 | +| io_threaded_writes_processed | 无 | 正在写入的线程数 | + +#### 指标集合:replication + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------|------|-------------------------------------------------------------------------------------| +| role | 无 | 节点角色 master 主节点 slave 从节点 | +| connected_slaves | 无 | 连接的从节点数 | +| master_failover_state | 无 | 正在进行的故障切换的状态(如果有) | +| master_replid | 无 | 实例启动的随机字符串 | +| master_replid2 | 无 | 故障切换后用于PSYNC的辅助复制ID | +| master_repl_offset | 无 | 主从同步偏移量 | +| second_repl_offset | 无 | 接受从服务ID的最大偏移量 | +| repl_backlog_active | 无 | 表示从服务挤压处于活动状态 | +| repl_backlog_size | byte | 从服务积压缓冲区的总大小(字节) | +| repl_backlog_first_byte_offset | 无 | 复制缓冲区里偏移量的大小 | +| repl_backlog_histlen | 无 | 此值等于 master_repl_offset - repl_backlog_first_byte_offset,该值不会超过repl_backlog_size的大小 | + +#### 指标集合:cpu + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------------------|------|------------------------| +| used_cpu_sys | 无 | valkey主进程在内核态所占用CPU时钟总和 | +| used_cpu_user | 无 | valkey主进程在用户态所占用CPU时钟总和 | +| used_cpu_sys_children | 无 | valkey子进程在内核态所占用CPU时钟总和 | +| used_cpu_user_children | 无 | valkey子进程在用户态所占用CPU时钟总和 | +| used_cpu_sys_main_thread | 无 | valkey服务器主线程消耗的内核CPU | +| used_cpu_user_main_thread | 无 | valkey服务器主线程消耗的用户CPU | + +#### 指标集合:errorstats + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|-----------| +| errorstat_ERR | 无 | 错误累计出现的次数 | +| errorstat_MISCONF | 无 | | + +#### 指标集合:cluster + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|--------------------| +| cluster_enabled | 无 | 集群是否开启 0 - 否 1 - 是 | + +#### 指标集合:commandstats + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|---------------------------------------------------------------------------------------------------------------------------| +| cmdstat_set | 无 | set命令的统计信息,calls: 累计调用该命令的次数;usec: 调用该命令的累计耗时,单位微秒;usec_per_call: 调用该命令的平均耗时;rejected_call: 拒绝执行的次数;failed_calls: 调用失败的次数 | +| cmdstat_get | 无 | get命令的统计信息 | +| cmdstat_setnx | 无 | setnx命令的统计信息 | +| cmdstat_hset | 无 | hset命令的统计信息 | +| cmdstat_hget | 无 | hget命令的统计信息 | +| cmdstat_lpush | 无 | lpush命令的统计信息 | +| cmdstat_rpush | 无 | rpush命令的统计信息 | +| cmdstat_lpop | 无 | lpop命令的统计信息 | +| cmdstat_rpop | 无 | rpop命令的统计信息 | +| cmdstat_llen | 无 | llen命令的统计信息 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/vastbase.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/vastbase.md new file mode 100644 index 0000000000..2d7265108c --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/vastbase.md @@ -0,0 +1,55 @@ +--- +id: vastbase +title: 监控:Vastbase 数据库监控 +sidebar_label: Vastbase 数据库 +keywords: [开源监控系统, 开源数据库监控, Vastbase 数据库监控] +--- + +> 对 Vastbase 数据库的通用性能指标进行采集监控。支持Vastbase 9.2.4+。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|-------------------------------------------------| +| 监控Host | 被监控的 Host 地址。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为5432。 | +| 查询超时时间 | 设置 SQL 查询未响应数据时的超时时间,单位 ms 毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户名,可选 | +| 密码 | 数据库连接密码,可选 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------|------|---------------| +| server_version | 无 | 数据库服务器的版本号 | +| port | 无 | 数据库服务器端暴露服务端口 | +| server_encoding | 无 | 数据库服务器端的字符集编码 | +| data_directory | 无 | 数据库存储数据盘地址 | +| max_connections | 连接数 | 数据库最大连接数 | + +#### 指标集合:state + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|------------------------------------------------------------------------| +| name | 无 | 数据库名称,或 share-object 为共享对象。 | +| conflicts | 次数 | 由于与恢复冲突而在这个数据库中被取消的查询的数目 | +| deadlocks | 个数 | 在这个数据库中被检测到的死锁数 | +| blks_read | 次数 | 在这个数据库中被读取的磁盘块的数量 | +| blks_hit | 次数 | 磁盘块被发现已经在缓冲区中的次数,这样不需要一次读取(这只包括 Vastbase 缓冲区中的命中,而不包括在操作系统文件系统缓冲区中的命中) | +| blk_read_time | ms | 在这个数据库中后端花费在读取数据文件块的时间 | +| blk_write_time | ms | 在这个数据库中后端花费在写数据文件块的时间 | +| stats_reset | 无 | 这些统计信息上次被重置的时间 | + +#### 指标集合:activity + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------|------|----------| +| running | 连接数 | 当前客户端连接数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/website.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/website.md new file mode 100644 index 0000000000..38100f2dc2 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/website.md @@ -0,0 +1,29 @@ +--- +id: website +title: 监控:网站监测 +sidebar_label: 网站监测 +keywords: [开源监控系统, 开源网站监控] +--- + +> 对网站是否可用,响应时间等指标进行监测 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|---------|-------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 网站对外提供的端口,http一般默认为80,https一般默认为443。 | +| 相对路径 | 网站地址除IP端口外的后缀路径,例如 `www.tancloud.io/console` 网站的相对路径为 `/console`。 | +| 启用HTTPS | 是否通过HTTPS访问网站,注意⚠️开启HTTPS一般默认对应端口需要改为443 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:summary + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| responseTime | ms毫秒 | 网站响应时间 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/websocket.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/websocket.md new file mode 100644 index 0000000000..13c33c3c9e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/websocket.md @@ -0,0 +1,33 @@ +--- +id: websocket +title: 监控:Websocket +sidebar_label: Websocket +keywords: [ 开源监控系统, Websocket监控 ] +--- + +> WebSocket 服务的首次握手的响应等相关指标进行监测。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|------------------|--------------------------------------------------------------| +| WebSocket服务的Host | 被监控的Websocket的IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Websocket服务的端口。 | +| WebSocket服务的路径 | Websocket端点的路径。 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。 | +| 绑定标签 | 用于对监控资源进行分类管理。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:概要 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|---------| +| responseTime | ms | 响应时间 | +| httpVersion | 无 | HTTP 版本 | +| responseCode | 无 | 响应状态码 | +| statusMessage | 无 | 状态消息 | +| connection | 无 | 表示连接方式 | +| upgrade | 无 | 升级后的协议 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/windows.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/windows.md new file mode 100644 index 0000000000..d575213b66 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/windows.md @@ -0,0 +1,114 @@ +--- +id: windows +title: 监控:Windows操作系统监控 +sidebar_label: Windows 操作系统 +keywords: [开源监控系统, 开源操作系统监控, Windows操作系统监控] +--- + +> 通过SNMP协议对Windows操作系统的通用性能指标进行采集监控。 +> 注意⚠️ Windows服务器需开启SNMP服务 + +参考资料: +[什么是SNMP协议1](https://www.cnblogs.com/xdp-gacl/p/3978825.html) +[什么是SNMP协议2](https://www.auvik.com/franklyit/blog/network-basics-what-is-snmp/) +[Win配置SNMP英文](https://docs.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-snmp-service) +[Win配置SNMP中文](https://docs.microsoft.com/zh-cn/troubleshoot/windows-server/networking/configure-snmp-service) + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|----------|----------------------------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Windows SNMP服务对外提供的端口,默认为 161。 | +| SNMP 版本 | SNMP协议版本 V1 V2c V3 | +| SNMP 团体字 | SNMP 协议团体名(Community Name),用于实现SNMP网络管理员访问SNMP管理代理时的身份验证。类似于密码,默认值为 public | +| 超时时间 | 协议连接超时时间 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:系统 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| name | 无 | 主机名称 | +| descr | 无 | 操作系统描述 | +| uptime | 无 | 系统运行时间 | +| numUsers | 个数 | 当前用户数 | +| services | 个数 | 当前服务数量 | +| processes | 个数 | 当前进程数量 | +| responseTime | ms | 采集响应时间 | +| location | 无 | 位置 | +| memory | GB | 系统内存 | + +#### 指标集合:进程 + +| 字段名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|----------| +| hrSWRunIndex | 无 | 编号 | +| hrSWRunName | 无 | 进程名称 | +| hrSWRunID | 无 | 进程 ID | +| hrSWRunPath | 无 | 进程路径 | +| hrSWRunParameters | 无 | 进程参数 | +| hrSWRunType | 无 | 进程类型 | +| hrSWRunStatus | 无 | 进程状态 | +| hrSWRunPerfCPU | s | 进程占用 CPU | +| hrSWRunPerfMem | KB | 进程占用内存 | + +#### 指标集合:服务 + +| 字段名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|-----------| +| svSvcName | 无 | 服务名称 | +| svSvcInstalledState | 无 | 服务安装状态 | +| svSvcOperatingState | 无 | 服务运行状态 | +| svSvcCanBeUninstalled | 无 | 服务是否可以被卸载 | +| svSvcCanBePaused | 无 | 服务是否可以被暂停 | + +#### 指标集合:安装 + +| 字段名称 | 指标单位 | 指标帮助描述 | +|--------------------|------|--------| +| hrSWInstalledIndex | 无 | 编号 | +| hrSWInstalledName | 无 | 安装名称 | +| hrSWInstalledID | 无 | 安装 ID | +| hrSWInstalledType | 无 | 安装类型 | + +#### 指标集合:存储 + +| 字段名称 | 指标单位 | 指标帮助描述 | +|-------|------|--------| +| index | 无 | 编号 | +| descr | 无 | 存储描述 | +| size | Mb | 存储大小 | +| free | Mb | 存储空闲 | +| used | Mb | 存储占用 | +| usage | % | 存储使用率 | + +#### 指标集合:接口详情 + +| 字段名称 | 指标单位 | 指标帮助描述 | +|--------------|------|--------| +| index | 无 | 编号 | +| descr | 无 | 接口名称 | +| speed | Mbps | 接口速率 | +| in_octets | Kbps | 入流量 | +| out_octets | Kbps | 出流量 | +| admin_status | 无 | 配置状态 | +| oper_status | 无 | 当前状态 | +| mtu | B | MTU | +| in_discards | 个数 | 入丢包数 | +| in_errors | 个数 | 入错包数 | +| out_discards | 个数 | 出丢包数 | +| out_errors | 个数 | 出错包数 | + +#### 指标集合:设备 + +| 字段名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| index | 无 | 编号 | +| descr | 无 | 描述 | +| status | 无 | 状态 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/windows_script.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/windows_script.md new file mode 100644 index 0000000000..a4f6912022 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/windows_script.md @@ -0,0 +1,86 @@ +--- +id: windows_script +title: 监控:使用脚本监控 Windows 操作系统 +sidebar_label: 使用脚本监控 Windows 操作系统 +keywords: [开源监控系统, 开源网络监控, 使用脚本监控 Windows 操作系统] +--- + +## 准备工作 +> +> 若要监控本机,部署 HertzBeat 即可,若要监控其他主机,需在目标主机上部署采集器,部署采集器可参考[此链接](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package)的第 5 步。 +> 如果使用 Docker 安装采集器,则会导致采集器监控不到宿主机上的进程信息,因为 Docker 容器在一个独立的环境中运行,每个容器都有自己的进程空间。 +> 在创建监控任务选择采集器时,需选择目标主机上对应的采集器。 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|:-------|---------------------------------|---| +| 监控 Host | 被监控的对端 IPV4,IPV6 或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | | +| 采集器 | 配置此监控使用哪台采集器调度采集。 | +| 监控周期 | 监控周期性采集数据间隔时间,单位秒。 | +| 绑定标签 | 对监控资源的分类管理标签。 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 | + +### 采集指标 + +#### 指标集合:basic + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------|------|--------| +| hostname | 无 | 主机名称 | +| version | 无 | 操作系统版本 | + +#### 指标集合:cpu + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|-------------| +| info | 无 | CPU 型号 | +| cores | 核数 | CPU 内核数量 | +| interrupt | 个数 | CPU 中断数量 | +| load | 无 | CPU 最近的平均负载 | +| context_switch | 个数 | 当前上下文切换数量 | +| usage | % | CPU 使用率 | + +#### 指标集合:memory + +| 指标名称 | 指标单位 | 指标帮助描述 | +|---------------|------|----------| +| totalPhysical | Mb | 总物理内存容量 | +| freePhysical | Mb | 空闲物理内存容量 | +| totalVirtual | Mb | 总虚拟内存容量 | +| freeVirtual | Mb | 空闲虚拟内存容量 | + +#### 指标集合:disk + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------|------|---------| +| Model | 无 | 磁盘型号 | +| Size | Mb | 磁盘大小 | +| BytesPerSector | 字节 | 每个扇区字节数 | + +#### 指标集合:disk_free + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| Caption | 无 | 盘符 | +| FreeSpace | Mb | 可用空间大小 | +| Size | Mb | 总空间大小 | + +#### 指标集合:CPU 占用率前10的程序 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|----------| +| name | 无 | 进程名称 | +| id | 无 | 进程 id | +| cpu | 秒 | cpu 使用时间 | +| ws | Mb | 内存占用量 | + +#### 指标集合:内存占用率前10的程序 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|------|----------| +| name | 无 | 进程名称 | +| id | 无 | 进程 id | +| cpu | 秒 | cpu 使用时间 | +| ws | Mb | 内存占用量 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/xugu.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/xugu.md new file mode 100644 index 0000000000..63736d5ee9 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/xugu.md @@ -0,0 +1,62 @@ +--- +id: xugu +title: 监控:xuguDB数据库监控 +sidebar_label: xugu数据库 +keywords: [ 开源监控系统, 开源数据库监控, xugu数据库监控 ] +--- + +> 对xugu数据库的通用性能指标进行采集监控。支持xuguDB.v12。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | 数据库对外提供的端口,默认为5138。 | +| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 | +| 数据库名称 | 数据库实例名称,可选。 | +| 用户名 | 数据库连接用户 | +| 密码 | 数据库连接密码 | +| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:会话 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|--------------------------------|------|----------| +| Idle_Connection | 无 | 空闲连接 | +| Active_Connections | 无 | 活跃连接 | +| Connection_being_created | 无 | 正在创建的连接 | +| Null_Read_Connection | 无 | 空读连接 | +| Complete_data_input_connection | 无 | 完成数据输入连接 | +| Other | 无 | 其他 | + +#### 指标集合:内存 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|-------------| +| G_MEM | MB | 全局内存消耗 | +| CATA_MEM | MB | CATALOG内存消耗 | +| TRAN_MEM | MB | 事务内存消耗 | +| NET_MEM | MB | 用户连接用内存消耗 | +| TASK_MEM | MB | 任务线程消耗 | +| MSG_MEM | MB | 内部通讯消息内存消耗 | +| LOCK_MEM | MB | 局部锁内存消耗 | +| GLOCK_MEM | MB | 全局锁内存消耗 | +| DLCHK_MEM | MB | 死锁检测内存消耗 | +| MODI_MEM | MB | 变更日志内存消耗 | +| PROC_MEM | MB | 过程执行机内存消耗 | + +#### 指标集合:磁盘 信息 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------|------|-----------| +| DISK_READ_NUM | 次 | 数据块磁盘读取次数 | +| DISK_WRITE_NUM | 次 | 磁盘写入数据块次数 | +| DISK_READ_BYTES | MB | 磁盘读取字节数 | +| DISK_WRITE_BYTES | MB | 磁盘写入字节数 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/yarn.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/yarn.md new file mode 100644 index 0000000000..c0545a57af --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/yarn.md @@ -0,0 +1,83 @@ +--- +id: yarn +title: 监控:Apache Yarn监控 +sidebar_label: Apache Yarn +keywords: [大数据监控系统, Apache Yarn监控, 资源管理器监控] +--- + +> HertzBeat 对 Apache Yarn 节点监控指标进行监控。 + +**使用协议:HTTP** + +## 监控前操作 + +获取 Apache Yarn 的 HTTP 监控端口。 取值:`yarn.resourcemanager.webapp.address` + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|-------------------------------------| +| 目标Host | 被监控的对端IPV4,IPV6或域名。不带协议头。 | +| 端口 | Apache Yarn 的监控端口号,默认为8088。 | +| 查询超时时间 | 查询 Apache Yarn 的超时时间,单位毫秒,默认6000毫秒。 | +| 指标采集间隔 | 监控数据采集的时间间隔,单位秒,最小间隔为30秒。 | + +### 采集指标 + +#### 指标集合:ClusterMetrics + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------------------|------|------------------------------------| +| NumActiveNMs | | 当前存活的 NodeManager 个数 | +| NumDecommissionedNMs | | 当前 Decommissioned 的 NodeManager 个数 | +| NumDecommissioningNMs | | 集群正在下线的节点数 | +| NumLostNMs | | 集群丢失的节点数 | +| NumUnhealthyNMs | | 集群不健康的节点数 | + +#### 指标集合:JvmMetrics + +| 指标名称 | 指标单位 | 指标帮助描述 | +|----------------------|------|------------------| +| MemNonHeapCommittedM | MB | JVM当前非堆内存大小已提交大小 | +| MemNonHeapMaxM | MB | JVM非堆最大可用内存 | +| MemNonHeapUsedM | MB | JVM当前已使用的非堆内存大小 | +| MemHeapCommittedM | MB | JVM当前已使用堆内存大小 | +| MemHeapMaxM | MB | JVM堆内存最大可用内存 | +| MemHeapUsedM | MB | JVM当前已使用堆内存大小 | +| GcTimeMillis | | JVM GC时间 | +| GcCount | | JVM GC次数 | + +#### 指标集合:QueueMetrics + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------------------------------|------|-----------------------| +| queue | | 队列名称 | +| AllocatedVCores | | 分配的虚拟核数(已分配) | +| ReservedVCores | | 预留核数 | +| AvailableVCores | | 可用核数(尚未分配) | +| PendingVCores | | 阻塞调度核数 | +| AllocatedMB | MB | 已分配(已用)的内存大小 | +| AvailableMB | MB | 可用内存(尚未分配) | +| PendingMB | MB | 阻塞调度内存 | +| ReservedMB | MB | 预留内存 | +| AllocatedContainers | | 已分配(已用)的container数 | +| PendingContainers | | 阻塞调度container个数 | +| ReservedContainers | | 预留container数 | +| AggregateContainersAllocated | | 累积的container分配总数 | +| AggregateContainersReleased | | 累积的container释放总数 | +| AppsCompleted | | 完成的任务数 | +| AppsKilled | | 被杀掉的任务数 | +| AppsFailed | | 失败的任务数 | +| AppsPending | | 阻塞的任务数 | +| AppsRunning | | 提正在运行的任务数 | +| AppsSubmitted | | 提交过的任务数 | +| running_0 | | 运行时间小于60分钟的作业个数 | +| running_60 | | 运行时间介于60~300分钟的作业个数 | +| running_300 | | 运行时间介于300~1440分钟的作业个数 | +| running_1440 | | 运行时间大于1440分钟的作业个数 | + +#### 指标集合:runtime + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-----------|------|--------| +| StartTime | | 启动时间戳 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/zookeeper.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/zookeeper.md new file mode 100644 index 0000000000..41dc444a4d --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/zookeeper.md @@ -0,0 +1,119 @@ +--- +id: zookeeper +title: 监控:Zookeeper监控 +sidebar_label: Apache Zookeeper 监控 +keywords: [开源监控系统, Zookeeper监控监控] +--- + +> 对Zookeeper的通用性能指标进行采集监控 + +## 监控前操作 +> +> 监控 zookeeper 目前的实现方案使用的是 zookeeper 提供的四字命令 + netcat 来收集指标数据 +> 需要用户自己将zookeeper的四字命令加入白名单 + +1. 加白名单步骤 + + 1. 找到我们 zookeeper 的配置文件,一般是 `zoo.cfg` + + 2. 配置文件中加入以下命令 + + ```shell + # 将需要的命令添加到白名单中 + 4lw.commands.whitelist=stat, ruok, conf, isro + + # 将所有命令添加到白名单中 + 4lw.commands.whitelist=* + ``` + + 3. 重启服务 + + ```shell + zkServer.sh restart + ``` + +2. netcat 协议 + +目前实现方案需要我们部署zookeeper的linux服务器,安装netcat的命令环境 + +> netcat安装步骤 +> +> ```shell +> yum install -y nc +> ``` + +如果终端显示以下信息则说明安装成功 + +```shell +Complete! +``` + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|--------|------------------------------------------------------| +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 端口 | Zookeeper的Linux服务器SSH端口。 | +| 查询超时时间 | 设置Zookeeper连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 用户名 | Zookeeper所在Linux连接用户名 | +| 密码 | Zookeeper所在Linux连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + +#### 指标集合:conf + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|----------------------------------------| +| clientPort | 无 | 端口 | +| dataDir | 无 | 数据快照文件目录,默认10万次操作生成一次快照 | +| dataDirSize | kb | 数据快照文件大小 | +| dataLogDir | 无 | 事务日志文件目录,生产环境放在独立磁盘上 | +| dataLogSize | kb | 事务日志文件大小 | +| tickTime | ms | 服务器之间或客户端与服务器之间维持心跳的时间间隔 | +| minSessionTimeout | ms | 最小session超时时间 心跳时间x2 指定时间小于该时间默认使用此时间 | +| maxSessionTimeout | ms | 最大session超时时间 心跳时间x20 指定时间大于该时间默认使用此时间 | +| serverId | 无 | 服务器编号 | + +#### 指标集合:stats + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------------------|------|------------| +| zk_version | 无 | 服务器版本 | +| zk_server_state | 无 | 服务器角色 | +| zk_num_alive_connections | 个 | 连接数 | +| zk_avg_latency | ms | 平均延时 | +| zk_outstanding_requests | 个 | 堆积请求数 | +| zk_znode_count | 个 | znode结点数量 | +| zk_packets_sent | 个 | 发包数 | +| zk_packets_received | 个 | 收包数 | +| zk_watch_count | 个 | watch数量 | +| zk_max_file_descriptor_count | 个 | 最大文件描述符数量 | +| zk_approximate_data_size | kb | 数据大小 | +| zk_open_file_descriptor_count | 个 | 打开的文件描述符数量 | +| zk_max_latency | ms | 最大延时 | +| zk_ephemerals_count | 个 | 临时节点数 | +| zk_min_latency | ms | 最小延时 | + +#### 指标集合:envi + +| 指标名称 | 指标单位 | 指标帮助描述 | +|-------------------|------|-------------| +| zk_version | 无 | ZooKeeper版本 | +| hostname | 无 | 主机名 | +| java_version | 无 | Java版本 | +| java_vendor | 无 | Java供应商 | +| java_home | 无 | Java主目录 | +| java_class_path | 无 | Java类路径 | +| java_library_path | 无 | Java库路径 | +| java_io_tmpdir | 无 | Java临时目录 | +| java_compiler | 无 | Java编译器 | +| os_name | 无 | 操作系统名称 | +| os_arch | 无 | 操作系统架构 | +| os_version | 无 | 操作系统版本 | +| user_name | 无 | 用户名 | +| user_home | 无 | 用户主目录 | +| user_dir | 无 | 用户当前目录 | diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/zookeeper_sd.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/zookeeper_sd.md new file mode 100644 index 0000000000..efedfcd5d5 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/help/zookeeper_sd.md @@ -0,0 +1,122 @@ +--- +id: zookeeper_sd +title: 监控:Zookeeper服务发现监控 +sidebar_label: Zookeeper服务发现 +keywords: [开源监控系统, 开源服务发现监控, Zookeeper服务发现监控] +--- + +> HertzBeat 集成 Zookeeper,自动发现存储在 Zookeeper 节点中的服务实例并为发现的实例创建监控任务。 + +## 概述 + +Zookeeper 服务发现允许 HertzBeat 连接到您的 Zookeeper 服务器并自动发现存储在特定路径节点中的服务实例信息。这通常用于 Dubbo 和其他使用 Zookeeper 作为注册中心的 RPC 框架。当服务实例发生变化时,HertzBeat 将自动创建或删除相应的监控任务。 + +### 监控前操作 + +#### 部署 Zookeeper 服务器 + +1. 根据 [Zookeeper 官方文档](https://zookeeper.apache.org/doc/current/zookeeperStarted.html)部署 Zookeeper 服务器。 +2. 确保 Zookeeper 服务器可从 HertzBeat 访问。 +3. 使用 Zookeeper 客户端工具验证 Zookeeper 运行正常 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +|-----------------------|-----------------------------------------------------| +| 任务名称 | 标识此监控的名称,名称需要保证唯一性 | +| 服务发现地址 | Zookeeper 服务器连接地址。示例:`192.168.1.100:2181` 或 `zk1:2181,zk2:2181,zk3:2181`(集群模式) | +| 服务发现路径前缀 | Zookeeper 中用于服务发现的路径前缀。示例:`/dubbo` 或 `/services` | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 使用步骤 + +1. **创建服务发现监控** + - 在 HertzBeat Web 界面中,导航到 **监控** → **新增监控** + - 选择监控类型:**Zookeeper服务发现** + - 填写基本配置参数 + +2. **配置监控模板** + - 创建服务发现监控后,需要指定一个监控模板 + - 模板定义了为发现的服务实例创建什么类型的监控 + - 例如:如果发现的实例是 Dubbo 服务,可以选择端口监控模板 + - 常用模板类型:端口、HTTP、Ping 等 + +3. **自动发现** + - HertzBeat 会根据采集间隔定期查询 Zookeeper + - 为新发现的服务实例自动创建监控任务 + - 自动删除已消失服务实例的监控任务 + +4. **查看发现的实例** + - 在监控列表中,您可以看到所有自动创建的子监控任务 + - 每个子监控任务对应一个发现的服务实例 + +### 使用示例 + +#### 示例 1:Dubbo 服务发现 + +假设您有一个运行在 Zookeeper 中的 Dubbo 服务注册中心,地址为 `192.168.1.100:2181`,服务信息存储在 `/dubbo` 路径下。 + +配置示例: + +- **任务名称**:`Zookeeper-Dubbo-Discovery` +- **服务发现地址**:`192.168.1.100:2181` +- **服务发现路径前缀**:`/dubbo` +- **采集间隔**:`60` 秒 +- **监控模板**:选择 `端口` 监控 + +配置完成后: + +1. HertzBeat 连接到 Zookeeper +2. 获取 `/dubbo` 路径下的所有子节点 +3. 解析节点信息提取服务实例的主机和端口 +4. 为每个服务实例自动创建端口监控 + +#### 示例 2:自定义服务发现 + +如果您有一个使用 Zookeeper 的自定义服务注册机制,服务信息存储在 `/services` 路径下: + +- **服务发现地址**:`zk1:2181,zk2:2181,zk3:2181`(Zookeeper 集群) +- **服务发现路径前缀**:`/services` + +HertzBeat 将发现此路径下的所有服务实例。 + +### 注意事项 + +- **节点格式**:Zookeeper 服务发现期望子节点包含主机:端口信息 + - 示例节点名称格式:`192.168.1.101:8080` 或类似格式 +- **网络连通性**:确保 HertzBeat 可以访问 Zookeeper 服务器地址和端口(默认:2181) +- **监控模板**:服务发现仅发现服务实例地址,您需要配置合适的监控模板来实际监控这些实例 +- **采集间隔**:建议最小间隔为 60 秒,避免对 Zookeeper 造成过多请求 +- **路径前缀**:确保路径前缀正确,且 HertzBeat 有权限读取此路径下的节点 +- **集群模式**:支持 Zookeeper 集群模式,多个地址用逗号分隔 +- **实例命名**:自动创建的监控任务基于节点信息命名 + +### 采集指标 + +#### 指标集合:监控目标 + +| 指标名称 | 指标单位 | 指标帮助描述 | +|------|-------|---------------| +| 目标 | 无 | 发现的服务实例目标 | +| 主机 | 无 | 服务实例主机地址 | +| 端口 | 无 | 服务实例端口号 | + +### 适用场景 + +- **Dubbo 服务**:自动监控注册在 Zookeeper 中的 Dubbo 服务提供者和消费者 +- **RPC 框架**:监控使用 Zookeeper 作为注册中心的 RPC 服务 +- **自定义注册**:监控使用基于 Zookeeper 的自定义服务注册的服务 +- **分布式系统**:管理使用 Zookeeper 进行协调的分布式系统组件的监控 +- **服务治理**:集中管理 Zookeeper 服务生态中所有服务的监控 + +### 常见 Dubbo 路径结构 + +对于 Dubbo 服务,典型的 Zookeeper 路径结构包括: + +- `/dubbo/{serviceName}/providers` - 服务提供者地址 +- `/dubbo/{serviceName}/consumers` - 服务消费者地址 +- `/dubbo/{serviceName}/routers` - 路由规则 +- `/dubbo/{serviceName}/configurators` - 配置覆盖 + +使用 Zookeeper 服务发现配合 Dubbo 时,建议将路径前缀设置为 `/dubbo` 以发现所有 Dubbo 服务。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/introduce.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/introduce.md new file mode 100644 index 0000000000..62dc34b7ff --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/introduce.md @@ -0,0 +1,417 @@ +--- +id: introduce +title: Apache HertzBeat™ - 开源实时监控系统 +sidebar_label: 介绍 +slug: / +description: Apache HertzBeat 是 AI 驱动的无代理开源监控系统,支持指标、日志、告警和可观测性的自定义监控模板。 +--- + +**官网: [hertzbeat.apache.org](https://hertzbeat.apache.org)** + +## 什么是 Apache HertzBeat? + +Apache HertzBeat™ 是一款 AI 驱动的无代理开源实时监控系统。它统一了指标收集、日志聚合、告警分发和通知功能,无需安装代理即可运行。 + +**可观测性系统定义:** 可观测性系统收集、分析和可视化运营数据(指标、日志、链路追踪),用于监控基础设施和应用健康状况。 + +## 核心能力 + +HertzBeat 提供四个集成能力: + +1. **指标收集** - 监控 200+ 服务,包括数据库、操作系统、中间件和云基础设施 +2. **日志聚合** - 通过 OTLP 协议统一收集多日志源进行分析 +3. **告警管理** - 处理内部和外部告警,支持灵活的阈值规则 +4. **通知分发** - 通过邮件、Slack、Discord、Telegram、钉钉、微信等方式发送告警 + +**关键差异点:** 无需代理安装。HertzBeat 使用原生协议(HTTP、SNMP、JMX、SSH、JDBC)直接收集数据。 + +## HertzBeat vs 传统监控 + +| 特性 | HertzBeat | 传统代理式监控 | +|------|-----------|----------------| +| **代理安装** | 不需要 | 每台主机都需要 | +| **部署时间** | Docker 几分钟 | 代理部署需要数小时 | +| **监控类型** | 200+ 内置模板 | 有限的预定义类型 | +| **自定义** | YML 模板通过 UI | 需要代码更改 | +| **架构** | 统一平台 | 多个独立工具 | +| **部署** | 单个 Docker 命令 | 复杂的多组件部署 | + +## 平台架构 + +HertzBeat 统一四个监控功能: + +1. **收集** - 使用原生协议(HTTP、SNMP、JMX、SSH、JDBC、Prometheus)进行无代理数据收集 +2. **分析** - AI 驱动的模式检测和异常识别 +3. **告警** - 灵活的阈值规则,支持分组、收敛、静默和抑制 +4. **通知** - 多渠道分发(邮件、Discord、Slack、Telegram、钉钉、微信、短信、Webhook) + +**Prometheus 兼容性:** HertzBeat 支持 Prometheus 协议,可无缝集成现有的 Prometheus 导出器和指标。 + +## 关键特性 + +**基于模板的监控:** 通过编写 YML 配置文件创建自定义监控类型。无需编码即可监控新服务,如 Kubernetes 或 Docker。 + +**高性能集群:** 多采集器集群的水平扩展。自动任务调度和故障转移确保大规模下的可靠性。 + +**云边协同:** 监控隔离网络环境,边缘采集器向集中管理上报。 + +**状态页构建器:** 创建公共状态页(类似 GitHub Status),向用户传达服务可用性。 + +--- + +### 强大的监控模板 + +> 开始我们就说 HertzBeat 的特点是自定义监控能力,无需 Agent。在讨论这两点之前,我们先介绍下 HertzBeat 的不一样的监控模板。而正是因为这样的监控模板设计,才会有了后面的高级特性。 + +HertzBeat 自身并没有去创造一种采集数据协议让监控对端来适配它。而是充分使用了现有的生态,`SNMP协议`采集网络交换机路由器信息,`JMX规范`采集JAVA应用信息,`JDBC规范`采集数据集信息,`SSH`直连执行脚本获取回显信息,`HTTP+(JsonPath | prometheus等)`解析API接口信息,`IPMI协议`采集服务器信息等等。 +HertzBeat 使用这些已有的标准协议或规范,将他们抽象规范可配置化,最后使其都可以通过编写YML格式监控模板的形式,来制定模板使用这些协议来采集任何想要的指标数据。 + +![HertzBeat](/img/blog/multi-protocol.png) + +你相信用户只需在UI页面编写一个监控模板,点击保存后,就能立刻适配一款`K8s`或`Docker`等新的监控类型吗? + +![HertzBeat](/img/home/9.png) + +### 内置监控类型 + +**官方内置了大量的监控模板类型,方便用户直接在页面添加使用,一款监控类型对应一个YML监控模板** + +- [Website](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-website.yml), [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-port.yml), + [Http Api](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api.yml), [Ping Connect](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ping.yml), + [Jvm](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jvm.yml), [SiteMap](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-fullsite.yml), + [Ssl Certificate](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ssl_cert.yml), [SpringBoot2](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot2.yml), + [FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ftp.yml), [SpringBoot3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot3.yml), + [Udp Port](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-udp_port.yml), [Dns](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dns.yml), + [Pop3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-pop3.yml), [Ntp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ntp.yml), + [Api Code](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api_code.yml), [Smtp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-smtp.yml), + [Nginx](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nginx.yml) +- [Mysql](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mysql.yml), [PostgreSQL](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-postgresql.yml), + [MariaDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mariadb.yml), [Redis](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis.yml), + [ElasticSearch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-elasticsearch.yml), [SqlServer](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-sqlserver.yml), + [Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml), + [DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml), + [ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml), + [Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml), + [Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml), + [Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml) +- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml), + [CentOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-centos.yml), [Windows](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-windows.yml), + [EulerOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-euleros.yml), [Fedora CoreOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-coreos.yml), + [OpenSUSE](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opensuse.yml), [Rocky Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rockylinux.yml), + [Red Hat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redhat.yml), [FreeBSD](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-freebsd.yml), + [AlmaLinux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-almalinux.yml), [Debian Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-debian.yml) +- [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tomcat.yml), [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nacos.yml), + [Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-zookeeper.yml), [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rabbitmq.yml), + [Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-flink.yml), [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kafka.yml), + [ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-shenyu.yml), [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dynamic_tp.yml), + [Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jetty.yml), [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-activemq.yml), + [Spring Gateway](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spring_gateway.yml), [EMQX MQTT](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-emqx.yml), + [AirFlow](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-airflow.yml), [Hive](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hive.yml), + [Spark](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spark.yml), [Hadoop](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hadoop.yml) +- [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml), [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-docker.yml) +- [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-cisco_switch.yml), [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hpe_switch.yml), + [HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-huawei_switch.yml), [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tplink_switch.yml), + [H3cSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-h3c_switch.yml) +- 和更多自定义监控模板。 +- 通知支持 `Discord` `Slack` `Telegram` `邮件` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱`。 + +### 自定义能力 + +> 由前面的**监控模板**介绍,大概清楚了 `HertzBeat` 拥有的自定义功能。 +> 我们将每个监控类型都视为一个监控模板,不管是官方内置的还是后期用户自定义新增的。用户都可以方便的通过修改监控模板来新增修改删除监控指标。 +> 模板里面包含各个协议的使用配置,环境变量,指标转换,指标计算,单位转换,指标采集等一系列功能,帮助用户能采集到自己想要的监控指标。 + +![HertzBeat](/img/docs/custom-arch.png) + +### 无需 Agent + +> 对于使用过各种系统的用户来说,可能最麻烦头大的不过就是各种 `agent` 的安装部署调试升级了。 +> 每台主机得装个 `agent`,为了监控不同应用中间件可能还得装几个对应的 `agent`,监控数量上来了轻轻松松上千个,写个批量脚本可能会减轻点负担。 +> `agent` 的版本是否与主应用兼容, `agent` 与主应用的通讯调试, `agent` 的同步升级等等等等,这些全是头大的点。 + +`HertzBeat` 的原理就是使用不同的协议去直连对端系统,采用 `PULL` 的形式去拉取采集数据,无需用户在对端主机上部署安装 `Agent` | `Exporter` 等。 + +- 比如监控 `linux操作系统`, 在 `HertzBeat` 端输入IP端口账户密码或密钥即可。 +- 比如监控 `mysql数据库`, 在 `HertzBeat` 端输入IP端口账户密码即可。 +**密码等敏感信息全链路加密** + +### 高性能集群 + +> 当监控数量指数级上升,采集性能下降或者环境不稳定容易造成采集器单点故障时,这时我们的采集器集群就出场了。 + +- `HertzBeat` 支持部署采集器集群,多采集器集群横向扩展,指数级提高可监控数量与采集性能。 +- 监控任务在采集器集群中自调度,单采集器挂掉无感知故障迁移采集任务,新加入采集器节点自动调度分担采集压力。 +- 单机模式与集群模式相互切换部署非常方便,无需额外组件部署。 + +![HertzBeat](/img/docs/cluster-arch.png) + +### 云边协同 + +> 两地三中心,多云环境,多隔离网络,这些场景名词可能大家略有耳闻。当需要用一套监控系统统一监控不同隔离网络的IT资源时,这时我们的云边协同就来啦。 + +- `HertzBeat` 支持部署边缘采集器集群,与主 `HertzBeat` 服务云边协同提升采集能力。 + +在多个网络不相通的隔离网络中,在以往方案中我们需要在每个网络都部署一套监控系统,这导致数据不互通,管理部署维护都不方便。 +`HertzBeat` 提供的云边协同能力,可以在多个隔离网络部署边缘采集器,采集器在隔离网络内部进行监控任务采集,采集数据上报,由主服务统一调度管理展示。 + +![HertzBeat](/img/docs/cluster-arch.png) + +### 易用友好 + +- 集 **监控+告警+通知** All in one, 无需单独部署多个组件服务。 +- 全UI界面操作,不管是新增监控,修改监控模板,还是告警阈值通知,都可在WEB界面操作完成,无需要修改文件或脚本或重启。 +- 无需 Agent, 监控对端我们只需在WEB界面填写所需IP端口账户密码等参数即可。 +- 自定义友好,只需一个监控模板YML,自动生成对应监控类型的监控管理页面,数据图表页面,阈值配置等。 +- 阈值告警通知友好,基于表达式阈值配置,多种告警通知渠道,支持告警静默,时段标签告警级别过滤等。 + +### 完全开源 + +- Apache 基金会孵化器下开源项目,Gitee GVP,使用`Apache2`协议,由自由开放的开源社区主导维护的开源协作产品。 +- 无监控数量`License`,监控类型等伪开源限制。 +- 基于`Java+SpringBoot+TypeScript+Angular`主流技术栈构建,方便的二次开发。 +- 基于 HertzBeat 二次开发需保留版权。 + +**HertzBeat 已被 [CNCF云原生全景图](https://landscape.cncf.io/?view-mode=card&classify=category&sort-by=name&sort-direction=asc#observability-and-analysis--observability) 收录** + +![cncf](/img/home/cncf-landscape-left-logo.svg) + +--- +**`HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助开发者和团队快速搭建自有监控系统。** + +--- + +## 即刻体验一波 + +Docker 环境下运行一条命令即可:`docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` +浏览器访问 `http://localhost:1157` 默认账户:admin/hertzbeat + +### 登陆页面 + +- HertzBeat 的用户管理统一由配置文件 `sureness.yml` 维护,用户可以通过修改此文件来新增删除修改用户信息,用户角色权限等。默认账户密码 admin/hertzbeat + +![HertzBeat](/img/home/0.png) + +### 概览页面 + +- 全局概览页面,分类展示了当前监控大类别数量分布,用户可直观查看当前的监控类型与数量并点击跳转至对应监控类型进行维护管理。 +- 展示当前注册的采集器集群状态,包括采集器的上线状态,监控任务,启动时间,IP地址,名称等。 +- 下发展示了最近告警信息列表,告警级别分布情况等。 + +![HertzBeat](/img/home/1.png) + +### 监控中心 + +- 监控入口,支持对应用服务,数据库,操作系统,中间件,网络,自定义等监控的管理。 +- 以列表的形式展示当前已添加的监控,支持对监控的新增,修改,删除,取消监控,导入导出,批量管理等。 +- 支持标签分组,查询过滤,查看监控详情入口等。 + +内置支持的监控类型包括: + +- [Website](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-website.yml), [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-port.yml), + [Http Api](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api.yml), [Ping Connect](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ping.yml), + [Jvm](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jvm.yml), [SiteMap](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-fullsite.yml), + [Ssl Certificate](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ssl_cert.yml), [SpringBoot2](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot2.yml), + [FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ftp.yml), [SpringBoot3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot3.yml), + [Udp Port](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-udp_port.yml), [Dns](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dns.yml), + [Pop3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-pop3.yml), [Ntp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ntp.yml), + [Api Code](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api_code.yml), [Smtp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-smtp.yml), + [Nginx](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nginx.yml) +- [Mysql](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mysql.yml), [PostgreSQL](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-postgresql.yml), + [MariaDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mariadb.yml), [Redis](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis.yml), + [ElasticSearch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-elasticsearch.yml), [SqlServer](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-sqlserver.yml), + [Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml), + [DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml), + [ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml), + [Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml), + [Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml), + [Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml) +- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml), + [CentOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-centos.yml), [Windows](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-windows.yml), + [EulerOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-euleros.yml), [Fedora CoreOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-coreos.yml), + [OpenSUSE](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opensuse.yml), [Rocky Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rockylinux.yml), + [Red Hat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redhat.yml), [FreeBSD](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-freebsd.yml), + [AlmaLinux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-almalinux.yml), [Debian Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-debian.yml) +- [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tomcat.yml), [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nacos.yml), + [Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-zookeeper.yml), [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rabbitmq.yml), + [Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-flink.yml), [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kafka.yml), + [ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-shenyu.yml), [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dynamic_tp.yml), + [Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jetty.yml), [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-activemq.yml), + [Spring Gateway](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spring_gateway.yml), [EMQX MQTT](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-emqx.yml), + [AirFlow](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-airflow.yml), [Hive](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hive.yml), + [Spark](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spark.yml), [Hadoop](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hadoop.yml) +- [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml), [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-docker.yml) +- [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-cisco_switch.yml), [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hpe_switch.yml), + [HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-huawei_switch.yml), [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tplink_switch.yml), + [H3cSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-h3c_switch.yml) + +![HertzBeat](/img/home/2.png) + +### 新增监控 + +- 新增或修改指定监控类型的监控实例,配置对端监控的IP,端口等参数,设置采集周期,采集任务调度方式,支持提前探测可用性等。 +- 页面上配置的监控参数由对应监控类型的监控模板所定义,用户可以通过修改监控模板来修改页面配置参数。 +- 支持关联标签,用标签来管理监控分组,告警匹配等。 + +![HertzBeat](/img/home/10.png) + +### 监控详情 + +- 监控的数据详情页面,展示了当前监控的基本参数信息,监控指标数据信息。 +- 监控实时数据报告,以小卡片列表的形式展示了当前监控的所有指标实时值,用户可根据实时值参考配置告警阈值规则。 +- 监控历史数据报告,以趋势图表的形式展示了当前监控数值类型的指标的历史值,支持查询小时,天,月的历史数据,支持配置页面刷新时间。 +- ⚠️注意监控历史图表需配置外置时序数据库才能获取完整功能。 + +![HertzBeat](/img/home/3.png) + +![HertzBeat](/img/home/4.png) + +### 告警中心 + +- 已触发告警消息的管理展示页面,使用户有直观的展示当前告警情况。 +- 支持告警处理,告警标记未处理,告警删除清空等批量操作。 + +![HertzBeat](/img/home/7.png) + +### 阈值规则 + +- 告警阈值规则是 `HertzBeat` 的核心功能,用户可以通过阈值规则来配置告警的触发条件。 +- 阈值规则支持实时阈值和计划阈值,实时阈值可以在监控数据采集时直接触发告警,计划阈值支持 PromQL 等表达式在指定时间段内计算触发告警。 +- 阈值规则支持可视化页面配置或更高灵活性的表达式规则配置,支持配置触发次数,告警级别,通知模板,关联指定监控等。 + +![HertzBeat](/img/home/6.png) + +![HertzBeat](/img/docs/start/ssl_5.png) + +### 告警集成 + +- 统一管理不同第三方平台告警,集成接入第三方监控观测系统的告警消息,对其进行分组,收敛,抑制,静默,分发通知等。 + +![HertzBeat](/img/home/11.png) + +### 告警分组 + +- 分组收敛支持对指定分组标签的告警进行分组合并,对时间段的相同重复告警去重收敛。 +- 当阈值规则触发告警或外部告警上报后,会进入到分组收敛进行告警分组,告警去重,以避免大量告警消息导致告警风暴。 + +![HertzBeat](/img/home/12.png) + +### 告警抑制 + +- 告警抑制用于配置告警之间的抑制关系,比如同一实例下高级别告警抑制低级别告警。 +- 当某个告警发生时,可以抑制其他告警的产生。例如,当服务器宕机时,可以抑制该服务器上的所有告警。 + +![HertzBeat](/img/home/13.png) + +### 告警静默 + +- 当通过阈值规则判断触发告警后,会进入到告警静默,告警静默会根据规则对特定一次性时间段或周期性时候段的告警消息屏蔽静默,此时间段不发送告警消息。 +- 此应用场景如用户在系统维护中,无需发已知告警。用户在工作日时间才会接收告警消息,用户在晚上需避免打扰等。 +- 告警静默规则支持一次性时间段或周期性时间段,支持标签匹配和告警级别匹配。 + +![HertzBeat](/img/home/15.png) + +### 消息通知 + +- 消息通知功能是把告警消息通过不同媒体渠道通知给指定的接收人,告警消息及时触达。 +- 功能包含接收人信息管理和通知策略管理,接收人管理维护接收人信息以其通知方式信息,通知策略管理维护把哪些告警信息通知给哪些接收人的策略规则。 +- 通知方式支持 `邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` 等方式。 +- 通知策略支持标签匹配和告警级别匹配,方便的使不同标签的告警和告警级别分派给不同的接收处理人。 +- 支持通知模板,用户可以自定义通过模板内容格式来满足自己的个性化通知展示需求。 + +![HertzBeat](/img/home/16.png) + +![HertzBeat](/img/home/17.png) + +![HertzBeat](/img/home/8.png) + +![HertzBeat](/img/home/14.png) + +### 监控模板 + +- HertzBeat 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s` 或 `Docker` 等新的监控类型吗? +- 同理我们内置的所有监控类型(mysql,website,jvm,k8s)也一一映射为对应的监控模板,用户可以新增修改监控模板来自定义监控功能。 + +![HertzBeat](/img/home/9.png) + +### 采集集群 + +- 用户可以通过配置采集器集群来实现对大规模监控任务的分布式采集。 +- 采集器集群支持多节点部署,支持自动负载均衡,自动故障转移等。 +- 支持多隔离网络的统一管理,云边协同。 + +![HertzBeat](/img/home/18.png) + +### 状态页面 + +- 基于 HertzBeat 快速构建自己产品的对外状态页,轻松向用户传达您产品服务的实时状态。例如 Github 提供的服务状态页 [https://www.githubstatus.com](https://www.githubstatus.com)。 +- 支持状态页组件状态和监控状态联动同步,故障事件维护管理机制等。提高您的透明度,专业度和用户信任,降低沟通成本。 + +![HertzBeat](/img/home/19.png) + +![HertzBeat](/img/home/status.png) + +--- + +## 常见问题 + +### HertzBeat 用于什么? + +HertzBeat 监控 IT 基础设施,包括服务器、数据库、应用程序、网络和云服务。它收集指标、聚合日志、触发告警并发送通知,实现运营可观测性。 + +### HertzBeat 需要安装代理吗? + +不需要。HertzBeat 使用无代理监控,通过原生协议(HTTP、SNMP、JMX、SSH、JDBC)收集数据。只需在 Web 界面提供 IP、端口和凭据。 + +### 如何安装 HertzBeat? + +运行单个 Docker 命令:`docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` + +访问 `http://localhost:1157`, 默认账号:admin/hertzbeat + +### HertzBeat 可以监控哪些系统? + +HertzBeat 监控 200+ 服务,包括: + +- 数据库:MySQL、PostgreSQL、MongoDB、Redis、Oracle、SQL Server +- 操作系统:Linux、Windows、Unix 变体 +- 中间件:Tomcat、Kafka、Zookeeper、RabbitMQ、Nginx +- 云原生:Kubernetes、Docker +- 网络:思科、华为、HPE 交换机 + +### 可以创建自定义监控模板吗? + +可以。通过 Web UI 创建 YML 模板监控任何服务。模板定义指标、收集协议和阈值,无需编码。 + +### HertzBeat 兼容 Prometheus 吗? + +兼容。HertzBeat 支持 Prometheus 协议,可从 Prometheus 导出器收集指标。 + +### HertzBeat 与 Prometheus + Grafana 相比如何? + +HertzBeat 提供统一平台,包含收集、告警和通知。Prometheus + Grafana 需要独立的告警组件(Alertmanager),且缺乏内置的多渠道通知。 + +### 支持哪些通知渠道? + +邮件、Discord、Slack、Telegram、钉钉、微信、飞书、短信、Webhook。 + +### HertzBeat 能否大规模部署? + +可以。部署采集器集群实现水平扩展。采集器自动负载均衡任务并提供故障转移,确保高可用性。 + +### HertzBeat 使用什么许可证? + +Apache License 2.0。HertzBeat 完全开源,无监控数量或类型限制。 + +## 快速开始总结 + +1. **安装:** `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` +2. **访问:** `http://localhost:1157` (admin/hertzbeat) +3. **监控:** 通过 Web UI 添加服务,提供 IP、端口、凭据 +4. **告警:** 配置阈值规则和通知渠道 +5. **扩展:** 按需部署采集器集群 + +--- + +**Github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +**官网: [https://hertzbeat.apache.org/](https://hertzbeat.apache.org/)** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/others/design.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/others/design.md new file mode 100644 index 0000000000..49a706b4ef --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/others/design.md @@ -0,0 +1,9 @@ +--- +id: design +title: 设计文档 +sidebar_label: 设计文档 +--- + +## HertzBeat 架构 + +![architecture](/img/docs/hertzbeat-arch.svg) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/others/resource.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/others/resource.md new file mode 100644 index 0000000000..910499fe86 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/others/resource.md @@ -0,0 +1,19 @@ +--- +id: resource +title: 相关资源 +sidebar_label: 相关资源 +--- + +## 图标资源 + +### HertzBeat LOGO + +![logo](/img/hertzbeat-logo.svg) + +Download: [SVG](/img/hertzbeat-logo.svg) [PNG](/img/hertzbeat-logo.png) + +### HertzBeat Brand LOGO + +![logo](/img/hertzbeat-brand.svg) + +Download: [SVG](/img/hertzbeat-brand.svg) [PNG](/img/hertzbeat-brand.png) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/account-modify.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/account-modify.md new file mode 100644 index 0000000000..24f82b02e7 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/account-modify.md @@ -0,0 +1,188 @@ +--- +id: account-modify +title: 配置修改账户密码和加密密钥 +sidebar_label: 更新账户和密钥 +--- + +## 更新账户 + +Apache HertzBeat™ 默认内置三个用户账户,分别为 admin/hertzbeat tom/hertzbeat guest/hertzbeat +若需要新增删除修改账户或密码,可以通过配置 `sureness.yml` 实现,若无此需求可忽略此步骤 +修改位于安装目录下的 `/hertzbeat/config/sureness.yml` 的配置文件,docker环境目录为`opt/hertzbeat/config/sureness.yml`,建议提前挂载映射 +配置文件内容参考如下 + +```yaml + +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] + # OpenAPI 文档包含全部路由、参数与数据模型,等同于一份接口地图, + # 因此按普通管理类资源收敛到 admin,不再匿名开放 + - /v3/api-docs/**===get===[admin] + - /v3/api-docs.yaml===get===[admin] + - /v3/api-docs.yaml/**===get===[admin] + - /v2/api-docs/**===get===[admin] + - /swagger-resources/**===get===[admin] + +# 需要被过滤保护的资源,不认证鉴权直接访问 +# /api/v1/source3===get 表示 /api/v1/source3===get 可以被任何人访问 无需登录认证鉴权 +excludedResource: + - /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 + # h2 database + - /h2-console/**===* + +# 用户账户信息 +# 下面有 admin tom lili 三个账户 +# eg: admin 拥有[admin]角色,密码为 hertzbeat +# eg: tom 拥有[user],密码为 hertzbeat +# eg: lili 拥有[guest],明文密码为 hertzbeat, 加盐 123 后密码为 94C6B34E7A199A9F9D4E1F208093B489 +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: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] +``` + +修改`sureness.yml`的如下**部分参数**:**[注意⚠️sureness配置的其它默认参数需保留]** + +```yaml + +# 用户账户信息 +# 下面有 admin tom lili 三个账户 +# eg: admin 拥有[admin,user]角色,密码为hertzbeat +# eg: tom 拥有[user],密码为hertzbeat +# eg: lili 拥有[guest],明文密码为 hertzbeat, 加盐 123 后密码为 94C6B34E7A199A9F9D4E1F208093B489 +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: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] +``` + +## OpenAPI 文档与 Swagger UI + +生成的 OpenAPI 文档会列出全部路由、HTTP 方法、参数名与类型,以及所有请求和响应模型,等同于一份现成的攻击面地图,因此 HertzBeat 默认不对外提供:随包发布的 `application.yml` 中 `springdoc.api-docs.enabled` 与 `springdoc.swagger-ui.enabled` 均为 `false`,此时 `/v3/api-docs` 和 `/swagger-ui/index.html` 返回 404。 + +如果确实需要该文档,更新 `config` 目录下的 `application.yml` 文件显式开启: + +```yaml +springdoc: + api-docs: + enabled: true + swagger-ui: + enabled: true +``` + +开启之后,文档接口仍然被上面的 `resourceRole` 规则收敛在 `admin` 角色。请先以管理员身份登录 HertzBeat Web 应用,再打开 `/swagger-ui/index.html`;Swagger UI 会在同源的文档请求与 try-it-out 请求中附带 HertzBeat 保存的令牌,页面不会再要求任何输入。 + +没有该会话时文档同样不会泄露,但页面并非静默失败:`/swagger-ui/index.html` 是静态文件,仍然可以打开,而它请求 `/v3/api-docs/swagger-config` 会得到 `401` 与 `WWW-Authenticate: Digest` 挑战,浏览器因此弹出用户名密码框。在该弹框中输入管理员账号可以正常加载文档;没有 `admin` 角色的账号则会收到 `403`。 + +也可以直接携带管理员令牌获取文档: + +```shell +curl -H "Authorization: Bearer $YOUR_ADMIN_TOKEN" http://localhost:1157/v3/api-docs +``` + +> ⚠️ 不要把 OpenAPI 路径放回 `excludedResource`,否则完整接口文档会再次匿名开放。 + +## 更新安全密钥 + +> 此密钥为账户安全加密管理的密钥,需要更新为相同长度的你自定义密钥串。 + +更新 `config` 目录下的 `application.yml` 文件,修改 `sureness.jwt.secret` 参数为你自定义的相同长度的密钥串。 + +```yaml +sureness: + jwt: + secret: 'CyaFv0bwq2Eik0jdrKUtsA6bx4sDJeFV643R + LnfKefTjsIfJLBa2YkhEqEGtcHDTNe4CU6+9 + 8tVt4bisXQ13rbN0oxhUZR73M6EByXIO+SV5 + dKhaX0csgOCTlCxq20yhmUea6H6JIpSE2Rwp' +``` + +**重启 HertzBeat 浏览器访问 [http://ip:1157/](http://ip:1157/) 即可探索使用 HertzBeat** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/baota-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/baota-deploy.md new file mode 100644 index 0000000000..0bbfa27cf5 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/baota-deploy.md @@ -0,0 +1,44 @@ +--- +id: baota-deploy +title: 使用 宝塔面板 部署 HertzBeat +sidebar_label: 基于宝塔面板部署 +--- + +Apache HertzBeat™ 支持在宝塔面板的 `Docker` 应用商店一键部署。 + +## 前提 + +安装宝塔面板,前往[宝塔面板](https://www.bt.cn/new/index.html)官网,选择对应的脚本下载安装。 + +## 部署 + +1. 登录宝塔面板,在菜单栏中点击 `Docker`,根据提示安装 `Docker` 和 `Docker Compose` 服务。 + + > 在宝塔面板安装 Docker 服务,若已有则跳过。 + + ![HertzBeat](/img/docs/start/install-to-baota-1.png) + +2. 在`Docker-应用商店`中找到 `HertzBeat`,点击`安装` + + ![HertzBeat](/img/docs/start/install-to-baota-2.png) + +3. 设置域名等基本信息,点击`确定` + + ![HertzBeat](/img/docs/start/install-to-baota-3.png) + + - 名称:应用名称,默认`HertzBeat-随机字符` + - 版本选择:默认`latest` + - 域名:如需通过域名直接访问,请在此配置域名并将域名解析到服务器 + - 允许外部访问:如您需通过`IP+Port`直接访问,请勾选,如您已经设置了域名,请不要勾选此处 + - 端口:默认`1157`,可自行修改 + +4. 提交后面板会自动进行应用初始化,大概需要`1-3`分钟,初始化完成后即可访问。 + +## 访问 HertzBeat + +- 如您设置了域名,请直接在浏览器地址栏中输入域名访问,如`http://demo.hertzbeat.apache.org`,即可访问 `HertzBeat` 控制台。 +- 如您选择了通过`IP+Port`访问,请在浏览器地址栏中输入域名访问 `http://<宝塔面板IP>:1157`,即可访问 `HertzBeat` 控制台。 + +![HertzBeat](/img/home/0.png) + +> 默认用户名`admin`默认密码`hertzbeat` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/custom-config.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/custom-config.md new file mode 100644 index 0000000000..ed18b3af3f --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/custom-config.md @@ -0,0 +1,48 @@ +--- +id: custom-config +title: 常见参数配置 +sidebar_label: 常见参数配置 +--- + +这里描述了如何配置告警自定义参数等。 + +**`hertzbeat`的配置文件`application.yml`** + +配置HertzBeat的配置文件 + +- 修改位于 `hertzbeat/config/application.yml` 的配置文件 +- **Docker部署:** ⚠️docker容器方式需要将 `application.yml` 文件挂载到主机本地 +- **安装包方式:** 解压修改位于 `hertzbeat/config/application.yml` 的配置文件即可 + +## 0. 虚拟线程配置 + +虚拟线程的默认值、调优建议、回滚方式,以及 Docker/安装包对应的配置文件位置,已经单独整理到文档页: + +- [虚拟线程配置说明](./virtual-thread) + +## 1. 配置告警自定义参数 + +```yaml +alerter: + # 自定义控制台地址 + console-url: https://console.tancloud.io +``` + +## 2. 使用外置redis代替内存存储实时指标数据 + +> 默认我们的指标实时数据存储在内存中,可以配置如下来使用redis代替内存存储。 + +注意⚠️ `memory.enabled: false, redis.enabled: true` + +```yaml +warehouse: + store: + memory: + enabled: false + init-size: 1024 + redis: + enabled: true + host: 127.0.0.1 + port: 6379 + password: 123456 +``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/docker-compose-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/docker-compose-deploy.md new file mode 100644 index 0000000000..021cb28003 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/docker-compose-deploy.md @@ -0,0 +1,82 @@ +--- +id: docker-compose-deploy +title: 通过 Docker Compose 方式安装 HertzBeat +sidebar_label: Docker Compose方式安装 +--- + +:::tip +推荐使用 Docker Compose 方式一键部署 HertzBeat 及其依赖服务。 +::: + +:::note +需您的环境中已经拥有 Docker 环境 和 Docker Compose 环境 ,若未安装请参考 [Docker官网文档](https://docs.docker.com/compose/install/) +执行命令 `docker compose version` 检查是否拥有 Docker Compose 环境。 +::: + +1. 下载启动脚本包 + + 从 [下载地址](/docs/download) 下载安装脚本包 `apache-hertzbeat-xxx-docker-compose.tar.gz` + +2. 选择使用 HertzBeat + PostgreSQL + VictoriaMetrics 方案 + + :::tip + + - `apache-hertzbeat-${version}-docker-compose.tar.gz` 解压后包含多个部署方案,这里我们推荐选择 `hertzbeat-postgresql-victoria-metrics` 方案。 + - 其它部署方式请详细阅读各个部署方案的 README.md 文件, MySQL 方案需要自行准备 MySQL 驱动包。 + + ::: + + - 解压脚本包 + + ```shell + tar zxvf apache-hertzbeat-${version}-docker-compose.tar.gz + ``` + + - 进入解压目录, 选择 `HertzBeat + PostgreSQL + VictoriaMetrics` 一键部署 + + ```shell + cd apache-hertzbeat-${version}-docker-compose + cd hertzbeat-postgresql-victoria-metrics + ``` + + - 创建 `.env` 文件并设置数据库密码 + + > `POSTGRES_PASSWORD` 为必填项,未设置时 `docker compose up` 会直接报错退出。 + + ```shell + cp .env.example .env + # 编辑 .env,将 POSTGRES_PASSWORD 设置为你自己的强密码 + ``` + + - 一键启动 + + > 在 `hertzbeat-postgresql-victoria-metrics` 目录下执行以下命令 + + ```shell + docker-compose up -d + ``` + + - 查看服务状态 + + > 查看各个容器的运行状态,up 为正常运行状态 + + ```shell + docker-compose ps + ``` + +3. 开始探索 HertzBeat + 浏览器访问 [http://localhost:1157/](http://localhost:1157/) 即可开始探索使用,默认账户密码 admin/hertzbeat。 + + :::note + + 快速启动方案默认将所有宿主机端口绑定到 `127.0.0.1`,因此 Web 页面只能在运行 Docker 的本机访问。如需从其他主机访问,请在 `.env` 中把 `HERTZBEAT_BIND_ADDRESS` 设置为其他主机可达的地址(建议通过 TLS 反向代理开放,而不是直接使用 `0.0.0.0` 这类通配地址),然后执行 `docker compose config` 检查最终端口映射,再重新执行 `docker compose up -d`。该变量同时会开放 `1158` 供远程 Collector 连接;`14317`(OTLP/gRPC)由独立的 `HERTZBEAT_OTLP_BIND_ADDRESS` 控制。详见部署方案目录下的 `README.md`。 + + ::: + +**HAVE FUN** + +---- + +## 部署常见问题 + +**最多的问题就是容器网络问题,请先提前排查** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/docker-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/docker-deploy.md new file mode 100644 index 0000000000..061f4eb852 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/docker-deploy.md @@ -0,0 +1,156 @@ +--- +id: docker-deploy +title: 通过 Docker 方式安装 HertzBeat +sidebar_label: Docker方式安装 +--- + +:::tip +使用 Docker 方式一键启动 HertzBeat 最小可用环境,无外部服务依赖,方便快速体验。 +但不建议在生产环境中使用,生产环境建议使用 Docker Compose 方式部署, 安装包方式部署, Kubernetes 方式部署。 +::: + +:::note +需您的环境中已经拥有 Docker 环境,若未安装请参考 [Docker官网文档](https://docs.docker.com/get-docker/) +::: + +## 部署 HertzBeat Server + +1. 执行以下命令 + + ```shell + $ docker run -d -p 1157:1157 -p 1158:1158 \ + -e HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=auto \ + -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 \ + --restart=always \ + --name hertzbeat apache/hertzbeat + ``` + + > 命令参数详解 + + - `docker run -d` : 通过 Docker 后台运行容器 + - `-p 1157:1157 -p 1158:1158` : 映射容器端口到主机端口(前面是宿主机的端口号,后面是容器的端口号)。1157是页面端口,1158是集群端口。 + - `-v $(pwd)/data:/opt/hertzbeat/data` : (可选,数据持久化) 重要,挂载数据库文件到本地主机,保证数据不会因为容器的创建删除而丢失 + - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (可选) 挂载日志文件到本地主机方便查看 + - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (可选) 挂载配置文件到容器中(请确保本地已有此文件)。[下载源](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (可选) 挂载账户配置文件到容器中(请确保本地已有此文件)。[下载源](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) + - `-v $(pwd)/ext-lib:/opt/hertzbeat/ext-lib` : (可选) 在你需要运行时 JDBC 扩展时挂载外部第三方 JAR 包。`mysql-jdbc` 只在你明确希望 MySQL 兼容监控继续走 JDBC 时才需要;Oracle 监控仍然需要 [oracle-jdbc](https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar) 和 [oracle-i18n](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar)。 + - `-e HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=auto` : (可选) 覆盖主程序内置采集器的 MySQL 兼容监控查询链路。可选值:`auto`、`jdbc`、`r2dbc`。 + - `--name hertzbeat` : (可选) 命名容器名称为 hertzbeat + - `--restart=always` : (可选) 配置容器自动重启。 + - `apache/hertzbeat` : 使用[官方应用镜像](https://hub.docker.com/r/apache/hertzbeat)来启动容器, 若网络超时可用`quay.io/tancloud/hertzbeat`代替。 + + :::tip + + - 标记为可选的参数,非必填项,若不需要则删除。 + - 此将容器的 1157,1158 端口映射到宿主机的 1157,1158 端口上。若宿主机该端口已被占用,则需修改主机映射端口。 + - 挂载文件时,前面参数为你自定义本地文件地址,后面参数为容器内文件地址。挂载时请确保你本地已有此文件。 + - 可执行```docker update --restart=always hertzbeat```配置容器自动重启。 + + ::: + +2. 开始探索 HertzBeat + 浏览器访问 [http://ip:1157/](http://ip:1157/) 即可开始探索使用HertzBeat,默认账户密码 admin/hertzbeat。 + +### 部署 HertzBeat Collector 集群(可选) + +:::note +HertzBeat Collector 是一个轻量级的数据采集器,用于采集并将数据发送到 HertzBeat Server。 +通过部署多个 HertzBeat Collector 可以实现数据的高可用,负载均衡和云边协同。 +::: + +![HertzBeat](/img/docs/cluster-arch.png) + +1. 执行以下命令 + + ```shell + $ docker run -d \ + -e IDENTITY=custom-collector-name \ + -e MODE=public \ + -e MANAGER_HOST=127.0.0.1 \ + -e MANAGER_PORT=1158 \ + -e HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=auto \ + --name hertzbeat-collector apache/hertzbeat-collector + ``` + + > 命令参数详解 + + - `docker run -d` : 通过 Docker 后台运行容器 + - `-e IDENTITY=custom-collector-name` : (可选) 设置采集器的唯一标识名称。注意多采集器时名称需保证唯一性。 + - `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 + - `-e MANAGER_HOST=127.0.0.1` : 重要, 配置连接的 HertzBeat Server 地址,127.0.0.1 需替换为 HertzBeat Server 对外 IP 地址。 + - `-e MANAGER_PORT=1158` : (可选) 配置连接的 HertzBeat Server 端口,默认 1158. + - `-e HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=auto` : (可选) 覆盖 MySQL 兼容监控查询链路。可选值:`auto`、`jdbc`、`r2dbc`。 + - `-v $(pwd)/ext-lib:/opt/hertzbeat-collector/ext-lib` : (可选) 挂载外部 JDBC 驱动到采集器。 + - `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (可选)挂载日志文件到本地主机方便查看 + - `--name hertzbeat-collector` : 命名容器名称为 hertzbeat-collector + - `apache/hertzbeat-collector` : 使用[官方应用镜像](https://hub.docker.com/r/apache/hertzbeat-collector)来启动容器, 若网络超时可用`quay.io/tancloud/hertzbeat-collector`代替。 + + :::tip + + - `MANAGER_HOST=127.0.0.1` 中的 `127.0.0.1` 需被替换为 HertzBeat Server 对外 IP 地址。 + - 标记为可选的参数,非必填项,若不需要则删除。 + - 挂载文件时,前面参数为你自定义本地文件地址,后面参数为容器内文件地址。挂载时请确保你本地已有此文件。 + - 采集器容器会将 `/opt/hertzbeat-collector` 保持为稳定根路径,升级版本时无需调整 `logs` 和 `ext-lib` 的挂载目标。 + - 可执行```docker update --restart=always hertzbeat-collector```配置容器自动重启。 + + ::: + +2. 开始探索 HertzBeat Collector + 浏览器访问 [http://ip:1157/](http://ip:1157/) 即可开始探索使用,默认账户密码 admin/hertzbeat。 + +**HAVE FUN** + +---- + +### Docker 方式部署常见问题 + +**最多的问题就是网络问题,请先提前排查** + +1. MYSQL,TDENGINE或IotDB和HertzBeat都Docker部署在同一主机上,HertzBeat使用localhost或127.0.0.1连接数据库失败 + 此问题本质为Docker容器访问宿主机端口连接失败,由于docker默认网络模式为Bridge模式,其通过localhost访问不到宿主机。 + + > 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP + > 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` + +2. 按照流程部署,访问 [http://ip:1157/](http://ip:1157/) 无界面 + 请参考下面几点排查问题: + + > 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 + > 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 + +3. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] + + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - + > 安装初始化此时序数据库 + +4. 安装配置了时序数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] + + > 请检查配置的时许数据库参数是否正确 + > 时序数据库对应的 enable 是否设置为true + > 注意⚠️若hertzbeat和外置数据库都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 + +5. application.yml 是干什么用的 + + > 此文件是HertzBeat的配置文件,用于配置HertzBeat的各种参数,如数据库连接信息,时序数据库配置等。 + + 下载 `application.yml` 文件到主机目录下,例如: $(pwd)/application.yml + 下载源 [github/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + + - 若需使用邮件发送告警,需替换 `application.yml` 里面的邮件服务器参数 + - 若需使用外置Mysql数据库替换内置H2数据库,需替换`application.yml`里面的`spring.datasource`参数 具体步骤参见 [H2数据库切换为MYSQL](mysql-change)) + - 若需使用时序数据库TDengine来存储指标数据,需替换`application.yml`里面的`warehouse.store.victoria-metrics`参数 具体步骤参见 [使用victoria-metrics存储指标数据](victoria-metrics-init) + +6. sureness.yml 是干什么用的 + + > 此文件是HertzBeat的用户配置文件,用于配置HertzBeat的用户信息,如账户密码等。 + + HertzBeat默认内置三个用户账户,分别为 admin/hertzbeat tom/hertzbeat guest/hertzbeat + 若需要新增删除修改账户或密码,可以通过配置 `sureness.yml` 实现,若无此需求可忽略此步骤 + 下载 `sureness.yml` 文件到主机目录下,例如: $(pwd)/sureness.yml + 下载源 [github/script/sureness.yml](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) + 具体修改步骤参考 [配置修改账户密码](account-modify) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/doris-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/doris-init.md new file mode 100644 index 0000000000..3db64efe50 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/doris-init.md @@ -0,0 +1,223 @@ +--- +id: doris-init +title: 依赖时序数据库服务 Doris 安装初始化(可选) +sidebar_label: 指标/日志数据存储 Doris +--- + +Apache HertzBeat™ 的历史数据存储依赖时序数据库,任选其一安装初始化即可,也可不安装(注意⚠️但强烈建议生产环境配置)。 + +> 我们推荐使用并长期支持 Greptime 作为存储。 + +Apache Doris 是一款面向实时分析场景的 MPP 数据库。在 HertzBeat 中,Doris 可用于同时存储: + +- 指标历史数据(`hzb_history`) +- 日志数据(`hzb_log`) + +**⚠️ 若不配置时序数据库,则只会保留最近一小时历史数据。** + +> 如果您已有 Doris 环境,可直接跳到 YML 配置步骤。 + +## 安装 Doris(可选) + +你可以通过安装包或 Docker 部署 Doris。生产环境建议参考官方部署文档: + +- Doris 官方文档:[Quick Start](https://doris.apache.org/docs/4.x/gettingStarted/quick-start/) + +对 HertzBeat 接入来说,至少需要保证: + +- FE MySQL 服务端口可访问(默认 `9030`) +- FE HTTP 服务端口可访问(默认 `8030`) + +### 注意,必须添加 MYSQL jdbc 驱动 jar + +- 下载 MYSQL jdbc driver jar,例如 mysql-connector-java-8.1.0.jar。[https://mvnrepository.com/artifact/com.mysql/mysql-connector-j/8.1.0](https://mvnrepository.com/artifact/com.mysql/mysql-connector-j/8.1.0) +- 将此 jar 包拷贝放入 HertzBeat 的安装目录下的 `ext-lib` 目录下。 +- 重启 HertzBeat 服务。 + +### 前置检查 + +1. Doris FE、BE 节点状态正常。 +2. HertzBeat 到 Doris 网络可达: + - FE MySQL 端口(默认 `9030`),用于建库建表、查询 + - FE HTTP 端口(默认 `8030`),用于 Stream Load 写入 +3. 配置的 Doris 用户具有建库建表、写入、查询权限。 + +### 在 HertzBeat `application.yml` 中配置 Doris + +1. 修改 `hertzbeat/config/application.yml`。 + + Docker 容器部署需将配置文件挂载到主机本地,安装包部署直接修改解压目录下配置文件即可。 + +2. 配置 `warehouse.store.doris`(生产环境推荐配置使用 Stream Load 模式): + +```yaml +warehouse: + store: + doris: + enabled: true + # Doris FE MySQL 连接地址 + url: jdbc:mysql://127.0.0.1:9030 + username: root + password: + + table-config: + # 开启动态分区(用于自动过期) + enable-partition: true + # 支持 HOUR / DAY / MONTH + partition-time-unit: DAY + # 历史分区保留数量 + partition-retention-days: 30 + # 预创建未来分区数量 + partition-future-days: 3 + buckets: 8 + replication-num: 3 + + pool-config: + minimum-idle: 5 + maximum-pool-size: 20 + connection-timeout: 30000 + + write-config: + # 生产环境强烈推荐使用 stream 模式以获得高吞吐性能 + write-mode: stream + batch-size: 1000 + flush-interval: 5 + stream-load-config: + # Doris FE HTTP 端口 + http-port: ":8030" + timeout: 60 + max-bytes-per-batch: 10485760 + # 复杂网络环境(K8s/跨域)需配置:direct / public / private + redirect-policy: "" +``` + +### 切换到 Stream Load 模式 + +#### 生产环境推荐配置 + +在生产环境部署时,**强烈推荐使用 Stream Load 模式** 以保证大规模写入性能。Stream Load 直接写入 Doris 存储层,相比 JDBC 模式提供更高的吞吐量提升。 + +#### 切换前的前置检查 + +1. **网络可达性** + - 确保 HertzBeat 能访问 Doris FE HTTP 端口(默认 `8030`) + - 若无法直连,需在 Doris 侧配置 BE 公网/内网地址标签 + +2. **复杂网络场景的特殊配置** + + 在 K8s、跨域、负载均衡等环境下,Stream Load 的重定向机制需要特别注意: + - FE 会将请求重定向到某个可用的 BE,该 BE 地址必须对 HertzBeat 可达 + - 通过配置 `redirect-policy` 来控制 FE 返回的 BE 地址类型: + - `direct`:直连 BE IP + - `public`:使用公网地址(云环境) + - `private`:使用内网地址(私有网络) + - 留空则使用 Doris 默认策略 + + 参考官方文档:[Doris Stream Load 复杂网络原理](https://doris.apache.org/zh-CN/docs/4.x/data-operate/import/load-internals/stream-load-in-complex-network) + +#### 切换步骤 + +1. **修改配置文件** + + 编辑 `hertzbeat/config/application.yml`,将 `write-mode` 改为 `stream`: + + ```yaml + warehouse: + store: + doris: + write-config: + write-mode: stream # 改这里:从 jdbc 改为 stream + stream-load-config: + http-port: ":8030" + timeout: 60 + max-bytes-per-batch: 10485760 + redirect-policy: "" # 复杂网络需配置这里 + ``` + +2. **重启 HertzBeat 服务** + +3. **验证切换成功** + +查看 HertzBeat 日志,应出现 Stream Load 相关日志 + +#### 常见切换问题 + +**Q: 切换后需要重建表吗?** + +A: 不需要。Stream Load 和 JDBC 模式使用同一套表结构,数据完全兼容。 + +**Q: 从 JDBC 切换到 Stream Load 会丢数据吗?** + +A: 不会。两种模式的写入是独立的,历史数据保持不变。 + +**Q: Stream Load 失败了怎么回退?** + +A: 如果流处理失败了会自动尝试使用jdbc模式进行回退写入 + +**Q: 跨网络环境配置了 redirect-policy 仍然超时?** + +A: 可能原因: + +- 在当前 `redirect-policy` 设置下,返回的 BE 地址仍不可达 +- 尝试其他 `redirect-policy` 值(`direct` / `public` / `private`) +- 联系 Doris 管理员确认 BE 节点的地址标签配置是否正确 + +### 参数说明 + +| 参数 | 说明 | +| --- | --- | +| `enabled` | 是否启用 Doris 存储 | +| `url` | Doris FE MySQL JDBC 地址 | +| `table-config.enable-partition` | 是否启用动态分区与自动过期 | +| `table-config.partition-time-unit` | 分区时间粒度:`HOUR` / `DAY` / `MONTH` | +| `table-config.partition-retention-days` | 历史分区保留数量 | +| `table-config.partition-future-days` | 未来分区预创建数量 | +| `table-config.buckets` | 分桶数量 | +| `table-config.replication-num` | 副本数量 | +| `write-config.write-mode` | 写入模式:`jdbc` 或 `stream` | +| `write-config.batch-size` | 单批写入大小 | +| `write-config.flush-interval` | 刷新间隔(秒) | +| `stream-load-config.http-port` | Stream Load 使用的 FE HTTP 端口 | +| `stream-load-config.timeout` | Stream Load 超时时间(秒) | +| `stream-load-config.max-bytes-per-batch` | 单批最大字节数 | +| `stream-load-config.redirect-policy` | FE->BE 地址返回策略:`direct` / `public` / `private` | + +### 重启 HertzBeat + +完成配置后,重启 HertzBeat 使配置生效。 + +### 验证 Doris 存储是否生效 + +1. 查看 HertzBeat 日志,确认出现 Stream Load 成功日志。 +2. 在 Doris 中检查建表是否完成: + + ```sql + SHOW CREATE TABLE hertzbeat.hzb_history; + SHOW CREATE TABLE hertzbeat.hzb_log; + ``` + +3. 若启用了动态分区,检查分区调度状态: + +```sql +SHOW DYNAMIC PARTITION TABLES FROM hertzbeat; +SHOW PARTITIONS FROM hertzbeat.hzb_history; +SHOW PARTITIONS FROM hertzbeat.hzb_log; +``` + +### 常见问题 + +1. 不开启分区还能分桶吗? + + > 可以。分桶与是否开启动态分区无强依赖,`enable-partition` 主要影响动态分区和自动过期能力。 + +2. Doris 能否同时存储指标和日志? + + > 可以。HertzBeat 会将指标写入 `hzb_history`,日志写入 `hzb_log`,共用同一 Doris 数据源配置。 + +3. 修改 `application.yml` 的分区/分桶参数后,旧表会自动更新吗? + + > 不会。已存在表的 DDL 不会自动变更。需要手动执行 DDL 或重建表。 + +4. 当前是否启用了 Stream Load 压缩? + + > 当前实现默认使用 JSON Stream Load。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/greptime-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/greptime-init.md new file mode 100644 index 0000000000..9e19b524d9 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/greptime-init.md @@ -0,0 +1,74 @@ +--- +id: greptime-init +title: 依赖时序数据库服务 Greptime 安装初始化 (推荐) +sidebar_label: 指标数据存储 Greptime (推荐) +--- + +Apache HertzBeat™ 的历史数据存储依赖时序数据库,任选其一安装初始化即可,也可不安装(注意⚠️但强烈建议生产环境配置) + +> 我们推荐使用并长期支持 Greptime 作为存储。 + +[Greptime](https://github.com/GreptimeTeam/greptimedb) 是一个开源的云原生统一可观测性数据库,用于度量、日志和追踪,支持SQL/PromQL/流式处理。 + +**⚠️ 若不配置时序数据库,则只会留最近一小时历史数据** + +## 通过Docker方式安装Greptime + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装Greptime + + ```shell + $ docker run -d -p 127.0.0.1:4000-4003:4000-4003 \ + -v "$(pwd)/greptimedb:/tmp/greptimedb" \ + --name greptime \ + greptime/greptimedb:latest standalone start \ + --http-addr 0.0.0.0:4000 \ + --rpc-addr 0.0.0.0:4001 \ + --mysql-addr 0.0.0.0:4002 \ + --postgres-addr 0.0.0.0:4003 + ``` + + `-v "$(pwd)/greptimedb:/tmp/greptimedb` 为 greptimedb 数据目录本地持久化挂载,需将 `$(pwd)/greptimedb` 替换为实际本地存在的目录,默认使用执行命令的当前目录下的 `greptimedb` 目录作为数据目录。 + + 使用```$ docker ps```查看数据库是否启动成功 + +### 在hertzbeat的`application.yml`配置文件配置此数据库连接 + +1. 配置HertzBeat的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 [/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 + + **修改里面的`warehouse.store.duckdb.enabled`参数为`false`, 配置里面的`warehouse.store.greptime`数据源参数,URL账户密码,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + duckdb: + enabled: false + greptime: + enabled: true + grpc-endpoints: localhost:4001 + http-endpoint: http://localhost:4000 + database: public + username: greptime + password: greptime + ``` + + 默认数据库是内置的 `public` ,若制定其它数据库名称,需要在 `greptimeDB` 提前创建。 + eg: 创建名称为 `hertzbeat` 数据有效期90天的数据库 SQL: `CREATE DATABASE IF NOT EXISTS hertzbeat WITH(ttl='90d')` + +2. 重启 HertzBeat + +### 常见问题 + +1. 时序数据库是否都需要配置,能不能都用 + + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/influxdb-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/influxdb-init.md new file mode 100644 index 0000000000..91236ef76a --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/influxdb-init.md @@ -0,0 +1,75 @@ +--- +id: influxdb-init +title: 依赖时序数据库服务InfluxDB安装初始化(可选) +sidebar_label: 指标数据存储InfluxDB +--- + +Apache HertzBeat™ 的历史数据存储依赖时序数据库,任选其一安装初始化即可,也可不安装(注意⚠️但强烈建议生产环境配置) + +> 我们推荐使用并长期支持 VictoriaMetrics 作为存储。 + +InfluxDB是一个由InfluxData开发的开源时序型数据库,专注于海量时序数据的高性能读、高性能写、高效存储与实时分析等。 注意支持⚠️ 1.x版本。 + +**注意⚠️ 时序数据库安装配置为可选项,但强烈建议生产环境配置,以提供更完善的历史图表功能,高性能和稳定性** +**⚠️ 若不配置时序数据库,则只会留最近一小时历史数据** + +## 1. 直接使用华为云服务 GaussDB For Influx +> +> 开通使用[华为云云数据库 GaussDB For Influx](https://www.huaweicloud.com/intl/zh-cn/product/gaussdb.html) +> +> 获取云数据库对外暴露连接地址,账户密码即可 + +⚠️注意云数据库默认开启了SSL,云数据库地址应使用 `https:` + +### 2. 通过Docker方式安装InfluxDB + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装InfluxDB 1.x + + ```shell + $ docker run -p 8086:8086 \ + -v /opt/influxdb:/var/lib/influxdb \ + influxdb:1.8 + ``` + + `-v /opt/influxdb:/var/lib/influxdb` 为influxdb数据目录本地持久化挂载,需将`/opt/influxdb`替换为实际本地存在的目录 + 使用```$ docker ps```查看数据库是否启动成功 + +### 在hertzbeat的`application.yml`配置文件配置此数据库连接 + +1. 配置HertzBeat的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 + 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 + + **修改里面的`warehouse.store.duckdb.enabled`参数为`false`, 配置里面的`warehouse.store.influxdb`数据源参数,URL账户密码,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认DuckDB + duckdb: + enabled: false + influxdb: + enabled: true + server-url: http://localhost:8086 + username: root + password: root + expire-time: '30d' + replication: 1 + ``` + +2. 重启 HertzBeat + +### 常见问题 + +1. 时序数据库InfluxDb, IoTDB和TDengine是否都需要配置,能不能都用 + + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/iotdb-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/iotdb-init.md new file mode 100644 index 0000000000..e048b1b89e --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/iotdb-init.md @@ -0,0 +1,125 @@ +--- +id: iotdb-init +title: 依赖时序数据库服务IoTDB安装初始化(可选) +sidebar_label: 指标数据存储IoTDB +--- + +Apache HertzBeat™ 的历史数据存储依赖时序数据库,任选其一安装初始化即可,也可不安装(注意⚠️但强烈建议生产环境配置) + +> 我们推荐使用并长期支持 VictoriaMetrics 作为存储。 + +Apache IoTDB是一体化收集、存储、管理与分析物联网时序数据的软件系统,我们使用其存储分析采集到的监控指标历史数据。支持V1.*版本,废弃V0.*版本的支持。 + +**注意⚠️ 时序数据库安装配置为可选项,但强烈建议生产环境配置,以提供更完善的历史图表功能,高性能和稳定性** + +**⚠️ 若不配置时序数据库,则只会留最近一小时历史数据** + +> 如果您已有IoTDB环境,可直接跳到YML配置那一步。 + +## 通过Docker方式安装IoTDB +> +> 可参考官方网站[安装教程](https://iotdb.apache.org/zh/UserGuide/V0.13.x/QuickStart/WayToGetIoTDB.html) + +1. 下载安装Docker环境 + Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 + 安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装IoTDB + + ```shell + $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ + -v /opt/iotdb/data:/iotdb/data \ + --name iotdb \ + apache/iotdb:1.2.2-standalone + ``` + + `-v /opt/iotdb/data:/iotdb/data` 为IoTDB数据目录本地持久化挂载,需将`/iotdb/data`替换为实际本地存在的目录 + 使用```$ docker ps```查看数据库是否启动成功 + +3. 在hertzbeat的`application.yml`配置文件配置IoTDB数据库连接 + + 配置HertzBeat的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 + 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 + + **修改里面的`warehouse.store.duckdb.enabled`参数为`false`, 配置`warehouse.store.iot-db`数据源参数,HOST账户密码等,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认DuckDB + duckdb: + enabled: false + # 启用IotDB + iot-db: + enabled: true + host: 127.0.0.1 + rpc-port: 6667 + username: root + password: root + # use default queryTimeoutInMs = -1 + query-timeout-in-ms: -1 + # 数据存储时间:默认'7776000000'(90天,单位为毫秒,-1代表永不过期) + expire-time: '7776000000' + ``` + + **IoTDB集群版配置** + 如果您使用IoTDB为集群请参考下面配置 + + ```yaml + warehouse: + store: + # 关闭默认DuckDB + duckdb: + enabled: false + # 启用IotDB + iot-db: + enabled: true + node-urls: ['127.0.0.1:6667','127.0.0.2:6667','127.0.0.3:6667''] + username: root + password: root + # if iotdb version >= 0.13 use default queryTimeoutInMs = -1; else use default queryTimeoutInMs = 0 + query-timeout-in-ms: -1 + # 数据存储时间:默认'7776000000'(90天,单位为毫秒,-1代表永不过期) + expire-time: '7776000000' + ``` + + 参数说明: + + | 参数名称 | 参数说明 | + |---------------------|-------------------------------------------| + | enabled | 是否启用 | + | host | IoTDB数据库地址 | + | rpc-port | IoTDB数据库端口 | + | node-urls | IoTDB集群地址 | + | username | IoTDB数据库账户 | + | password | IoTDB数据库密码 | + | version | IoTDB数据库版本,已废弃,仅支持V1.* | + | query-timeout-in-ms | 查询超时时间 | + | expire-time | 数据存储时间,默认'7776000000'(90天,单位为毫秒,-1代表永不过期) | + + > 如果集群配置`node-urls`和单机配置同时设置,以集群`node-urls`配置稳准 + +4. 重启 HertzBeat + +### 常见问题 + +1. 时序数据库IoTDB和TDengine是否都需要配置,能不能都用 + + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + +2. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] + + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 + +3. 安装配置了IotDB数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] + + > 请检查配置参数是否正确 + > iot-db enable是否设置为true + > 注意⚠️若hertzbeat和IotDB都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/mysql-change.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/mysql-change.md new file mode 100644 index 0000000000..34474fa615 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/mysql-change.md @@ -0,0 +1,118 @@ +--- +id: mysql-change +title: 关系型数据库使用 Mysql 替换依赖的 H2 存储系统元数据(可选) +sidebar_label: 元数据存储Mysql +--- + +MYSQL是一款值得信赖的关系型数据库,Apache HertzBeat™ 除了支持使用默认内置的H2数据库外,还可以切换为使用MYSQL存储监控信息,告警信息,配置信息等结构化关系数据。 + +注意⚠️ 使用外置MySQL数据库替换内置H2数据库为可选项,但建议生产环境配置,以提供更好的性能 + +> 如果您已有MYSQL环境,并且MYSQL版本符合要求,可直接跳到数据库创建那一步。 + +## 支持的MYSQL版本 + +请确保使用支持的 MySQL 版本。HertzBeat 仅支持 MySQL 5.7+ 或 8 版本。你可以通过以下命令查看 MySQL 版本: + +```shell +$ mysql --version +mysql Ver 8.0.25 for Linux on x86_64 (MySQL Community Server - GPL) +``` + +### 通过Docker方式安装MYSQL + +1. 下载安装Docker环境 + Docker 的安装请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 + 安装完毕后请于终端检查Docker版本输出是否正常。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装MYSQL + + ```shell + $ docker run -d --name mysql \ + -p 3306:3306 \ + -v /opt/data:/var/lib/mysql \ + -e MYSQL_ROOT_PASSWORD=123456 \ + --restart=always \ + mysql:5.7 + ``` + + `-v /opt/data:/var/lib/mysql` 为mysql数据目录本地持久化挂载,需将`/opt/data`替换为实际本地存在的目录 + 使用```$ docker ps```查看数据库是否启动成功 + +### 数据库创建 + +1. 进入MYSQL或使用客户端连接MYSQL服务 + `mysql -uroot -p123456` +2. 创建名称为hertzbeat的数据库 + `create database hertzbeat default charset utf8mb4 collate utf8mb4_general_ci;` +3. 查看hertzbeat数据库是否创建成功 + `show databases;` + +### 添加 MYSQL jdbc 驱动 jar + +- 下载 MYSQL jdbc driver jar, 例如 mysql-connector-java-8.0.25.jar. [https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip) +- 将此 jar 包拷贝放入 HertzBeat 的安装目录下的 `ext-lib` 目录下. + +### 修改hertzbeat的配置文件application.yml切换数据源 + +- 配置 HertzBeat 的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 + 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 + 替换里面的`spring.database`数据源参数,IP端口账户密码驱动 + ⚠️注意`application.yml`文件内容需完整,除下方修改内容外其他参数需保留,完整内容见[/script/application.yml](https://raw.githubusercontent.com/apache/hertzbeat/master/script/application.yml) + + 需修改部分原参数: + +```yaml +spring: + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database: h2 + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + format_sql: true +``` + +具体替换参数如下,需根据mysql环境配置账户密码IP: + +```yaml +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: 123456 + url: jdbc:mysql://mysql:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&useSSL=false + hikari: + max-lifetime: 120000 + jpa: + show-sql: false + database: mysql + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.MySQLDialect + format_sql: true +``` + +- 通过docker启动时,建议修改host为宿主机的外网IP地址,包括mysql连接字符串。 + +> 注意:上述是针对下载安装包的方式,对于本地切换数据源,只需完成[数据库创建](./mysql-change#数据库创建)以及修改`hertzbeat-startup/src/main/resources/application.yml`中的配置即可。 + +**启动 HertzBeat 浏览器访问 [http://ip:1157/](http://ip:1157/) 开始使用HertzBeat进行监控告警,默认账户密码 admin/hertzbeat** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/native-collector.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/native-collector.md new file mode 100644 index 0000000000..38564f6adf --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/native-collector.md @@ -0,0 +1,116 @@ +--- +id: native-collector +title: Native 采集器指南 +sidebar_label: Native 采集器 +description: 说明 HertzBeat Native 采集器安装包适合什么场景、优缺点、限制和部署建议。 +--- + +## 什么场景适合使用 Native 采集器? + +当你的监控任务不依赖从 `ext-lib` 动态加载外部 JDBC 驱动时,优先考虑 Native 采集器安装包。 + +比较适合 Native 采集器的场景包括: + +- HTTP、HTTPS、网站可用性、API 检查 +- 端口可用性、Ping、SSL 证书等网络探测 +- 不依赖运行时 `ext-lib` JDBC 加载的 MySQL、MariaDB、OceanBase +- SQL 查询指标不依赖运行时 `ext-lib` JDBC 加载的 TiDB +- Redis、Zookeeper、Kafka 等非 JDBC 监控类型 + +## 为什么选择它? + +相较 JVM 采集器安装包,Native 采集器安装包通常更适合以下诉求: + +- 启动更快 +- 常驻内存更低 +- 运行时更轻,不需要额外准备 bundled 或预装 JDK + +## 它的缺点和限制是什么? + +Native 采集器并不是所有 JVM 采集器场景的无损替代。 + +- Native 安装包是平台相关的,必须选择与你操作系统和 CPU 架构匹配的包。 +- Native 采集器不支持在运行时从 `ext-lib` 目录动态加载外部 JDBC 驱动 JAR。 +- 如果你的部署依赖 JVM 风格的运行时 classpath 扩展能力,仍然应该使用 JVM 采集器安装包。 + +## 运行环境要求 + +Native 采集器是提前编译好的原生可执行文件,运行环境的要求比 JVM 采集器**严格得多**。JVM 采集器由 JIT 在 +启动时探测 CPU 特性并自动适配,而 native 包在构建时就把指令集固化进了二进制,没有回退机制。 + +| 平台 | 要求 | +| --- | --- | +| Linux / Windows(x86-64) | CPU 必须支持 **AVX2**:Intel Haswell(2013)及以后、AMD Zen(2017)及以后 | +| Linux(两种架构) | **glibc ≥ 2.34** | +| Linux(arm64) | ARMv8-A 基线即可,无额外指令集要求 | +| Windows | Windows 10 / Server 2016 及以上,并安装 **Microsoft Visual C++ 2015-2022 可再发行组件包** | + +常见发行版对照(glibc ≥ 2.34 这条线): + +| 可用 | 不可用 | +| --- | --- | +| Ubuntu 22.04 / 24.04、Debian 12、RHEL / Rocky / AlmaLinux 9、Amazon Linux 2023 | Ubuntu 20.04、Debian 11、RHEL / Rocky / AlmaLinux 8、CentOS 7、Amazon Linux 2 | + +不支持 AVX2 的环境还包括:部分 Atom 血统的低端芯片(如 J4125、N4020、N5105)、Apple Silicon 上的 +Rosetta 2、以及未更新到 Prism 新版模拟器的 Windows on ARM。 + +:::caution 不满足要求时的表现很具有迷惑性 + +- **CPU 不支持 AVX2**:进程**瞬间退出,没有任何输出、也没有日志文件**(Linux 上报 `Illegal instruction`, + Windows 上退出码为 `-1073741795`) +- **glibc 版本过低**:报 `version 'GLIBC_2.34' not found` +- **Windows 缺少 VC++ 运行库**:报缺少 `VCRUNTIME140_1.dll` + +第一种最容易被误判为"安装包损坏"。遇到"双击没反应"或"启动了什么都没打印"时,请先核对 CPU 是否支持 AVX2。 + +**任何一项不满足,都可以改用 JVM 采集器安装包** `apache-hertzbeat-collector-{version}-bin.tar.gz`, +它只要求 JDK 25,没有上述限制。 +::: + +## 哪些场景应该继续使用 JVM 采集器? + +如果你的监控依赖外部 JDBC 驱动,请继续使用 JVM 采集器安装包,尤其包括: + +- Oracle,需要 `ojdbc8`,部分场景还需要 `orai18n` +- DB2,需要 `jcc` +- 任何明确把 `mysql-connector-j` 放进 `ext-lib` 并希望继续走 JDBC 的 MySQL、MariaDB、OceanBase 场景 + +## 安装包命名规则 + +JVM 采集器安装包仍然保持跨平台: + +- `apache-hertzbeat-collector-{version}-bin.tar.gz` + +Native 采集器安装包按平台区分: + +- Linux 或 macOS:`apache-hertzbeat-collector-native-{version}-{platform}-bin.tar.gz` +- Windows:`apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip` + +例如: + +- `apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz` +- `apache-hertzbeat-collector-native-1.9.0-macos-arm64-bin.tar.gz` +- `apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip` + +## 配置文件是否和 JVM 采集器一致? + +Native 采集器安装包和 JVM 采集器安装包使用同一套 `config/application.yml` 结构。 + +这意味着: + +- 采集器连接参数仍然在同一个位置修改 +- 虚拟线程相关配置仍然在同一个位置修改 +- Native 专用的启动调整通过代码在运行时生效,而不是长期维护第二份 `application.yml` + +## 推荐选择 + +- 想要更低内存、更快启动,并且监控类型不依赖 JDBC 驱动时,优先选择 Native 采集器安装包;MySQL、MariaDB、OceanBase 在不使用 `ext-lib` 时适合直接选择 Native 采集器安装包,TiDB 的 SQL 查询指标在不使用 `ext-lib` 时也可以走内置 MySQL 兼容查询引擎。 +- 需要 `ext-lib`、外置 JDBC 驱动,或者依赖 JVM 风格运行时扩展能力时,使用 JVM 采集器安装包。 +- 对 MySQL 兼容监控来说,`auto` 只检查 `ext-lib`。如果你想手动指定链路,可以配置 `hertzbeat.collector.mysql.query-engine=jdbc`、`r2dbc` 或 `auto`。 + +## 官方多平台安装包是怎么构建的? + +- `mvn clean package -pl hertzbeat-collector-collector -am -Pnative` 只会为当前宿主机构建一个 Native 采集器安装包。 +- 官方发布使用的 Linux、macOS、Windows Native 安装包,会在发布准备阶段手动触发 `Collector Native Release` GitHub Actions 工作流来生成,而不是在每次 push 或 pull request 时自动构建。 + +具体安装步骤可参考 [通过安装包安装 HertzBeat](package-deploy)。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/package-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/package-deploy.md new file mode 100644 index 0000000000..1f576597a4 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/package-deploy.md @@ -0,0 +1,169 @@ +--- +id: package-deploy +title: 通过安装包安装 HertzBeat +sidebar_label: 安装包方式安装 +--- + +:::tip +Apache HertzBeat™ 支持在Linux Windows Mac系统安装运行,CPU支持X86/ARM64。 +当前分支默认使用 `Java 25`,且标准安装包不再提供内置 JDK。可参考以下情况使用 HertzBeat: + +- 当你的服务器中默认环境变量为 `Java 25` 时,这一步无需任何操作。 +- 当你的服务器中默认环境变量不为 `Java 25` 时,如 `Java 8`、`Java 11`、`Java 21`,若你服务器中**没有**其他应用需要低版本 `Java`,根据你的系统到 [https://www.oracle.com/java/technologies/downloads/](https://www.oracle.com/java/technologies/downloads/) 下载 `Java 25`,并将环境变量指向新的 `Java 25`。 +- 当你的服务器中默认环境变量不为 `Java 25` 时,如 `Java 8`、`Java 11`、`Java 21`,若你服务器中**有**其他应用需要低版本 `Java`,不希望修改全局环境变量,可根据你的系统到 [https://www.oracle.com/java/technologies/downloads/](https://www.oracle.com/java/technologies/downloads/) 下载 `Java 25`,并将解压后的文件夹重命名为 `java`,复制到 HertzBeat 的解压目录下。 + +::: + +## 部署 HertzBeat Server + +1. 下载安装包 + + 从 [下载页面](/docs/download) 下载您系统环境对应的安装包版本 `apache-hertzbeat-xxx-bin.tar.gz` + +2. 设置配置文件(可选) + + 解压安装包到主机 eg: /opt/hertzbeat + + ```shell + tar zxvf apache-hertzbeat-xxx-bin.tar.gz + ``` + + :::tip + 位于 `config/application.yml` 的配置文件,您可以根据需求修改配置文件来配置外部依赖的服务,如数据库,时序数据库等参数。 + HertzBeat 启动时默认全使用内部服务,但生产环境建议切换为外部数据库服务。 + ::: + + 建议元数据存储使用 [PostgreSQL](postgresql-change), 指标数据存储使用 [VictoriaMetrics](victoria-metrics-init), 具体步骤参见 + + - [内置 H2 数据库切换为 PostgreSQL](postgresql-change) + - [使用 VictoriaMetrics 存储指标数据](victoria-metrics-init) + +3. 配置账户文件(可选) + + HertzBeat 默认内置三个用户账户,分别为 admin/hertzbeat tom/hertzbeat guest/hertzbeat + 若需要新增删除修改账户或密码,可以通过修改位于 `config/sureness.yml` 的配置文件实现,具体参考 + + - [配置修改账户密码](account-modify) + +4. 启动 + + 执行位于安装目录 bin 下的启动脚本 startup.sh, windows 环境下为 startup.bat + + ```shell + ./startup.sh + ``` + +5. 开始探索HertzBeat + 浏览器访问 [http://ip:1157/](http://ip:1157/) 即刻开始探索使用HertzBeat,默认账户密码 admin/hertzbeat。 + +### 部署 HertzBeat Collector 集群(可选) + +:::note +HertzBeat Collector 是一个轻量级的数据采集器,用于采集并将数据发送到 HertzBeat Server。 +通过部署多个 HertzBeat Collector 可以实现数据的高可用,负载均衡和云边协同。 +::: + +:::tip Native 采集器推荐 +如果你的监控任务不依赖从 `ext-lib` 动态加载外部 JDBC 驱动,优先选择 Native 采集器安装包,通常启动更快、常驻内存更低。MySQL、MariaDB、OceanBase 在没有提供 `mysql-connector-j` 时,也可以直接使用 Native 采集器安装包;TiDB 的 SQL 查询指标也遵循同样规则。 + +在选择前,建议先阅读 [Native 采集器指南](native-collector) 了解它的限制和取舍。 +::: + +![HertzBeat](/img/docs/cluster-arch.png) + +1. 下载安装包 + + 按部署形态选择对应的采集器安装包: + - JVM 采集器安装包:`apache-hertzbeat-collector-xxx-bin.tar.gz` + - Linux 或 macOS 的 Native 采集器安装包:`apache-hertzbeat-collector-native-xxx-{platform}-bin.tar.gz` + - Windows 的 Native 采集器安装包:`apache-hertzbeat-collector-native-xxx-windows-amd64-bin.zip` + - 从 [下载页面](/docs/download) 下载 + +2. 设置配置文件 + + 解压安装包到主机 eg: /opt/hertzbeat-collector + + ```shell + tar zxvf apache-hertzbeat-collector-xxx-bin.tar.gz + # 或 + tar zxvf apache-hertzbeat-collector-native-xxx-linux-amd64-bin.tar.gz + # 或 + unzip apache-hertzbeat-collector-native-xxx-windows-amd64-bin.zip + ``` + + 配置采集器的配置文件 `config/application.yml` 里面的 HertzBeat Server 连接 IP, 端口, 采集器名称(需保证唯一性)等参数。 + + ```yaml + 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. + +3. 启动 + + JVM 采集器安装包执行位于安装目录 `hertzbeat-collector/bin/` 下的启动脚本 `startup.sh`,Windows 环境下为 `startup.bat`;Linux 或 macOS 的 Native 采集器安装包执行 `./startup.sh`,Windows 的 Native 采集器安装包执行 `bin\\startup.bat` + +4. 开始探索 HertzBeat Collector + 浏览器访问主 HertzBeat 服务 [http://manager-host:1157/](http://manager-host:1157/) 的概览页面,即可确认新采集器已注册。 + +:::important Native 采集器限制说明 +Native 采集器适合不依赖外部 JVM classpath 扩展的监控类型。 + +关于包选择、安装包命名和平台相关限制,详见 [Native 采集器指南](native-collector)。 + +基于 `ext-lib` 的 JDBC 驱动加载能力是 JVM 采集器的能力。Native 采集器当前不支持在运行时从 `ext-lib` 目录动态加载外部 JDBC 驱动 JAR。 + +因此,凡是依赖外置 JDBC 驱动的监控类型,请使用 JVM 采集器,不要使用 Native 采集器。当前至少包括: + +- Oracle,需要 `ojdbc8`,部分场景还需要 `orai18n` +- DB2,需要 `jcc` +- 任何明确把 `mysql-connector-j` 放进 `ext-lib` 并希望继续走 JDBC 的 MySQL、MariaDB、OceanBase 场景 + +建议部署方式: + +- `API`、`网站`、`端口可用性`、`Ping` 等非 JDBC 类型,以及不依赖 `ext-lib` 的 MySQL、MariaDB、OceanBase,优先使用 Native 采集器 +- 需要 `ext-lib` 扩展驱动时使用 JVM 采集器 +::: + +**HAVE FUN** + +---- + +### 安装包部署常见问题 + +**最多的问题就是网络环境问题,请先提前排查** + +1. 启动失败,需您提前准备JAVA运行环境 + + 安装JAVA运行环境-可参考[官方网站](https://www.oracle.com/java/technologies/downloads/) + 要求:JAVA25环境 + 下载JAVA安装包: [镜像站](https://mirrors.huaweicloud.com/openjdk/) + 安装后命令行检查是否成功安装 + + ```shell + $ java -version + openjdk version "25.0.2" 2026-01-20 + OpenJDK Runtime Environment (build 25.0.2+8) + OpenJDK 64-Bit Server VM (build 25.0.2+8, mixed mode, sharing) + + ``` + +2. 按照流程部署,访问 [http://ip:1157/](http://ip:1157/) 无界面 + 请参考下面几点排查问题: + + > 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 + > 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/postgresql-change.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/postgresql-change.md new file mode 100644 index 0000000000..91cfc428fc --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/postgresql-change.md @@ -0,0 +1,105 @@ +--- +id: postgresql-change +title: 关系型数据库使用 PostgreSQL 替换依赖的 H2 存储系统元数据(推荐) +sidebar_label: 元数据存储PostgreSQL(推荐) +--- + +PostgreSQL 是一个功能强大,开源的关系型数据库管理系统(RDBMS)。Apache HertzBeat™ 除了支持使用默认内置的 H2 数据库外,还可以切换为使用 PostgreSQL 存储监控信息,告警信息,配置信息等结构化关系数据。 + +注意⚠️ 使用外置 PostgreSQL 数据库替换内置 H2 数据库为可选项,但建议生产环境配置,以提供更好的性能 + +> 如果您已有 PostgreSQL 环境,可直接跳到数据库创建那一步。 + +## 通过 Docker 方式安装 PostgreSQL + +1. 下载安装 Docker 环境 + Docker 的安装请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。安装完毕后请于终端检查 Docker 版本输出是否正常。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker 安装 PostgreSQL + + ```shell + docker run -d --name postgresql -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=123456 -e TZ=Asia/Shanghai postgres:15 + ``` + + 使用 ```$ docker ps``` 查看数据库是否启动成功 + +### 数据库创建 + +1. 进入 PostgreSQL 或使用客户端连接 PostgreSQL 服务 + + ```shell + su - postgres + psql + ``` + +2. 创建名称为 hertzbeat 的数据库 + + ```sql + CREATE DATABASE hertzbeat; + ``` + +3. 查看 hertzbeat 数据库是否创建成功 + + ```sql + SELECT * FROM pg_database where datname='hertzbeat'; + ``` + +### 修改 hertzbeat 的配置文件 application.yml 切换数据源 + +1. 配置 HertzBeat 的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 + 注意⚠️ docker 容器方式需要将 application.yml 文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 + 替换里面的 `spring.database` 数据源参数,IP 端口账户密码驱动 + ⚠️注意 `application.yml` 文件内容需完整,除下方修改内容外其他参数需保留,完整内容见[/script/application.yml](https://raw.githubusercontent.com/apache/hertzbeat/master/script/application.yml) + +```yaml +spring: + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database: h2 + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + format_sql: true +``` + +具体替换参数如下,需根据 PostgreSQL 环境配置账户密码 IP: + +```yaml +spring: + datasource: + driver-class-name: org.postgresql.Driver + username: root + password: 123456 + url: jdbc:postgresql://postgresql:5432/hertzbeat + hikari: + max-lifetime: 120000 + jpa: + show-sql: false + database: postgresql + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.PostgreSQLDialect + format_sql: true +``` + +> 注意:上述是针对下载安装包的方式,对于本地切换数据源,只需完成[数据库创建](./postgresql-change#数据库创建)以及修改`hertzbeat-startup/src/main/resources/application.yml`中的配置即可。 + +**启动 HertzBeat 浏览器访问 [http://ip:1157/](http://ip:1157/) 开始使用HertzBeat进行监控告警,默认账户密码 admin/hertzbeat** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/questdb-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/questdb-init.md new file mode 100644 index 0000000000..59214a5679 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/questdb-init.md @@ -0,0 +1,127 @@ +--- +id: questdb-init +title: 依赖时序数据库服务QuestDB安装初始化(可选) +sidebar_label: 指标数据存储QuestDB +--- + +Apache HertzBeat™ 的历史数据存储依赖时序数据库,任选其一安装初始化即可,也可不安装(注意⚠️但强烈建议生产环境配置) + +> 我们推荐使用并长期支持 VictoriaMetrics 作为存储。 + +QuestDB 是一款开源的时序数据库,因其高性能和低延迟等特点,在时序数据处理领域备受关注,我们使用其存储分析采集到的监控指标历史数据。 + +**注意⚠️ 时序数据库安装配置为可选项,但强烈建议生产环境配置,以提供更完善的历史图表功能,高性能和稳定性** + +**⚠️ 若不配置时序数据库,则只会留最近一小时历史数据** + +> 如果您已有QuestDB环境,可直接跳到YML配置那一步。 + +## 安装QuestDB + +1. 下载安装包 + + 从官方 GitHub 下载对应系统的最新版本: + + ```shell + # Linux/macOS(以v7.3.9为例,可替换为最新版本号) + wget https://github.com/questdb/questdb/releases/download/7.3.9/questdb-7.3.9-no-jre-bin.tar.gz + + # 解压 + tar -zxvf questdb-7.3.9-no-jre-bin.tar.gz + mv questdb-7.3.9 /opt/questdb # 移动到常用目录 + ``` + + Windows 用户: + 下载 zip 包后解压到`C:\questdb`或自定义目录。 + +2. 启动 QuestDB + + ```shell + # Linux/macOS:进入安装目录,启动服务 + cd /opt/questdb/bin + ./questdb start + + # Windows(命令提示符): + cd C:\questdb\bin + questdb.exe start + ``` + +3. 设置访问密码 + + QuestDB 通过配置文件启用认证,需手动修改配置。 + + 编辑配置文件: + + ```shell + # Linux/macOS + vi /opt/questdb/conf/server.conf + + # Windows + notepad C:\questdb\conf\server.conf + ``` + + 启用认证并配置密码: + + ```shell + # 启用认证(默认关闭) + http.security.enabled=true + pg.security.enabled=true # PostgreSQL协议认证 + + # 设置管理员账号密码(自定义) + http.security.admin.username=admin + http.security.admin.password=YourStrongPassword123! + + # 可选:限制Web控制台访问IP(如只允许本地) + http.bind.to=127.0.0.1:9000 + ``` + + 重启后生效: + + ```shell + # Linux/macOS + ./questdb stop + ./questdb start + + # Windows + questdb.exe stop + questdb.exe start + ``` + +4. 在hertzbeat的`application.yml`配置文件配置QuestDB数据库连接 + + 配置HertzBeat的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 + 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 + + **修改里面的`warehouse.store.duckdb.enabled`参数为`false`, 配置`warehouse.store.questdb`数据源参数,HOST账户密码等,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认DuckDB + duckdb: + enabled: false + # 启用IotDB + questdb: + enabled: true + url: localhost:9000 + username: admin + password: quest + ``` + + 参数说明: + + | 参数名称 | 参数说明 | + | -------- | ---------------- | + | enabled | 是否启用 | + | url | QuestDB的URL地址 | + | username | QuestDB据库账户 | + | password | QuestDB据库密码 | + + > **注意:** 因为 QuestDB 架构设计原因,如果对数据的过期时间有要求可以前往 QuestDB 的配置文件 `server.conf` 中配置: + > + > ```ini + > cairo.default.ttl=30d + > ``` + +5. 重启 HertzBeat diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/quickstart.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/quickstart.md new file mode 100644 index 0000000000..ecb018ac8d --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/quickstart.md @@ -0,0 +1,170 @@ +--- +id: quickstart +title: HertzBeat 快速开始 - 5分钟安装 +sidebar_label: 快速开始 +description: Apache HertzBeat 监控系统快速安装指南 - Docker、安装包、源码安装,支持 X86 和 ARM64 系统。 +--- + +## 如何安装 HertzBeat? + +使用 Docker 在 5 分钟内安装 Apache HertzBeat™。HertzBeat 支持 Docker、二进制包和源码安装,兼容 X86/ARM64 架构。 + +**快速安装命令:** `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` + +## 安装方式 + +HertzBeat 提供多种安装选项: + +1. **Docker**(推荐)- 最快设置,生产就绪 +2. **二进制包** - 传统部署,手动配置 +3. **源码** - 开发和定制 +4. **Docker Compose** - 包含数据库和时间序列存储的全栈 + +### 安装方式对比 + +| 方式 | 部署时间 | 难度 | 适用场景 | +|------|----------|------|----------| +| Docker | 2分钟 | 简单 | 生产、测试 | +| 安装包 | 10分钟 | 中等 | 自定义配置 | +| 源码 | 30分钟 | 高级 | 开发 | +| Docker Compose | 5分钟 | 简单 | 全栈部署 | + +## 安装说明 + +### 方式一:Docker方式快速安装 + +1. `docker` 环境仅需一条命令即可开始 + + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + + ```或者使用 quay.io (若 dockerhub 网络链接超时)``` + + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + +2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` + +3. 部署采集器集群(可选) + + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` + + - `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 + - `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 + - `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 + - `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 + +更多配置详细步骤参考 [通过Docker方式安装HertzBeat](docker-deploy) + +#### 方式二:通过安装包安装 + +1. 下载您系统环境对应的安装包 `apache-hertzbeat-xx-bin.tar.gz` [Download Page](https://hertzbeat.apache.org/docs/download) +2. 配置 HertzBeat 的配置文件 `hertzbeat/config/application.yml`(可选) +3. 部署启动 `$ ./bin/startup.sh` 或 `bin/startup.bat` +4. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` +5. 部署采集器集群(可选) + - 如果你不需要 `ext-lib` 外置 JDBC 驱动,优先选择 Native 采集器安装包,通常启动更快、内存更省。MySQL、MariaDB、OceanBase 在没有提供 `mysql-connector-j` 时可以直接使用内置查询引擎;TiDB 的 SQL 查询指标也遵循同样规则。详见 [Native 采集器指南](native-collector)。 + - 下载您系统环境对应采集器安装包 `apache-hertzbeat-collector-xx-bin.tar.gz`(JVM 采集器)或匹配目标平台的 Native 采集器安装包,例如 `apache-hertzbeat-collector-native-xx-linux-amd64-bin.tar.gz`、`apache-hertzbeat-collector-native-xx-windows-amd64-bin.zip`,到规划的另一台部署主机上 [Download Page](https://hertzbeat.apache.org/docs/download) + - 配置采集器的配置文件 `hertzbeat-collector/config/application.yml` 里面的连接主HertzBeat服务的对外IP,端口,当前采集器名称(需保证唯一性)等参数 `identity` `mode` (public or private) `manager-host` `manager-port` + + ```yaml + collector: + dispatch: + entrance: + netty: + enabled: true + identity: ${IDENTITY:} + mode: ${MODE:public} + manager-host: ${MANAGER_HOST:127.0.0.1} + manager-port: ${MANAGER_PORT:1158} + ``` + + - Native 采集器的代价是安装包按平台区分、不支持运行时 `ext-lib` JDBC 加载,也不适合依赖 JVM 风格运行时 classpath 扩展的场景。详见 [Native 采集器指南](native-collector)。 + - 如果在 `ext-lib` 中放入了 `mysql-connector-j`,主程序内置采集器或 JVM 采集器会在重启后自动优先走 JDBC;这一点现在适用于 MySQL、MariaDB、OceanBase,TiDB 的 SQL 查询指标也遵循同样规则,而它的 HTTP 指标不受影响。Oracle、DB2 仍然必须使用 JVM 采集器安装包,因为它们依赖外置 JDBC 驱动 + - JVM 采集器安装包使用 `$ ./bin/startup.sh` 或 `bin/startup.bat` 启动。Linux 或 macOS 的 Native 采集器安装包使用 `$ ./bin/startup.sh` 启动,Windows 的 Native 采集器安装包使用 `bin\\startup.bat` 启动 + - 浏览器访问主 HertzBeat 服务 `http://localhost:1157` 查看概览页面即可看到注册上来的新采集器 + +更多配置详细步骤参考 [通过安装包安装HertzBeat](package-deploy) + +#### 方式三:本地代码启动 + +1. 此为前后端分离项目,本地代码调试需要分别启动后端工程`hertzbeat-startup`和前端工程`web-app` +2. 后端:需要`maven3+`, `java25`和`lombok`环境,修改`YML`配置信息并启动`hertzbeat-startup`服务 +3. 前端:需要`nodejs`和`pnpm`环境,先执行`pnpm install`,待本地后端启动后,在`web-app`目录下启动 `pnpm start` +4. 浏览器访问 `http://localhost:4200` 即可开始,默认账号密码 `admin/hertzbeat` + +详细步骤参考 [参与贡献之本地代码启动](../community/contribution) + +##### 方式四:Docker-Compose 统一安装 hertzbeat+postgresql+tsdb + +通过 [docker-compose部署脚本](https://github.com/apache/hertzbeat/tree/master/script/docker-compose) 一次性把 postgresql/mysql 数据库, victoria-metrics/iotdb/tdengine 时序数据库和 hertzbeat 安装部署。 + +详细步骤参考 [docker-compose部署方案](https://github.com/apache/hertzbeat/tree/master/script/docker-compose/README.md) + +##### 方式五:Kubernetes Helm Charts 部署 hertzbeat+collector+postgresql+tsdb + +通过 Helm Chart 一次性将 HertzBeat 集群组件部署到 Kubernetes 集群中。 + +详细步骤参考 [Artifact Hub](https://artifacthub.io/packages/helm/hertzbeat/hertzbeat) + +## 安装常见问题 + +### HertzBeat 的系统要求是什么? + +**最低要求:** + +- 2 CPU 核心 +- 4GB RAM +- 10GB 磁盘空间 +- Docker 20.10+ 或 Java 25+ + +**支持系统:** Linux、macOS、Windows(通过 Docker 或 WSL) + +### HertzBeat 使用哪些端口? + +- **1157** - Web UI 和 API +- **1158** - 采集器通信(仅集群模式) + +### 如何验证 HertzBeat 是否运行? + +1. 检查容器状态:`docker ps | grep hertzbeat` +2. 访问 Web UI:`http://localhost:1157` +3. 使用账号:admin/hertzbeat 登录 + +### 可以修改默认密码吗? + +可以。首次登录后,进入 设置 → 账号管理 修改密码。 + +### 如何升级 HertzBeat? + +**Docker 升级:** + +```bash +docker stop hertzbeat +docker rm hertzbeat +docker pull apache/hertzbeat:latest +docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat +``` + +### HertzBeat 使用什么数据库? + +HertzBeat 默认使用 H2 嵌入式数据库。生产环境可配置外部数据库: + +- **元数据:** MySQL、PostgreSQL +- **时序数据:** VictoriaMetrics、IoTDB、TDengine、InfluxDB + +### 如何添加第一个监控? + +1. 登录 Web UI +2. 点击 监控 → 新增监控 +3. 选择监控类型(如 MySQL、Linux、网站) +4. 输入 IP、端口、凭据 +5. 点击 确认 开始监控 + +### 在哪里可以获得帮助? + +- **文档:** [https://hertzbeat.apache.org/docs/](https://hertzbeat.apache.org/docs/) +- **GitHub Issues:** [https://github.com/apache/hertzbeat/issues](https://github.com/apache/hertzbeat/issues) +- **社区:** [https://hertzbeat.apache.org/docs/community/contact](https://hertzbeat.apache.org/docs/community/contact) + +**祝你使用愉快!** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/rainbond-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/rainbond-deploy.md new file mode 100644 index 0000000000..df6a8bf96d --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/rainbond-deploy.md @@ -0,0 +1,50 @@ +--- +id: rainbond-deploy +title: 使用 Rainbond 部署 HertzBeat +sidebar_label: 基于Rainbond部署 +--- + +如果你不熟悉 Kubernetes,想在 Kubernetes 中安装 Apache HertzBeat,可以使用 Rainbond 来部署。Rainbond 是一个基于 Kubernetes 构建的云原生应用管理平台,可以很简单的将你的应用部署到 Kubernetes中。 + +## Rainbond Cloud 部署 + +如果想在 “Rainbond Cloud” 上一键部署 “HertzBeat”,可以按照以下步骤进行操作 + +- 打开 [HertzBeat 应用详情](https://hub.grapps.cn/marketplace/apps/753) + +![HertzBeat应用详情](/img/docs/start/hertzbeat-desc.png) + +- 登录 Rainbond Cloud 账号,没有账号,提前注册账号! + +![Rainbond Cloud](/img/docs/start/rainbond-cloud.png) + +- 选择版本安装 + +![hertzbeat 版本](/img/docs/start/hertzbeat-versions.png) + +## 开源 Rainbond 部署 + +### 前提 + +安装 Rainbond,请参阅 [Rainbond 快速安装](https://www.rainbond.com/docs/quick-start/quick-install)。 + +### 部署 HertzBeat + +登录 Rainbond 后,点击左侧菜单中的 `应用市场`,切换到开源应用商店,在搜索框中搜索 `HertzBeat`,点击安装按钮。 + +![HertzBeat](/img/docs/start/install-to-rainbond.png) + +填写以下信息,然后点击确认按钮进行安装。 + +- 团队:选择现有团队或创建新的团队 +- 集群:选择对应的集群 +- 应用:选择现有应用或创建新的应用 +- 版本:选择要安装的 HertzBeat 版本 + +等待安装完成,即可访问 HertzBeat 应用。 + +![HertzBeat](/img/docs/start/hertzbeat-topology.png) + +:::tip +通过 Rainbond 安装的 HertzBeat,默认使用了外部的 Mysql 数据库 和 Redis 以及 IoTDB。同时也挂载了 HertzBeat 的配置文件,可以在 `组件 -> 环境配置 -> 配置文件设置` 中修改配置文件。 +::: diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/tdengine-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/tdengine-init.md new file mode 100644 index 0000000000..a62f7f2714 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/tdengine-init.md @@ -0,0 +1,137 @@ +--- +id: tdengine-init +title: 依赖时序数据库服务TDengine安装初始化(可选) +sidebar_label: 指标数据存储TDengine +--- + +Apache HertzBeat™ 的历史数据存储依赖时序数据库,任选其一安装初始化即可,也可不安装(注意⚠️但强烈建议生产环境配置) + +> 我们推荐使用并长期支持 VictoriaMetrics 作为存储。 + +TDengine是一款开源物联网时序型数据库,我们用其存储采集到的监控指标历史数据。 注意支持⚠️ 3.x版本。 + +**注意⚠️ 时序数据库安装配置为可选项,但强烈建议生产环境配置,以提供更完善的历史图表功能,高性能和稳定性** +**⚠️ 若不配置时序数据库,则只会留最近一小时历史数据** + +> 如果您已有TDengine环境,可直接跳到创建数据库实例那一步。 + +## 通过Docker方式安装TDengine + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装TDengine + + ```shell + $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ + -v /opt/taosdata:/var/lib/taos \ + --name tdengine -e TZ=Asia/Shanghai \ + tdengine/tdengine:3.0.4.0 + ``` + + `-v /opt/taosdata:/var/lib/taos` 为tdengine数据目录本地持久化挂载,需将`/opt/taosdata`替换为实际本地存在的目录 + `-e TZ="Asia/Shanghai"` 为tdengine设置时区,这里可选设置对应的时区 + 使用```$ docker ps```查看数据库是否启动成功 + +### 创建数据库实例 + +> [TDengine CLI 小技巧](https://docs.taosdata.com/develop/) + +1. 进入数据库Docker容器 + + ```shell + docker exec -it tdengine /bin/bash + ``` + +2. 修改账户密码 + + > 建议您修改密码。TDengine默认的账户密码是 root/taosdata + > 进入容器后,执行 `taos` 命令进入TDengine CLI , 如下: + + ```shell + root@tdengine-server:~/TDengine-server# taos + Welcome to the TDengine shell from Linux, Client Version + Copyright (c) 2020 by TAOS Data, Inc. All rights reserved. + taos> + ``` + + > 在 TDengine CLI 中使用 alter user 命令可以修改用户密码,缺省密码为 taosdata + +3. 创建名称为hertzbeat的数据库 + + 执行创建数据库命令 + + ```shell + taos> show databases; + taos> CREATE DATABASE hertzbeat KEEP 90 DURATION 10 BUFFER 16; + ``` + + 上述语句将创建一个名为 hertzbeat 的库,这个库的数据将保留90天(超过90天将被自动删除),每 10 天一个数据文件,每个 VNode 的写入内存池的大小为 16 MB + +4. 查看hertzbeat数据库是否成功创建 + + ```shell + taos> show databases; + taos> use hertzbeat; + ``` + +5. 退出TDengine CLI + + ```text + 输入 q 或 quit 或 exit 回车 + ``` + +**注意⚠️若是安装包安装的TDengine** + +> 除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter + +### 在hertzbeat的`application.yml`配置文件配置此数据库连接 + +1. 配置HertzBeat的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 + 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 + + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.td-engine`数据源参数,URL账户密码,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + td-engine: + enabled: true + driver-class-name: com.taosdata.jdbc.rs.RestfulDriver + url: jdbc:TAOS-RS://localhost:6041/hertzbeat + username: root + password: taosdata + ``` + +2. 重启 HertzBeat + +### 常见问题 + +1. 时序数据库IoTDB和TDengine是否都需要配置,能不能都用 + + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + +2. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] + + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 + +3. 监控详情历史图片不展示或无数据,已经配置了TDengine + + > 请确认是否安装的TDengine版本为3.0以上,版本2.x不支持兼容 + +4. 安装配置了TDengine数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] + + > 请检查配置参数是否正确 + > td-engine enable是否设置为true + > 注意⚠️若hertzbeat和TDengine都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.6.0.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.6.0.md new file mode 100644 index 0000000000..ce9397d5ed --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.6.0.md @@ -0,0 +1,280 @@ +--- +id: 1.6.0-update +title: 如何升级到 1.6.0 +sidebar_label: 1.6.0 升级指南 +--- + +## HertzBeat 1.6.0 升级指南 + +### 注意:该指南适用于1.5.0向1.6.0版本升级 + +### 如果你使用更老的版本,建议使用导出功能重新安装,或先升级到1.5.0再按本指南升级到1.6.0 + +### 二进制安装包升级 + +1. 升级Java环境 + + 由于1.6.0版本使用Java17,且安装包不再提供内置jdk的版本,参考以下情况使用新版HertzBeat。 + + - 当你的服务器中默认环境变量为Java17时,这一步你无需任何操作。 + - 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**没有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并在搜索引擎搜索如何设置新的环境变量指向新的Java17。 + - 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并将解压后的文件夹重命名为java,复制到HertzBeat的解压目录下。 + +2. 升级数据库 + + 打开[https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件执行升级sql。 + +3. 升级配置文件 + + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE + ``` + + 如若修改为mysql数据库,给出一个示例: + + ```yaml + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: mysql + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # 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: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` + +4. 添加相应的数据库驱动 + +由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动,复制到安装目录下`ext-lib`中。 + +mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) +oracle(如果你要监控oracle,这两个驱动是必须的): + [https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar](https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) +接下来,像之前那样运行启动脚本,即可体验最新的HertzBeat1.6.0! + +### Docker 方式升级 - Mysql数据库 + +1. 关闭 HertzBeat 容器 + + ```shell + docker stop hertzbeat + ``` + +2. 升级数据库脚本 + + 打开[https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 Mysql 执行升级sql。 + +3. 升级配置文件 + + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: mysql + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # 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: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` + +4. 添加相应的数据库驱动 + +由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动 jar 放到本地 `ext-lib`目录下,然后启动时将`ext-lib`挂载到容器的 `/opt/hertzbeat/ext-lib`目录。 + +mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) +oracle(如果你要监控oracle,这两个驱动是必须的): + [https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar](https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) +接下来,像之前那样 Docker 运行启动 HertzBeat,即可体验最新的HertzBeat1.6.0! + +### Docker安装升级 - H2内置数据库(生产环境不推荐使用H2) + +1. 关闭 HertzBeat 容器 + + ```shell + docker stop hertzbeat + ``` + +2. 编辑H2数据库文件 + + 前题你已经将 H2 数据库文件 data 目录挂载到本地,或者启动老容器手动将 /opt/hertzbeat/data 目录拷贝出来。 + 下载 h2 驱动 jar [https://mvnrepository.com/artifact/com.h2database/h2/2.2.220](https://mvnrepository.com/artifact/com.h2database/h2/2.2.220) + 使用 h2 驱动 jar 本地启动数据库 + + ```shell + java -jar h2-2.2.220.jar -url jdbc:h2:file:./hertzbeat -user sa -password 123456 + ``` + + 打开[https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 H2 执行升级sql。 + +3. 升级配置文件 + + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # 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: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` + +4. 添加相应的数据库驱动 + +由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动 jar 放到本地 `ext-lib`目录下,然后启动时将`ext-lib`挂载到容器的 `/opt/hertzbeat/ext-lib`目录。 + +mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) +oracle(如果你要监控oracle,这两个驱动是必须的): + [https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar](https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) +接下来,像之前那样 Docker 运行启动,即可体验最新的HertzBeat1.6.0! + +### 通过导出导入升级 + +> 若不想如上繁琐的脚本升级方式,可以直接将老环境的监控任务和阈值信息导出导入 + +1. 部署一套最新版本的新环境 +2. 在页面上将老环境的监控任务和阈值信息导出。 +3. 在页面上将监控任务和阈值信息文件导入。 + +⚠️注意此方式只保留了老环境的监控任务信息和阈值信息,没有其它数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.7.0.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.7.0.md new file mode 100644 index 0000000000..7a4f5b3d01 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.7.0.md @@ -0,0 +1,41 @@ +--- +id: 1.7.0-update +title: 如何升级到 1.7.0 +sidebar_label: 1.7.0 升级指南 +--- + +## HertzBeat 1.7.0 升级指南 + +:::note +该指南适用于 1.6.x 向1.6.0 版本升级 1.7.0 +如果你使用更老的版本,建议使用导出功能重新安装,或先升级到 1.6.0 再按本指南升级到 1.7.0 +::: + +其它请参考 [版本更新指引](upgrade) + +## 升级注意 + +### 变更数据库 + +在 1.7.0 中,我们使用 `label` 代替 `tag`,在某些环境中,我们需要删除数据库中的表 `hzb_tag_monitor_bind`。 + +```sql +DELETE FROM hzb_tag_monitor_bind; +``` + +### 更新告警阈值 + +在 1.7.0 中,我们重新设计了新的告警阈值,包括实时阈值和计划阈值。 +我们需要手动重新配置告警阈值和告警分组。 + +:::tip +新版本没有内置的默认阈值规则,比如之前的可用性阈值。 +如果您发现监控下线后没有告警,您需要自己配置相应的可用性阈值。 +::: + +## 通过导出导入升级 + +若不想如上繁琐的脚本升级方式,可以直接将老环境的监控任务导出导入。 + +- 部署一套最新版本的新环境 +- 在页面上将老环境的监控任务导出再导入 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.9.0.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.9.0.md new file mode 100644 index 0000000000..2e13e9c217 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/update-1.9.0.md @@ -0,0 +1,481 @@ +--- +id: 1.9.0-update +title: 如何升级到 1.9.0 +sidebar_label: 1.9.0 升级指南 +--- + +## HertzBeat 1.9.0 升级指南 + +:::danger 本版本包含破坏性变更 +1.9.0 **不是**可以直接替换 jar 或镜像的平滑升级版本。运行环境、配置文件、权限规则、采集器加密协议、GreptimeDB 表结构和部分告警语义都发生了不兼容变化。请在开始升级前完整阅读本指南。 +::: + +:::note +该指南仅适用于**正式发布的 1.8.x** 升级到正式发布的 1.9.0。 +如果你使用 1.6.x / 1.7.x,请先按 [1.7.0 升级指南](1.7.0-update) 和对应版本文档逐级升级到 1.8.x,验证运行正常后再使用本指南。 +::: + +其它请参考 [版本更新指引](upgrade) + +## 是否受影响:快速检查 + +| 你的部署或使用情况 | 必读章节 | +|---|---| +| 安装包部署 | [运行环境](#运行环境)、[Manager 配置](#manager-配置applicationyml)、[权限规则](#权限规则surenessyml) | +| Docker / Docker Compose | [Manager 配置](#manager-配置applicationyml)、[权限规则](#权限规则surenessyml)、[Docker Compose](#docker-compose) | +| Helm 部署 | [Helm 部署](#helm-部署);Chart 未适配时不要只覆盖镜像 tag | +| 启用了 GreptimeDB | [GreptimeDB](#greptimedb仅启用时);不处理会导致日志停止写入 | +| 部署了远程采集器 | [采集器](#采集器);必须先于 Manager 1.9.0 完成升级 | +| 使用 SFTP、群晖、NVIDIA、Redis Sentinel 或 Push 式监控 | [监控任务](#监控任务) | +| 使用周期性阈值、静默或分组收敛 | [告警与通知](#告警与通知) | +| 有调用 HertzBeat API 的脚本或第三方系统 | [接口调用方](#接口调用方) | +| 在 `ext-lib/` 放置过第三方依赖,或部署过模板市场服务 | [依赖与第三方组件](#依赖与第三方组件)、[已移除的功能](#已移除的功能) | +| 自研插件 | [插件开发者](#插件开发者) | + +## 推荐执行顺序与维护窗口 + +Collector 与 GreptimeDB 之间没有固定的先后依赖,但二者都必须在启动 Manager 1.9.0 前准备完成。推荐按以下顺序执行: + +1. 根据上面的快速检查定位所有受影响章节,在测试环境完成演练;下载并准备 1.9.0 安装包、Java 25、新版 `application.yml` 与 `sureness.yml`,此时不要覆盖正在运行的 1.8.x 文件。 +2. 在任何生产数据修改、组件升级或文件替换前,备份下节列出的配置和部署文件,并记录当前各组件的版本。 +3. 在仍运行 1.8.x 时完成必须提前处理的动作:删除 Push 式监控及相关自定义模板、检查周期性阈值规则、修正无 host 监控的名称、清理重名公告、导出模板市场中的模板,并移除 `ext-lib/` 中冲突的旧依赖。 +4. 有远程 Collector 时,先逐台滚动升级到 1.9.0。1.9.0 Collector 可以连接 1.8.x Manager,因此这一步通常不需要停止 Manager。 +5. 进入维护窗口:停止 Manager,并暂停所有直接或间接向该 GreptimeDB 写入 HertzBeat 产品日志的发送方。需要避免 Collector 持续重试时,也可以暂时停止 Collector。 +6. 在停止写入后,对元数据库与 GreptimeDB 创建一致性备份或快照。 +7. 启用了 GreptimeDB 时,按本指南的分阶段路径升级 GreptimeDB,并完成 `hertzbeat_logs` 旧表重命名。 +8. 整包替换 Manager,合并新版配置和权限规则,然后启动 Manager 1.9.0。确认新日志表创建成功后,在外部写入保持暂停的情况下回灌并验证历史日志。 +9. 受控恢复一个发送方或发送一条测试日志,完成文末的[升级后检查](#升级后检查)。确认正常后再恢复全部外部写入,并结束维护窗口。 + +:::caution 停机范围 +Manager 从第 5 步停止到第 8 步启动完成期间不可用。Collector 可以提前滚动升级;GreptimeDB 升级、表重命名、Manager 切换和历史日志回灌期间必须停止产品日志写入。实际停机时间取决于 GreptimeDB 的分阶段升级、数据卷恢复和历史日志回灌速度。受控验证新日志写入成功后才能全面恢复发送方。 +::: + +## 升级前备份 + +备份分为两个阶段。**任何变更之前**先保存: + +1. HertzBeat 与 Collector 文件:`define/`、`ext-lib/`、`config/`,以及所有外置的 `application.yml`、`sureness.yml`、证书和密钥文件。 +2. 容器部署文件:`.env`、实际使用的 Compose 文件及其本地修改;Kubernetes 的 ConfigMap、Secret、values 文件和挂载声明。 +3. 当前 1.8.x 安装包或镜像 tag、所有 Collector 版本和 GreptimeDB 版本,确保回滚时仍能取得相同制品。 + +进入维护窗口并停止相关写入后,再创建以下**一致性备份**: + +1. 元数据库:H2 的完整 `data/` 目录,或 MySQL / PostgreSQL 的一致性备份。 +2. 启用 GreptimeDB 时:完整数据目录、Docker volume 或外部存储快照。该备份必须能与升级前使用的 GreptimeDB 版本一起恢复。 + +升级完成前不要覆盖或删除这些备份。尤其是启用了 GreptimeDB、周期性告警规则或自定义 `sureness.yml` 的部署,建议先完整演练升级与回滚。 + +## 运行环境 + +### Java 25 + +1.9.0 的 Java 运行时要求由 Java 17 提升到 **Java 25**。官方通用安装包与 1.8.x 一样不内置 JDK。 + +- 服务器默认 Java 已是 25:无需操作。 +- 服务器默认 Java 不是 25(如 Java 8、11、17、21),且没有其他应用依赖旧版本:安装 Java 25 并把环境变量指向它。 +- 服务器有其他应用依赖旧版本 Java:下载 Java 25,把解压后的目录改名为 `java`,放到 HertzBeat 解压目录下,启动脚本会优先使用它。 + +Docker 镜像基础层已切换到 `eclipse-temurin:25-jdk`,Docker 用户无需处理。 + +### 安装包目录结构 + +启动脚本的 classpath 改为显式的 `lib/*` 与 `ext-lib/*`,不再依赖 jar 的 manifest。请**整包替换**安装目录,不要只替换主 jar。 + +### 采集器镜像路径 + +采集器镜像的工作目录从 `/opt/apache-hertzbeat-collector-<版本>-bin/` 改为固定的 `/opt/hertzbeat-collector/`。所有挂载 `config/`、`logs/`、`ext-lib/` 的 volume 或 Kubernetes ConfigMap 路径需要同步修改。 + +## Manager 配置:application.yml + +### JPA 实现从 EclipseLink 切换为 Hibernate + +这是最容易被忽略、后果最直接的一处。**沿用 1.8.x 的 `application.yml` 会导致主服务无法启动。** 请按所用数据库把 `spring.jpa` 段整体替换。 + +1.8.x 的写法(需要删除): + +```yaml +spring: + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE +``` + +1.9.0 的写法,H2: + +```yaml +spring: + jpa: + show-sql: false + database: h2 + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + format_sql: true +``` + +MySQL: + +```yaml +spring: + jpa: + show-sql: false + database: mysql + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.MySQLDialect + format_sql: true +``` + +PostgreSQL: + +```yaml +spring: + jpa: + show-sql: false + database: postgresql + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.PostgreSQLDialect + format_sql: true +``` + +:::caution +`hibernate.ddl-auto: update` 不能省略。1.9.0 新增的表和列(如 `hzb_auth_token`、通知接收人的 ntfy 字段)由 Hibernate 自动创建,省略后启动虽然成功,但相关功能会在运行时报 SQL 错误。 +::: + +1.9.0 新增的 Flyway 数据库迁移会在启动时自动执行,无需手工干预,其中一项有可见影响: + +- 它把 `hzb_alert_define.expr` 扩展为大文本类型(PostgreSQL `TEXT`、MySQL `LONGTEXT`、H2 `CLOB`),绑定大量监控的阈值表达式不再被截断。 + +:::caution 挂载了自己的 application.yml 的部署 +Docker Compose 用 `./conf/application.yml` 覆盖镜像内的配置文件,`docker run` 也常挂载 `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml`。**镜像升级不会更新这些挂载进去的文件**,沿用 1.8.x 的副本一样会撞上上面的 EclipseLink 问题。请用 1.9.0 的版本重新生成,再把你自己的改动合并回去。 +::: + +### 其他配置键变更 + +| 1.8.x | 1.9.0 | 说明 | +|---|---|---| +| `management.endpoints.enabled-by-default: on` | `management.endpoints.access.default: read_only` | Spring Boot 4 移除了旧键。保留旧键不会报错,但 actuator 会退回不受限模式。 | +| 无 | `springdoc.api-docs.enabled: false`、`springdoc.swagger-ui.enabled: false` | OpenAPI 文档默认关闭。需要时设为 true,且只有 admin 角色可访问。 | +| 无 | `hertzbeat.otlp.grpc.port: 14317` | 启用 GreptimeDB 时新增 OTLP/gRPC 监听端口,详见 [版本更新指引](upgrade#新增-otlpgrpc-监听端口-14317)。 | +| 无 | `hertzbeat.collector.mysql.query-engine: auto` | MySQL 系采集引擎选择,见下文"采集器"一节。 | +| `spring.mail.properties.mail.smtp.ssl.trust` | 页面邮件设置中的"校验 SSL 证书"开关 | yml 中的 `ssl.trust` 不再生效,自签证书的 SMTP 需在页面关闭校验。 | + +## 权限规则:sureness.yml + +1.9.0 收紧了大量接口的角色要求。1.9.0 的安装包、Docker 镜像、仓库内五个 Compose 方案的 `conf/sureness.yml` 以及 `script/sureness.yml` 都已同步为新规则。 + +- 没有挂载过 `sureness.yml`:无需操作。 +- 挂载的是 1.8.x 时期下载或复制的 `sureness.yml`:**必须换成 1.9.0 的版本**。1.9.0 更新了授权规则,而挂载进去的文件会覆盖发布包与镜像内的那份。 +- 自定义过该文件:以 1.9.0 的文件为基础重新合并你的改动。 + +需要注意的变化: + +- 告警 SSE 与管理 SSE(`/api/alert/sse/**`、`/api/manager/sse/**`)在 1.9.0 中需要登录。浏览器原生 `EventSource` 无法携带认证头,页面已改用带认证的 fetch 流式实现;第三方看板需要同样处理。 +- 以下接口在 1.9.0 中 **仅 admin** 可访问:插件上传 `/api/plugin/**`、AI 与 SOP `/api/ai/**`、API Token 管理 `/api/account/token*`、系统配置写入 `/api/config/**`、监控模板修改 `/api/apps/**`(PUT/DELETE)、`/actuator/**`、`/api/metrics`、`/api/warehouse/query`、单个监控删除。使用这些接口的自动化需要改用 admin 凭据。 +- 阈值规则新增与修改(`POST/PUT /api/alert/define`、`/api/alert/defines/import`)以及阈值预览 `GET /api/alert/define/preview/**` 在 1.9.0 中 **仅 admin** 可访问;guest 不能读取阈值规则。 +- 标签删除 `DELETE /api/label/**` 在 1.9.0 中 **仅 admin** 可访问。 +- 外部告警源推送 `POST /api/v2/alerts` 在 1.9.0 中只允许 admin 与 user;Alertmanager / Zabbix 集成需要使用相应角色的凭据。 +- 系统密钥配置不再支持通过 REST API 读取,相关请求对所有角色返回 403。 +- OpenAPI 文档接口 `/v3/api-docs/**` 在 1.9.0 中仅 admin 可访问。 +- 跨域配置不再返回 `Access-Control-Allow-Credentials`,依赖 Cookie 的跨域前端需改为 `Authorization: Bearer` 头。 + +使用 Prometheus 抓取 `/actuator/prometheus` 的用户,需要为抓取任务配置 admin 角色的 API Token。 + +## GreptimeDB(仅启用时) + +:::caution +1.9.0 启动时会主动初始化 GreptimeDB 的表和日志 pipeline,**任一失败主服务将直接退出**,不再像 1.8.x 那样降级运行。请先完成本节,再启动主服务。 +::: + +### 版本要求 + +1.8.x Docker Compose 自带的 `greptime/greptimedb:v0.14.3` 不支持 1.9.0 的日志 pipeline,Compose 1.9.0 已更新为 `v1.1.3`。**不能把 v0.14.3 直接替换为 v1.1.3**;根据 [GreptimeDB 官方升级路径](https://docs.greptime.com/user-guide/deployments-administration/upgrade/),低于 v0.16 的版本必须先升级到 v0.16,再升级到 v1.0。 + +按以下阶段操作,每一阶段都要使用该版本对应的官方升级说明,并在继续前确认 GreptimeDB 可以启动、旧表可查询且行数符合预期,再为下一阶段创建新的可恢复快照: + +1. `v0.14.3` → 一个兼容的 `v0.16.x` 版本; +2. `v0.16.x` → `v1.0.x`; +3. `v1.0.x` → Compose 使用的 `v1.1.3`。 + +任一阶段验证失败都应恢复该阶段开始前的数据快照,不要让更高版本继续写入该数据目录。 + +配置的 GreptimeDB 账号需要有建表、修改表和上传 pipeline 的权限。 + +### 产品日志表 hertzbeat_logs 的 body 列 + +1.8.x 把 `body` 列建为 `JSON` 类型,1.9.0 改为 `STRING`。1.9.0 不会修改已有表,**直接启动后所有新写入的日志都会被 GreptimeDB 拒绝**,页面上只表现为"日志不再更新",日志告警随之失效。 + +确认 Manager 和其它日志写入方已经停止,并已完成 GreptimeDB 数据快照后,先核对旧表结构和行数: + +```sql +SHOW CREATE TABLE hertzbeat_logs; +SELECT COUNT(*) AS row_count, MIN(time_unix_nano) AS min_time, MAX(time_unix_nano) AS max_time +FROM hertzbeat_logs; +``` + +确认 `body` 为 `JSON` 且表名无误后执行: + +```sql +ALTER TABLE hertzbeat_logs RENAME hertzbeat_logs_v18; +``` + +启动 1.9.0 让其创建新表,但继续暂停外部日志写入。确认新表为空后,再把历史数据回灌: + +```sql +INSERT INTO hertzbeat_logs (time_unix_nano, observed_time_unix_nano, trace_id, span_id, trace_flags, + severity_text, severity_number, body, attributes, resource, instrumentation_scope, dropped_attributes_count) +SELECT time_unix_nano, observed_time_unix_nano, trace_id, span_id, trace_flags, + severity_text, severity_number, json_to_string(body), attributes, resource, instrumentation_scope, dropped_attributes_count +FROM hertzbeat_logs_v18; +``` + +:::caution 历史日志只能回灌一次 +新表使用 append-only 模式,该 `INSERT ... SELECT` **不是幂等操作**,重复执行会产生重复日志。执行前记录旧表行数及最早、最晚时间;执行成功后,新旧表的这些值应一致。验证完成后,才受控恢复一个发送方并检查新日志写入。 + +如果客户端断线、超时或无法确认 SQL 是否完整执行,**不要直接重跑**。继续保持所有产品日志写入暂停,比较新旧表的行数和时间范围;无法证明目标表仍为空或回灌完整时,应使用升级前快照恢复并重新执行整个 GreptimeDB 升级流程。若必须保留目标表中的数据,请先在隔离环境设计并验证去重迁移方案。 +::: + +GreptimeDB 的 DDL 不应假定可以随关系型数据库事务一起回滚,因此执行每条语句后都要确认结果。 + +:::danger +不要使用 `ALTER TABLE hertzbeat_logs MODIFY COLUMN body STRING`。该语句能执行成功,但历史行的 JSON 二进制内容会被当成字符串读出,变成乱码。 +::: + +### 自监控表改名 + +HertzBeat 自监控的日志与链路表从 `hzb_logs` / `hzb_traces` 改名为 `hzb_internal_logs` / `hzb_internal_traces`,无自动迁移,迁移原则见 [版本更新指引](upgrade#greptimedb-信号表改名)。 + +产品链路表 `hertzbeat_traces` 是新建的:1.8.x 没有链路接入接口、查询接口和页面,`hzb_traces` 里只有 HertzBeat 自身的 span,所以没有历史业务链路数据需要迁移。 + +## 采集器 + +:::danger 采集器必须先于主服务升级 +1.9.0 更改了监控凭据的 AES 密文格式。主服务不解密、直接把密文下发给采集器,**1.8.x 采集器无法解密 1.9.0 主服务下发的密码**,需要认证的监控可能采集失败。握手过程没有版本校验,不会阻止这种错配:采集器日志里会出现 AES 解密错误,监控侧通常表现为目标服务返回的认证失败,容易被误判成密码填错。主服务首次启动就会用新格式重写部分凭据,不需要用户操作即触发。 + +正确顺序:先把所有采集器升级到 1.9.0(1.9.0 采集器可以正常解密 1.8.x 格式的密文,接旧主服务无问题),再升级主服务。 +::: + +### MySQL 系采集引擎 + +1.9.0 内置了 MySQL / MariaDB / OceanBase / TiDB 的 R2DBC 查询引擎,`query-engine` 默认为 `auto`:`ext-lib/` 下存在 `mysql-connector-j` 时继续用 JDBC,行为不变;否则用内置引擎。若驱动放在 `ext-lib/` 之外的路径,请显式设置 `HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=jdbc`。 + +内置引擎比 JDBC 严格: + +- 忽略 `url` 参数中的连接选项(`useSSL`、`serverTimezone` 等)。 +- 对自定义 SQL 采用**白名单**:只接受以 `SELECT` 或 `SHOW` 开头的单条语句。 +- 拒绝任何注释(`--`、`#`、`/* */`),也拒绝含 `insert`/`update`/`delete`/`replace`/`merge`/`alter`/`drop`/`truncate`/`create`/`call` 整词的语句——所以 `WITH ... SELECT`、`DESC`、`SHOW CREATE TABLE` 和带注释的 SQL 都会被拒。 + +内置 R2DBC 路径会优先使用 TLS。若升级后出现 TLS 握手或 MySQL 认证插件兼容错误,请为监控账号配置兼容的 TLS/认证方式;也可以把 `mysql-connector-j` 放入 `ext-lib/`,并显式设置 `HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=jdbc` 回到 JDBC 路径。 + +### JDBC 数据库名校验 + +JDBC 类监控的 `database` 参数现在只允许 `[A-Za-z0-9_$][A-Za-z0-9_$.-]{0,63}`。包含空格、中文或超过 64 字符的库名,请改为在 `url` 参数中完整填写连接串。 + +## 监控任务 + +### SFTP 监控 + +SFTP 监控(FTP 模板开启 SSL)升级后默认拒绝所有服务器主机密钥,**每个 SFTP 监控都需要手工补充主机密钥指纹**,或临时勾选跳过校验。详见 [版本更新指引](upgrade#sftp监控必须显式配置主机密钥策略)。 + +### 群晖模板改名 + +群晖模板的 `app` 标识从 `synology` 改为 `synology_nas`,已有监控不会自动迁移。停止 Manager、备份元数据库后,先确认受影响记录: + +```sql +SELECT id, name, app FROM hzb_monitor WHERE app = 'synology'; +``` + +确认结果无误后执行,并再次查询确认没有遗漏: + +```sql +UPDATE hzb_monitor SET app = 'synology_nas' WHERE app = 'synology'; +SELECT id, name, app FROM hzb_monitor WHERE app = 'synology'; +``` + +引用了 `synology` 的阈值规则、通知规则和看板过滤条件需要同步修改。 + +### Push 式监控已移除 + +`push` 协议的监控模板(Push Style Monitor)已删除。升级前先查询受影响监控: + +```sql +SELECT id, name, app FROM hzb_monitor WHERE app = 'push'; +``` + +请在仍运行 1.8.x 时通过页面或 API 删除查询到的监控,让 HertzBeat 同时清理参数、阈值绑定、父子监控绑定、指标收藏、采集器绑定和调度任务。**不要只对 `hzb_param` 和 `hzb_monitor` 执行手工 DELETE**,否则会遗留孤儿数据。如果页面或 API 已不可用,请先停止 Manager,再根据所用数据库制定并验证完整的事务清理脚本,不要直接复制不完整的通用 SQL。 + +如果在页面上编辑并保存过含 `push:` 协议块的自定义模板,或对象存储中存有此类模板,**必须在升级前删除**,否则主服务启动时解析模板失败而退出。Prometheus 推送网关 `/api/push/prometheus/**` 是另一功能,不受影响。 + +### 模板字段变更 + +- NVIDIA 模板 `basic` 指标的字段改名:`utilization.gpu [%]` → `utilization_gpu`、`utilization.memory [%]` → `utilization_memory`、`memory.total [MiB]` → `memory_total`、`memory.used [MiB]` → `memory_used`、`memory.free [MiB]` → `memory_free`、`temperature.gpu` → `temperature_gpu`。引用旧字段名的阈值规则和看板需要修改。该模板同时删除了 `proxyHost`、`proxyPort`、`proxyUsername`、`proxyPassword`、`proxyPrivateKey` 五个参数,通过跳板机采集 GPU 的监控需要改用其他方式连通。 +- Redis Sentinel 模板 `sentinel` 指标的 `sentinel_masters`、`sentinel_tilt`、`sentinel_running_scripts`、`sentinel_scripts_queue_length`、`sentinel_simulate_failure_flags` 从字符串改为数值。按字符串比较的阈值规则需要改为数值比较。 +- 历史数据查询接口会校验所有查询参数:`app`、指标组和字段名只允许字母、数字、`_`、`-`,长度 1–200;`instance` 另外允许 `. : [ ]`,但不允许空格和中文;时间范围必须是 1–6 位数字加一个 `s`、`m`、`h`、`d`、`w` 或 `y` 单位,单位不区分大小写(如 `6h`、`1D`)。自定义模板和 API 调用方需要同步检查。 + +## 告警与通知 + +### 周期性阈值规则 + +周期性规则(PromQL 与 SQL)在执行时新增了限制:查询语句不超过 8192 字符,时间范围不超过 1 天(如 `[2d]`、`[1w]`、`RANGE '2d'` 会被拒绝),结果不超过 1000 行。SQL 规则还必须是单条只读语句,以 `SELECT` 或 `WITH` 开头,不含库名前缀,且能被标准 SQL 解析器解析。 + +**不满足限制的规则在保存时不会报错,执行时会被静默跳过**,已经触发的告警不会恢复。升级前请逐条检查现有周期性规则,可用阈值预览接口验证(该接口现在仅 admin 可调用)。 + +### 实时阈值规则的空值语义 + +1.8.x 中指标字段为空或无法解析时,该行数据直接跳过。1.9.0 改为数值字段以 `null`、字符串字段以空串参与表达式求值。影响: + +- `field != 0`、`!contains(field, "x")`、`!matches(field, "...")` 这类取反表达式在空值行上会成立,可能误报。 +- 字段已经变空的历史告警会在升级后第一轮评估中集中恢复,产生一批恢复通知。 + +建议给此类规则加上 `exists(field) &&` 前置条件。 + +### 周期性告警静默 + +1.8.x 中周期型静默规则存在缺陷,创建当天之后事实上不再生效。1.9.0 修复后按每天的时间段、闭区间、支持跨午夜匹配,并统一按**服务端时区**计算。所有仍处于启用状态的周期型静默规则升级后会真正开始压制告警,请逐条复核;浏览器与服务端时区不同的规则,时间窗口会整体平移。 + +### 告警分组收敛 + +分组告警处于 firing 状态时会按 `repeat_interval`(默认 4 小时)重复通知。`repeat_interval` 为 0 时会按 `group_interval`(默认 5 分钟)重复发送,请改为较大的数值。带标签过滤的通知规则现在只要分组内任一告警命中即触发,下发给通知渠道的分组内容按规则重新组装,`groupKey` 与落库值可能不同,下游按 `groupKey` 去重的系统请改为按单条告警的 `fingerprint`。 + +### 通知渠道 + +- Webhook 地址改为原样发送,不再自动编码。地址中含空格、`|`、`{`、`}` 等字符的接收人需要修正。 +- 邮件通知默认校验 SMTP 证书,自签证书需在页面邮件设置中关闭校验。 +- 接口返回的通知接收人密钥字段(Webhook Token、机器人 Token、Slack 地址等)改为掩码 `******` 加末 4 位。通过接口"读取后再新建"接收人的脚本会把掩码存成真实值,请改为"读取后修改"。 + +## 接口调用方 + +- 日志查询、日志管理与日志 SSE 接口从 `/api/logs/**` 迁移到 `/api/observability/**`,旧路径返回 404。OTLP 日志上报旧路径 `/api/logs/otlp/v1/logs`、`/api/logs/ingest/otlp` 保留为过期别名。链路与指标查询接口(`/api/observability/traces/**`、`/api/observability/metrics/**`)是 1.9.0 新增的,1.8.x 没有对应路径。完整对照表见 [版本更新指引](upgrade#可观测otlp--日志--链路接口路径变更)。 +- `/api/logs/ingest/otlp` 别名的成功响应体从 `{"code":0,...}` 改为 `{}`;缺少 `Content-Type` 的请求按 protobuf 解析;新增 429 与 503 状态码。 +- `GET /api/monitor/{id}` 返回的密码类参数改为掩码 `******`,修改时提交掩码即保留原值;新建监控时不能提交掩码。 +- 监控 Excel 导出格式从 11 列改为 14 列,**1.8.x 导出的 xlsx 不能导入 1.9.0**,请重新导出或使用 JSON / YAML。导入改为整批校验,任一行失败则整批不入库。 +- 阈值规则导出新增 `datasource` 字段。1.8.x 导出的规则导入后 `datasource` 为空,周期性规则不会执行,导入后请补填。 +- 匿名 Prometheus 推送网关 `/api/push/prometheus/**` 新增限额:单次请求体不超过 5 MB、样本不超过 10000 个,自动创建的监控总数不超过 10000。超限统一返回 400 且响应体里 `code` 为 0,真正原因只写在服务端日志里。可用 `HERTZBEAT_PUSH_MAX_BODY_BYTES`、`HERTZBEAT_PUSH_MAX_SAMPLES`、`HERTZBEAT_PUSH_MAX_AUTO_CREATED_MONITORS` 调整。 +- 1.8.x 签发的登录 Token 与 API Token 继续有效。新签发的 API Token 支持在页面上列出和吊销。 + +## Docker Compose + +- 所有 Compose 变体的端口默认绑定到 `127.0.0.1`。需要远程访问时复制 `.env.example` 为 `.env`,注意三者分开: + - `HERTZBEAT_BIND_ADDRESS` 控制 1157(Web/API)与 1158(采集器接入); + - `HERTZBEAT_OTLP_BIND_ADDRESS` 单独控制 14317(OTLP/gRPC),只设前者不会放开它; + - 数据库与时序库端口(如 `127.0.0.1:15432:5432`、`127.0.0.1:14000:4000`)是**写死**在 compose 文件里的,没有对应环境变量,确有需要只能直接改 compose。 + + 改完先跑 `docker compose config` 核对最终的宿主机绑定。 +- `hertzbeat-postgresql-victoria-metrics` 变体的 `POSTGRES_PASSWORD` 改为必填。若旧部署没有覆盖 Compose 的默认密码,已有数据卷使用旧默认值初始化;若曾自定义,则应以实际数据库用户口令为准。升级前请核对旧 `.env`、Compose 配置和数据库用户名,在新 `.env` 中填入**相同口令**,否则数据库认证失败。若要改用强口令,请先在 PostgreSQL 中修改该数据库用户的口令,再同步 `.env`。 +- `hertzbeat-postgresql-greptimedb` 变体的 GreptimeDB 镜像从 `v0.14.3` 升级到 `v1.1.3`,见 [GreptimeDB](#greptimedb仅启用时)。 + +## Helm 部署 + +Helm Chart 由独立项目维护。**不要在仍以 1.8.x 为 `appVersion` 的 Chart 上只覆盖 Manager 镜像 tag 为 1.9.0**:旧 Chart 可能继续挂载 EclipseLink 版 `application.yml`、旧权限规则,并且没有声明 OTLP/gRPC 端口 14317,导致启动失败、权限行为与 1.9.0 不一致或 gRPC 接入不可用。 + +升级前确认所用 Chart 明确支持 HertzBeat 1.9.0,并至少检查: + +- `application.yml` 已使用本指南中的 Hibernate 配置; +- `sureness.yml` 已同步为 1.9.0 规则; +- 使用 OTLP/gRPC 时,Deployment、Service、NetworkPolicy 和 Ingress/Gateway 已按需配置 14317; +- Collector 的配置挂载路径已从版本化目录改为 `/opt/hertzbeat-collector/`; +- values、ConfigMap、Secret 和持久卷已经备份。 + +如果尚无明确支持 1.9.0 的 Chart,请不要只替换镜像,改用已验证的安装包或 Compose 流程,或等待 Chart 发布兼容版本。 + +## AI 会话与 SOP 计划任务 + +1.9.0 给 AI 会话和 SOP 计划任务加上了归属校验: + +- 没有记录创建者的 AI 会话会被隔离,不再出现在任何用户的会话列表里。 +- SOP 计划任务归属于其目标会话的创建者。没有目标会话、没有创建者或创建者与会话创建者不一致的任务,会在后台执行前被禁用。 +- 整个 `/api/ai/**` 收敛为仅 admin 可访问。 + +正式发布的 1.8.x 没有 SOP 计划任务,因此从 1.8.x 升级不会产生需要恢复的历史任务。 + +## 其它行为变化 + +这几项不需要改配置,但会改变你看到的数据或告警,升级后请留意: + +- **无 host 的监控模板**(`*_sd` 服务发现类、openai、deepseek 等)的 `instance` 从 `null:port` 改为回填监控名。首次编辑保存后,时序数据会与旧序列断开一次,告警指纹也会随之变化一次。监控名将作为历史查询的 `instance`;名称含空格、中文或其它不在 `[A-Za-z0-9_\-.:\[\]]` 中的字符时,历史查询会被拒绝,升级前请先改名。 +- **SSH / 脚本类采集的单行指标**:命令输出为空且没有 stderr 时,1.8.x 判为采集失败,1.9.0 判为一行值为 NULL 的成功数据。原来靠"response data is null"触发的可用性告警不再触发,需要改为对具体字段判空。stderr 现在会作为失败信息返回。 +- **VictoriaMetrics 存储**:与保留标签 `__name__`、`__monitor_id__`、`__metrics__`、`__metric__`、`instance` 同名的自定义标签会被丢弃,不再覆盖保留标签。 +- **公告栏**:`hzb_bulletin.name` 增加唯一约束,`POST` 不再按 id 做 upsert(同名直接报已存在),`PUT` 必须带 id。库里已有重名公告时唯一约束会被 Hibernate 静默跳过,建议升级前先清理重名。 +- **通知接收人**:`PUT` 一个不存在的 id 从 upsert 改为报错;当 host、port、Webhook URL 等目标字段发生变更时不再接受掩码值,必须提交真实密钥。 + +## 已移除的功能 + +- **Push 式监控(`app-push`)**,见 [监控任务](#监控任务)。 +- **监控模板市场(template marketplace hub)**:独立部署的模板市场服务整体删除,`/template`、`/tag`、`/star`、`/share`、`/category`、`/user`、`/version`、`/role`、`/resource`、`/auth` 等接口和对应的 7 张表都不再存在,**没有升级路径**。如果你部署过这个服务,请在升级前自行导出其中的模板,改为通过页面或 `define/` 目录管理。 + +## 依赖与第三方组件 + +这些变化只影响特定部署方式,多数用户无需处理: + +| 组件 | 1.8.0 | 1.9.0 | 影响 | +|---|---|---|---| +| Nacos 客户端 | 2.2.1 | 3.1.1 | **不再支持 Nacos 1.x 服务端**。用 Nacos 做服务发现的监控(`nacos_sd`)需要 Nacos 2.x 及以上 | +| BouncyCastle | `bcprov-jdk15on` | `bcprov-jdk18on` 1.85 | `ext-lib/` 里自带 `jdk15on` 系列 jar 的部署会出现类冲突,请删除旧 jar | +| OkHttp | 4.12.0 | 5.3.2 | 自带 OkHttp 的第三方插件需重编 | +| mssql-jdbc | 10.2.0.jre8 | 12.10.2.jre11 | 手动放进 `ext-lib/` 的旧 SQL Server 驱动建议同步更新 | +| gRPC / OpenTelemetry | 1.56.1 / 2.15.0 | 1.76.3 / 2.25.0 | 一般无感知 | + +另外,通知与采集的出站 HTTP 客户端从 OkHttp 换成了 JDK 自带的 `HttpClient`:请求头里的 `Connection: close` 会被静默丢弃,且 https 到 http 的重定向会被拒绝。自建的 Webhook 接收端如果依赖这两种行为,需要调整。 + +## 插件开发者 + +`hertzbeat-common` 拆分为 `hertzbeat-common-core` 与 `hertzbeat-common-spring`,插件 SPI 接口(`Plugin`、`PostAlertPlugin`、`PostCollectPlugin`、`PluginRunner`)以及 `GroupAlert`、`SingleAlert`、`CollectRep`、`Job` 的全限定名都未变。 + +- **必须做**:把依赖坐标从 `org.apache.hertzbeat:hertzbeat-common:1.8.0` 换成 `hertzbeat-common-core` 或 `hertzbeat-common-spring`,然后用 Java 25 重新编译。 +- **不需要改代码**:`JsonUtil`、`XmlUtil`(迁至 `hertzbeat-common-core`)、`CommonThreadPool`(迁至 `hertzbeat-common-spring`)等工具类只是换了模块,包名与类名一字未改。 +- **需要改代码**:`PluginUpload` 与 `CollectorSummary` 迁到了 `org.apache.hertzbeat.manager.pojo.dto`,`PushProtocol` 与 `PushMetricsDto` 随 Push 式监控一起删除。 +- 核心 JSON 库升级到 Jackson 3(`tools.jackson.*`)。Jackson 2 的 databind 仍作为传递依赖存在于 classpath,但不应再依赖它,新代码请使用 Jackson 3。 + +## 升级后检查 + +1. 主服务日志无 Flyway 与 Hibernate 报错。 +2. 采集器页面所有采集器在线且版本为 1.9.0。 +3. 随机抽查需要认证的监控(数据库、SSH、API Key 类)采集正常。 +4. 启用 GreptimeDB 时,日志页面有新数据写入;主服务日志无 `[warehouse greptime-log] Write failed`。 +5. 周期性阈值规则页面无执行异常;告警静默列表已逐条复核。 +6. 挂载或自定义过 `sureness.yml` 的部署,分别使用 admin、普通用户和 guest 验证若干仅管理员接口、登录后接口与匿名接口,确认授权结果符合 1.9.0 规则。 + +## 回滚到 1.8.x + +:::danger +升级后产生的新数据可能无法合并回升级前快照。不要让 1.8.x Manager 直接连接已经被 1.9.0 修改过的元数据库,也不要用 GreptimeDB 0.14 直接打开已经由 1.1 写入的数据目录。 +::: + +如果升级验证失败并决定回滚: + +1. 停止 Manager,以及所有通过 OTLP、HTTP、SQL 或其它方式直接或间接写入该 GreptimeDB 的客户端;共享 GreptimeDB 的其它应用也必须停止写入。为避免持续重试,可同时停止 Collector。 +2. 恢复升级前的关系型元数据库备份。 +3. 如果升级或修改过 GreptimeDB,恢复升级前的**完整 GreptimeDB 数据目录、Docker volume 或外部存储快照**,并使用备份时记录的 GreptimeDB 版本启动。不要把修改表名当作跨大版本数据库回滚。 +4. 恢复 1.8.x 安装包或镜像,以及配套的 `config/`、`define/`、`ext-lib/`、`.env`、Compose/Helm 配置和证书密钥。 +5. Collector 1.9.0 可以临时连接 1.8.x Manager;如果要求完整恢复原版本,再逐台恢复 Collector 1.8.x。任何时候都不要让 Manager 1.9.0 向 Collector 1.8.x 下发凭据。 +6. 先启动数据库和时序库,再启动 Manager 与 Collector。按升级前记录抽查监控、告警、通知和日志写入。 + +1.9.0 已经创建新 `hertzbeat_logs` 时,不能直接把 `hertzbeat_logs_v18` 重命名回来,因为目标表名已被占用。完整数据快照是首选回滚方式;如果必须保留 GreptimeDB 1.1 并只回滚 HertzBeat,请先在隔离环境验证如何归档 1.9 新表、恢复旧表名和 JSON `body` 结构,不要在生产环境临时拼接 DDL。 + +## 仅迁移监控任务到全新环境 + +如果希望放弃原环境、重新部署一套 1.9.0,可以导出导入监控任务。这不是完整环境迁移,新环境仍需按本文完成 Java、配置、权限、Collector、GreptimeDB 和部署方式检查。 + +1. 部署并验证一套全新的 1.9.0 环境。 +2. 在老环境页面用 **JSON 或 YAML** 格式导出监控任务(Excel 格式不兼容),在新环境导入。 +3. 单独导出并导入阈值规则;1.8.x 导出的规则需要在新环境补填 `datasource`。 +4. SFTP 监控导入后仍需补充主机密钥指纹。 + +账号与角色、通知接收人和策略、看板、状态页、公告、AI 会话、系统配置、历史指标/日志以及其它元数据不会因为导入监控任务而自动迁移,需要逐项重建或制定单独的数据迁移方案。 + +## 获取帮助与报告安全问题 + +- 一般升级问题可以通过 [GitHub Issues](https://github.com/apache/hertzbeat/issues)、[社区联系方式](../community/contact)或公开开发者邮件列表 `dev@hertzbeat.apache.org` 求助。提问前请删除密码、Token、数据库连接串和其它敏感信息。 +- 疑似安全问题**不要**提交公开 Issue、Discussion 或发送到公开邮件列表。请按照 [安全模型](../help/security_model)和 [ASF 漏洞报告流程](https://www.apache.org/security/#reporting-a-vulnerability)私下报告。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/upgrade.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/upgrade.md new file mode 100644 index 0000000000..2b31e0ad17 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/upgrade.md @@ -0,0 +1,141 @@ +--- +id: upgrade +title: HertzBeat 新版本更新指引 +sidebar_label: 版本更新指引 +--- + +**Apache HertzBeat™ 的发布版本列表** + +- [下载页面](https://hertzbeat.apache.org/docs/download) +- [Github Release](https://github.com/apache/hertzbeat/releases) +- [DockerHub Release](https://hub.docker.com/r/apache/hertzbeat/tags) + +HertzBeat 的元数据信息保存在 H2 或 Mysql, PostgreSQL 关系型数据库内, 采集指标数据存储在 TDengine, IotDB 等时序数据库内。 + +**升级前您需要保存备份好数据库的数据文件和监控模板文件** + +## 1.9.0 新增:Native 采集器安装包 + +1.9.0 起提供预编译的 Native 采集器安装包(`apache-hertzbeat-collector-native-*`),启动快、内存占用低。 + +它**不是 JVM 采集器的无损替代**,且对运行环境有硬性要求(x86 包需要 CPU 支持 AVX2、Linux 包需要 +glibc ≥ 2.34、Windows 包需要 VC++ 运行库),不满足时进程会**瞬间退出且没有任何日志**。 +升级时如果打算改用 Native 采集器,请先阅读 [Native 采集器](native-collector) 中的"运行环境要求"。 + +原有的 JVM 采集器安装包 `apache-hertzbeat-collector-{version}-bin.tar.gz` 继续提供,升级方式不变。 + +## 1.9.0 不兼容变更 + +### SFTP监控必须显式配置主机密钥策略 + +从 1.9.0 起,每个SFTP监控必须显式配置主机密钥策略:一个或多个可信的 +`SHA256:...`主机密钥指纹,或者由操作员显式选择危险的临时跳过验证选项。 + +这是一个失败关闭的不兼容变更。HertzBeat不会为1.8.x监控、导入配置或通过API/SQL +直接创建的记录自动启用跳过验证。升级前或升级后应立即编辑每个SFTP监控: + +1. 获取服务器密钥,并通过可信渠道核对指纹; +2. 将核对后的指纹添加到“SFTP主机密钥指纹”; +3. 仅把跳过验证选项用于短期故障恢复。 + +完成上述任一策略配置前,受影响的SFTP监控会报告配置失败且不会建立连接。普通FTP +监控不受影响。指纹获取与密钥轮换方法请参阅[FTP监控](../help/ftp)。 + +### 可观测(OTLP / 日志 / 链路)接口路径变更 + +1.9.0 将 1.8.x 的日志模块合并为 `hertzbeat-observability`,指标、日志、链路统一使用 `/api/otlp/v1/{signal}` 接收、`/api/observability/**` 查询。1.8.x 只有日志一路信号有接口,因此下表列出的都是**日志接口**的迁移;所有按 1.8.x 路径配置的 OpenTelemetry Collector、Vector、SDK exporter、脚本或看板都需要更新。 + +| 1.8.x 路径 | 1.9.0 路径 | 1.9.x 状态 | +|---|---|---| +| `POST /api/logs/otlp/v1/logs` | `POST /api/otlp/v1/logs` | **保留为 deprecated 别名**,仍可用,响应带 `Deprecation: true`;2.0 移除 | +| `POST /api/logs/ingest/otlp` | `POST /api/otlp/v1/logs` | **保留为 deprecated 别名**,仍可用,响应带 `Deprecation: true`;2.0 移除 | +| `POST /api/logs/ingest/{其他协议}` | — | 已移除(`400`),历史上只有 `otlp` 有适配器 | +| `GET /api/logs/list` | `GET /api/observability/logs` | 已移除(`404`) | +| `GET /api/logs/stats/overview` | `GET /api/observability/logs/overview` | 已移除(`404`) | +| `GET /api/logs/stats/trace-coverage` | `GET /api/observability/logs/trace-coverage` | 已移除(`404`) | +| `GET /api/logs/stats/trend` | `GET /api/observability/logs/trend` | 已移除(`404`) | +| `GET /api/logs/sse/subscribe` | `GET /api/observability/logs/stream` | 已移除(`404`);新路径需要 `admin/user/guest` 登录 | +| `DELETE /api/logs` | `DELETE /api/observability/logs` | 已移除(`404`) | + +`POST /api/otlp/v1/{metrics,traces}` 接收接口、`/api/observability/metrics/**` 与 `/api/observability/traces/**` 查询接口是 1.9.0 **新增**的,1.8.x 没有对应路径,不涉及迁移。 + +建议的升级步骤: + +- 升级前在 collector / exporter 配置中搜索 `/api/logs/`,改为 `/api/otlp/v1/logs`。OTLP HTTP exporter 会把 `404` 视为永久错误并静默丢弃该批数据,路径过期的表现只是"日志突然没了"。 +- 如果无法在同一维护窗口内改完 exporter,上表两条接收别名在 1.9.x 仍然可用;请关注 HertzBeat 日志中的 `Deprecated OTLP log route ... was called` 告警并在 2.0 之前完成迁移。 +- 如果使用了自定义 `sureness.yml`,请补充 `/api/otlp/v1/**===post===[admin,user]` 与 `/api/observability/**===get===[admin,user,guest]`(参考安装包内的 `sureness.yml`);旧的 `/api/logs/**` 规则在 exporter 迁移完成后即可删除。 + +### 新增 OTLP/gRPC 监听端口 14317 + +当 `warehouse.store.greptime.enabled=true` 时,1.9.0 会额外启动一个 OTLP/gRPC 监听器,绑定 `0.0.0.0:14317`,供 exporter 通过 gRPC 推送指标、日志与链路。官方 Dockerfile 会暴露该容器端口;仓库内的五个 Docker Compose 快速启动方案将其发布为宿主机端口 `14317`,并默认绑定到 `127.0.0.1`。 + +- **这里没有使用 OpenTelemetry 标准的 4317。** 同机的 OTel Collector、Jaeger 或 Tempo 通常已经占着 4317,而已发布端口一旦冲突,`docker compose up` 会直接失败。HertzBeat 的 OTLP/HTTP 同样走自有端口,因此 14317 与产品其余部分是一致的。 +- 存量部署升级后会多出一个监听端口。如果你的防火墙或安全策略按端口清单管理,请把 14317 加进去。 +- 1.9.0 的所有 Docker Compose 快速启动方案现在默认把全部已发布端口绑定到 `127.0.0.1`,包括 `1157`、`1158`、`14317` 以及开发用的数据库/时序库端口。在旧的 Compose 检出目录上升级后,本机访问不受影响,但远程浏览器、Collector、OTLP 和数据库访问会被有意关闭,直到显式配置为止。 +- 如需接入远程 Collector,请把所选方案目录下的 `.env.example` 复制为 `.env`,将 `HERTZBEAT_BIND_ADDRESS` 设置为 Manager 的可达地址,并只允许 Collector 来源网络访问 `1158`。该变量同时控制 `1157`;远程访问 Web/API 时建议使用 TLS 反向代理。仅在有可信 OTLP 发送方时单独设置 `HERTZBEAT_OTLP_BIND_ADDRESS`。在使用通配地址前,请先替换默认凭证并配置防火墙或安全组限制。重启前执行 `docker compose config`,逐项检查最终的宿主机端口绑定。 +- 端口绑定失败**不会**导致 HertzBeat 启动失败:失败会被记录到日志,进程在没有 gRPC 接收能力的情况下继续启动,`/api/otlp/v1` 上的 OTLP/HTTP 不受影响。 +- 如需把监听器改到 4317 或关闭它,可在 `application.yml` 中配置,或使用对应的环境变量,并同步修改 docker-compose 的端口映射: + + ```yaml + hertzbeat: + otlp: + grpc: + enabled: ${HERTZBEAT_OTLP_GRPC_ENABLED:true} + host: ${HERTZBEAT_OTLP_GRPC_HOST:0.0.0.0} + port: ${HERTZBEAT_OTLP_GRPC_PORT:14317} + ``` + +- 使用 Helm 部署时请注意:Chart 维护在 `apache/hertzbeat-helm-chart` 仓库,依赖 gRPC 接入前请先确认其发布版本已暴露 14317。 + +### GreptimeDB 信号表改名 + +当 `warehouse.store.greptime.enabled=true` 时,GreptimeDB 里同时存着两类遥测数据:**你**通过 OTLP 推送的日志,以及 HertzBeat 通过 OpenTelemetry 写入的**自身**运行日志与链路。1.9.0 给自监控表加上了 `hzb_internal_` 前缀,与产品表区分开: + +| 数据 | 1.8.x 表名 | 1.9.0 表名 | +|---|---|---| +| 产品 OTLP 日志(日志页面、日志告警、SQL 编辑器) | `hertzbeat_logs` | `hertzbeat_logs`(表名不变,但 `body` 列类型变了,见下节) | +| HertzBeat 自身日志(自监控) | `hzb_logs` | `hzb_internal_logs` | +| HertzBeat 自身链路(自监控) | `hzb_traces` | `hzb_internal_traces` | +| 产品 OTLP 链路(链路页面、链路查询) | 1.8.x 无此功能 | `hertzbeat_traces`(新增) | + +- **1.8.x 没有产品链路能力**:没有链路接收接口、没有链路查询接口、也没有链路页面,`hzb_traces` 里只有 HertzBeat 自身的 span。链路是 1.9.0 新增的功能,不存在需要迁移的历史业务链路数据。 +- 不做自动迁移。旧的 `hzb_logs` / `hzb_traces` 表会原样保留、不再写入新数据,在保留期内仍可查询。这些是自监控历史,最省事的做法是等它自然过期后直接 `DROP` 掉。 +- 确实需要把这些历史数据搬到新表时,请先比对两张表的结构,并用**显式列名**插入。GreptimeDB 会随着新属性的出现给 OTLP 表动态增加列,源表与目标表的列数和顺序不保证一致,`INSERT ... SELECT *` 会报 `Column count doesn't match insert query`。 +- 如果有看板或临时 SQL 直接查询 `hzb_logs` / `hzb_traces`,请改为新表名。 + +### 产品日志表 hertzbeat_logs 的 body 列类型变更 + +`hertzbeat_logs` 表名虽然没变,但 1.8.x 把 `body` 列建为 `JSON`,1.9.0 改为 `STRING`。1.9.0 的建表语句是 `CREATE TABLE IF NOT EXISTS`,对 1.8.x 已经建出来的旧表是空操作,**因此直接启动后所有新写入的日志都会被 GreptimeDB 拒绝**:exporter 侧仍然收到 200,服务端只有一行 `[warehouse greptime-log] Write failed` 警告,页面上表现为"日志不再更新",日志告警随之失效。 + +必须在升级前重命名旧表、启动 1.9.0 建出新表后再回灌历史数据,**不要**直接 `ALTER TABLE ... MODIFY COLUMN`。完整步骤见 [1.9.0 升级指南](1.9.0-update)。 + +## Docker部署方式的升级 + +1. 若使用了自定义监控模板 + - 需要备份 `docker cp hertzbeat:/opt/hertzbeat/define ./define` 当前运行 docker 容器里面的 `/opt/hertzbeat/define` 目录到当前主机下 + - `docker cp hertzbeat:/opt/hertzbeat/define ./define` + - 然后在后续升级启动 docker 容器的时候需要挂载上这个 define 目录,`-v $(pwd)/define:/opt/hertzbeat/define` + - `-v $(pwd)/define:/opt/hertzbeat/define` +2. 若使用内置默认 H2 数据库 + - 需挂载或备份 `-v $(pwd)/data:/opt/hertzbeat/data` 容器内的数据库文件目录 `/opt/hertzbeat/data` + - 停止并删除容器,删除本地 HertzBeat docker 镜像,拉取新版本镜像 + - 参考 [Docker安装HertzBeat](docker-deploy) 使用新镜像创建新的容器,注意需要将数据库文件目录挂载 `-v $(pwd)/data:/opt/hertzbeat/data` +3. 若使用外置关系型数据库 Mysql, PostgreSQL + - 无需挂载备份容器内的数据库文件目录 + - 停止并删除容器,删除本地 HertzBeat docker 镜像,拉取新版本镜像 + - 参考 [Docker安装HertzBeat](docker-deploy) 使用新镜像创建新的容器,`application.yml`配置数据库连接即可 + +### 安装包部署方式的升级 + +1. 若使用内置默认 H2 数据库 + - 备份安装包下的数据库文件目录 `/opt/hertzbeat/data` + - 若有自定义监控模板,需备份 `/opt/hertzbeat/define` 下的模板YML + - `bin/shutdown.sh` 停止 HertzBeat 进程,下载新安装包 + - 参考 [安装包安装HertzBeat](package-deploy) 使用新安装包启动 +2. 若使用外置关系型数据库 Mysql, PostgreSQL + - 无需备份安装包下的数据库文件目录 + - 若有自定义监控模板,需备份 `/opt/hertzbeat/define` 下的模板YML + - `bin/shutdown.sh` 停止 HertzBeat 进程,下载新安装包 + - 参考 [安装包安装HertzBeat](package-deploy) 使用新安装包启动,`application.yml`配置数据库连接即可 + +**HAVE FUN** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/linux-os-practice.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/linux-os-practice.md new file mode 100644 index 0000000000..698a337ef5 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/linux-os-practice.md @@ -0,0 +1,94 @@ +--- +id: linux-os-practice +title: Linux 操作系统监控案例 +sidebar_label: Linux 操作系统监控案例 +--- + +这篇文章介绍如何使用 HertzBeat 监控系统对Linux操作系统的通用性能指标进行采集监控,并在文件系统使用率过高时给我们发告警消息。 + +## HertzBeat 是什么 + +Apache HertzBeat 一个拥有强大自定义监控能力,无需 Agent 的实时监控工具。网站监测,端口可用性,数据库,操作系统,阈值告警,告警通知(邮件微信钉钉飞书)。 + +github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat) + +## 安装 + +1. `docker` 环境仅需一条命令即可安装 + + ```bash + docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat + ``` + +2. 安装成功浏览器访问 `http://ip:1157` 即可开始探索使用,默认账户密码 `admin/hertzbeat` + +:::note +生产环境建议完整部署方式, 参考 [Docker Compose 方式安装 HertzBeat](https://hertzbeat.apache.org/docs/start/docker-compose-deploy) +::: + +## 监控 Linux 操作系统 + +### 1. 新增监控 + +> 系统页面 -> 监控中心 -> 新增监控 -> 操作系统监控 -> Linux 操作系统 -> 新增 Linux 操作系统监控 + +![HertzBeat](/img/docs/start/linux-os-practice-1.png) + +### 2. 配置参数 + +- **目标Host**:被监控的对端IPV4,IPV6或域名。注意️不带协议头(eg: https://, http://)) +- **端口**:Linux SSH对外提供的端口,默认为 22 +- **超时时间**:设置连接的超时时间,单位为毫秒,默认 6000 毫秒 +- **复用连接**: 设置 SSH 连接是否复用,默认开启。如果关闭则每次获取信息都会创建一个连接 +- **用户名**: SSH 连接用户名 +- **密码**: SSH 连接密码,可选 + +> 更多参数和高级设置请查看帮助文档:[监控:Linux操作系统监控](https://hertzbeat.apache.org/zh-cn/docs/help/linux) + +可以使用标签分类来管理任务,如添加`OS=Linux`等相关标签。 + +![HertzBeat](/img/docs/start/linux-os-practice-2.png) + +### 3. 查看监控数据 + +在监控列表可以查看任务状态,点击这个监控详情可以查看指标数据图表等。 + +![HertzBeat](/img/docs/start/linux-os-practice-3.png) + +![HertzBeat](/img/docs/start/linux-os-practice-4.png) + +### 4. 设置阈值规则 + +这里我们设置一个阈值规则,当**文件系统中某个目录使用率过高**时触发告警。 + +> 系统页面 -> 阈值规则 -> 新增 -> 新增实时计算阈值 +> +> 配置阈值,配置告警表达式-当指标`文件系统使用率`大于等于 `50%` 触发,也支持设置告警级别和通知模板信息等。 + +![HertzBeat](/img/docs/start/linux-os-practice-5.png) + +> 阈值规则还有其它功能可以配置, 比如阈值关联指定监控, 触发次数, 关联标签等等。 + +最终可以在告警中心看到已触发的告警。 + +![HertzBeat](/img/docs/start/linux-os-practice-6.png) + +### 5. 消息通知 + +> 系统页面 -> 消息通知 -> 通知媒介 -> 新增接收对象 + +![HertzBeat](/img/docs/start/linux-os-practice-7.png) + +> 系统页面 -> 消息通知 -> 通知策略 -> 新增通知策略 -> 选择接收对象并启用通知 + +![HertzBeat](/img/docs/start/linux-os-practice-8.png) + +当阈值触发后就可以收到对应告警消息,如果没有配置消息通知,也可以在**告警中心**查看告警信息。 + +---- + +## 总结 + +监控 Linux 操作系统的实践就到这里,当然对 HertzBeat 来说这个功能只是冰山一角,如果您觉得 HertzBeat 这个开源项目不错的话欢迎给我们 Star 哦,非常感谢各位的支持! + +**Github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/springboot-auto-practice.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/springboot-auto-practice.md new file mode 100644 index 0000000000..a3f8163eba --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/springboot-auto-practice.md @@ -0,0 +1,256 @@ +--- +id: springboot-auto-practice +title: SpringBoot Web应用监控案例 +sidebar_label: SpringBoot Web应用监控案例 +--- + +:::tip + +在云原生时代,SpringBoot应用的监控与可视化已然成为运维体系的核心环节,实时监控应用性能是保障系统稳定性的关键。 + +::: + +这篇文章介绍使用 HertzBeat 监控系统实现从指标采集、可视化到告警通知的一体化解决方案,并展示完整操作流程与监控实践。 + +## HertzBeat 是什么 + +Apache HertzBeat 一个拥有强大自定义监控能力,无需Agent的实时监控工具。网站监测,PING连通性,端口可用性,数据库,操作系统,中间件,API监控,阈值告警,告警通知(邮件微信钉钉飞书)。 + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +## 安装 HertzBeat + +> 生产环境中推荐使用 **PostgreSQL** + **VictoriaMetrics** 服务的方式部署 HertzBeat。 + +1. 部署 HertzBeat + + > 下载安装包 + > + > 从 [下载页面](https://hertzbeat.apache.org/zh-cn/docs/download) 下载您系统环境对应的安装包版本 `apache-hertzbeat-xxx-incubating-bin.tar.gz`。解压安装包到主机,如: `/opt/hertzbeat` + + ```sh + tar zxvf apache-hertzbeat-xxx-incubating-bin.tar.gz + ``` + +2. 快速安装 PostgreSQL + VictoriaMetrics 服务 + + > Docker 安装 PostgreSQL + + ```sh + docker run -d --name postgresql -p 5432:5432 -v "$PWD/postgresql:/var/lib/postgresql/data" -e POSTGRES_USER=root -e POSTGRES_PASSWORD=123456 -e TZ=Asia/Shanghai postgres:15 + ``` + + > Docker 安装 VictoriaMetrics + + ```sh + docker run -d -p 8428:8428 -v "$PWD/victoria-metrics-data:/victoria-metrics-data" --name victoria-metrics victoriametrics/victoria-metrics:v1.95.1 + ``` + +3. 修改 HertzBeat 的配置文件 + + > 切换元数据储存数据源 + > + > 修改位于 `hertzbeat/config/application.yml` 的配置文件,替换为 PostgreSQL 服务。 + + :::note + + PostgreSQL 配置请查阅文档:[元数据存储PostgreSQL(推荐)](https://hertzbeat.apache.org/zh-cn/docs/start/postgresql-change) + ::: + + > 配置时序数据库存储指标 + > + > 同理,修改 `hertzbeat/config/application.yml` 的配置文件,开启 VictoriaMetrics 服务用于存储指标。 + + :::note + + VictoriaMetrics 配置请查阅文档:[指标数据存储VictoriaMetrics(推荐)](https://hertzbeat.apache.org/zh-cn/docs/start/victoria-metrics-init) + ::: + +4. 启动 HertzBeat + + > 在上述解压好的安装目录 bin 下的启动脚本 `startup.sh`,windows 环境下为 `startup.bat`。 + > + > 启动成功后,浏览器访问 `localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat`。 + + ```sh + ./startup.sh + ``` + +## SpringBoot 应用配置 + +1. 开启 Actuator 配置 + + > 在项目 `pom.xml` 中添加依赖: + > + + ```xml + + org.springframework.boot + spring-boot-starter-actuator + + + io.micrometer + micrometer-registry-prometheus + + ``` + + > 配置 `application.yml` 暴露端点: + > + + ```yml + management: + endpoints: + web: + exposure: + include: '*' + enabled-by-default: true + metrics: + export: + prometheus: + enabled: true + ``` + + > *注意:如果你的项目里还引入了认证相关的依赖,比如 springboot-security ,那么 SpringBoot Actuator 暴露出的接口可能会被拦截,此时需要你手动放开这些接口,以 springboot-security 为例,需要在 SecurityConfig 配置类中加入以下代码:* + + ```java + public class SecurityConfig extends WebSecurityConfigurerAdapter{ + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception{ + httpSecurity + // 配置要放开的接口 + .antMatchers("/actuator/**").permitAll() + .antMatchers("/metrics/**").permitAll() + .antMatchers("/trace").permitAll() + .antMatchers("/heapdump").permitAll() + // ... + \} + \} + ``` + +2. 验证端点 + + > SpringBoot 程序启动后,请求URL: + > + > - `http://:`/actuator`: 验证已启用的端点, + > - `http://:`/actuator/prometheus`: 应返回指标数据。 + +## 监控 SpringBoot 应用 + +1. 新增 AUTO 监控 + + > 系统页面 -> 监控中心 -> 新增监控 -> AUTO -> Prometheus任务 + > + + ![HertzBeat](/img/docs/start/springboot-auto-practice-1.png) + +2. 填写关键参数 + + > **目标Host**:SpringBoot 应用服务器地址(不带协议头,例如: https://, http:// ) + > + > **端口**:应用服务端口(例如: 8080) + > + > **端点路径**:`/actuator/prometheus` + > + > 可以使用标签分类来管理任务,如添加`env=test`等业务相关标签。 + + ![HertzBeat](/img/docs/start/springboot-auto-practice-2.png) + +3. 查看检测指标数据 + + > 点击进入新建监控,可以查看指标数据详情及指标历史图表等。 + > + + ![HertzBeat](/img/docs/start/springboot-auto-practice-3.png) + + ![HertzBeat](/img/docs/start/springboot-auto-practice-4.png) + +## Grafana可视化集成 (可选) + +1. Grafana 图表配置 + + > 需启用 Grafana 可嵌入功能,并开启匿名访问。 + + :::note + + 完整配置请参考文档:[Grafana历史图表](https://hertzbeat.apache.org/zh-cn/docs/help/grafana_dashboard) + ::: + +2. 在 HertzBeat 监控中嵌入 Grafana 仪表盘 + + > 配置启用 Grafana 后,重启 HertzBeat 服务,在新增的 AUTO 监控中启用并上传 Grafana 模板。 + > + > 比如:Grafana 数据源选择`hertzbeat-victoria-metrics`,然后在仪表盘点击:「Share」→「Export」→「Save to file」下载模板并上传至 HertzBeat 监控中。 + + ![HertzBeat](/img/docs/start/springboot-auto-practice-5.png) + +3. 查看 Grafana 图表 + + > 进入新增 AUTO 监控页面,点击 Grafana 图标按钮,即可查看 Grafana 图表。 + + ![HertzBeat](/img/docs/start/springboot-auto-practice-6.png) + +## 告警与通知联动 + +1. HertzBeat 告警配置 + + > 系统页面 -> 告警 -> 阈值规则 -> 新增 -> 新增阈值 + > + + ![HertzBeat](/img/docs/start/springboot-auto-practice-7.png) + + > HertzBeat 提供了 **实时计算** 和 **计划周期** 两种类型的阈值规则设置,这里我们以 **计划周期** 阈值规则为例。 + > + > - **阈值名称**:阈值规则名称 + > - **阈值规则**:填写指标监测的规则(支持 `PromQL`) + > - **执行周期**:周期性执行阈值计算的时间间隔 + > - **告警级别**:触发阈值的告警级别,从低到高依次为: 警告-warning,严重-critical,紧急-emergency + > - **触发次数**:设置触发阈值多少次之后才会发送告警 + > - **告警内容**:填写监测告警的内容(支持填写变量) + +2. 设置阈值规则 + + > 比如监测 SpringBoot 应用程序的 CPU 占用,添加阈值规则:`system_cpu_usage{job="Jolly_Vulture_43vT"}` > 0.01` + > + > 可以设置的阈值规则组合有很多,用户可以根据自身需要设置更丰富的告警规则。 + + ![HertzBeat](/img/docs/start/springboot-auto-practice-8.png) + + > 最后可以在 告警中心 看到已触发的告警。 + > + + ![HertzBeat](/img/docs/start/springboot-auto-practice-9.png) + +3. 告警通知 + + > 系统页面 -> 消息通知 -> 通知媒介 -> 新增接收对象 + > + + ![HertzBeat](/img/docs/start/springboot-auto-practice-10.png) + + > 系统页面 -> 消息通知 -> 通知策略 -> 新增通知策略 -> 选择接收对象并启用通知 + > + + ![HertzBeat](/img/docs/start/springboot-auto-practice-11.png) + +4. OK!当阈值规则触发后我们就可以收到对应告警消息啦,如果没有配置通知,也可以在告警中心查看告警信息。 + +## 小总结 + +这篇文章通过简洁的监控配置,用户在几分钟之内就可搭建完整的监控体系,这充分体现了 HertzBeat 的几点优势: + +- 无需部署 Exporter 和 Agent 即可监控 SpringBoot Actuator 端点,支持自定义指标采集与告警规则。 +- 轻量化:相比传统 Prometheus + AlertManager 组合,HertzBeat 简化了部署和维护流程。 +- 无缝集成 Grafana,HertzBeat 将采集的时序数据实时推送至 Grafana 构建可视化仪表盘。 +- 监控+告警+通知功能整合联动,全协议覆盖 + 实时/周期阈值检测 + 多通道通知(钉钉/飞书/Webhook等)。 + +------ + +## 结束搞定 + +监控 SpringBoot 应用的实践就到这里,当然对 HertzBeat 来说这个功能只是冰山一角,如果您觉得 HertzBeat 这个开源项目不错的话欢迎在 GitHub、Gitee 点 **Star** 哦,您的 Star 是我们持续优化的动力!欢迎点亮小星星✨ + +**让监控更简单,期待与您共建生态!** 💝 + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +**gitee: [https://gitee.com/hertzbeat/hertzbeat](https://gitee.com/hertzbeat/hertzbeat)** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/sslcert-practice.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/sslcert-practice.md new file mode 100644 index 0000000000..c81d0b9240 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/sslcert-practice.md @@ -0,0 +1,94 @@ +--- +id: ssl-cert-practice +title: SSL 证书过期监控案例 +sidebar_label: SSL 证书过期监控案例 +--- + +:::tip +现在大部分网站都默认支持 HTTPS,我们申请的证书一般是3个月或者1年,很容易随着时间的流逝SSL证书过期了我们却没有第一时间发现,或者在过期之前没有及时更新证书。 +::: + +这篇文章介绍如果使用 hertzbeat 监控系统来检测我们网站的SSL证书有效期,当证书过期时或证书快过期前几天,给我们发告警消息。 + +## HertzBeat 是什么 + +Apache HertzBeat™ 一个拥有强大自定义监控能力,无需Agent的实时监控工具。网站监测,PING连通性,端口可用性,数据库,操作系统,中间件,API监控,阈值告警,告警通知(邮件微信钉钉飞书)。 + +github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat) + +## 安装 HertzBeat + +1. `docker` 环境仅需一条命令即可安装 + + `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` + +2. 安装成功浏览器访问 `localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` + +:::note +生产环境建议完整部署方式, 参考 [https://hertzbeat.apache.org/docs/start/docker-compose-deploy](https://hertzbeat.apache.org/docs/start/docker-compose-deploy) +::: + +## 监控 SSL 证书 + +1. 新增 SSL 证书监控 + + > 系统页面 -> 监控中心 -> 新增监控 -> 应用服务监控 -> SSL 证书 -> 新增 SSL 证书 + + ![HertzBeat](/img/docs/start/ssl_1.png) + +2. 配置监控网站 + + > 我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。 + + ![HertzBeat](/img/docs/start/ssl_2.png) + +3. 查看检测指标数据 + + > 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 + + ![HertzBeat](/img/docs/start/ssl_3.png) + + ![HertzBeat](/img/docs/start/ssl_4.png) + +4. 设置阈值(证书过期时触发) + + > 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 -> 新增实时阈值规则 + > 配置阈值,选择SSL证书指标对象,配置告警表达式-当指标`expired`为`true`触发,即`equals(expired,"true")` , 设置告警级别通知模板信息等。 + + ![HertzBeat](/img/docs/start/ssl_5.png) + + > 阈值规则还有其它功能可以配置, 比如阈值关联指定监控, 触发次数, 关联标签等等。 + +5. 设置阈值(证书过期前一周触发) + + > 同理如上,选择代码阈值规则,新增配置阈值,配置告警表达式-当指标有效期时间戳 `end_timestamp`,`now()`函数为当前时间戳,若配置提前一周触发告警即:`end_timestamp <= (now() + 604800000)` , 其中 `604800000` 为7天总时间差毫秒值。 + + ![HertzBeat](/img/docs/start/ssl_6.png) + + > 最终可以在告警中心看到已触发的告警。 + + ![HertzBeat](/img/docs/start/ssl_7.png) + +6. 告警通知(通过钉钉微信飞书等及时通知) + + > 系统页面 -> 消息通知 -> 通知媒介 -> 新增接收对象 + + ![HertzBeat](/img/docs/start/notice_receiver_1.png) + + 钉钉微信飞书等 token 配置可以参考帮助文档 + + [https://hertzbeat.apache.org/docs/help/alert_feishu](https://hertzbeat.apache.org/docs/help/alert_feishu) + + > 消息通知 -> 通知策略 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知 + + ![HertzBeat](/img/docs/start/notice_policy_1.png) + +7. OK 当阈值触发后我们就可以收到对应告警消息啦,如果没有配通知,也可以在告警中心查看告警信息。 + +---- + +## 结束搞定 + +监控SSL证书的实践就到这里,当然对hertzbeat来说这个功能只是冰山一角,如果您觉得hertzbeat这个开源项目不错的话欢迎给我们在GitHub Gitee star哦,灰常感谢。感谢老铁们的支持。笔芯! + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/tdengine-practice.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/tdengine-practice.md new file mode 100644 index 0000000000..82be88c743 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/usecase/tdengine-practice.md @@ -0,0 +1,171 @@ +--- +id: tdengine-practice +title: TDengine 监控案例 +sidebar_label: TDengine 监控案例 +--- + +:::tip +TDengine TSDB 是一款 开源、高性能、云原生 的时序数据库(Time Series Database, TSDB, 它专为物联网、车联网、工业互联网、金融、IT 运维等场景优化设计。同时它还带有内建的缓存、流式计算、数据订阅等系统功能,能大幅减少系统设计的复杂度,降低研发和运营成本,是一款极简的时序数据处理平台。 +::: + +这篇文章介绍如何使用 HertzBeat 监控系统对 TDengine 通用性能指标进行采集监控 + +## HertzBeat 是什么 + +Apache HertzBeat™ 一个拥有强大自定义监控能力,无需Agent的实时监控工具。网站监测,PING连通性,端口可用性,数据库,操作系统,中间件,API监控,阈值告警,告警通知(邮件微信钉钉飞书)。 + +> **github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +## 安装 HertzBeat + +1. `docker` 环境仅需一条命令即可安装 + + `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` + +2. 安装成功浏览器访问 `localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` + +:::note +生产环境建议完整部署方式, 参考:[https://hertzbeat.apache.org/docs/start/docker-compose-deploy](https://hertzbeat.apache.org/docs/start/docker-compose-deploy) +::: + +## 启用 TDengine 监控 + +:::tip +TDengine TSDB 集成了多种监控指标收集机制,并通过 taosKeeper 进行汇总,taosKeeper 是 TDengine TSDB 3.0 版本监控指标的导出工具,通过简单的几项配置即可获取 TDengine TSDB 的运行状态,参考:[https://docs.taosdata.com/3.4.1/reference/components/taoskeeper/](https://docs.taosdata.com/3.4.1/reference/components/taoskeeper/) +::: + +## 监控 TDengine(PromQL) + +1. 新增 TDengine-PromQL 监控 + + > 系统页面 -> 监控中心 -> 新增监控 -> 自定义监控 -> TDengine-PromQL任务 + + ![HertzBeat](/img/docs/start/tdengine_1.png) + +2. 填写关键参数 + + > **目标Host**:Prometheus 应用服务器地址(不带协议头,例如: https://, http:// ) + > + > **端口**:Prometheus api 端口,默认值:9090 + > + > **端点路径**:Prometheus查询PromQL的URL,默认值:`/api/v1/query` + > + > 可以使用标签分类来管理任务,如添加`env=test`等业务相关标签。 + + ![HertzBeat](/img/docs/start/tdengine_2.png) + +3. 查看检测指标数据 + + > 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 + + ![HertzBeat](/img/docs/start/tdengine_3.png) + + ![HertzBeat](/img/docs/start/tdengine_4.png) + +## 监控 TDengine(Prometheus) + +1. 新增 AUTO 监控 + + > 系统页面 -> 监控中心 -> 新增监控 -> AUTO -> Prometheus任务 + + ![HertzBeat](/img/docs/start/tdengine_1_1.png) + +2. 填写关键参数 + + > **目标Host** taosKeeper 服务地址(不带协议头,例如: https://, http:// ) + > + > **端口**:taosKeeper服务端口(例如: 6043) + > + > **端点路径**:`/metrics` + > + > 可以使用标签分类来管理任务,如添加`env=test`等业务相关标签。 + + ![HertzBeat](/img/docs/start/tdengine_1_2.png) + +3. 查看检测指标数据 + + > 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 + + ![HertzBeat](/img/docs/start/tdengine_1_3.png) + + ![HertzBeat](/img/docs/start/tdengine_1_4.png) + +### Grafana可视化集成 (可选) + +1. Grafana 图表配置 + + > 需启用 Grafana 可嵌入功能,并开启匿名访问。 + + :::note + + 完整配置请参考文档:[Grafana历史图表](https://hertzbeat.apache.org/zh-cn/docs/help/grafana_dashboard) + ::: + +2. 在 HertzBeat 监控中嵌入 Grafana 仪表盘 + + > 配置启用 Grafana 后,重启 HertzBeat 服务,在新增的 AUTO 监控中启用并上传 Grafana 模板。 + > + > 比如:Grafana 数据源选择`hertzbeat-victoria-metrics`,然后在仪表盘点击:「Share」→「Export」→「Save to file」下载模板并上传至 HertzBeat 监控中,可参考:[taoskeeper-prometheus-dashboard](https://grafana.com/grafana/dashboards/15164-taoskeeper-prometheus-dashboard/) + + ![HertzBeat](/img/docs/start/tdengine_1_5.png) + +3. 查看 Grafana 图表 + + > 进入新增 AUTO 监控页面,点击 Grafana 图标按钮,即可查看 Grafana 图表。 + + ![HertzBeat](/img/docs/start/tdengine_1_6.png) + +## 告警与通知联动 + +1. HertzBeat 告警配置 + + > 系统页面 -> 告警 -> 阈值规则 -> 新增 -> 新增阈值 + > + + ![HertzBeat](/img/docs/start/tdengine_5.png) + + > HertzBeat 提供了 **实时计算** 和 **计划周期** 两种类型的阈值规则设置,这里我们以 **计划周期** 阈值规则为例。 + > + > - **阈值名称**:阈值规则名称 + > - **阈值规则**:填写指标监测的规则(支持 `PromQL`) + > - **执行周期**:周期性执行阈值计算的时间间隔 + > - **告警级别**:触发阈值的告警级别,从低到高依次为: 警告-warning,严重-critical,紧急-emergency + > - **触发次数**:设置触发阈值多少次之后才会发送告警 + > - **告警内容**:填写监测告警的内容(支持填写变量) + +2. 设置阈值规则 + + > 比如监测 Dnode 节点的系统使用的 CPU 百分比,添加阈值规则:`taos_dnodes_info_cpu_system_value > 20` + > + > 可以设置的阈值规则组合有很多,用户可以根据自身需要设置更丰富的告警规则。 + + ![HertzBeat](/img/docs/start/tdengine_6.png) + + > 最后可以在 告警中心 看到已触发的告警。 + > + + ![HertzBeat](/img/docs/start/tdengine_7.png) + +3. 告警通知 + + > 系统页面 -> 消息通知 -> 通知媒介 -> 新增接收对象 + > + + ![HertzBeat](/img/docs/start/tdengine_8.png) + + > 系统页面 -> 消息通知 -> 通知策略 -> 新增通知策略 -> 选择接收对象并启用通知 + > + + ![HertzBeat](/img/docs/start/tdengine_9.png) + +4. OK!当阈值规则触发后我们就可以收到对应告警消息啦,如果没有配置通知,也可以在告警中心查看告警信息。 + +## 总结 + +监控 TDengine 应用的实践就到这里,当然对 HertzBeat 来说这个功能只是冰山一角,如果您觉得 HertzBeat 这个开源项目不错的话欢迎在 GitHub、Gitee 点 **Star** 哦,您的 Star 是我们持续优化的动力!欢迎点亮小星星✨ + +**让监控更简单,期待与您共建生态!** 💝 + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +**gitee: [https://gitee.com/hertzbeat/hertzbeat](https://gitee.com/hertzbeat/hertzbeat)** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/victoria-metrics-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/victoria-metrics-init.md new file mode 100644 index 0000000000..e49f286fd4 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/victoria-metrics-init.md @@ -0,0 +1,157 @@ +--- +id: victoria-metrics-init +title: 依赖时序数据库服务VictoriaMetrics安装初始化 +sidebar_label: 指标数据存储VictoriaMetrics(推荐) +--- + +Apache HertzBeat™ 的历史数据存储依赖时序数据库,任选其一安装初始化即可,也可不安装(注意⚠️但强烈建议生产环境配置) + +> 我们推荐使用并长期支持 VictoriaMetrics 作为存储。 + +VictoriaMetrics,是一个快速高效、经济并且可扩展的监控解决方案和时序数据库,兼容 Prometheus 生态。推荐版本(VictoriaMetrics:v1.95.1+, HertzBeat:v1.4.3+) + +**注意⚠️ 时序数据库安装配置为可选项,但强烈建议生产环境配置,以提供更完善的历史图表功能,高性能和稳定性** +**⚠️ 若不配置时序数据库,则只会留最近一小时历史数据** + +> 如果您已有VictoriaMetrics环境,可直接跳到YML配置那一步。 + +## 通过Docker方式安装VictoriaMetrics + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装VictoriaMetrics + + ```shell + $ docker run -d -p 8428:8428 \ + -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ + --name victoria-metrics \ + victoriametrics/victoria-metrics:v1.95.1 + ``` + + `-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` 为VictoriaMetrics数据目录本地持久化挂载 + 使用```$ docker ps```查看数据库是否启动成功 + +3. 在hertzbeat的`application.yml`配置文件配置VictoriaMetrics数据库连接 + + 配置HertzBeat的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 + 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 + + **修改里面的`warehouse.store.duckdb.enabled`参数为`false`, 配置`warehouse.store.victoria-metrics`数据源参数,HOST账户密码等,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认DuckDB + duckdb: + enabled: false + # 启用 victoria-metrics + victoria-metrics: + enabled: true + url: http://localhost:8428 + username: root + password: root + ``` + +4. 重启 HertzBeat + +### 使用 VictoriaMetrics 集群模式(Cluster Mode) + +VictoriaMetrics 支持 **集群模式**,将数据写入(`vminsert`)、存储(`vmstorage`)与查询(`vmselect`)分别由独立组件负责。以下是如何部署 VictoriaMetrics 集群并集成至 HertzBeat 的说明。 + +#### 1. 使用 Docker Compose 部署 VictoriaMetrics 集群 + +创建一个名为 `docker-compose.yml` 的文件,内容如下: + +```yaml +version: "3" + +services: + vmstorage1: + image: victoriametrics/vmstorage + command: + - "-retentionPeriod=1" + - "-storageDataPath=/storage" + volumes: + - vmstorage-data:/storage + ports: + - "8400:8400" # 提供给 vminsert 写入连接 + - "8401:8401" # 提供给 vmselect 查询连接 + + vminsert: + image: victoriametrics/vminsert + command: + - "-storageNode=vmstorage1:8400" + - "-httpAuth.username=root" + - "-httpAuth.password=root" + ports: + - "8480:8480" # 数据写入端口 + + vmselect: + image: victoriametrics/vmselect + command: + - "-storageNode=vmstorage1:8401" + - "-httpAuth.username=root" + - "-httpAuth.password=root" + ports: + - "8481:8481" # 查询接口端口 + +volumes: + vmstorage-data: +``` + +使用以下命令启动集群: + +```shell +docker-compose up -d +``` + +使用以下命令确认所有组件是否运行成功: + +```shell +docker ps +``` + +#### 2. 配置 HertzBeat 使用集群模式 + +修改 `hertzbeat/config/application.yml` 配置文件,内容如下: + +```yaml +warehouse: + store: + duckdb: + enabled: false + victoria-metrics: + cluster: + enabled: true + select: + url: http://127.0.0.1:8481 + username: root + password: root + insert: + url: http://127.0.0.1:8480 + username: root + password: root +``` + +**注意事项:** + +- `cluster.enabled` 设置为 `true` 表示启用集群模式; +- `select.url` 和 `insert.url` 需与部署时的地址保持一致,确保网络互通。 + +#### 3. 重启 HertzBeat + +完成配置后,重启 HertzBeat 以连接至 VictoriaMetrics 集群。 + +### 常见问题 + +1. 时序数据库是否都需要配置,能不能都用 + + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,但会影响历史图表数据和存储时长等。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/virtual-thread.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/virtual-thread.md new file mode 100644 index 0000000000..020f5376b5 --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/start/virtual-thread.md @@ -0,0 +1,122 @@ +--- +id: virtual-thread +title: 虚拟线程配置说明 +sidebar_label: 虚拟线程 +description: 说明 HertzBeat 虚拟线程执行器的默认值、回滚开关和调优方式。 +--- + +HertzBeat 基于 JDK 25 运行,并把适合虚拟线程的阻塞型执行路径切到了虚拟线程模型。所有 `hertzbeat.vthreads` 配置项都是可选的。也就是说,即使升级 HertzBeat 后你没有把新的 YAML 配置块合并到原有 `application.yml`,系统也会使用内置默认值正常启动。 + +## 1. 到哪里配置 + +根据你的部署方式修改对应配置文件: + +- 安装包部署:`hertzbeat/config/application.yml` +- Docker 单机部署:把本地 `application.yml` 挂载到容器内 `/opt/hertzbeat/config/application.yml` +- Docker Compose 部署:修改 `script/docker-compose/*/conf/application.yml` +- 独立 collector 部署:修改 `hertzbeat-collector/config/application.yml` + +## 2. 不配置也可以 + +你可以完全不写 `hertzbeat.vthreads` 这一段: + +```yaml +# 虚拟线程配置可以整体省略。 +``` + +HertzBeat 会自动使用运行时默认值。 + +## 3. 完整可选配置模板 + +只有在你需要覆盖默认值时,才需要显式写出下面这段: + +```yaml +hertzbeat: + vthreads: + enabled: true + common: + mode: UNBOUNDED_VT + collector: + mode: LIMIT_AND_REJECT + manager: + mode: LIMIT_AND_REJECT + max-concurrent-jobs: 10 + alerter: + notify: + mode: LIMIT_AND_REJECT + max-concurrent-jobs: 64 + periodic-max-concurrent-jobs: 10 + log-worker: + max-concurrent-jobs: 10 + queue-capacity: 1000 + reduce: + max-concurrent-jobs: 2 + window-evaluator: + max-concurrent-jobs: 2 + notify-max-concurrent-per-channel: 4 + warehouse: + mode: UNBOUNDED_VT + async: + enabled: true + concurrency-limit: 256 + reject-when-limit-reached: true + task-termination-timeout: 5000 +``` + +## 4. 内置默认值 + +| 配置项 | 默认值 | 说明 | +| --- | --- | --- | +| `hertzbeat.vthreads.enabled` | `true` | HertzBeat 虚拟线程执行器总开关 | +| `hertzbeat.vthreads.common.mode` | `UNBOUNDED_VT` | 通用短任务执行器 | +| `hertzbeat.vthreads.collector.mode` | `LIMIT_AND_REJECT` | 保持采集入口快速拒绝语义 | +| `hertzbeat.vthreads.collector.max-concurrent-jobs` | `512` | 面向单机混合 HTTP/JDBC 采集场景的折中默认值 | +| `hertzbeat.vthreads.manager.mode` | `LIMIT_AND_REJECT` | 保持 manager 入口语义 | +| `hertzbeat.vthreads.manager.max-concurrent-jobs` | `10` | 与原来的限制一致 | +| `hertzbeat.vthreads.alerter.notify.mode` | `LIMIT_AND_REJECT` | 通知执行器入口控制 | +| `hertzbeat.vthreads.alerter.notify.max-concurrent-jobs` | `64` | 通知全局并发 | +| `hertzbeat.vthreads.alerter.notify-max-concurrent-per-channel` | `4` | 单通知通道/类型并发 | +| `hertzbeat.vthreads.alerter.periodic-max-concurrent-jobs` | `10` | 周期告警全局并发 | +| `hertzbeat.vthreads.alerter.log-worker.max-concurrent-jobs` | `10` | 日志告警短任务并发 | +| `hertzbeat.vthreads.alerter.log-worker.queue-capacity` | `1000` | 有界队列,保留 backlog 语义 | +| `hertzbeat.vthreads.alerter.reduce.max-concurrent-jobs` | `2` | 告警 reduce 并发 | +| `hertzbeat.vthreads.alerter.reduce.queue-capacity` | 无界 | 默认不填,保持旧版无界队列语义 | +| `hertzbeat.vthreads.alerter.window-evaluator.max-concurrent-jobs` | `2` | 窗口 evaluator 并发 | +| `hertzbeat.vthreads.alerter.window-evaluator.queue-capacity` | 无界 | 默认不填,保持旧版无界队列语义 | +| `hertzbeat.vthreads.warehouse.mode` | `UNBOUNDED_VT` | 仓储短任务执行;真实资源仍由下游连接池限制 | +| `hertzbeat.vthreads.async.enabled` | `true` | 专用 `@Async` 执行器开关 | +| `hertzbeat.vthreads.async.concurrency-limit` | `256` | `@Async` 并发保护阈值 | +| `hertzbeat.vthreads.async.reject-when-limit-reached` | `true` | 达到上限后拒绝额外 `@Async` 任务 | +| `hertzbeat.vthreads.async.task-termination-timeout` | `5000` | 单位毫秒 | + +## 5. 调优建议 + +- 除非你已经明确知道某个下游资源比较脆弱,否则先使用默认值。 +- collector 默认值刻意高于旧版按 CPU 推导的线程池上限,这样单独部署 HertzBeat 主程序时可以承载更多阻塞型采集任务,减少对额外 collector 的依赖。 +- 默认值之所以设为 `512`,是因为它更适合作为混合负载起点。我们本地验证时,HTTP 型采集在 `512` 以上还能继续扩展,而 JDBC 型采集在接近 `512` 时已经接近甜点,继续提高并发反而会掉总吞吐。 +- 虚拟线程解决的是平台线程成本问题,不会消除数据库连接上限、HTTP 连接上限、网络带宽、文件描述符或下游服务限流。并发调得过高,只是把瓶颈转移到这些资源上。 +- 如果你的采集任务大多是 HTTP,而且目标分散在很多不同主机上,可以先尝试把 `collector.max-concurrent-jobs` 提高到 `768`,稳定后再考虑 `1024`。 +- 如果你的采集任务大多是 JDBC 或其他数据库型采集,建议把 `collector.max-concurrent-jobs` 控制在 `256` 到 `512`。这类场景下,并发超过 `512` 后不一定更快。 +- 如果你暂时不确定负载结构,就先保持 `512`。对于混合场景,它通常比直接上 `768+` 更稳。 +- 当 collector 连接的是小规格数据库、低容量 HTTP 服务或脆弱网络设备时,再下调 `collector.max-concurrent-jobs`。 +- 只有当通知通道供应商和 HTTP 连接池都能承受更高吞吐时,才上调 `alerter.notify.max-concurrent-jobs` 或 `notify-max-concurrent-per-channel`。 +- `warehouse.mode` 建议保持 `UNBOUNDED_VT`,真正的资源限制仍应交给数据库/TSDB 客户端连接池。 +- `reduce.queue-capacity` 和 `window-evaluator.queue-capacity` 默认故意不写,这样才能兼容旧版队列语义。 +- 每次调高并发时都建议按小步递增,并同时观察超时率、下游 `429/5xx`、数据库连接池等待时间、内存和文件描述符使用情况。 + +## 6. 回滚方式 + +如需关闭 HertzBeat 的虚拟线程执行器,可配置: + +```yaml +hertzbeat: + vthreads: + enabled: false +``` + +这样相关执行器会回退到原来的平台线程实现。 + +## 7. 补充说明 + +- 如果你当前的部署运行稳定,可以继续保持现有 `application.yml` 不变。 +- 只有在你希望调节并发阈值,或者显式关闭该能力时,才需要增加 `hertzbeat.vthreads` 配置块。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/template.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/template.md new file mode 100644 index 0000000000..5ee81d6b8b --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.9.0/template.md @@ -0,0 +1,95 @@ +--- +id: template +title: 监控模板中心 +sidebar_label: 监控模板 +--- + +> Apache HertzBeat™ 是一个拥有强大自定义监控能力,无需 Agent 的开源实时监控告警工具。 +> +> 我们将`Http, Jmx, Ssh, Snmp, Jdbc, Prometheus`等协议规范可配置化,您只需在浏览器配置`YML`就能使用这些协议去自定义采集任何您想要的指标。 +> 您相信只需简单配置即可快速适配一款`K8s`或`Docker`等新的监控类型吗? + +这是它的架构原理: + +![hertzBeat](/img/docs/hertzbeat-arch.png) + +**我们将所有监控采集类型(mysql,website,jvm,k8s)都定义为yml模板,用户可以导入这些模板到hertzbeat系统中,使其支持对应类型的监控,非常方便!** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +**欢迎大家一起贡献你使用过程中自定义的通用监控类型YML模板,可用的模板如下:** + +## 应用服务监控模板 + + 👉 [Website monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-website.yml)
+ 👉 [HTTP API](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api.yml)
+ 👉 [PING Connectivity](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ping.yml)
+ 👉 [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-port.yml)
+ 👉 [Full site monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-fullsite.yml)
+ 👉 [SSL Cert monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ssl_cert.yml)
+ 👉 [JVM monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jvm.yml)
+ 👉 [SpringBoot2.0](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot2.yml)
+ 👉 [SpringBoot3.0](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot3.yml)
+ 👉 [FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ftp.yml)
+ +### 数据库监控模板 + + 👉 [MYSQL database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mysql.yml)
+ 👉 [MariaDB database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mariadb.yml)
+ 👉 [PostgreSQL database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-postgresql.yml)
+ 👉 [SqlServer database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-sqlserver.yml)
+ 👉 [Oracle database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml)
+ 👉 [DM database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml)
+ 👉 [OpenGauss database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml)
+ 👉 [IoTDB database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml)
+ 👉 [ElasticSearch database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-elasticsearch.yml)
+ 👉 [MongoDB database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml)
+ 👉 [ClickHouse database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml)
+ 👉 [Redis database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis.yml)
+ 👉 [Redis Sentinel database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml)
+ 👉 [Redis Cluster database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml)
+ +### 操作系统监控模板 + + 👉 [Linux operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml)
+ 👉 [Windows operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-windows.yml)
+ 👉 [Ubuntu operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml)
+ 👉 [Centos operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-centos.yml)
+ 👉 [EulerOS operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-euleros.yml)
+ 👉 [Fedora CoreOS operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-coreos.yml)
+ 👉 [OpenSUSE operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opensuse.yml)
+ 👉 [Rocky Linux operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rockylinux.yml)
+ 👉 [Red Hat operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redhat.yml)
+ 👉 [FreeBSD operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-freebsd.yml)
+ 👉 [AlmaLinux operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-almalinux.yml)
+ 👉 [Debian operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-debian.yml)
+ +### 中间件监控模板 + + 👉 [Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-zookeeper.yml)
+ 👉 [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kafka.yml)
+ 👉 [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tomcat.yml)
+ 👉 [ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-shenyu.yml)
+ 👉 [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dynamic_tp.yml)
+ 👉 [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rabbitmq.yml)
+ 👉 [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-activemq.yml)
+ 👉 [Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jetty.yml)
+ 👉 [Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-flink.yml)
+ 👉 [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nacos.yml)
+ +### 云原生监控模板 + + 👉 [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-docker.yml)
+ 👉 [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml)
+ +### 网络监控模板 + + 👉 [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-cisco_switch.yml)
+ 👉 [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hpe_switch.yml)
+ 👉 [HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-huawei_switch.yml)
+ 👉 [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tplink_switch.yml)
+ 👉 [H3CSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-h3c_switch.yml)
+ +--- + +**Have Fun!** diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-http-default.md b/home/versioned_docs/version-1.9.0/advanced/extend-http-default.md new file mode 100644 index 0000000000..c8a6294abc --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-http-default.md @@ -0,0 +1,285 @@ +--- +id: extend-http-default +title: HTTP Protocol System Default Parsing Method +sidebar_label: Default Parsing Method +--- + +> After calling the HTTP api to obtain the response data, use the default parsing method of hertzbeat to parse the response data. + +**The interface response data structure must be consistent with the data structure rules specified by hertzbeat** + +## HertzBeat data format specification + +Note⚠️ The response data is JSON format. + +Single layer format :key-value + +```json +{ + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" +} +``` + +Multilayer format:Set key value in the array + +```json +[ + { + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" + }, + { + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" + } +] +``` + +eg: +Query the CPU information of the custom system. The exposed interface is `/metrics/cpu`. We need `hostname,core,usage` Metric. +If there is only one virtual machine, its single-layer format is : + +```json +{ + "hostname": "linux-1", + "core": 1, + "usage": 78.0, + "allTime": 200, + "runningTime": 100 +} +``` + +If there are multiple virtual machines, the multilayer format is: : + +```json +[ + { + "hostname": "linux-1", + "core": 1, + "usage": 78.0, + "allTime": 200, + "runningTime": 100 + }, + { + "hostname": "linux-2", + "core": 3, + "usage": 78.0, + "allTime": 566, + "runningTime": 34 + }, + { + "hostname": "linux-3", + "core": 4, + "usage": 38.0, + "allTime": 500, + "runningTime": 20 + } +] +``` + +**The corresponding monitoring template yml can be configured as follows** + +```yaml +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: a_example +# The monitoring i18n name +name: + zh-CN: 模拟应用 + en-US: EXAMPLE APP +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`
`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。 + en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `
`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template." + zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`
`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/ + en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/ +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + # required-true or false + required: true + # default value + defaultValue: 80 + # param field input placeholder + placeholder: 'Please Input Port' + # field-param field key + - field: username + # name-param field display i18n name + name: + zh-CN: 用户名 + en-US: Username + # type-param field type(most mapping the html input type) + type: text + # when type is text, use limit to limit string length + limit: 50 + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: password + # name-param field display i18n name + name: + zh-CN: 用户密码 + en-US: Password + # type-param field type(most mapping the html input tag) + type: password + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: ssl + # name-param field display i18n name + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + # required-true or false + required: false + # field-param field key + - field: method + # name-param field display i18n name + name: + zh-CN: 请求方式 + en-US: Method + # type-param field type(radio mapping the html radio tag) + type: radio + # required-true or false + required: true + # when type is radio checkbox, use option to show optional values {name1:value1,name2:value2} + options: + - label: GET + value: GET + - label: POST + value: POST + - label: PUT + value: PUT + - label: DELETE + value: DELETE + # field-param field key + - field: headers + # name-param field display i18n name + name: + zh-CN: 请求Headers + en-US: Headers + # type-param field type(key-value mapping the html key-value input tags) + type: key-value + # required-true or false + required: false + # when type is key-value, use keyAlias to config key alias name + keyAlias: Header Name + # when type is key-value, use valueAlias to config value alias name + valueAlias: Header Value +# collect metrics config list +metrics: + # metrics - cpu + - name: cpu + # metrics name i18n label + i18n: + zh-CN: CPU 信息 + en-US: CPU Info + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, i18n-metric name i18n label, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field + - field: hostname + type: 1 + label: true + i18n: + zh-CN: 主机名称 + en-US: Host Name + - field: usage + type: 0 + unit: '%' + i18n: + zh-CN: 使用率 + en-US: Usage + - field: cores + type: 0 + i18n: + zh-CN: 核数 + en-US: Cores + - field: waitTime + type: 0 + unit: s + i18n: + zh-CN: 主机名称 + en-US: Host Name + # (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field + aliasFields: + - hostname + - core1 + - core2 + - usage + - allTime + - runningTime + # mapping and conversion expressions, use these and aliasField above to calculate metrics value + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - hostname=hostname + - cores=core1+core2 + - usage=usage + - waitTime=allTime-runningTime + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: /metrics/cpu + # http method: GET POST PUT DELETE PATCH + method: GET + # if enabled https + ssl: false + # http request header content + headers: + ^_^headers^_^: ^_^headers^_^ + # http request params + params: + param1: param1 + param2: param2 + # http auth + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + type: Basic Auth + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: jsonPath + parseScript: '$' +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-http-example-hertzbeat.md b/home/versioned_docs/version-1.9.0/advanced/extend-http-example-hertzbeat.md new file mode 100644 index 0000000000..482712129b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-http-example-hertzbeat.md @@ -0,0 +1,220 @@ +--- +id: extend-http-example-hertzbeat +title: Tutorial 1 Adapting a monitoring type based on HTTP protocol +sidebar_label: Tutorial 1 Adapting an HTTP protocol monitoring +--- + +Through this tutorial, we describe step by step how to add a monitoring type based on the http protocol under the hertzbeat monitoring tool. + +Before reading this tutorial, we hope that you are familiar with how to customize types, metrics, protocols, etc. from [Custom Monitoring](extend-point) and [http Protocol Customization](extend-http). + +## HTTP protocol parses the general response structure to obtain metric data +> +> In many scenarios, we need to monitor the provided HTTP API interface and obtain the index value returned by the interface. In this article, we use the http custom protocol to parse our common http interface response structure, and obtain the fields in the returned body as metric data. + +```json +{ + "code": 200, + "msg": "success", + "data": {} +} + +``` + +As above, usually our background API interface will design such a general return. The same is true for the background of the hertzbeat system. Today, we will use the hertzbeat API as an example, add a new monitoring type **hertzbeat**, and monitor and collect its system summary statistics API +`http://localhost:1157/api/summary`, the response data is: + +```json +{ + "msg": null, + "code": 0, + "data": { + "apps": [ + { + "category": "service", + "app": "jvm", + "status": 0, + "size": 2, + "availableSize": 0, + "unManageSize": 2, + "unAvailableSize": 0, + "unReachableSize": 0 + }, + { + "category": "service", + "app": "website", + "status": 0, + "size": 2, + "availableSize": 0, + "unManageSize": 2, + "unAvailableSize": 0, + "unReachableSize": 0 + } + ] + } +} +``` + +**This time we get the metric data such as `category`, `app`, `status`, `size`, `availableSize` under the app.** + +### Add custom monitoring template `hertzbeat` + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +Here we define a custom monitoring type `app` named `hertzbeat` which use the HTTP protocol to collect data. + +**Monitoring Templates** -> **Config New Monitoring Template Yml** -> **Save and Apply** + +```yaml +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat +name: + zh-CN: HertzBeat + en-US: HertzBeat +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat 监控系统的通用指标进行测量监控。`
`您可以点击 “``新建 HertzBeat监控系统``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor through general performance metric. You could click the "``New HertzBeat Monitor``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控系統的通用名額進行量測監控。`
`您可以點擊“``新建HertzBeat監控系統``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat +params: + - field: host + name: + zh-CN: 目标Host + en-US: Target Host + type: host + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + range: '[0,65535]' + required: true + defaultValue: 1157 + - field: ssl + name: + zh-CN: 启用HTTPS + en-US: HTTPS + type: boolean + required: true + - field: timeout + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + type: number + required: false + hide: true + - field: authType + name: + zh-CN: 认证方式 + en-US: Auth Type + type: radio + required: false + hide: true + options: + - label: Basic Auth + value: Basic Auth + - label: Digest Auth + value: Digest Auth + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 50 + required: false + hide: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: false + hide: true +metrics: + # the first metrics summary + # attention: Built-in monitoring metrics contains (responseTime - Response time) + - name: summary + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # metrics content contains field-metric name, type-metric type:0-number,1-string, instance-if is metrics, unit-metric unit('%','ms','MB') + - field: app + type: 1 + label: true + - field: category + type: 1 + - field: status + type: 0 + - field: size + type: 0 + - field: availableSize + type: 0 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here + protocol: http + # the config content when protocol is http + http: + # host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url, we don't need to enter a parameter here, just set the fixed value to /api/summary + url: /api/summary + timeout: ^_^timeout^_^ + # http method: GET POST PUT DELETE PATCH, default fixed value is GET + method: GET + # if enabled https, default value is false + ssl: ^_^ssl^_^ + # http auth + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + type: ^_^authType^_^ + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + digestAuthUsername: ^_^username^_^ + digestAuthPassword: ^_^password^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, we use jsonpath to parse response data here + parseType: jsonPath + parseScript: '$.data.apps.*' + +``` + +**The addition is complete, now we save and apply. We can see that the system page has added a `hertzbeat` monitoring type.** + +![HertzBeat](/img/docs/advanced/extend-http-example-1.png) + +### The system page adds the monitoring of `hertzbeat` monitoring type + +> We click Add `HertzBeat Monitoring Tool`, configure monitoring IP, port, collection cycle, account password in advanced settings, etc., click OK to add monitoring. + +![HertzBeat](/img/docs/advanced/extend-http-example-2.png) + +![HertzBeat](/img/docs/advanced/extend-http-example-3.png) + +> After a certain period of time (depending on the collection cycle), we can see the specific metric data and historical charts in the monitoring details! + +![HertzBeat](/img/docs/advanced/extend-http-example-4.png) + +### Set threshold alarm notification + +> Next, we can set the threshold normally. After the alarm is triggered, we can view it in the alarm center, add recipients, set alarm notifications, etc. Have Fun!!! + +---- + +#### over + +This is the end of the practice of custom monitoring of the HTTP protocol. The HTTP protocol also has other parameters such as headers and params. We can define it like postman, and the playability is also very high! + +If you think hertzbeat is a good open source project, please star us on GitHub Gitee, thank you very much. + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-http-example-token.md b/home/versioned_docs/version-1.9.0/advanced/extend-http-example-token.md new file mode 100644 index 0000000000..35a0c8cef6 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-http-example-token.md @@ -0,0 +1,408 @@ +--- +id: extend-http-example-token +title: Tutorial 2 Obtain TOKEN index value based on HTTP protocol for subsequent collection and authentication +sidebar_label: Tutorial 2 Get TOKEN for subsequent authentication +--- + +Through this tutorial, we will describe step by step how to modify on the basis of tutorial 1, add metrics, first call the authentication interface to obtain the TOKEN, and use the TOKEN as a parameter for the subsequent metrics collection and authentication. + +Before reading this tutorial, we hope that you are familiar with how to customize types, metrics, protocols, etc. from [Custom Monitoring](extend-point) and [http Protocol Customization](extend-http). + +## Request process + +【**Authentication information metrics (highest priority)**】【**HTTP interface carries account password call**】->【**Response data analysis**】->【**Analysis and issuance of TOKEN-accessToken as an metric**] -> [**Assign accessToken as a variable parameter to other collection index groups**] + +> Here we still use the hertzbeat monitoring example of Tutorial 1! The hertzbeat background interface not only supports the basic direct account password authentication used in Tutorial 1, but also supports token authentication. + +**We need `POST` to call the login interface `/api/account/auth/form` to get `accessToken`, the request body (json format) is as follows**: + +```json +{ + "credential": "hertzbeat", + "identifier": "admin" +} +``` + +**The response structure data is as follows**: + +```json +{ + "data": { + "token": "xxxx", + "refreshToken": "xxxx" + }, + "msg": null, + "code": 0 +} +``` + +### Add custom monitoring type `hertzbeat_token` + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +1. The custom monitoring type needs to add a new configuration monitoring template yml. We directly reuse the `hertzbeat` monitoring type in Tutorial 1 and modify it based on it + +A monitoring configuration definition file named after the monitoring type - hertzbeat_token + +We directly reuse the definition content in `hertzbeat` and modify it to our current monitoring type `hertzbeat_auth` configuration parameters, such as `app, category, etc`. + +```yaml +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat_token +# The monitoring i18n name +name: + zh-CN: HertzBeat(Token) + en-US: HertzBeat(Token) +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`
`您可以点击 “``新建 HertzBeat监控(Token)``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "``New HertzBeat Monitor(Token)``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`
`您可以點擊“``新建HertzBeat監控(Token)``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + required: true + defaultValue: 1157 + placeholder: 'Please input port' + - field: ssl + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + required: false + - field: contentType + name: + zh-CN: Content-Type + en-US: Content-Type + type: text + placeholder: 'Request Body Type' + required: false + - field: payload + name: + zh-CN: 请求BODY + en-US: BODY + type: textarea + placeholder: 'Available When POST PUT' + required: false +# collect metrics config list +``` + +### Define metrics `auth` login request to get `token` + +1. Add an index group definition `auth` in `hertzbeat_token`, set the collection priority to the highest 0, and collect the index `token`. + +```yaml + +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat_token +# The monitoring i18n name +name: + zh-CN: HertzBeat(Token) + en-US: HertzBeat(Token) +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`
`您可以点击 “``新建 HertzBeat监控(Token)``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "``New HertzBeat Monitor(Token)``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`
`您可以點擊“``新建HertzBeat監控(Token)``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + required: true + defaultValue: 1157 + placeholder: 'Please input port' + - field: ssl + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + required: false + - field: contentType + name: + zh-CN: Content-Type + en-US: Content-Type + type: text + placeholder: 'Request Body Type' + required: false + - field: payload + name: + zh-CN: 请求BODY + en-US: BODY + type: textarea + placeholder: 'Available When POST PUT' + required: false +# collect metrics config list +metrics: + # metrics - auth + - name: auth + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field + - field: token + type: 1 + - field: refreshToken + type: 1 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: /api/account/auth/form + # http method: GET POST PUT DELETE PATCH + method: POST + # if enabled https + ssl: ^_^ssl^_^ + payload: ^_^payload^_^ + # http request header content + headers: + content-type: ^_^contentType^_^ + ^_^headers^_^: ^_^headers^_^ + # http request params + params: + ^_^params^_^: ^_^params^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: jsonPath + parseScript: '$.data' +--- +``` + +**At this time, save and apply, add `hertzbeat_token` type monitoring on the system page, configure input parameters, `content-type` fill in `application/json`, `request Body` fill in the account password json as follows:** + +```json +{ + "credential": "hertzbeat", + "identifier": "admin" +} +``` + +![HertzBeat](/img/docs/advanced/extend-http-example-5.png) + +**After the addition is successful, we can see the `token`, `refreshToken` metric data we collected on the details page.** + +![HertzBeat](/img/docs/advanced/extend-http-example-6.png) + +![HertzBeat](/img/docs/advanced/extend-http-example-7.png) + +### Use `token` as a variable parameter to collect and use the following metricss + +**Add an index group definition `summary` in `app-hertzbeat_token.yml`, which is the same as `summary` in Tutorial 1, and set the collection priority to 1** + +**Set the authentication method in the HTTP protocol configuration of this index group to `Bearer Token`, assign the index `token` collected by the previous index group `auth` as a parameter, and use `^o^` as the internal replacement symbol, that is `^o^token^o^`. as follows:** + +```yaml + - name: summary +# When the protocol is the http protocol, the specific collection configuration + http: + # authentication + authorization: + # Authentication methods: Basic Auth, Digest Auth, Bearer Token + type: Bearer Token + bearerTokenToken: ^o^token^o^ +``` + +**The final `hertzbeat_token` template yml is defined as follows:** + +```yaml + +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat_token +# The monitoring i18n name +name: + zh-CN: HertzBeat(Token) + en-US: HertzBeat(Token) +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat监控(Token)进行测量监控。`
`您可以点击 “``新建 HertzBeat监控(Token)``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor(Token). You could click the "``New HertzBeat Monitor(Token)``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控(Token)進行量測監控。`
`您可以點擊“``新建HertzBeat監控(Token)``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat_token + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat_token +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + required: true + defaultValue: 1157 + placeholder: 'Please input port' + - field: ssl + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + required: false + - field: contentType + name: + zh-CN: Content-Type + en-US: Content-Type + type: text + placeholder: 'Request Body Type' + required: false + - field: payload + name: + zh-CN: 请求BODY + en-US: BODY + type: textarea + placeholder: 'Available When POST PUT' + required: false +# collect metrics config list +metrics: + # metrics - auth + - name: auth + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field + - field: token + type: 1 + - field: refreshToken + type: 1 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: /api/account/auth/form + # http method: GET POST PUT DELETE PATCH + method: POST + # if enabled https + ssl: ^_^ssl^_^ + payload: ^_^payload^_^ + # http request header content + headers: + content-type: ^_^contentType^_^ + ^_^headers^_^: ^_^headers^_^ + # http request params + params: + ^_^params^_^: ^_^params^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: jsonPath + parseScript: '$.data' +--- + - name: summary + priority: 1 + fields: + - field: app + type: 1 + label: true + - field: category + type: 1 + - field: status + type: 0 + - field: size + type: 0 + - field: availableSize + type: 0 + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + url: /api/summary + method: GET + ssl: ^_^ssl^_^ + authorization: + type: Bearer Token + # ^o^xxx^o^ ^o^ substitution represents the value of the acquisition metric xxx of the previous priority + bearerTokenToken: ^o^token^o^ + parseType: jsonPath + parseScript: '$.data.apps.*' + +``` + +**After the configuration is complete, save and apply, and check the monitoring details page** + +![HertzBeat](/img/docs/advanced/extend-http-example-8.png) + +![HertzBeat](/img/docs/advanced/extend-http-example-9.png) + +### Set threshold alarm notification + +> Next, we can set the threshold normally. After the alarm is triggered, we can view it in the alarm center, add a new recipient, set alarm notification, etc. Have Fun!!! + +--- + +#### over + +This is the end of the practice of custom monitoring of the HTTP protocol. The HTTP protocol also has other parameters such as headers and params. We can define it like postman, and the playability is also very high! + +If you think hertzbeat is a good open source project, please star us on GitHub Gitee, thank you very much. + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-http-jsonpath.md b/home/versioned_docs/version-1.9.0/advanced/extend-http-jsonpath.md new file mode 100644 index 0000000000..5fac26ef37 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-http-jsonpath.md @@ -0,0 +1,174 @@ +--- +id: extend-http-jsonpath +title: HTTP Protocol JsonPath Parsing Method +sidebar_label: JsonPath Parsing Method +--- + +> After calling the HTTP api to obtain the response data, use JsonPath script parsing method to parse the response data. + +Note⚠️ The response data is JSON format. + +**Use the JsonPath script to parse the response data into data that conforms to the data structure rules specified by HertzBeat** + +## JsonPath Operator + +[JSONPath online verification](https://www.jsonpath.cn) + +| JSONPATH | Help description | +|------------------|----------------------------------------------------------------------------------------| +| $ | Root object or element | +| @ | Current object or element | +| . or [] | Child element operator | +| .. | Recursively match all child elements | +| * | Wildcard. Match all objects or elements | +| [] | Subscript operator, jsonpath index starts from 0 | +| [,] | Join operator, return multiple results as an array. Jsonpath allows the use of aliases | +| [start:end:step] | Array slice operator | +| ?() | Filter (script) expression | +| () | Script Expression | + +### HertzBeat data format specification + +Single layer format :key-value + +```json +{ + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" +} +``` + +Multilayer format:Set key value in the array + +```json +[ + { + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" + }, + { + "metricName1": "metricValue", + "metricName2": "metricValue", + "metricName3": "metricValue", + "metricName4": "metricValue" + } +] +``` + +#### Example + +Query the value information of the custom system, and its exposed interface is `/metrics/person`. We need `type,num` Metric. +The raw data returned by the interface is as follows: + +```json +{ + "firstName": "John", + "lastName" : "doe", + "age" : 26, + "address" : { + "streetAddress": "naist street", + "city" : "Nara", + "postalCode" : "630-0192" + }, + "number": [ + { + "type": "core", + "num": 3343 + }, + { + "type": "home", + "num": 4543 + } + ] +} +``` + +We use the jsonpath script to parse, and the corresponding script is: `$.number[*]`,The parsed data structure is as follows: + +```json +[ + { + "type": "core", + "num": 3343 + }, + { + "type": "home", + "num": 4543 + } +] +``` + +This data structure conforms to the data format specification of HertzBeat, and the Metric `type,num` is successfully extracted. + +**The corresponding monitoring template yml can be configured as follows** + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: custom +# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws... +app: example +name: + zh-CN: 模拟应用类型 + en-US: EXAMPLE APP +params: + # field-field name identifier + - field: host + # name-parameter field display name + name: + zh-CN: 主机Host + en-US: Host + # type-field type, style(most mappings are input label type attribute) + type: host + # required or not true-required false-optional + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + # When type is number, range is used to represent the range. + range: '[0,65535]' + required: true + # port default + defaultValue: 80 + # Prompt information of parameter input box + placeholder: 'Please enter the port' +# Metric group list +metrics: +# The first monitoring Metric group person +# Note:the built-in monitoring Metrics have (responseTime - response time) + - name: cpu + # The smaller Metric group scheduling priority(0-127), the higher the priority. After completion of the high priority Metric group collection,the low priority Metric group will then be scheduled. Metric groups with the same priority will be scheduled in parallel. + # Metric group with a priority of 0 is an availability group which will be scheduled first. If the collection succeeds, the scheduling will continue otherwise interrupt scheduling. + priority: 0 + # metrics fields list + fields: + # Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit + - field: type + type: 1 + label: true + - field: num + type: 0 +# protocol for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http +# Specific collection configuration when the protocol is HTTP protocol + http: + # host: ipv4 ipv6 domain name + host: ^_^host^_^ + # port + port: ^_^port^_^ + # url request interface path + url: /metrics/person + # request mode GET POST PUT DELETE PATCH + method: GET + # enable ssl/tls or not, that is to say, HTTP or HTTPS. The default is false + ssl: false + # parsing method for response data: default-system rules, jsonPath-jsonPath script, website-website availability Metric monitoring + # jsonPath parsing is used here + parseType: jsonPath + parseScript: '$.number[*]' +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-http-xmlpath.md b/home/versioned_docs/version-1.9.0/advanced/extend-http-xmlpath.md new file mode 100644 index 0000000000..d274fb5852 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-http-xmlpath.md @@ -0,0 +1,326 @@ +--- +id: extend-http-xmlpath +title: HTTP Protocol XmlPath Parsing Method +sidebar_label: XmlPath Parsing Method +--- + +> After calling the HTTP API to obtain the response data, use the XmlPath script parsing method to parse the response data. + +Note⚠️ The response data must be in XML format. + +**Use XPath scripts to parse the response data into data that conforms to the data structure rules specified by HertzBeat.** + +## XmlPath Parsing Logic + +The XmlPath parsing method in HertzBeat uses a two-step XPath process: + +1. **Main XPath Expression (`parseScript`)**: This XPath expression is defined in the `http` configuration section under `parseScript`. It is used to select one or more main XML nodes from the response. Each selected node will correspond to one row of metric data in HertzBeat. +2. **Relative Field XPath Expressions (`xpath`)**: For each metric field defined in the `fields` list, you can specify a relative `xpath`. This XPath expression is evaluated *relative to each main node* selected by the `parseScript` in step 1. It extracts the specific value for that metric field from the current main node. + +This allows you to easily parse structured XML data where multiple records or items are present. + +**Special Metrics**: + +* `responseTime`: This built-in metric represents the HTTP request's response time and is automatically collected. It does not require an `xpath`. + +* `keyword`: This built-in metric counts the occurrences of a specified keyword (configured in `http.keyword`) in the raw response body. It does not require an `xpath`. + +### Example + +Assume the HTTP API returns the following XML data: + +```xml + + + + 36.400002 + + + + + 399640 + 98792 + 228492 + + + + + 1 + 1000 + + + 2 + 0 + + + 2025-01-06 10:27:48 + 87天0时55分59秒 + 2025-04-03 11:09:18 + 1 + + 16 + 23 + 12 + + NTP + 34.191.45.101 + +``` + +We want to monitor the device status and extract various metrics. + +Here's how you would configure the monitoring template YML: + +```yaml +category: server +# The monitoring type eg: linux windows tomcat mysql aws... +app: hikvision_isapi +# The monitoring i18n name +name: + zh-CN: 海康威视 ISAPI + en-US: Hikvision ISAPI +# The description and help of this monitoring type +help: + zh-CN: 通过ISAPI接口监控海康威视设备状态,获取设备健康数据。 + en-US: Monitor Hikvision devices through ISAPI interface to collect health data. + +# Input params define for monitoring(render web ui by the definition) +params: + - field: host + name: + zh-CN: 主机Host + en-US: Host + type: host + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + range: '[0,65535]' + required: true + defaultValue: 80 + - field: timeout + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + type: number + range: '[1000,60000]' + required: true + defaultValue: 5000 + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + required: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: true + - field: ssl + name: + zh-CN: 启用HTTPS + en-US: SSL + type: boolean + required: false + defaultValue: false + +# collect metrics config list +metrics: + - name: system_info + i18n: + zh-CN: 系统信息 + en-US: System Info + priority: 0 + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + ssl: ^_^ssl^_^ + url: /ISAPI/System/deviceInfo + method: GET + timeout: ^_^timeout^_^ + authorization: + type: Digest Auth + digestAuthUsername: ^_^username^_^ + digestAuthPassword: ^_^password^_^ + parseType: xmlPath + parseScript: //DeviceInfo + fields: + - field: deviceName + type: 1 + i18n: + zh-CN: 设备名称 + en-US: Device Name + - field: deviceID + type: 1 + i18n: + zh-CN: 设备ID + en-US: Device ID + - field: firmwareVersion + type: 1 + i18n: + zh-CN: 固件版本 + en-US: Firmware Version + - field: model + type: 1 + i18n: + zh-CN: 设备型号 + en-US: Device Model + - field: macAddress + type: 1 + i18n: + zh-CN: mac地址 + en-US: Mac Address + - name: status + i18n: + zh-CN: 设备状态 + en-US: Status + priority: 0 + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + ssl: ^_^ssl^_^ + url: /ISAPI/System/status + method: GET + timeout: ^_^timeout^_^ + authorization: + type: Digest Auth + digestAuthUsername: ^_^username^_^ + digestAuthPassword: ^_^password^_^ + parseType: xmlPath + parseScript: //DeviceStatus + fields: + - field: CPU_utilization + i18n: + zh-CN: CPU 利用率 + en-US: CPU Utilization + type: 0 + unit: '%' + - field: memory_usage + i18n: + zh-CN: 内存使用量 + en-US: Memory Usage + type: 0 + unit: MB + - field: memory_available + i18n: + zh-CN: 可用内存 + en-US: Memory Available + type: 0 + unit: MB + - field: cache_size + i18n: + zh-CN: 缓存大小 + en-US: Cache Size + type: 0 + unit: MB + - field: net_port_1_speed + i18n: + zh-CN: 网口1速度 + en-US: Net Port 1 Speed + type: 0 + unit: Mbps + - field: net_port_2_speed + i18n: + zh-CN: 网口2速度 + en-US: Net Port 2 Speed + type: 0 + unit: Mbps + - field: boot_time + i18n: + zh-CN: 启动时间 + en-US: Boot Time + type: 1 + - field: device_uptime + i18n: + zh-CN: 运行时长 + en-US: Device Uptime + type: 1 + - field: last_calibration_time + i18n: + zh-CN: 上次校时时间 + en-US: Last Calibration Time + type: 1 + - field: last_calibration_time_diff + i18n: + zh-CN: 上次校时时间差 + en-US: Last Calibration Time Diff + type: 0 + unit: s + - field: avg_upload_time + i18n: + zh-CN: 平均上传耗时 + en-US: Avg Upload Time + type: 0 + unit: ms + - field: max_upload_time + i18n: + zh-CN: 最大上传耗时 + en-US: Max Upload Time + type: 0 + unit: ms + - field: min_upload_time + i18n: + zh-CN: 最小上传耗时 + en-US: Min Upload Time + type: 0 + unit: ms + - field: last_calibration_mode + i18n: + zh-CN: 上次校时模式 + en-US: Last Calibration Mode + type: 1 + - field: last_calibration_address + i18n: + zh-CN: 上次校时地址 + en-US: Last Calibration Address + type: 1 + - field: response_time + i18n: + zh-CN: 响应时间 + en-US: Response Time + type: 0 + unit: ms + aliasFields: + - CPUList/CPU/cpuUtilization + - MemoryList/Memory/memoryUsage + - MemoryList/Memory/memoryAvailable + - MemoryList/Memory/cacheSize + - NetPortStatusList/NetPortStatus[id='1']/workSpeed + - NetPortStatusList/NetPortStatus[id='2']/workSpeed + - bootTime + - deviceUpTime + - lastCalibrationTime + - lastCalibrationTimeDiff + - uploadTimeConsumingList/avgTime + - uploadTimeConsumingList/maxTime + - uploadTimeConsumingList/minTime + - lastCalibrationTimeMode + - lastCalibrationTimeAddress + - responseTime + calculates: + - CPU_utilization=CPUList/CPU/cpuUtilization + - memory_usage=MemoryList/Memory/memoryUsage + - memory_available=MemoryList/Memory/memoryAvailable + - cache_size=MemoryList/Memory/cacheSize + - net_port_1_speed=NetPortStatusList/NetPortStatus[id='1']/workSpeed + - net_port_2_speed=NetPortStatusList/NetPortStatus[id='2']/workSpeed + - boot_time=bootTime + - device_uptime=deviceUpTime + - last_calibration_time=lastCalibrationTime + - last_calibration_time_diff=lastCalibrationTimeDiff + - avg_upload_time=uploadTimeConsumingList/avgTime + - max_upload_time=uploadTimeConsumingList/maxTime + - min_upload_time=uploadTimeConsumingList/minTime + - last_calibration_mode=lastCalibrationTimeMode + - last_calibration_address=lastCalibrationTimeAddress + - response_time=responseTime + units: + - memory_usage=KB->MB + - memory_available=KB->MB + - cache_size=KB->MB diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-http.md b/home/versioned_docs/version-1.9.0/advanced/extend-http.md new file mode 100644 index 0000000000..ec2756e36b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-http.md @@ -0,0 +1,281 @@ +--- +id: extend-http +title: HTTP Protocol Custom Monitoring +sidebar_label: HTTP Protocol Custom Monitoring +--- + +> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use HTTP protocol to customize Metric monitoring + +## HTTP protocol collection process + +【**Call HTTP API**】->【**Response Verification**】->【**Parse Response Data**】->【**Default method parsing|JsonPath script parsing | XmlPath parsing(todo) | Prometheus parsing**】->【**Metric data extraction**】 + +It can be seen from the process that we define a monitoring type of HTTP protocol. We need to configure HTTP request parameters, configure which Metrics to obtain, and configure the parsing method and parsing script for response data. +HTTP protocol supports us to customize HTTP request path, request header, request parameters, request method, request body, etc. + +**System default parsing method**:HTTP interface returns the JSON data structure specified by hertzbeat, that is, the default parsing method can be used to parse the data and extract the corresponding Metric data. For details, refer to [**System Default Parsing**](extend-http-default) +**JsonPath script parsing method**:Use JsonPath script to parse the response JSON data, return the data structure specified by the system, and then provide the corresponding Metric data. For details, refer to [**JsonPath Script Parsing**](extend-http-jsonpath) + +### Custom Steps + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +------- + +Configuration usages of the monitoring templates yml are detailed below. Please pay attention to usage annotation. + +### Monitoring Templates YML + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +eg:Define a custom monitoring type `app` named `example_http` which use the HTTP protocol to collect data. + +**Monitoring Templates** -> **Config New Monitoring Template Yml** -> **Save and Apply** + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: a_example +# The monitoring i18n name +name: + zh-CN: 模拟应用 + en-US: EXAMPLE APP +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`
`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。 + en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `
`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template." + zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`
`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/ + en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/ +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 目标Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + # required-true or false + required: true + # default value + defaultValue: 80 + # param field input placeholder + placeholder: 'Please Input Port' + # field-param field key + - field: username + # name-param field display i18n name + name: + zh-CN: 用户名 + en-US: Username + # type-param field type(most mapping the html input type) + type: text + # when type is text, use limit to limit string length + limit: 50 + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: password + # name-param field display i18n name + name: + zh-CN: 用户密码 + en-US: Password + # type-param field type(most mapping the html input tag) + type: password + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: ssl + # name-param field display i18n name + name: + zh-CN: 启动SSL + en-US: SSL + # type-param field type(boolean mapping the html switch tag) + type: boolean + # required-true or false + required: false + # field-param field key + - field: method + # name-param field display i18n name + name: + zh-CN: 请求方式 + en-US: Method + # type-param field type(radio mapping the html radio tag) + type: radio + # required-true or false + required: true + # when type is radio checkbox, use option to show optional values {name1:value1,name2:value2} + options: + - label: GET + value: GET + - label: POST + value: POST + - label: PUT + value: PUT + - label: DELETE + value: DELETE + # field-param field key + - field: headers + # name-param field display i18n name + name: + zh-CN: 请求Headers + en-US: Headers + # type-param field type(key-value mapping the html key-value input tags) + type: key-value + # required-true or false + required: false + # when type is key-value, use keyAlias to config key alias name + keyAlias: Header Name + # when type is key-value, use valueAlias to config value alias name + valueAlias: Header Value +# collect metrics config list +metrics: + # metrics - cpu + - name: cpu + # metrics name i18n label + i18n: + zh-CN: CPU 信息 + en-US: CPU Info + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, i18n-metric name i18n label, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field + - field: hostname + type: 1 + label: true + i18n: + zh-CN: 主机名称 + en-US: Host Name + - field: usage + type: 0 + unit: '%' + i18n: + zh-CN: 使用率 + en-US: Usage + - field: cores + type: 0 + i18n: + zh-CN: 核数 + en-US: Cores + - field: waitTime + type: 0 + unit: s + i18n: + zh-CN: 主机名称 + en-US: Host Name + # (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field + aliasFields: + - hostname + - core1 + - core2 + - usage + - allTime + - runningTime + # mapping and conversion expressions, use these and aliasField above to calculate metrics value + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - hostname=hostname + - cores=core1+core2 + - usage=usage + - waitTime=allTime-runningTime + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: /metrics/cpu + # http method: GET POST PUT DELETE PATCH + method: GET + # if enabled https + ssl: false + # http request header content + headers: + ^_^headers^_^: ^_^headers^_^ + # http request params + params: + param1: param1 + param2: param2 + # http auth + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + type: Basic Auth + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: jsonPath + parseScript: '$' + + - name: memory + i18n: + zh-CN: 内存信息 + en-US: Memory Info + priority: 1 + fields: + - field: hostname + type: 1 + label: true + i18n: + zh-CN: 主机名称 + en-US: Hostname + - field: total + type: 0 + unit: kb + i18n: + zh-CN: 总量 + en-US: Total + - field: usage + type: 0 + unit: '%' + i18n: + zh-CN: 使用率 + en-US: Usage + - field: speed + type: 0 + i18n: + zh-CN: 速率 + en-US: Speed + protocol: http + http: + host: ^_^host^_^ + port: ^_^port^_^ + url: /metrics/memory + method: GET + headers: + apiVersion: v1 + params: + param1: param1 + param2: param2 + authorization: + type: Basic Auth + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + parseType: default + +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-jdbc.md b/home/versioned_docs/version-1.9.0/advanced/extend-jdbc.md new file mode 100644 index 0000000000..3b6166d20b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-jdbc.md @@ -0,0 +1,243 @@ +--- +id: extend-jdbc +title: JDBC Protocol Custom Monitoring +sidebar_label: JDBC Protocol Custom Monitoring +--- + +> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use JDBC(support mysql,mariadb,postgresql,sqlserver at present) to customize Metric monitoring. +> JDBC protocol custom monitoring allows us to easily monitor Metrics we want by writing SQL query statement. + +## JDBC protocol collection process + +【**System directly connected to MYSQL**】->【**Run SQL query statement**】->【**parse response data: oneRow, multiRow, columns**】->【**Metric data extraction**】 + +It can be seen from the process that we define a monitoring type of JDBC protocol. We need to configure SSH request parameters, configure which Metrics to obtain, and configure query SQL statements. + +### Data parsing method + +We can obtain the corresponding Metric data through the data fields queried by SQL and the Metric mapping we need. At present, there are three mapping parsing methods:oneRow, multiRow, columns. + +#### **oneRow** + +> Query a row of data, return the column name of the result set through query and map them to the queried field. + +eg: +queried Metric fields:one two three four +query SQL:select one, two, three, four from book limit 1; +Here the Metric field and the response data can be mapped into a row of collected data one by one. + +#### **multiRow** + +> Query multiple rows of data, return the column names of the result set and map them to the queried fields. + +eg: +queried Metric fields:one two three four +query SQL:select one, two, three, four from book; +Here the Metric field and the response data can be mapped into multiple rows of collected data one by one. + +#### **columns** + +> Collect a row of Metric data. By matching the two columns of queried data (key value), key and the queried field, value is the value of the query field. + +eg: +queried fields:one two three four +query SQL:select key, value from book; +SQL response data: + +| key | value | +|-------|-------| +| one | 243 | +| two | 435 | +| three | 332 | +| four | 643 | + +Here by mapping the Metric field with the key of the response data, we can obtain the corresponding value as collection and monitoring data. + +### Custom Steps + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +------- + +Configuration usages of the monitoring templates yml are detailed below. + +### Monitoring Templates YML + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +eg:Define a custom monitoring type `app` named `example_sql` which use the JDBC protocol to collect data. + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: db +# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws... +app: example_sql +name: + zh-CN: 模拟MYSQL应用类型 + en-US: MYSQL EXAMPLE APP +# Monitoring parameter definition file is used to define required input parameter field structure definition Front-end page render input parameter box according to structure +params: + - field: host + name: + zh-CN: 主机Host + en-US: Host + type: host + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + range: '[0,65535]' + required: true + defaultValue: 80 + placeholder: 'Please enter the port' + - field: database + name: + zh-CN: 数据库名称 + en-US: Database + type: text + required: false + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 50 + required: false + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: false + - field: url + name: + zh-CN: Url + en-US: Url + type: text + required: false +# Metric group list +metrics: + - name: basic + # The smaller Metric group scheduling priority(0-127), the higher the priority. After completion of the high priority Metric group collection,the low priority Metric group will then be scheduled. Metric groups with the same priority will be scheduled in parallel. + # Metric group with a priority of 0 is an availability group which will be scheduled first. If the collection succeeds, the scheduling will continue otherwise interrupt scheduling. + priority: 0 + # metrics fields list + fields: + # Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit + - field: version + type: 1 + label: true + - field: port + type: 1 + - field: datadir + type: 1 + - field: max_connections + type: 0 + # (optional)Monitoring Metric alias mapping to the Metric name above. The field used to collect interface data is not the final Metric name directly. This alias is required for mapping conversion. + aliasFields: + - version + - version_compile_os + - version_compile_machine + - port + - datadir + - max_connections + # (optional)The Metric calculation expression works with the above alias to calculate the final required Metric value. + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - port=port + - datadir=datadir + - max_connections=max_connections + - version=version+"_"+version_compile_os+"_"+version_compile_machine + protocol: jdbc + jdbc: + # host: ipv4 ipv6 domain name + host: ^_^host^_^ + # port + port: ^_^port^_^ + platform: mysql + username: ^_^username^_^ + password: ^_^password^_^ + database: ^_^database^_^ + # SQL query method:oneRow, multiRow, columns + queryType: columns + # sql + sql: show global variables where Variable_name like 'version%' or Variable_name = 'max_connections' or Variable_name = 'datadir' or Variable_name = 'port'; + url: ^_^url^_^ + + - name: status + priority: 1 + fields: + # Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit + - field: threads_created + type: 0 + - field: threads_connected + type: 0 + - field: threads_cached + type: 0 + - field: threads_running + type: 0 + # (optional)Monitoring Metric alias mapping to the Metric name above. The field used to collect interface data is not the final Metric name directly. This alias is required for mapping conversion. + aliasFields: + - threads_created + - threads_connected + - threads_cached + - threads_running + # (optional)The Metric calculation expression works with the above alias to calculate the final required Metric value. + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - threads_created=threads_created + - threads_connected=threads_connected + - threads_cached=threads_cached + - threads_running=threads_running + protocol: jdbc + jdbc: + # host: ipv4 ipv6 domain name + host: ^_^host^_^ + # port + port: ^_^port^_^ + platform: mysql + username: ^_^username^_^ + password: ^_^password^_^ + database: ^_^database^_^ + # SQL query method: oneRow, multiRow, columns + queryType: columns + # sql + sql: show global status where Variable_name like 'thread%' or Variable_name = 'com_commit' or Variable_name = 'com_rollback' or Variable_name = 'questions' or Variable_name = 'uptime'; + url: ^_^url^_^ + + - name: innodb + priority: 2 + fields: + # Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit + - field: innodb_data_reads + type: 0 + unit: times + - field: innodb_data_writes + type: 0 + unit: times + - field: innodb_data_read + type: 0 + unit: kb + - field: innodb_data_written + type: 0 + unit: kb + protocol: jdbc + jdbc: + # host: ipv4 ipv6 domain name + host: ^_^host^_^ + # port + port: ^_^port^_^ + platform: mysql + username: ^_^username^_^ + password: ^_^password^_^ + database: ^_^database^_^ + # SQL query method:oneRow, multiRow, columns + queryType: columns + # sql + sql: show global status where Variable_name like 'innodb%'; + url: ^_^url^_^ +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-jmx.md b/home/versioned_docs/version-1.9.0/advanced/extend-jmx.md new file mode 100644 index 0000000000..29f1bc3ff4 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-jmx.md @@ -0,0 +1,194 @@ +--- +id: extend-jmx +title: JMX Protocol Custom Monitoring +sidebar_label: JMX Protocol Custom Monitoring +--- + +> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use JMX to customize Metric monitoring. +> JMX protocol custom monitoring allows us to easily monitor Metrics we want by config JMX Mbeans Object. + +## JMX protocol collection process + +【**Peer Server Enable Jmx Service**】->【**HertzBeat Connect Peer Server Jmx**】->【**Query Jmx Mbean Object Data**】->【**Metric data extraction**】 + +It can be seen from the process that we define a monitoring type of JMX protocol. We need to configure JMX request parameters, configure which Metrics to obtain, and configure Mbeans Object. + +### Data parsing method + +By configuring the monitoring template YML metrics `field`, `aliasFields`, `objectName` of the `jmx` protocol to map and parse the `Mbean` object information exposed by the peer system. + +### Custom Steps + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +Configuration usages of the monitoring templates yml are detailed below. + +### Monitoring Templates YML + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +eg:Define a custom monitoring type `app` named `example_jvm` which use the JVM protocol to collect data. + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: service +# The monitoring type eg: linux windows tomcat mysql aws... +app: example_jvm +# The monitoring i18n name +name: + zh-CN: 自定义JVM虚拟机 + en-US: CUSTOM JVM +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + # required-true or false + required: true + # default value + defaultValue: 9999 + # field-param field key + - field: url + # name-param field display i18n name + name: + zh-CN: JMX URL + en-US: JMX URL + # type-param field type(most mapping the html input type) + type: text + # required-true or false + required: false + # hide param-true or false + hide: true + # param field input placeholder + placeholder: 'service:jmx:rmi:///jndi/rmi://host:port/jmxrmi' + # field-param field key + - field: username + # name-param field display i18n name + name: + zh-CN: 用户名 + en-US: Username + # type-param field type(most mapping the html input type) + type: text + # when type is text, use limit to limit string length + limit: 50 + # required-true or false + required: false + # hide param-true or false + hide: true + # field-param field key + - field: password + # name-param field display i18n name + name: + zh-CN: 密码 + en-US: Password + # type-param field type(most mapping the html input tag) + type: password + # required-true or false + required: false + # hide param-true or false + hide: true +# collect metrics config list +metrics: + # metrics - basic + - name: basic + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label + - field: VmName + type: 1 + - field: VmVendor + type: 1 + - field: VmVersion + type: 1 + - field: Uptime + type: 0 + unit: ms + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: jmx + # the config content when protocol is jmx + jmx: + # host: ipv4 ipv6 domain + host: ^_^host^_^ + # port + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: java.lang:type=Runtime + url: ^_^url^_^ + + - name: memory_pool + priority: 1 + fields: + - field: name + type: 1 + label: true + - field: committed + type: 0 + unit: MB + - field: init + type: 0 + unit: MB + - field: max + type: 0 + unit: MB + - field: used + type: 0 + unit: MB + units: + - committed=B->MB + - init=B->MB + - max=B->MB + - used=B->MB + # (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field + aliasFields: + - Name + - Usage->committed + - Usage->init + - Usage->max + - Usage->used + # mapping and conversion expressions, use these and aliasField above to calculate metrics value + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - name=Name + - committed=Usage->committed + - init=Usage->init + - max=Usage->max + - used=Usage->used + protocol: jmx + jmx: + # host: ipv4 ipv6 domain + host: ^_^host^_^ + # port + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + objectName: java.lang:type=MemoryPool,name=* + url: ^_^url^_^ +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-ngql.md b/home/versioned_docs/version-1.9.0/advanced/extend-ngql.md new file mode 100644 index 0000000000..ef4f3f2430 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-ngql.md @@ -0,0 +1,174 @@ +--- +id: extend-ngql +title: NGQL Custom Monitoring +sidebar_label: NGQL Custom Monitoring +--- + +> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use JDBC(support mysql,mariadb,postgresql,sqlserver at present) to customize Metric monitoring. +> NGQL custom monitoring allows us to easily query metric data from the NebulaGraph graph database using NGQL or OpenCypher, supporting NebulaGraph 3.X versions. + +## Data Parsing Methods + +Mapping the fields returned by NGQL queries to the metrics we need allows us to obtain corresponding metric data. Currently, there are four mapping and parsing methods: filterCount, oneRow, multiRow, columns. + +### **filterCount** +> +> Counts the number of results returned by a query based on specified fields, usually used in `SHOW ...` statements. If NGQL statements can directly return the count, it is recommended to use NGQL statements for counting. +> Syntax for the `commands` field: aliasField#NGQL#filterName#filterValue +> `aliasField`: corresponds to the value in the `aliasFields` in the monitoring template +> `NGQL`: query statement +> `filterName`: filter attribute name (optional) +> `filterValue`: filter attribute value (optional) + +For example: + +- online_meta_count#SHOW HOSTS META#Status#ONLINE +Counts the number of rows returned by `SHOW HOSTS META` where Status equals ONLINE. +- online_meta_count#SHOW HOSTS META## +Counts the number of rows returned by `SHOW HOSTS META`. + +#### **oneRow** + +> Queries a single row of data by mapping the column names of the query result set to the queried fields. + +For example: + +- Metrics fields: a, b +- NGQL query: match (v:metrics) return v.metrics.a as a, v.metrics.b as b; + +Here, the metric fields can be mapped to the response data row by row. + +Notes: + +- When using the `oneRow` method, if a single query statement returns multiple rows of results, only the first row of results will be mapped to the metric fields. +- When the `commands` field contains two or more query statements and the returned fields of multiple query statements are the same, the fields returned by the subsequent statement will overwrite those returned by the previous statement. +- It is recommended to use the limit statement to limit the number of rows returned in the result set when defining `commands`. + +#### **multiRow** + +> Queries multiple rows of data by mapping the column names of the query result set to the queried fields. + +For example: + +- Metrics fields: a, b +- NGQL query: match (v:metrics) return v.metrics.a as a, v.metrics.b as b; + +Here, the metric fields can be mapped to the response data row by row. +Notes: + +- When using the `multiRow` method, the `commands` field can only contain one query statement. + +#### **columns** + +> Collects a single row of metric data by mapping two columns of data (key-value), where the key matches the queried fields and the value is the value of the queried field. + +Notes: + +- When using the `columns` method, the first two columns of the result set are mapped to collect data by default, where the first column corresponds to the metric name and the second column corresponds to the metric value. +- When the `commands` field contains two or more query statements and the first column of data returned by multiple query statements is duplicated, the result of the last statement will be retained. + +### Customization Steps + +**HertzBeat Page** -> **Monitoring Template Menu** -> **Add Monitoring Type** -> **Configure Custom Monitoring Template YML** -> **Click Save Application** -> **Use the New Monitoring Type to Add Monitoring** + +![HertzBeat Page](/img/docs/advanced/extend-point-1.png) + +------- + +Configuration usages of the monitoring templates yml are detailed below. + +### Monitoring Template YML + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> Monitoring template is used to define the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information, etc. + +eg: Customize a monitoring type named example_ngql, which collects metric data using NGQL. + +```yaml +# Monitoring category: service-application service program-application program db-database custom-custom os-operating system bigdata-big data mid-middleware webserver-web server cache-cache cn-cloud native network-network monitoring, etc. +category: db +# Monitoring application type (consistent with the file name) eg: linux windows tomcat mysql aws... +app: example_ngql +name: + zh-CN: NGQL Custom Monitoring Application + en-US: NGQL Custom APP +# Monitoring parameter definition. These are input parameter variables, which can be written in the format of ^_^host^_^ to be replaced by system variable values in the later configuration +# This part is usually not modified +params: + # field-param field key + - field: host + name: + zh-CN: Target Host + en-US: Target Host + type: host + required: true + - field: graphPort + name: + zh-CN: Graph Port + en-US: Graph Port + type: number + range: '[0,65535]' + required: true + defaultValue: 9669 + - field: username + name: + zh-CN: Username + en-US: Username + type: text + required: true + - field: password + name: + zh-CN: Password + en-US: Password + type: password + required: true + - field: spaceName + name: + zh-CN: Space Name + en-US: Space Name + type: text + required: false + - field: timeout + name: + zh-CN: Connect Timeout(ms) + en-US: Connect Timeout(ms) + type: number + unit: ms + range: '[0,100000]' + required: true + defaultValue: 6000 +# Metric collection configuration list +metrics: + - name: base_info + i18n: + zh-CN: Vertex statistics + en-US: Vertex statistics + priority: 0 + fields: + - field: tag1 + type: 1 + i18n: + zh-CN: tag1 + en-US: tag1 + - field: tag1 + type: 1 + i18n: + zh-CN: tag2 + en-US: tag2 + aliasFields: + - tag1 + - tag2 + protocol: ngql + ngql: + host: ^_^host^_^ + username: ^_^username^_^ + password: ^_^password^_^ + port: ^_^graphPort^_^ + spaceName: ^_^spaceName^_^ + parseType: columns + # Define the query statements used to collect data + commands: + - match (v:tag1) return "tag1" as name ,count(v) as cnt + - match (v:tag2) return "tag2" as name ,count(v) as cnt + timeout: ^_^timeout^_^ +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-point.md b/home/versioned_docs/version-1.9.0/advanced/extend-point.md new file mode 100644 index 0000000000..6dec89aafc --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-point.md @@ -0,0 +1,146 @@ +--- +id: extend-point +title: Custom Monitoring +sidebar_label: Custom Monitoring +--- + +> HertzBeat has custom monitoring ability. You only need to configure monitoring template yml to fit a custom monitoring type. +> Custom monitoring currently supports [HTTP protocol](extend-http),[JDBC protocol](extend-jdbc), [SSH protocol](extend-ssh), [JMX protocol](extend-jmx), [SNMP protocol](extend-snmp). And it will support more general protocols in the future. + +## Custom Monitoring Steps + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +### Custom Monitoring Metrics Refresh Interval + +HertzBeat now supports setting different refresh intervals for various groups of monitoring metrics. This can be configured in the monitoring template under the `metrics` section by setting the `interval` field, with the unit being seconds. If not set, the default refresh interval specified during the creation of the monitoring will be used. + +------- + +Configuration usages of the monitoring templates yml are detailed below. + +### Monitoring Templates YML + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +eg:Define a custom monitoring type `app` named `example2` which use the HTTP protocol to collect data. + +**Monitoring Templates** -> **Config New Monitoring Template Yml** -> **Save and Apply** + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: example2 +# The monitoring i18n name +name: + zh-CN: 模拟网站监测 + en-US: EXAMPLE WEBSITE +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 支持自定义监控,您只需配置监控模板 YML 就能适配一款自定义的监控类型。`
`定义流程如下:HertzBeat 页面 -> 监控模板菜单 -> 新增监控类型 -> 配置自定义监控模板YML -> 点击保存应用 -> 使用新监控类型添加监控。 + en-US: "HertzBeat supports custom monitoring, and you only need to configure the monitoring template YML to adapt to a custom monitoring type. `
`Definition process as follow: HertzBeat Pages -> Main Menu -> Monitor Template -> edit and save -> apply this template." + zh-TW: HertzBeat支持自定義監控,您只需配寘監控模板YML就能適配一款自定義的監控類型。`
`定義流程如下:HertzBeat頁面->監控模板選單->新增監控類型->配寘自定義監控模板YML ->點擊保存應用->使用新監控類型添加監控。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/advanced/extend-point/ + en-US: https://hertzbeat.apache.org/docs/advanced/extend-point/ +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + # required-true or false + required: true + # default value + defaultValue: 80 + # field-param field key + - field: uri + # name-param field display i18n name + name: + zh-CN: 相对路径 + en-US: URI + # type-param field type(most mapping the html input tag) + type: text + # when type is text, use limit to limit string length + limit: 200 + # required-true or false + required: false + # param field input placeholder + placeholder: 'Website uri path(no ip port) EG:/console' + # field-param field key + - field: ssl + # name-param field display i18n name + name: + zh-CN: 启用HTTPS + en-US: HTTPS + # type-param field type(most mapping the html input type) + type: boolean + # required-true or false + required: true + # field-param field key + - field: timeout + # name-param field display i18n name + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + # type-param field type(most mapping the html input tag) + type: number + # required-true or false + required: false + # hide param-true or false + hide: true + +metrics: + # metrics - summary, inner monitoring metrics (responseTime - response time, keyword - number of keywords) + - name: summary + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # refresh interval for this metrics group + interval: 600 + # collect metrics content + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label + - field: responseTime + type: 0 + unit: ms + - field: keyword + type: 0 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url + url: ^_^uri^_^ + timeout: ^_^timeout^_^ + # http method: GET POST PUT DELETE PATCH + method: GET + # if enabled https + ssl: ^_^ssl^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule + parseType: website + +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-snmp.md b/home/versioned_docs/version-1.9.0/advanced/extend-snmp.md new file mode 100644 index 0000000000..ce39f61ec8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-snmp.md @@ -0,0 +1,171 @@ +--- +id: extend-snmp +title: SNMP Protocol Custom Monitoring +sidebar_label: SNMP Protocol Custom Monitoring +--- + +> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use SNMP to customize Metric monitoring. +> JMX protocol custom monitoring allows us to easily monitor Metrics we want by config SNMP MIB OIDs. + +## SNMP protocol collection process + +【**Peer Server Enable SNMP Service**】->【**HertzBeat Connect Peer Server SNMP**】->【**Query Oids Data**】->【**Metric data extraction**】 + +It can be seen from the process that we define a monitoring type of Snmp protocol. We need to configure Snmp request parameters, configure which Metrics to obtain, and configure oids. + +### Data parsing method + +By configuring the metrics `field`, `aliasFields`, and `oids` under the `snmp` protocol of the monitoring template YML to capture the data specified by the peer and parse the mapping. + +### Custom Steps + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +Configuration usages of the monitoring templates yml are detailed below. + +### Monitoring Templates YML + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +eg:Define a custom monitoring type `app` named `example_windows` which use the SNMP protocol to collect data. + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring mid-middleware custom-custom monitoring os-operating system monitoring +category: os +# The monitoring type eg: linux windows tomcat mysql aws... +app: windows +# The monitoring i18n name +name: + zh-CN: Windows操作系统 + en-US: OS Windows +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + # required-true or false + required: true + # default value + defaultValue: 161 + # field-param field key + - field: version + # name-param field display i18n name + name: + zh-CN: SNMP 版本 + en-US: SNMP Version + # type-param field type(radio mapping the html radio tag) + type: radio + # required-true or false + required: true + # when type is radio checkbox, use option to show optional values {name1:value1,name2:value2} + options: + - label: SNMPv1 + value: 0 + - label: SNMPv2c + value: 1 + # field-param field key + - field: community + # name-param field display i18n name + name: + zh-CN: SNMP 团体字 + en-US: SNMP Community + # type-param field type(most mapping the html input type) + type: text + # when type is text, use limit to limit string length + limit: 100 + # required-true or false + required: true + # param field input placeholder + placeholder: 'Snmp community for v1 v2c' + # field-param field key + - field: timeout + # name-param field display i18n name + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,100000]' + # required-true or false + required: false + # hide-is hide this field and put it in advanced layout + hide: true + # default value + defaultValue: 6000 +# collect metrics config list +metrics: + # metrics - system + - name: system + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label + - field: name + type: 1 + - field: descr + type: 1 + - field: uptime + type: 1 + - field: numUsers + type: 0 + - field: services + type: 0 + - field: processes + type: 0 + - field: responseTime + type: 0 + unit: ms + - field: location + type: 1 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: snmp + # the config content when protocol is snmp + snmp: + # server host: ipv4 ipv6 domain + host: ^_^host^_^ + # server port + port: ^_^port^_^ + # snmp connect timeout + timeout: ^_^timeout^_^ + # snmp community + community: ^_^community^_^ + # snmp version + version: ^_^version^_^ + # snmp operation: get, walk + operation: get + # metrics oids: metric_name - oid_value + oids: + name: 1.3.6.1.2.1.1.5.0 + descr: 1.3.6.1.2.1.1.1.0 + uptime: 1.3.6.1.2.1.25.1.1.0 + numUsers: 1.3.6.1.2.1.25.1.5.0 + services: 1.3.6.1.2.1.1.7.0 + processes: 1.3.6.1.2.1.25.1.6.0 + location: 1.3.6.1.2.1.1.6.0 +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-ssh.md b/home/versioned_docs/version-1.9.0/advanced/extend-ssh.md new file mode 100644 index 0000000000..436b875013 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-ssh.md @@ -0,0 +1,214 @@ +--- +id: extend-ssh +title: SSH Protocol Custom Monitoring +sidebar_label: SSH Protocol Custom Monitoring +--- + +> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use SSH protocol to customize Metric monitoring. +> SSH protocol custom monitoring allows us to easily monitor and collect the Linux Metrics we want by writing sh command script. + +## SSH protocol collection process + +【**System directly connected to Linux**】->【**Run shell command script statement**】->【**parse response data: oneRow, multiRow**】->【**Metric data extraction**】 + +It can be seen from the process that we define a monitoring type of SSH protocol. We need to configure SSH request parameters, configure which Metrics to obtain, and configure query script statements. + +### Data parsing method + +We can obtain the corresponding Metric data through the data fields queried by the SHELL script and the Metric mapping we need. At present, there are two mapping parsing methods:oneRow and multiRow which can meet the needs of most Metrics. + +#### **oneRow** + +> Query out a column of data, return the field value (one value per row) of the result set through query and map them to the field. + +eg: +Metrics of Linux to be queried hostname-host name,uptime-start time +Host name original query command:`hostname` +Start time original query command:`uptime | awk -F "," '{print $1}'` +Then the query script of the two Metrics in hertzbeat is(Use `;` Connect them together): +`hostname; uptime | awk -F "," '{print $1}'` +The data responded by the terminal is: + +```shell +tombook +14:00:15 up 72 days +``` + +At last collected Metric data is mapped one by one as: +hostname is `tombook` +uptime is `14:00:15 up 72 days` + +Here the Metric field and the response data can be mapped into a row of collected data one by one + +#### **multiRow** + +> Query multiple rows of data, return the column names of the result set through the query, and map them to the Metric field of the query. + +eg: +Linux memory related Metric fields queried:total-Total memory, used-Used memory,free-Free memory, buff-cache-Cache size, available-Available memory +Memory metrics original query command:`free -m`, Console response: + +```shell + total used free shared buff/cache available +Mem: 7962 4065 333 1 3562 3593 +Swap: 8191 33 8158 +``` + +In hertzbeat multiRow format parsing requires a one-to-one mapping between the column name of the response data and the indicator value, so the corresponding query SHELL script is: +`free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}'` +Console response is: + +```shell +total used free buff_cache available +7962 4066 331 3564 3592 +``` + +Here the Metric field and the response data can be mapped into collected data one by one. + +### Custom Steps + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +------- + +Configuration usages of the monitoring templates yml are detailed below. + +### Monitoring Templates YML + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +eg:Define a custom monitoring type `app` named `example_linux` which use the SSH protocol to collect data. + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: os +# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws... +app: example_linux +name: + zh-CN: 模拟LINUX应用类型 + en-US: LINUX EXAMPLE APP +params: + - field: host + name: + zh-CN: 主机Host + en-US: Host + type: host + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + range: '[0,65535]' + required: true + defaultValue: 22 + placeholder: 'Please enter the port' + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 50 + required: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: true +# Metric group list +metrics: + # The first monitoring Metric group basic + # Note:: the built-in monitoring Metrics have (responseTime - response time) + - name: basic + # The smaller Metric group scheduling priority(0-127), the higher the priority. After completion of the high priority Metric group collection,the low priority Metric group will then be scheduled. Metric groups with the same priority will be scheduled in parallel. + # Metric group with a priority of 0 is an availability group which will be scheduled first. If the collection succeeds, the scheduling will continue otherwise interrupt scheduling. + priority: 0 + # metrics fields list + fields: + # Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit + - field: hostname + type: 1 + label: true + - field: version + type: 1 + - field: uptime + type: 1 + # protocol for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: ssh + # Specific collection configuration when the protocol is SSH protocol + ssh: + # host: ipv4 ipv6 domain name + host: ^_^host^_^ + # port + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + script: (uname -r ; hostname ; uptime | awk -F "," '{print $1}' | sed "s/ //g") | sed ":a;N;s/\n/^/g;ta" | awk -F '^' 'BEGIN{print "version hostname uptime"} {print $1, $2, $3}' + # parsing method for response data:oneRow, multiRow + parseType: multiRow + + - name: cpu + priority: 1 + fields: + # Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit + - field: info + type: 1 + - field: cores + type: 0 + unit: the number of cores + - field: interrupt + type: 0 + unit: number + - field: load + type: 1 + - field: context_switch + type: 0 + unit: number + # protocol for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: ssh + # Specific collection configuration when the protocol is SSH protocol + ssh: + # 主机host: ipv4 ipv6 domain name + host: ^_^host^_^ + # port + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + script: "LANG=C lscpu | awk -F: '/Model name/ {print $2}';awk '/processor/{core++} END{print core}' /proc/cpuinfo;uptime | sed 's/,/ /g' | awk '{for(i=NF-2;i<=NF;i++)print $i }' | xargs;vmstat 1 1 | awk 'NR==3{print $11}';vmstat 1 1 | awk 'NR==3{print $12}'" + parseType: oneRow + + - name: memory + priority: 2 + fields: + # Metric information include field: name type: field type(0-number: number, 1-string: string) label-if is metrics label unit: Metric unit + - field: total + type: 0 + unit: Mb + - field: used + type: 0 + unit: Mb + - field: free + type: 0 + unit: Mb + - field: buff_cache + type: 0 + unit: Mb + - field: available + type: 0 + unit: Mb + # protocol for monitoring and collection eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: ssh + # Specific collection configuration when the protocol is SSH protocol + ssh: + # host: ipv4 ipv6 domain name + host: ^_^host^_^ + # port + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + script: free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}' + parseType: multiRow +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-telnet.md b/home/versioned_docs/version-1.9.0/advanced/extend-telnet.md new file mode 100644 index 0000000000..c4a65f885d --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-telnet.md @@ -0,0 +1,299 @@ +--- +id: extend-telnet +title: Telnet Protocol Custom Monitoring +sidebar_label: Telnet Protocol Custom Monitoring +--- + +> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use Telnet to customize Metric monitoring. +> Telnet protocol custom monitoring allows us to easily monitor and collect the Linux Metrics we want by writing sh command script. + +## Telnet protocol collection process + +【**System directly connected to Linux**】->【**Run shell command script statement**】->【**parse response data: oneRow, multiRow**】->【**Metric data extraction**】 + +It can be seen from the process that we define a monitoring type of Telnet protocol. We need to configure Telnet request parameters, configure which Metrics to obtain, and configure query script statements. + +### Data parsing method + +By configuring the metrics `field`, `aliasFields` the `Telnet` protocol of the monitoring template YML to capture the data specified by the peer and parse the mapping. + +### Custom Steps + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +------- + +Configuration usages of the monitoring templates yml are detailed below. + +### Monitoring Templates YML + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +eg:Define a custom monitoring type `app` named `zookeeper` which use the telnet protocol to collect data. + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +# 监控类型所属类别:service-应用服务 program-应用程序 db-数据库 custom-自定义 os-操作系统 bigdata-大数据 mid-中间件 webserver-web服务器 cache-缓存 cn-云原生 network-网络监控等等 +category: mid +# Monitoring application type(consistent with the file name) eg: linux windows tomcat mysql aws... +# 监控应用类型(与文件名保持一致) eg: linux windows tomcat mysql aws... +app: zookeeper +# The monitoring i18n name +# 监控类型国际化名称 +name: + zh-CN: Zookeeper服务 + en-US: Zookeeper Server +# 监控参数定义. field 这些为输入参数变量,即可以用^_^host^_^的形式写到后面的配置中,系统自动变量值替换 +# 强制固定必须参数 - host +params: + # field-param field key + # field-字段名称标识符 + - field: host + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # field-param field key + # field-字段名称标识符 + - field: port + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,65535]' + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # default + # 默认值 + defaultValue: 2181 + # param field input placeholder + # 参数输入框提示信息 + placeholder: '请输入端口' + # field-param field key + # field-字段名称标识符 + - field: timeout + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 查询超时时间(ms) + en-US: Query Timeout(ms) + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: false + # hide-is hide this field and put it in advanced layout + # 隐藏是隐藏这个字段,并把它放在高级布局 + hide: true + # default + # 默认值 + defaultValue: 6000 +# collect metrics config list +# 采集指标配置列表 +metrics: + # metrics - conf + # 第一个监控指标 conf + # 注意:内置监控指标有 (responseTime - 响应时间) + - name: conf + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + # 指标采集调度优先级(0->127)->(优先级高->低) 优先级低的指标会等优先级高的指标采集完成后才会被调度, 相同优先级的指标会并行调度采集 + # 优先级为0的指标为可用性指标,即它会被首先调度,采集成功才会继续调度其它指标,采集失败则中断调度 + priority: 0 + # collect metrics content + # 具体监控指标列表 + fields: + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 label是否为标签 unit:指标单位 + - field: clientPort + type: 0 + i18n: + zh-CN: 客户端端口 + en-US: Client Port + - field: dataDir + type: 1 + i18n: + zh-CN: 数据目录 + en-US: Data Directory + - field: dataDirSize + type: 0 + unit: kb + i18n: + zh-CN: 数据目录大小 + en-US: Data Directory Size + - field: dataLogDir + type: 1 + i18n: + zh-CN: 日志目录 + en-US: Data Log Directory + - field: dataLogSize + type: 0 + unit: kb + i18n: + zh-CN: 日志目录大小 + en-US: Data Log Size + - field: tickTime + type: 0 + unit: ms + i18n: + zh-CN: 心跳间隔时间 + en-US: Tick Time + - field: maxClientCnxns + type: 1 + i18n: + zh-CN: 最大客户端连接数 + en-US: Max Client Connections + - field: minSessionTimeout + type: 0 + unit: ms + i18n: + zh-CN: 最小会话超时 + en-US: Min Session Timeout + - field: maxSessionTimeout + type: 0 + unit: ms + i18n: + zh-CN: 最大会话超时 + en-US: Max Session Timeout + - field: serverId + type: 0 + i18n: + zh-CN: 服务器ID + en-US: Server ID + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk + protocol: telnet + # the config content when protocol is telnet + # 当protocol为telnet协议时具体的采集配置 + telnet: + # host: ipv4 ipv6 domain + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # port + # 端口 + port: ^_^port^_^ + # timeout + # 超时时间 + timeout: ^_^timeout^_^ + # telnet instruction + # telnet指令 + cmd: conf + + - name: stats + priority: 1 + fields: + - field: zk_version + type: 1 + i18n: + zh-CN: ZooKeeper版本 + en-US: ZooKeeper Version + - field: zk_server_state + type: 1 + i18n: + zh-CN: 服务器状态 + en-US: Server State + - field: zk_num_alive_connections + type: 0 + unit: 个 + i18n: + zh-CN: 存活连接数 + en-US: Number of Alive Connections + - field: zk_avg_latency + type: 0 + unit: ms + i18n: + zh-CN: 平均延迟 + en-US: Average Latency + - field: zk_outstanding_requests + type: 0 + unit: 个 + i18n: + zh-CN: 未完成请求数 + en-US: Outstanding Requests + - field: zk_znode_count + type: 0 + unit: 个 + i18n: + zh-CN: ZNode数量 + en-US: ZNode Count + - field: zk_packets_sent + type: 0 + unit: 个 + i18n: + zh-CN: 发送数据包数 + en-US: Packets Sent + - field: zk_packets_received + type: 0 + unit: 个 + i18n: + zh-CN: 接收数据包数 + en-US: Packets Received + - field: zk_watch_count + type: 0 + unit: 个 + i18n: + zh-CN: Watch数量 + en-US: Watch Count + - field: zk_max_file_descriptor_count + type: 0 + unit: 个 + i18n: + zh-CN: 最大文件描述符数量 + en-US: Max File Descriptor Count + - field: zk_approximate_data_size + type: 0 + unit: kb + i18n: + zh-CN: 大致数据大小 + en-US: Approximate Data Size + - field: zk_open_file_descriptor_count + type: 0 + unit: 个 + i18n: + zh-CN: 打开的文件描述符数量 + en-US: Open File Descriptor Count + - field: zk_max_latency + type: 0 + unit: ms + i18n: + zh-CN: 最大延迟 + en-US: Max Latency + - field: zk_ephemerals_count + type: 0 + unit: 个 + i18n: + zh-CN: 临时节点数量 + en-US: Ephemerals Count + - field: zk_min_latency + type: 0 + unit: ms + i18n: + zh-CN: 最小延迟 + en-US: Min Latency + protocol: telnet + telnet: + host: ^_^host^_^ + port: ^_^port^_^ + timeout: ^_^timeout^_^ + cmd: mntr + + +``` diff --git a/home/versioned_docs/version-1.9.0/advanced/extend-tutorial.md b/home/versioned_docs/version-1.9.0/advanced/extend-tutorial.md new file mode 100644 index 0000000000..6c774d8421 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/advanced/extend-tutorial.md @@ -0,0 +1,232 @@ +--- +id: extend-tutorial +title: Quick Tutorial Customize and adapt a monitoring based on HTTP protocol +sidebar_label: Tutorial Case +--- + +Through this tutorial, we describe step by step how to customize and adapt a monitoring type based on the http protocol under the Apache HertzBeat. + +Before reading this tutorial, we hope that you are familiar with how to customize types, metrics, protocols, etc. from [Custom Monitoring](extend-point) and [Http Protocol Customization](extend-http). + +## HTTP protocol parses the general response structure to obtain metrics data +> +> In many scenarios, we need to monitor the provided HTTP API interface and obtain the index value returned by the interface. In this article, we use the http custom protocol to parse our common http interface response structure, and obtain the fields in the returned body as metric data. + +```json +{ + "code": 200, + "msg": "success", + "data": {} +} + +``` + +As above, usually our background API interface will design such a general return. The same is true for the background of the hertzbeat system. Today, we will use the hertzbeat API as an example, add a new monitoring type **hertzbeat**, and monitor and collect its system summary statistics API +`http://localhost:1157/api/summary`, the response data is: + +```json +{ + "msg": null, + "code": 0, + "data": { + "apps": [ + { + "category": "service", + "app": "jvm", + "status": 0, + "size": 2, + "availableSize": 0, + "unManageSize": 2, + "unAvailableSize": 0, + "unReachableSize": 0 + }, + { + "category": "service", + "app": "website", + "status": 0, + "size": 2, + "availableSize": 0, + "unManageSize": 2, + "unAvailableSize": 0, + "unReachableSize": 0 + } + ] + } +} +``` + +**This time we get the metrics data such as `category`, `app`, `status`, `size`, `availableSize` under the app.** + +### Add Monitoring Template Yml + +**HertzBeat Dashboard** -> **Monitoring Templates** -> **New Template** -> **Config Monitoring Template Yml** -> **Save and Apply** -> **Add A Monitoring with The New Monitoring Type** + +> We define all monitoring collection types (mysql,jvm,k8s) as yml monitoring templates, and users can import these templates to support corresponding types of monitoring. +> +> Monitoring template is used to define *the name of monitoring type(international), request parameter mapping, index information, collection protocol configuration information*, etc. + +Here we define a custom monitoring type `app` named `hertzbeat` which use the HTTP protocol to collect data. + +**Monitoring Templates** -> **Config New Monitoring Template Yml** -> **Save and Apply** + +```yaml +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: custom +# The monitoring type eg: linux windows tomcat mysql aws... +app: hertzbeat +# The monitoring i18n name +name: + zh-CN: HertzBeat监控系统 + en-US: HertzBeat Monitor +# The description and help of this monitoring type +help: + zh-CN: HertzBeat 对 HertzBeat 监控系统的通用指标进行测量监控。`
`您可以点击 “``新建 HertzBeat监控系统``” 并进行配置,或者选择“``更多操作``”,导入已有配置。 + en-US: HertzBeat monitors HertzBeat Monitor through general performance metric. You could click the "``New HertzBeat Monitor``" button and proceed with the configuration or import an existing setup through the "``More Actions``" menu. + zh-TW: HertzBeat對HertzBeat監控系統的通用名額進行量測監控。`
`您可以點擊“``新建HertzBeat監控系統``”並進行配寘,或者選擇“``更多操作``”,導入已有配寘。 +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hertzbeat + en-US: https://hertzbeat.apache.org/docs/help/hertzbeat +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + - field: host + # name-param field display i18n name + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + type: host + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + # required-true or false + required: true + # default value + defaultValue: 1157 + - field: ssl + name: + zh-CN: 启用HTTPS + en-US: HTTPS + type: boolean + required: true + - field: timeout + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + type: number + required: false + hide: true + - field: authType + name: + zh-CN: 认证方式 + en-US: Auth Type + type: radio + required: false + hide: true + options: + - label: Basic Auth + value: Basic Auth + - label: Digest Auth + value: Digest Auth + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 50 + required: false + hide: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: false + hide: true +metrics: + # the first metrics summary + # attention: Built-in monitoring metrics contains (responseTime - Response time) + - name: summary + # metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + priority: 0 + # collect metrics content + fields: + # metrics content contains field-metric name, type-metric type:0-number,1-string, label-if is metrics label, unit-metric unit('%','ms','MB') + - field: app + type: 1 + label: true + - field: category + type: 1 + - field: status + type: 0 + - field: size + type: 0 + - field: availableSize + type: 0 + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here + protocol: http + # the config content when protocol is http + http: + # http host: ipv4 ipv6 domain + host: ^_^host^_^ + # http port + port: ^_^port^_^ + # http url, we don't need to enter a parameter here, just set the fixed value to /api/summary + url: /api/summary + timeout: ^_^timeout^_^ + # http method: GET POST PUT DELETE PATCH, default fixed value is GET + method: GET + # if enabled https, default value is false + ssl: ^_^ssl^_^ + # http auth + authorization: + # http auth type: Basic Auth, Digest Auth, Bearer Token + type: ^_^authType^_^ + basicAuthUsername: ^_^username^_^ + basicAuthPassword: ^_^password^_^ + digestAuthUsername: ^_^username^_^ + digestAuthPassword: ^_^password^_^ + # http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, we use jsonpath to parse response data here + parseType: jsonPath + parseScript: '$.data.apps.*' +``` + +**The addition is complete, now we restart the hertzbeat system. We can see that the system page has added a `hertzbeat` monitoring type.** + +![HertzBeat](/img/docs/advanced/extend-http-example-1.png) + +### The system page adds the monitoring of `hertzbeat` monitoring type + +> We click Add `HertzBeat Monitoring Tool`, configure monitoring IP, port, collection cycle, account password in advanced settings, etc., click OK to add monitoring. + +![HertzBeat](/img/docs/advanced/extend-http-example-2.png) + +![HertzBeat](/img/docs/advanced/extend-http-example-3.png) + +> After a certain period of time (depending on the collection cycle), we can see the specific metric data and historical charts in the monitoring details! + +![HertzBeat](/img/docs/advanced/extend-http-example-4.png) + +### Set threshold alarm notification + +> Next, we can set the threshold normally. After the alarm is triggered, we can view it in the alarm center, add a new recipient, set alarm notification, etc. Have Fun!!! + +---- + +#### over + +This is the end of the practice of custom monitoring of the HTTP protocol. The HTTP protocol also has other parameters such as headers and params. We can define it like postman, and the playability is also very high! + +If you think hertzbeat is a good open source project, please star us on GitHub Gitee, thank you very much. Thanks for the old iron support. Refill! + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/versioned_docs/version-1.9.0/community/become_committer.md b/home/versioned_docs/version-1.9.0/community/become_committer.md new file mode 100644 index 0000000000..939edc29f1 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/become_committer.md @@ -0,0 +1,83 @@ +--- +id: 'become_committer' +title: 'Become A Committer' +sidebar_position: 2 +--- + + + +## Become A Committer of Apache HertzBeat + +Anyone being supportive of the community and working in any of the +CoPDoC areas can become an Apache HertzBeat™ committer. The CoPDoC is an +acronym from ASF to describe how we recognize your contributions not +only by code. + +- **Community** - You can join us via our mailing list, issue + trackers, discussions page to interact with community members, and + share vision and knowledge +- **Project** - a clear vision and consensus are needed +- **Documentation** - without it, the stuff remains only in the minds + of the authors +- **Code** - discussion goes nowhere without code + +Apache HertzBeat™ community strives to be meritocratic. Thus, once someone +has contributed sufficiently to any area of CoPDoC they can be a +candidate for committer-ship and at last voted in as a HertzBeat +committer. Being an Apache HertzBeat™ committer does not necessarily mean +you must commit code with your commit privilege to the codebase; it +means you are committed to the HertzBeat project and are productively +contributing to our community's success. + +## Committer requirements + +There are no strict rules for becoming a committer or new PMC member. +Candidates for new committers are typically people that are active +contributors and community members. Anyway, if the rules can be +clarified a little bit, it can somehow clear the doubts in the minds +of contributors and make the community more transparent, reasonable, +and fair. + +### Continuous contributions + +Committer candidates should have a decent amount of continuous +engagements and contributions (fixing bugs, adding new features, +writing documentation, maintaining issues boards, code review, or answering +community questions) to HertzBeat. + +- 3+ months with activity and engagement. +- 20+ pr coding, document, test or other contributions. + +### Quality of contributions + +- A solid general understanding of the project +- Well tested, well-designed, following Apache HertzBeat™ coding + standards, and simple patches. +- Well-organized and detailed user-oriented documentation. + +### Community involvement + +- Be active, courteous, and respectful on the dev mailing list and + help mentor newer contributors + and users. +- Be active, courteous, and respectful on the issue tracker for + project maintenance +- Be active, courteous, and respectful for pull requests reviewing +- Be involved in the design road map discussions with a professional + and diplomatic approach even if there is a disagreement +- Promoting the project by writing articles or holding events diff --git a/home/versioned_docs/version-1.9.0/community/become_pmc_member.md b/home/versioned_docs/version-1.9.0/community/become_pmc_member.md new file mode 100644 index 0000000000..660d189cd4 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/become_pmc_member.md @@ -0,0 +1,82 @@ +--- +id: 'become_pmc_member' +title: 'Become A new PMC member' +sidebar_position: 3 +--- + + + +## Become A new PMC member of Apache HertzBeat + +Anyone being supportive of the community and working in any of the +CoPDoC areas can become an Apache HertzBeat™ new PMC member. The CoPDoC is an +acronym from ASF to describe how we recognize your contributions not +only by code. + +- **Community** - You can join us via our mailing list, issue + trackers, discussions page to interact with community members, and + share vision and knowledge +- **Project** - a clear vision and consensus are needed +- **Documentation** - without it, the stuff remains only in the minds + of the authors +- **Code** - discussion goes nowhere without code + +Apache HertzBeat™ community strives to be meritocratic. Thus, once someone +has contributed sufficiently to any area of CoPDoC they can be a +candidate for new PMC membership and at last voted in as a HertzBeat +PMC member. Being an Apache HertzBeat™ new PMC member does not necessarily mean +you must commit code with your commit privilege to the codebase; it +means you are committed to the HertzBeat project and are productively +contributing to our community's success. + +## new PMC member requirements + +There are no strict rules for becoming a committer or new PMC member. +Candidates for new PMC member are typically people that are active +contributors and community members. Anyway, if the rules can be +clarified a little bit, it can somehow clear the doubts in the minds +of contributors and make the community more transparent, reasonable, +and fair. + +### Continuous contributions + +PMC member candidates should have a decent amount of continuous +engagements and contributions (fixing bugs, adding new features, +writing documentation, maintaining issues boards, code review, or answering +community questions) to HertzBeat. + +- 12+ months with activity and engagement. + +### Quality of contributions + +- A solid general understanding of the project +- Well tested, well-designed, following Apache HertzBeat™ coding + standards, and simple patches. +- Well-organized and detailed user-oriented documentation. + +### Community involvement + +- Be active, courteous, and respectful on the dev mailing list and + help mentor newer contributors + and users. +- Be active, courteous, and respectful on the issue tracker for + project maintenance +- Be active, courteous, and respectful for pull requests reviewing +- Be involved in the design road map discussions with a professional + and diplomatic approach even if there is a disagreement +- Promoting the project by writing articles or holding events diff --git a/home/versioned_docs/version-1.9.0/community/code-style-and-quality-guide.md b/home/versioned_docs/version-1.9.0/community/code-style-and-quality-guide.md new file mode 100644 index 0000000000..56ea62bb85 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/code-style-and-quality-guide.md @@ -0,0 +1,648 @@ +--- +id: 'code_style_and_quality_guide' +title: 'Code style and quality guide' +sidebar_position: 3 +--- + + + +## 1 Pull Requests & Changes Rule + +1. `ISSUE`/`PR`(pull request) driving and naming + + - After creating a new `PR`, you need to associate the existing corresponding `ISSUE` at the Github Development button on the `PR` page (if there is no corresponding ISSUE, it is recommended to create a new corresponding ISSUE). + + - Title naming format + `[feature/bugfix/doc/improve/refactor/bug/cleanup] title` + +2. Description + + - Please fill in the `PR` template to describe the contribution. So that the reviewer can understand the problem and solution from the description, rather than just from the code. + - Check the CheckList +3. It's recommended that `PR` should be arranged changes such as `cleanup`, `Refactor`, `improve`, and `feature` into separated `PRs`/`Commits`. +4. Commit message(English, lowercase, no special characters) + The commit of messages should follow a pattern similar to the `[feature/bugfix/doc/improve/refactor/bug/cleanup] title` + +## 2 Code Checkstyle + +### 2.1 Configure Checkstyle + +1. Install the Checkstyle-IDEA plugin. +2. Open Checkstyle Settings. Click **Settings** → **Tools** → **Checkstyle**. +3. Set **Checkstyle version** to **10.14.2**. +4. Set **Scan scope** to **Only Java sources (including tests)**. +5. Click **+** button in the **Configuration** section to open a dialog to choose the checkstyle config file. + 1. Enter a **Description**. For example, hertzbeat. + 2. Select **Use a local checkstyle file**. + 3. Set **File** to **script/checkstyle/checkstyle.xml**. + 4. Select **Store relative to project location**. + 5. Click **Next** → **Next** → **Finish**. +6. Activate the configuration you just added by toggling the corresponding box. +7. Click **OK**. + +- Backend code specification Maven plugin: `checkstyle` + Just run `mvn checkstyle:checkstyle`. + +- Frontend code formatting plugin `eslint` + Just run `pnpm run lint:fix` in web-app + +### 2.2 Document style check + +1. Install `markdownlint-cli2` and run `npm install markdownlint-cli2 --global` +2. Run `markdownlint-cli2 "home/**/*.md"` in the project to automatically detect the Markdown file format. +3. Run `markdownlint-cli2 --fix "home/**/*.md"` in the project to automatically format the Markdown file format to ensure that all documents meet the specifications. + +Error code description: + +| **Error code** | **description** | +|--------------------------------------------| ------------------------------------------------------------ | +| **MD001 heading-increment** | Heading levels should only increment by one level at a time | +| **MD003 heading-style** | Heading style | +| **MD004 ul-style** | Unordered list style | +| **MD005 list-indent** | Inconsistent indentation for list items at the same level | +| **MD007 ul-indent** | Unordered list indentation | +| **MD009 no-trailing-spaces** | Trailing spaces | +| **MD010 no-hard-tabs** | Hard tabs | +| **MD011 no-reversed-links** | Reversed link syntax | +| **MD012 no-multiple-blanks** | Multiple consecutive blank lines | +| **MD013 line-length** | Line length | +| **MD014 commands-show-output** | Dollar signs used before commands without showing output | +| **MD018 no-missing-space-atx** | No space after hash on atx style heading | +| **MD019 no-multiple-space-atx** | Multiple spaces after hash on atx style heading | +| **MD020 no-missing-space-closed-atx** | No space inside hashes on closed atx style heading | +| **MD021 no-multiple-space-closed-atx** | Multiple spaces inside hashes on closed atx style heading | +| **MD022 blanks-around-headings** | Headings should be surrounded by blank lines | +| **MD023 heading-start-left** | Headings must start at the beginning of the line | +| **MD024 no-duplicate-heading** | Multiple headings with the same content | +| **MD025 single-title/single-h1** | Multiple top-level headings in the same document | +| **MD026 no-trailing-punctuation** | Trailing punctuation in heading | +| **MD027 no-multiple-space-blockquote** | Multiple spaces after blockquote symbol | +| **MD028 no-blanks-blockquote** | Blank line inside blockquote | +| **MD029 ol-prefix** | Ordered list item prefix | +| **MD030 list-marker-space** | Spaces after list markers | +| **MD031 blanks-around-fences** | Fenced code blocks should be surrounded by blank lines | +| **MD032 blanks-around-lists** | Lists should be surrounded by blank lines | +| **MD033 no-inline-html** | Inline HTML | +| **MD034 no-bare-urls** | Bare URL used | +| **MD035 hr-style** | Horizontal rule style | +| **MD036 no-emphasis-as-heading** | Emphasis used instead of a heading | +| **MD037 no-space-in-emphasis** | Spaces inside emphasis markers | +| **MD038 no-space-in-code** | Spaces inside code span elements | +| **MD039 no-space-in-links** | Spaces inside link text | +| **MD040 fenced-code-language** | Fenced code blocks should have a language specified | +| **MD041 first-line-heading/first-line-h1** | First line in a file should be a top-level heading | +| **MD042 no-empty-links** | No empty links | +| **MD043 required-headings** | Required heading structure | +| **MD044 proper-names** | Proper names should have the correct capitalization | +| **MD045 no-alt-text** | Images should have alternate text (alt text) | +| **MD046 code-block-style** | Code block style | +| **MD047 single-trailing-newline** | Files should end with a single newline character | +| **MD048 code-fence-style** | Code fence style | +| **MD049 emphasis-style** | Emphasis style | +| **MD050 strong-style** | Strong style | +| **MD051 link-fragments** | Link fragments should be valid | +| **MD052 reference-links-images** | Reference links and images should use a label that is defined | +| **MD053 link-image-reference-definitions** | Link and image reference definitions should be needed | +| **MD054 link-image-style** | Link and image style | +| **MD055 table-pipe-style** | Table pipe style | +| **MD056 table-column-count** | Table column count | + +## 3 Programming Specification + +### 3.1 Naming Style + +1. Prioritize selecting nouns for variable naming, it's easier to distinguish between `variables` or `methods`. + + ```java + Cache`` publicKeyCache; + ``` + +2. Pinyin abbreviations are prohibited for variables (excluding nouns such as place names), such as chengdu. +3. It is recommended to end variable names with a `type`. + For variables of type `Collection/List`, take `xxxx` (plural representing multiple elements) or end with `xxxList` (specific type). + For variables of type `map`, describe the `key` and `value` clearly: + + ```java + Map idUserMap; + Map userIdNameMap; + ``` + +4. That can intuitively know the type and meaning of the variable through its name. + Method names should start with a verb first as follows: + + ```java + void computeVcores(Object parameter1); + ``` + + > Note: It is not necessary to strictly follow this rule in the `Builder` tool class. + +### 3.2 Constant Variables Definition + +1. Redundant strings should be extracted as constants + + > If a constant has been hardcoded twice or more times, please directly extract it as a constant and change the corresponding reference. + > In generally, constants in `log` can be ignored to extract. + + - Negative demo: + + ```java + public static RestResponse success(Object data) { + RestResponse resp = new RestResponse(); + resp.put("status", "success"); + resp.put("code", ResponseCode.CODE_SUCCESS); + resp.put("data", data); + return resp; + } + + public static RestResponse error() { + RestResponse resp = new RestResponse(); + resp.put("status", "error"); + resp.put("code", ResponseCode.CODE_FAIL); + resp.put("data", null); + return resp; + } + ``` + + - Positive demo: + + > Strings are extracted as constant references. + + ```java + public static final String STATUS = "status"; + public static final String CODE = "code"; + public static final String DATA = "data"; + + public static RestResponse success(Object data) { + RestResponse resp = new RestResponse(); + resp.put(STATUS, "success"); + resp.put(CODE, ResponseCode.CODE_SUCCESS); + resp.put(DATA, data); + return resp; + } + + public static RestResponse error() { + RestResponse resp = new RestResponse(); + resp.put(STATUS, "error"); + resp.put(CODE, ResponseCode.CODE_FAIL); + resp.put(DATA, null); + return resp; + } + ``` + +2. Ensure code readability and intuitiveness + + - The string in the `annotation` symbol doesn't need to be extracted as constant. + + - The referenced `package` or `resource` name doesn't need to be extracted as constant. + +3. Variables that have not been reassigned must also be declared as `` final `` types. + +4. About the arrangement order of `constant/variable` lines + + Sort the variable lines in the class in the order of + 1. `public static final V`, `static final V`,`protected static final V`, `private static final V` + 2. `public static v`, `static v`,`protected static v`, `private static v` + 3. `public v`, `v`, `protected v`, `private v` + +### 3.3 Methods Rule + +1. Sort the methods in the class in the order of `public`, `protected`, `private` + + Static methods of a class can be placed after non-static methods and sorted according to consistent method visibility. + +2. When there are restrictions on the method, the parameters and returned values of the method need to be annotated with `@Nonnull` or `@Nullable` annotations and constraints. + + For example, if the parameter cannot be null, it is best to add a `@Nonnull` annotation. If the returned value can be null, the `@Nullable` annotation should be added first. + + `` Note: that the package name is ``javax.validation.requirements`` `` + +3. If there are too many lines of code in the method, please have a try on using multiple sub methods at appropriate points to segment the method body. + + Generally speaking, it needs to adhere to the following principles: + - Convenient testing + - Good semantics + - Easy to read + + In addition, it is also necessary to consider whether the splitting is reasonable in terms of components, logic, abstraction, and other aspects in the scenario. + + > However, there is currently no clear definition of demo. During the evolution process, we will provide additional examples for developers to have a clearer reference and understanding. + +### 3.4 Collection Rule + +1. For `collection` returned values, unless there are special `concurrent` (such as thread safety), always return the `interface`, such as: + - returns `` List `` if use `ArrayList` + - returns `` Map `` if use `HashMap` + - returns `` Set `` if use `HashSet` +2. If there are multiple threads, the following declaration or returned types can be used: + + ```java + private CurrentHashMap map; + public CurrentHashMap funName(); + ``` + +3. Use `isEmpty()` instead of `length() == 0` or `size() == 0` + - Negative demo: + + ```java + if (pathPart.length() == 0) { + return; + } + ``` + + - Positive demo: + + ```java + if (pathPart.isEmpty()) { + return; + } + ``` + +### 3.5 Concurrent Processing + +1. The `thread pool` needs to be managed, using a unified entry point to obtain the `thread pool`. + + `` Note: During the evolution process, we will provide additional examples for developers to have a clearer reference and understanding. `` + +2. `Thread pool` needs to be resource constrained to prevent resource leakage caused by improper handling + +### 3.6 Control/Condition Statements + +1. Avoid unreasonable `condition/control` branches order leads to: + - Multiple code line `depths` of `n+1` + - Redundant lines + +Generally speaking, if a method's code line depth exceeds `2+ Tabs` due to continuous nested `if... else..`, it should be considered to try + +- `merging branches`, +- `inverting branch conditions` +- `extracting private methods` + +to reduce code line depth and improve readability like follows: + +- Union or merge the logic into the next level calling + - Negative demo: + + ```java + if (isInsert) { + save(platform); + } else { + updateById(platform); + } + ``` + + - Positive demo: + + ```java + saveOrUpdate(platform); + ``` + +- Merge the conditions + - Negative demo: + + ```java + if (expression1) { + if (expression2) { + ...... + } + } + + ``` + + - Positive demo: + + ```java + if (expression1 && expression2) { + ...... + } + ``` + +- Reverse the condition + - Negative demo: + + ```java + public void doSomething() { + // Ignored more deeper block lines + // ..... + if (condition1) { + // ... + } else { + // ... + } + } + ``` + + - Positive demo: + + ```java + public void doSomething() { + // Ignored more deeper block lines + // ..... + if (!condition1) { + // ... + return; + } + // ... + } + ``` + +- Using a single variable or method to reduce the complex conditional expression + - Negative demo: + + ```java + if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { + // ... + } + ``` + + - Positive demo: + + ```java + if (containsSqlServer(dbType)) { + // .... + } + //..... + // definition of the containsSqlServer + ``` + +> Using `sonarlint` and `better highlights` to check code depth looks like good in the future. + +### 3.7 Code Comments Rule + +1. Method lacks comments: + + - `When`: When can the method be called + - `How`: How to use this method and how to pass parameters, etc. + - `What`: What functions does this method achieve + - `Note`: What should developers pay attention to when calling this method + +2. Missing necessary class header description comments. + + Add `What`, `Note`, etc. like mentioned in the `1`. + +3. The method declaration in the interface must be annotated. + + - If the semantics of the implementation and the annotation content at the interface declaration are inconsistent, the specific implementation method also needs to be rewritten with annotations. + + - If the semantics of the method implementation are consistent with the annotation content at the interface declaration, it is not recommended to write annotations to avoid duplicate annotations. + +4. The first word in the comment lines need to be capitalized, like `param` lines, `return` lines. + If a special reference as a subject does not need to be capitalized, special symbols such as quotation marks need to be noted. + +### 3.8 Java Lambdas + +1. Prefer `non-capturing` lambdas (lambdas that do not contain references to the outer scope). + Capturing lambdas need to create a new object instance for every call. `Non-capturing` lambdas can use the same instance for each invocation. + + - Negative demo: + + ```java + map.computeIfAbsent(key, x -> key.toLowerCase()) + ``` + + - Positive demo: + + ```java + map.computeIfAbsent(key, k -> k.toLowerCase()); + ``` + +2. Consider method references instead of inline lambdas + + - Negative demo: + + ```java + map.computeIfAbsent(key, k-> Loader.load(k)); + ``` + + - Positive demo: + + ```java + map.computeIfAbsent(key, Loader::load); + ``` + +### 3.9 Java Streams + +- Avoid Java Streams in any performance critical code. + +- The main motivation to use Java Streams would be to improve code readability. As such, they can be a good match in parts of the code that are not data-intensive, but deal with coordination. + +- Even in the latter case, try to limit the scope to a method, or a few private methods within an internal class. + +### 3.10 Pre-Conditions Checking + +1. Use a unified `Utils.requireXXX` to complete the validation of the prerequisite, and if possible, replace the `AlertXXException.throwIfXXX` by new pre-conditions checking. + +### 3.11 StringUtils + +1. Use `StringUtils.isBlank` instead of `StringUtils.isEmpty` + + - Negative demo: + + ```java + if (StringUtils.isEmpty(name)) { + return; + } + ``` + + - Positive demo: + + ```java + if (StringUtils.isBlank(name)) { + return; + } + ``` + +2. Use `StringUtils.isNotBlank` instead of `StringUtils.isNotEmpty` + + - Negative demo: + + ```java + if (StringUtils.isNotEmpty(name)) { + return; + } + ``` + + - Positive demo: + + ```java + if (StringUtils.isNotBlank(name)) { + return; + } + ``` + +3. Use `StringUtils.isAllBlank` instead of `StringUtils.isAllEmpty` + + - Negative demo: + + ```java + if (StringUtils.isAllEmpty(name, age)) { + return; + } + ``` + + - Positive demo: + + ```java + if (StringUtils.isAllBlank(name, age)) { + return; + } + ``` + +### 3.12 `Enum` Class + +1. Enumeration value comparison + + - Negative demo: + + ```java + if (status.equals(JobStatus.RUNNING)) { + return; + } + ``` + + - Positive demo: + + ```java + if (status == JobStatus.RUNNING) { + return; + } + ``` + +2. Enumeration classes do not need to implement Serializable + + - Negative demo: + + ```java + public enum JobStatus implements Serializable { + // ... + } + ``` + + - Positive demo: + + ```java + public enum JobStatus { + // ... + } + ``` + +3. Use `Enum.name()` instead of `Enum.toString()` + + - Negative demo: + + ```java + System.out.println(JobStatus.RUNNING.toString()); + ``` + + - Positive demo: + + ```java + System.out.println(JobStatus.RUNNING.name()); + ``` + +4. Enumeration class names uniformly use the Enum suffix + + - Negative demo: + + ```java + public enum JobStatus { + // ... + } + ``` + + - Positive demo: + + ```java + public enum JobStatusEnum { + // ... + } + ``` + +### 3.13 `Deprecated` Annotation + +- Negative demo: + +```java +@deprecated +public void process(String input) { + // ... +} +``` + +- Positive demo: + +```java +@Deprecated +public void process(String input) { + // ... +} +``` + +## 4 Log + +1. Use `placeholders` for log output: + + - Negative demo + + ```java + log.info("Deploy cluster request " + deployRequest); + ``` + + - Positive demo + + ```java + log.info("load plugin:{} to {}", file.getName(), appPlugins); + ``` + +2. Pay attention to the selection of `log level` when printing logs + + When printing the log content, if the actual parameters of the log placeholder are passed, it is necessary to avoid premature evaluation to avoid unnecessary evaluation caused by the log level. + + - Negative demo: + + Assuming the current log level is `INFO`: + + ```java + // ignored declaration lines. + List`` userList = getUsersByBatch(1000); + LOG.debug("All users: {}", getAllUserIds(userList)); + ``` + + - Positive demo: + + In this case, we should determine the log level in advance before making actual log calls as follows: + + ```java + // ignored declaration lines. + List`` userList = getUsersByBatch(1000); + if (LOG.isDebugEnabled()) { + LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); + } + ``` + +## 5 Testing + +1. It's recommended to use `JUnit5` to develop test case preparation + +2. The implemented interface needs to write the `e2e` test case script under the `e2e` module. + +## References + +- [https://site.mockito.org/](https://site.mockito.org/) +- [https://alibaba.github.io/p3c/](https://alibaba.github.io/p3c/) +- [https://junit.org/junit5/](https://junit.org/junit5/) +- [https://streampark.apache.org/](https://streampark.apache.org/) diff --git a/home/versioned_docs/version-1.9.0/community/contact.md b/home/versioned_docs/version-1.9.0/community/contact.md new file mode 100644 index 0000000000..3132912bed --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/contact.md @@ -0,0 +1,21 @@ +--- +id: contact +title: Join discussion +sidebar_label: Discussion +--- + +> If you need any help or want to exchange suggestions during the use process, you can discuss and exchange through ISSUE or Github Discussion. + +[Join the Mailing Lists](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) : Mail to `dev-subscribe@hertzbeat.apache.org` to subscribe mailing lists. + +[Chat On Discord](https://discord.gg/Fb6M73htGr) + +WeChat Group : Add friend `ahertzbeat` and invite to the group. + +WeChat Official Account : Search ID `usthecom`. + +[Github Discussion](https://github.com/apache/hertzbeat/discussions) + +[Follow Us Twitter](https://x.com/hertzbeat1024) + +[Subscribe YouTube](https://www.youtube.com/channel/UCri75zfWX0GHqJFPENEbLow) diff --git a/home/versioned_docs/version-1.9.0/community/contribution.md b/home/versioned_docs/version-1.9.0/community/contribution.md new file mode 100644 index 0000000000..281d088d8b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/contribution.md @@ -0,0 +1,178 @@ +--- +id: 'contribution' +title: 'Contributor Guide' +sidebar_position: 0 +--- + + + +> We are committed to maintaining a happy community that helps each other, welcome every contributor to join us! + +## Kinds of Contributions +> +> In the HertzBeat community, there are many ways to contribute: + +- 💻**Code**: Can help the community complete some tasks, write new features or fix some bugs; + +- ⚠️**Test**: Can come to participate in the writing of test code, including unit testing, integration testing, e2e testing; + +- 📖**Docs**: Can write or Documentation improved to help users better understand and use HertzBeat; + +- 📝**Blog**: You can write articles about HertzBeat to help the community better promote; + +- 🤔**Discussion**: You can participate in the discussion of new features of HertzBeat and integrate your ideas with HertzBeat; + +- 💡**Preach**: Can help publicize or promote the HertzBeat community, speak in meetup or summit; + +- 💬**Suggestion**: You can also make some suggestions to the project or community to promote the healthy development of the community; + +More see [Contribution Types](https://allcontributors.org/en/reference/emoji-key/) + +Even small corrections to typos are very welcome :) + +### Getting HertzBeat up and running + +> To get HertzBeat code running on your development tools, and able to debug with breakpoints. +> This is a front-end and back-end separation project. To start the local code, the back-end manager and the front-end web-app must be started separately. + +#### Backend start + +1. Requires `maven3+`, `java25` and `lombok` environments +2. (Optional) Modify the configuration file: `hertzbeat-startup/src/main/resources/application.yml` +3. Execute under the project root directory: `mvn clean install -DskipTests` +4. Add VM Options: `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED` +5. Start `springboot startup` service: `hertzbeat-startup/src/main/java/org/apache/hertzbeat/startup/HertzBeatApplication.java` + +#### Frontend start + +1. Need `Node pnpm` Environment, Make sure `Node.js >= 18` + +2. Cd to the `web-app` directory: `cd web-app` + +3. Install pnpm if not existed `npm install -g pnpm` + +4. Install Dependencies: `pnpm install` or `pnpm install --registry=https://registry.npmmirror.com` in `web-app` + +5. After the local backend is started, start the local frontend in the web-app directory: `pnpm start` + +6. Browser access to localhost:4200 to start, default account/password is *admin/hertzbeat* + +### Find tasks + +Find the issue you are interested in! On our GitHub repo issue list, we often publish some issues with the label good first issue or status: volunteer wanted. +These issues welcome the help of contributors. Among them, good first issues tend to have low thresholds and are suitable for novices. + +Of course, if you have a good idea, you can also propose it directly on GitHub Discussion or contact with community. + +### Submit Pull Request + +1. First you need to fork your target [hertzbeat repository](https://github.com/apache/hertzbeat). +2. Then download the code locally with git command: + + ```shell + git clone git@github.com:`YOUR_USERNAME`/hertzbeat.git #Recommended + ``` + +3. After the download is complete, please refer to the getting started guide or README file of the target repository to initialize the project. +4. Then, you can refer to the following command to submit the code: + + ```shell + git checkout -b a-feature-branch #Recommended + ``` + +5. Submit the code as a commit, the commit message format specification required: [module name or type name]feature or bugfix or doc: custom message. + + ```shell + git add + git commit -m '[docs]feature: necessary instructions' #Recommended + ``` + +6. Push to the remote repository + + ```shell + git push origin a-feature-branch + ``` + +7. Then you can initiate a new PR (Pull Request) on GitHub. + + Please note that the title of the PR needs to conform to our spec, and write the necessary description in the PR to facilitate code review by Committers and other contributors. + +### Wait for the code to be merged + +After submitting the PR, the Committee or the community's friends will review the code you submitted (Code Review), and will propose some modification suggestions or conduct some discussions. Please pay attention to your PR in time. + +If subsequent changes are required, there is no need to initiate a new PR. After submitting a commit on the original branch and pushing it to the remote repository, the PR will be automatically updated. + +In addition, our project has a relatively standardized and strict CI inspection process. After submitting PR, CI will be triggered. Please pay attention to whether it passes the CI inspection. + +Finally, the Committers can merge the PR into the master branch. + +### After the code is merged + +After the code has been merged, you can delete the development branch on both the local and remote repositories: + +```shell +git branch -d a-dev-branch +git push origin --delete a-dev-branch +``` + +On the master/main branch, you can do the following to sync the upstream repository: + +```shell +git remote add upstream https://github.com/apache/hertzbeat.git #Bind the remote warehouse, if it has been executed, it does not need to be executed again +git checkout master +git pull upstream master +``` + +### Get Contributor Certificate + +After your pr is merged, you can send an email `dev@hertzbeat.apache.org` to request your Apache HertzBeat™ contributor electronic certificate. + +```text +Title: [Contributor] Request for a Contributor Certificate: +Body: +Hello, +I would like to request a Contributor Certificate for my contributions to the Apache HertzBeat™ project. + +- Full Name: # The Full Name will be printed on the certificate, any name you want. +- GitHub Username: +- Pull Request Links: +- Email Address: + +Best regards, + +``` + +You will receive a reply with an electronic certificate within a few working days, and your name will also appear in the list of contributors. +Attention contributor certificates are electronic, and certificates for you to become a `Committer` or `PMC` are physical. + +Certificate Sample: + +![cert](/img/docs/hertzbeat-cert.png) + +### HertzBeat Improvement Proposal (HIP) + +If you have major new features(e.g., support metrics push gateway, support logs monitoring), you need to write a design document known as a HertzBeat Improvement Proposal (HIP). Before starting to write a HIP, make sure you follow the process [guide](https://github.com/apache/hertzbeat/tree/master/hip). + +### How to become a Committer? + +With the above steps, you are a contributor to HertzBeat. Repeat the previous steps to stay active in the community, keep at, you can become a Committer! + +### Join Discussion + +[Discussion](contact) diff --git a/home/versioned_docs/version-1.9.0/community/development.md b/home/versioned_docs/version-1.9.0/community/development.md new file mode 100644 index 0000000000..c52e5c075e --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/development.md @@ -0,0 +1,72 @@ +--- +id: development +title: How to Run or Build HertzBeat? +sidebar_label: Development +--- + +## Getting HertzBeat code up and running + +> To get HertzBeat code running on your development tools, and able to debug with breakpoints. +> This is a front-end and back-end separation project. +> To start the local code, the back-end [manager](https://github.com/apache/hertzbeat/tree/master/hertzbeat-manager) and the front-end [web-app](https://github.com/apache/hertzbeat/tree/master/web-app) must be started separately. + +### Backend start + +1. Requires `maven3+`, `java25` and `lombok` environments +2. (Optional) Modify the configuration file: `hertzbeat-startup/src/main/resources/application.yml` +3. Execute under the project root directory: `mvn clean install -DskipTests` +4. Add VM Options: `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED` +5. Start `springboot startup` service: `hertzbeat-startup/src/main/java/org/apache/hertzbeat/startup/HertzBeatApplication.java` + +### Frontend start + +1. Need `Node pnpm` Environment, Make sure `Node.js >= 18` + +2. Cd to the `web-app` directory: `cd web-app` + +3. Install pnpm if not existed `npm install -g pnpm` + +4. Install Dependencies: `pnpm install` or `pnpm install --registry=https://registry.npmmirror.com` in `web-app` + +5. After the local backend is started, start the local frontend in the web-app directory: `pnpm start` + +6. Browser access to localhost:4200 to start, default account/password is *admin/hertzbeat* + +## Build HertzBeat binary package + +> Requires `maven3+`, `java25`, `node` and `pnpm` environments. + +### Frontend build + +1. Need `Node pnpm` Environment, Make sure `Node.js >= 18` + +2. Cd to the `web-app` directory: `cd web-app` + +3. Install pnpm if not existed `npm install -g pnpm` + +4. Install Dependencies: `pnpm install` or `pnpm install --registry=https://registry.npmmirror.com` in `web-app` + +5. Build web-app: `pnpm package` + +### Backend build + +1. Requires `maven3+`, `java25` environments + +2. Execute under the project root directory: `mvn clean package -Prelease` + +The HertzBeat install package will be generated at `dist/apache-hertzbeat-{version}-bin.tar.gz` + +### Collector build + +1. Requires `maven3+`, `java25` environments + +2. Execute under the project root directory: `mvn clean install` + +3. Cd to the `hertzbeat-collector` directory: `cd hertzbeat-collector` + +4. Build the JVM collector package under `hertzbeat-collector` directory: `mvn clean package -Pcluster` +5. Build the native collector package under `hertzbeat-collector` directory: `mvn clean package -pl hertzbeat-collector-collector -am -Pnative` + +> Native collector packaging requires GraalVM for JDK 25 with the `native-image` tool available in `PATH`. + +The HertzBeat collector packages will be generated at `dist/apache-hertzbeat-collector-{version}-bin.tar.gz` and a platform-specific native package such as `dist/apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz` diff --git a/home/versioned_docs/version-1.9.0/community/document.md b/home/versioned_docs/version-1.9.0/community/document.md new file mode 100644 index 0000000000..df22db1830 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/document.md @@ -0,0 +1,145 @@ +--- +id: 'document' +title: 'Documentation Notice' +sidebar_position: 1 +--- + + + +Good documentation is critical for any type of software. Any contribution that can improve the HertzBeat documentation is welcome. + +## Get the document project + +Documentation for the HertzBeat project is maintained in [git repository home directory](https://github.com/apache/hertzbeat/tree/master/home). + +First you need to fork the document project into your own github repository, and then clone the document to your local computer. + +```shell +git clone git@github.com:/hertzbeat.git +``` + +## Preview and generate static files + +This website is compiled using node, using Docusaurus framework components + +1. Download and install nodejs (version 18.8.0) +2. Clone the code to the local `git clone git@github.com:apache/hertzbeat.git` +3. In `home` directory run `pnpm install` to install the required dependent libraries. +4. In `home` directory run `pnpm start`, you can visit [http://localhost:3000](http://localhost:3000) to view the English mode preview of the site +5. In `home` directory run `pnpm start-zh-cn`, you can visit [http://localhost:3000](http://localhost:3000) to view the Chinese mode preview of the site +6. To generate static website resource files, run `pnpm build`. The static resources of the build are in the build directory. + +## Document Format Inspection + +In Apache HertzBeat, all MD articles have to pass MD's [CI](https://github.com/apache/hertzbeat/blob/master/.github/workflows/doc-build-test.yml) inspection before they can be merged. The purpose is to keep the website looking nice and the formatting of the articles consistent. + +After you have written an MD article, you can execute the following command locally to check whether the content of the MD article meets the requirements, so as to reduce the workload of review and save your time: + +```shell +cd home && pnpm install + +pnpm md-lint + +# If the documentation is wrong, you can use pnpm md-lint-fix to fix it. +pnpm md-lint-fix +``` + +For formatting rules for MD articles you can refer to: [Markdown-lint-rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md) +MD format configuration file in the project: [.markdownlint-cli2.jsonc](https://github.com/apache/hertzbeat/blob/master/.markdownlint-cli2.jsonc) + +## Directory structure + +```html +|-- docs +|-- blog +|-- i18n +| `-- zh-CN // internationalized chinese +| |-- code.json +| |-- docusaurus-plugin-content-blog +| |-- docusaurus-plugin-content-docs +| `-- docusaurus-theme-classic +|-- resource // static resource file +|-- src +| |-- theme +| |-- css +| |-- js +| |-- pages +| | |-- components +| | |-- index.js +| |-- constants.js +|-- static // picture static resource +| |-- img // +| | |-- blog // blog picture +| | |-- docs // document picture +| | |-- home // product picture +| | |-- icons // icon +|-- docusaurus.config.js +|-- sidebars.js // document sidebar menu configuration +``` + +## Writing a blog post + +A post lives in `blog/` and, when translated, in +`i18n//docusaurus-plugin-content-blog/` under the same file name. + +```yaml +--- +title: Announcement of Apache HertzBeat™ 1.8.0 Release +author: Apache HertzBeat Community +author_url: https://github.com/apache/hertzbeat +tags: [releases] +description: Apache HertzBeat 1.8.0 introduces AI chat and MCP tooling, log monitoring, and major performance improvements. +cover_headline: Apache HertzBeat 1.8.0 +--- +``` + +- **`tags`** — start with exactly one category from `blog/tags.yml` + (`releases`, `engineering`, `tutorials`, `community`). It drives the category + filter on the blog list page. Add free-form topic tags after it if useful. +- **`description`** — one or two sentences. It becomes the card summary *and* the + search-engine snippet. Without it Docusaurus falls back to the first block of + the post, which is usually a greeting or a heading. +- **`cover_headline`** — optional. The blog list renders a cover for every post + in the site's visual style; this sets the big line of text on it (e.g. + `Welcome Bob`). Without it the text is derived from the version or monitored + product found in the title. +- **`cover_kicker`** — optional. The small pill badge on the generated cover + (e.g. `New Committer`). Defaults to the category name. Cover text is English + on every locale, matching the shared visual style. +- **`image`** — optional. A real cover image; when set it replaces the generated + cover entirely. + +## Specification + +### Naming convention of files + +Consist entirely of lowercase letters, numbers, underscores, and dashes. + +Positive example: `render-dom.js / signup.css / index.html / company-logo.png / hertz_beat.md` + +Counter example: `renderDom.js / UserManagement.html` + +### Resource Path + +Image resources are unified under `static/img/{module name}` + +css and other style files are placed in the `src/css` directory + +### Page content modification + +> All pages doc can be directly jumped to the corresponding github resource modification page through the 'Edit this page' button at the bottom diff --git a/home/versioned_docs/version-1.9.0/community/how-to-release.md b/home/versioned_docs/version-1.9.0/community/how-to-release.md new file mode 100644 index 0000000000..ae654b384b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/how-to-release.md @@ -0,0 +1,586 @@ +--- +id: 'how_to_release' +title: How to Release +sidebar_position: 4 +--- + +This tutorial describes in detail how to release Apache HertzBeat™. + +:::caution Before you start: placeholders used in this document +The commands and mail templates below use placeholders. Replace every one of them with your own +values before running anything — **do not copy and paste as is**. + +| Placeholder | Meaning | Example | +| --- | --- | --- | +| `{version}` | Release version | `1.9.0` | +| `RC1` | Release candidate number, starts at 1 and goes up on every re-vote | `RC2` | +| `` | Your Apache LDAP user name | `duansg` | +| `@apache.org` | Your Apache mail address | `duansg@apache.org` | +| `` | Your short GPG key ID, from `gpg --keyid-format SHORT --list-keys` | `EF04C474` | +| `` | The name you sign mails with | `Duan SiGuo` | + +Command **output** samples in this document keep concrete values so you can compare the shape of +the output; what you see will contain your own key and address. +::: + +## 1. Environmental requirements + +This release process is operated in the UbuntuOS(Windows,Mac), and the following tools are required: + +- JDK 25 +- Node18 pnpm +- Apache Maven 3.x +- GnuPG 2.x +- Git +- SVN (apache uses svn to host project releases) + +> Pay attention to setting environment variables `export GPG_TTY=$(tty)` + +## 2. Preparing for release + +> First summarize the account information to better understand the operation process, will be used many times later. +> +> - apache id: `` (APACHE LDAP UserName) +> - apache passphrase: `APACHE LDAP Passphrase` +> - apache email: `@apache.org` +> - gpg real name: `` (Any name can be used, using the same name as the apache id is recommended) +> - gpg key passphrase: `The password set when creating the gpg key, you need to remember this password` + +### 2.1 Key generation + +```shell +$ gpg --full-gen-key +gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Please select what kind of key you want: +(1) RSA and RSA (default) +(2) DSA and Elgamal +(3) DSA (sign only) +(4) RSA (sign only) +(14) Existing key from card +Your selection? 1 # Please enter 1 +RSA keys may be between 1024 and 4096 bits long. +What keysize do you want? (3072) 4096 # Please enter 4096 here +Requested keysize is 4096 bits +Please specify how long the key should be valid. +0 = key does not expire +`` = key expires in n days +``w = key expires in n weeks +``m = key expires in n months +``y = key expires in n years +Key is valid for? (0) 0 # Please enter 0 +Key does not expire at all +Is this correct? (y/N) y # Please enter y here + +GnuPG needs to construct a user ID to identify your key. + +Real name: # Please enter 'gpg real name' +Email address: @apache.org # Please enter your apache email address here +Comment: apache key # Please enter some comments here +You selected this USER-ID: + "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" + +Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O # Please enter O here +We need to generate a lot of random bytes. It is a good idea to perform +some other action (type on the keyboard, move the mouse, utilize the +disks) during the prime generation; this gives the random number +generator a better chance to gain enough entropy. + +# At this time, a dialog box will pop up, asking you to enter the key for this gpg. +# you need to remember that it will be used in subsequent steps. +┌─────────────────────────────────────────────────────┐ +│ Please enter this passphrase to │ +│ protect your new key │ +│ │ +│ Passphrase: _______________________________________ │ +│ │ +│ `` `` │ +└─────────────────────────────────────────────────────┘ + +# Here you need to re-enter the password in the previous step. +┌─────────────────────────────────────────────────────┐ +│ Please re-enter this passphrase │ +│ │ +│ Passphrase: _______________________________________ │ +│ │ +│ `` `` │ +└─────────────────────────────────────────────────────┘ +gpg: key ACFB69E705016886 marked as ultimately trusted +gpg: revocation certificate stored as '/root/.gnupg/openpgp-revocs.d/DC12398CCC33A5349EB9663DF9D970AB18C9EDF6.rev' +public and secret key created and signed. + +pub rsa4096 2023-05-01 [SC] + 85778A4CE4DD04B7E07813ABACFB69E705016886 +uid muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org) +sub rsa4096 2023-05-01 [E] +``` + +Keys can be viewed through the `gpg --list-signatures` command + +### 2.2 Upload the generated key to the public server + +```shell +$ gpg --keyid-format SHORT --list-keys +/root/.gnupg/pubring.kbx +------------------------ +pub rsa4096/05016886 2023-05-01 [SC] + 85778A4CE4DD04B7E07813ABACFB69E705016886 +uid [ultimate] muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org) +sub rsa4096/0C5A4E1C 2023-05-01 [E] + +# Send public key to keyserver via key id +$ gpg --keyserver hkps://keyserver.ubuntu.com:443 --send-key +# Among them, keyserver.ubuntu.com is the selected keyserver, it is recommended to use this, because the Apache Nexus verification uses this keyserver +``` + +#### 2.3 Check if the key is created successfully + +Verify whether it is synchronized to the public network, it will take about a minute to find out the answer, if not successful, you can upload and retry multiple times. + +```shell +$ gpg --keyserver hkps://keyserver.ubuntu.com:443 --recv-key # If the following content appears, it means success +gpg: key ACFB69E705016886: "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" not changed +gpg: Total number processed: 1 +gpg: unchanged: 1 +``` + +Or enter [https://keyserver.ubuntu.com/](https://keyserver.ubuntu.com/) address in the browser, enter the name of the key and click 'Search key' to search if existed. + +#### 2.4 Add the gpg public key to the KEYS file of the Apache SVN project repo + +- Apache HertzBeat™ Branch Dev [https://dist.apache.org/repos/dist/dev/hertzbeat](https://dist.apache.org/repos/dist/dev/hertzbeat) +- Apache HertzBeat™ Branch Release [https://dist.apache.org/repos/dist/release/hertzbeat](https://dist.apache.org/repos/dist/release/hertzbeat) + +##### 2.4.1 Add public key to KEYS in dev branch + +```shell +$ mkdir -p svn/dev +$ cd svn/dev + +$ svn co https://dist.apache.org/repos/dist/dev/hertzbeat +$ cd svn/dev/hertzbeat + +# Append the KEY you generated to the file KEYS, and check if it is added correctly +$ (gpg --list-sigs @apache.org && gpg --export --armor @apache.org) >> KEYS + +$ svn ci -m "add gpg key for " +``` + +##### 2.4.2 Add public key to KEYS in release branch + +```shell +$ mkdir -p svn/release +$ cd svn/release + +$ svn co https://dist.apache.org/repos/dist/release/hertzbeat +$ cd svn/release/hertzbeat + +# Append the KEY you generated to the file KEYS, and check if it is added correctly +$ (gpg --list-sigs @apache.org && gpg --export --armor @apache.org) >> KEYS + +$ svn ci -m "add gpg key for " +``` + +## 3. Prepare material package & release + +### Build Package + +#### 3.1 Based on the master branch, create a release-`release_version`-rcx branch, such as release-1.7.3-rc1, And create a tag named v1.7.3-rc1 based on the release-1.7.3-rc1 branch, and set this tag as pre-release + +```shell +git checkout master +git checkout -b release-1.7.3-rc1 +``` + +#### 3.2 checkout release branch to local + +```shell +git checkout release-1.7.3-rc1 +``` + +#### 3.3 Compile the binary package + +> Build HertzBeat server binary, run script in `web-app` + +```shell +pnpm install + +pnpm package +``` + +> run script in root + +```shell +mvn clean package -Prelease +``` + +then + +```shell +mvn clean install +``` + +> Build HertzBeat collector binary, run script in the project root directory + +```shell +mvn clean package -pl hertzbeat-collector/hertzbeat-collector-collector -am -Pcluster +``` + +> Build the native collector binary for the current host with GraalVM JDK 25 and `native-image` + +```shell +mvn clean package -pl hertzbeat-collector/hertzbeat-collector-collector -am -Pnative -DskipTests +``` + +> The repository workflow `.github/workflows/collector-native-build.yml` is a release helper, not a regular PR or push CI workflow. +> +> It is intentionally manual-only because multi-platform native builds are relatively slow and consume scarce Linux ARM, macOS, and Windows runners. During release preparation, open the Actions page, select `Collector Native Release`, run it from the release branch or tag, and then download the uploaded artifacts for signing and publishing. + +The release package are here: + +- `dist/apache-hertzbeat-{version}-bin.tar.gz` +- `dist/apache-hertzbeat-collector-{version}-bin.tar.gz` +- `dist/apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz` +- `dist/apache-hertzbeat-collector-native-{version}-linux-arm64-bin.tar.gz` +- `dist/apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip` +- `dist/apache-hertzbeat-{version}-docker-compose.tar.gz` + +> **Start each native collector package once before signing it.** A native package has shipped +> green from the build while crashing immediately on startup, and neither signing nor uploading +> catches that. Unpack it, run `bin/startup.sh` (`bin\startup.bat` on Windows), and confirm the log +> shows `Started Collector` and `Registered N collect strategies`, and that the process is still +> alive ten seconds later. + +#### 3.4 Package the source code + +> Package the project source code + +```shell +git archive \ +--format=tar.gz \ +--output="dist/apache-hertzbeat-1.7.3-src.tar.gz" \ +--prefix=apache-hertzbeat-1.7.3-src/ \ +release-1.7.3-rc1 +``` + +The archive package is here `dist/apache-hertzbeat-1.7.3-src.tar.gz` + +### Sign package + +#### 3.5 Sign binary and source packages + +> `` is your short gpg key ID, see from `gpg --keyid-format SHORT --list-keys` + +```shell +cd dist + +# sign, skipping artifacts that already have a signature +for i in *.tar.gz *.zip; do + [ -e "$i.asc" ] || { echo "sign: $i"; gpg -u --armor --output "$i.asc" --detach-sig "$i"; } +done + +# SHA512 checksums, skipping artifacts that already have one +for i in *.tar.gz *.zip; do + [ -e "$i.sha512" ] || { echo "sha512: $i"; sha512sum "$i" > "$i.sha512"; } +done + +# if macos sha512sum not found, you can install by brew install coreutils + +# integrity check: every artifact must have both .asc and .sha512 +# this catches artifacts a glob missed, e.g. *.tar.gz alone skips the Windows .zip +for i in *.tar.gz *.zip; do + [ -e "$i.asc" ] || echo "MISSING SIGNATURE: $i" + [ -e "$i.sha512" ] || echo "MISSING CHECKSUM: $i" +done +``` + +> The final file list is as follows + +```text +apache-hertzbeat-1.7.3-src.tar.gz +apache-hertzbeat-1.7.3-src.tar.gz.asc +apache-hertzbeat-1.7.3-src.tar.gz.sha512 +apache-hertzbeat-1.7.3-bin.tar.gz +apache-hertzbeat-1.7.3-bin.tar.gz.asc +apache-hertzbeat-1.7.3-bin.tar.gz.sha512 +apache-hertzbeat-1.7.3-docker-compose.tar.gz +apache-hertzbeat-1.7.3-docker-compose.tar.gz.asc +apache-hertzbeat-1.7.3-docker-compose.tar.gz.sha512 +apache-hertzbeat-collector-1.7.3-bin.tar.gz +apache-hertzbeat-collector-1.7.3-bin.tar.gz.asc +apache-hertzbeat-collector-1.7.3-bin.tar.gz.sha512 +apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz +apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz.asc +apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz.sha512 +apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz +apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz.asc +apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz.sha512 +apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip +apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip.asc +apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip.sha512 +``` + +#### 3.6 Verify signature + +```shell +$ cd dist + +# Verify signature +$ for i in *.tar.gz; do echo $i; gpg --verify $i.asc $i ; done + +apache-hertzbeat-1.7.3-bin.tar.gz +gpg: Signature made Tue May 2 12:16:35 2023 CST +gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886 +gpg: Good signature from "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" [ultimate] +apache-hertzbeat-1.7.3-docker-compose.tar.gz +gpg: Signature made Tue May 2 12:16:36 2023 CST +gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886 +gpg: Good signature from "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" [ultimate] +apache-hertzbeat-1.7.3-src.tar.gz +gpg: Signature made Tue May 2 12:16:37 2023 CST +gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886 +gpg: Good signature from "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" [ultimate] +apache-hertzbeat-collector-1.7.3-bin.tar.gz +gpg: Signature made Tue May 2 12:16:37 2023 CST +gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886 +gpg: Good signature from "muchunjin (apache key) [muchunjin@apache.org](mailto:muchunjin@apache.org)" [ultimate] + +# Verify SHA512 +$ for i in *.tar.gz; do echo $i; sha512sum --check $i.sha512; done + +apache-hertzbeat-1.7.3-src.tar.gz +apache-hertzbeat-1.7.3-src.tar.gz: OK +apache-hertzbeat-1.7.3-bin.tar.gz +apache-hertzbeat-1.7.3-bin.tar.gz: OK +apache-hertzbeat-1.7.3-docker-compose.tar.gz +apache-hertzbeat-1.7.3-docker-compose.tar.gz: OK +apache-hertzbeat-collector-1.7.3-bin.tar.gz +apache-hertzbeat-collector-1.7.3-bin.tar.gz: OK +``` + +#### 3.7 Publish the dev directory of the Apache SVN material package + +- Clone the dev directory + +```shell +# Check out the dev directory of the Apache SVN to the svn/dev directory under dist in the root directory of the Apache HertzBeat™ project +svn co https://dist.apache.org/repos/dist/dev/hertzbeat svn/dev + +# alternative: check out an empty working copy when you do not want to download +# every past release candidate +# svn co --depth empty https://dist.apache.org/repos/dist/dev/hertzbeat svn/dev +``` + +- Copy the material package to the dev directory + +Create a version number directory and name it in the form of `release_version`-`RC_version`. RC_version starts from 1, that is, the candidate version starts from RC1. During the release process, there is a problem that causes the vote to fail. +If it needs to be corrected, it needs to iterate the RC version , the RC version number needs to be +1. For example: Vote for version 1.7.3-RC1. If the vote passes without any problems, the RC1 version material will be released as the final version material. +If there is a problem (when the HertzBeat community votes, the voters will strictly check various release requirements and compliance issues) and need to be corrected, then re-initiate the vote after the correction, and the candidate version for the next vote is 1.7.3- RC2. + +```shell +mkdir -p svn/dev/1.7.3-RC1 +cp -f dist/* svn/dev/1.7.3-RC1 +``` + +- Commit to SVN + +```shell +cd svn/dev + +# 1.check svn status +svn status + +# 2. add to svn +svn add 1.7.3-RC1 + +svn status + +# 3. Submit to svn remote server +svn commit -m "release for HertzBeat 1.7.3" +``` + +- Check Apache SVN Commit Results + +> Visit the address [https://dist.apache.org/repos/dist/dev/hertzbeat/](https://dist.apache.org/repos/dist/dev/hertzbeat/) in the browser, check if existed the new material package + +## 4. Enter the community voting stage + +### 4.1 Send a Community Vote Email + +Send a voting email in the community requires at least three `+1` and no `-1`. + +:::caution Check two things before sending + +1. **Your public key is already in the KEYS file.** Open [https://downloads.apache.org/hertzbeat/KEYS](https://downloads.apache.org/hertzbeat/KEYS) and search for your address. If it is not there, voters cannot verify your signatures. See 2.4 for how to add it. +2. **Every version and RC number in the template is replaced.** The template below has **five** places to change: the mail subject, the first line of the body, the release notes link, the release candidates link and the git tag link. When the RC number goes up (RC1 to RC2) all five have to move together; missing one confuses the voters. +::: + +> `Send to`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org)
+> `Title`: [VOTE] Release Apache HertzBeat™ 1.7.3 rc1
+> `Body`: + +```text +Hello HertzBeat Community: + +This is a call for vote to release Apache HertzBeat™ version release-1.7.3-RC1. + +Apache HertzBeat™ - A real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities. + +Release notes: +https://github.com/apache/hertzbeat/releases/tag/v1.7.3-rc1 + +The release candidates: +https://dist.apache.org/repos/dist/dev/hertzbeat/1.7.3-RC1/ + +Git tag for the release: +https://github.com/apache/hertzbeat/releases/tag/v1.7.3-rc1 + +The artifacts signed with PGP key [], corresponding to [@apache.org], that can be found in keys file: +https://downloads.apache.org/hertzbeat/KEYS + +The vote will be open for at least 72 hours or until the necessary number of votes are reached. + +Please vote accordingly: + +[ ] +1 approve +[ ] +0 no opinion +[ ] -1 disapprove with the reason + +*Valid check is a requirement for a vote. *Checklist for reference: + +[ ] Download HertzBeat are valid. +[ ] Checksums and PGP signatures are valid. +[ ] Source code distributions have correct names matching the current +release. +[ ] LICENSE and NOTICE files are correct for each HertzBeat repo. +[ ] All files have license headers if necessary. +[ ] No compiled archives bundled in source archive. +[ ] Can compile from source. + +Steps to validate the release,Please refer to: +https://hertzbeat.apache.org/docs/community/how_to_verify_release + +How to Build: +https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-package + +Thanks! +``` + +After 72 hours, the voting results will be counted, and the voting result email will be sent, as follows. + +> `Send to`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org)
+> `Title`: [RESULT]\[VOTE\] Release Apache HertzBeat™ 1.7.3-rc1
+> `Body`: + +```text +Dear HertzBeat community, + +Thanks for your review and vote for "Release Apache HertzBeat™ 1.7.3-rc1" +I'm happy to announce the vote has passed: +--- +4 binding +1, from: + +- cc + +1 non-binding +1, from: + +- Roc Marshal +--- +no 0 or -1 votes. + +Vote thread: +https://lists.apache.org/thread/t01b2lbtqzyt7j4dsbdp5qjc3gngjsdq +--- +Thank you to everyone who helped us to verify and vote for this release. We will move to the ASF Incubator voting shortly. +--- +Best, + +``` + +One item of the email content is `Vote thread`, and the link is obtained here: [https://lists.apache.org/list.html?dev@hertzbeat.apache.org](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) + +## 5. Complete the final publishing steps + +### 5.1 Migrating source and binary packages + +```shell +svn mv https://dist.apache.org/repos/dist/dev/hertzbeat/1.7.3-RC1 https://dist.apache.org/repos/dist/release/hertzbeat/1.7.3 -m "transfer packages for 1.7.3-RC1" +``` + +#### 5.2 Add the new version download address to the official website + +[https://github.com/apache/hertzbeat/blob/master/home/docs/download.md](https://github.com/apache/hertzbeat/blob/master/home/docs/download.md) +[https://github.com/apache/hertzbeat/blob/master/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/download.md](https://github.com/apache/hertzbeat/blob/master/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/download.md) + +Open the official website address [https://hertzbeat.apache.org/docs/download/](https://hertzbeat.apache.org/docs/download/) to see if there is a new version of the download + +> It should be noted that the download link may take effect after an hour, so please pay attention to it. + +#### 5.3 Generate a release on github + +Update pre-release to create a tag named v1.7.3 based on the release-1.7.3-rc1 branch, and set this tag to latest release. + +:::tip +You can modify it on the original RC Release without creating a new Release. +::: + +Then enter Release Title and Describe + +- Release Title: + +```text +v1.7.3 +``` + +- Describe: + +```text +xxx +release note: xxx +``` + +Then click the `Publish release` button. + +The rename the release-1.7.3-rc1 branch to release-1.7.3. + +#### 5.4 Send new version announcement email + +> `Send to`: [announce@apache.org](mailto:announce@apache.org)
+> `cc`: [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org)
+> `Title`: [ANNOUNCE] Apache HertzBeat™ 1.7.3 released
+> `Body`: + +```text +Hi Community, + +We are glad to announce the release of Apache HertzBeat™ 1.7.3. +Thanks again for your help. + +Apache HertzBeat™ (https://hertzbeat.apache.org/) - A real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities. + +Download Link: +https://hertzbeat.apache.org/docs/download/ + +Release Note: +https://github.com/apache/hertzbeat/releases/tag/v1.7.3 + +Website: +https://hertzbeat.apache.org/ + +HertzBeat Resources: +- Issue: https://github.com/apache/hertzbeat/issues +- Mailing list: dev@hertzbeat.apache.org +--- +Apache HertzBeat™ Team +--- +Best, + +``` + +This version release is over. + +--- + +This doc refer from [Apache StreamPark](https://streampark.apache.org/) diff --git a/home/versioned_docs/version-1.9.0/community/how-to-verify.md b/home/versioned_docs/version-1.9.0/community/how-to-verify.md new file mode 100644 index 0000000000..22f99fd25f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/how-to-verify.md @@ -0,0 +1,267 @@ +--- +id: how_to_verify_release +title: How to Verify Release +sidebar_position: 4 +--- + +## Verify the candidate version + +For the detailed check list, please refer to the ASF [release policy](https://www.apache.org/legal/release-policy.html) and [release publishing guide](https://infra.apache.org/release-publishing.html) + +Version content accessible in browser [https://dist.apache.org/repos/dist/dev/hertzbeat/](https://dist.apache.org/repos/dist/dev/hertzbeat/) + +### 1. Download the candidate version + +Download the candidate version to be released to the local environment Need to rely on gpg tool, if not, it is recommended to install `gpg2`. + +:::caution + +If the network is poor, downloading may be time-consuming. The download is completed normally in about 20 minutes, please wait patiently. + +::: + +```shell +# Replace {version} and RC1 with the version and candidate under vote, e.g. 1.9.0 and RC2 + +# if there is svn locally, you can check out the whole directory +$ svn co https://dist.apache.org/repos/dist/dev/hertzbeat/{version}-RC1/ + +# or download a single artifact directly +$ wget https://dist.apache.org/repos/dist/dev/hertzbeat/{version}-RC1/apache-hertzbeat-{version}-src.tar.gz +``` + +### 2. Verify that the uploaded version is compliant + +Start the verification process, which includes but is not limited to the following content and forms. + +#### 2.1 Check whether the release package is complete + +The package uploaded to dist must include the source code package, and the binary package is optional. + +1. Whether to include the source code package +2. Whether to include the signature of the source code package +3. Whether to include the sha512 of the source code package +4. If binary packages are uploaded (including the native collector packages), check items 2 and 3 for every one of them + +> **Every** artifact must have a matching `.asc` and `.sha512`, with no exception. This loop reports +> anything missing: +> +> ```shell +> for i in *.tar.gz *.zip; do +> [ -e "$i.asc" ] || echo "missing signature: $i" +> [ -e "$i.sha512" ] || echo "missing checksum: $i" +> done +> ``` + +#### 2.2 Check gpg signature + +First import the publisher's public key. Import KEYS from the svn repository to the local environment. (The person who releases the version does not need to import it again, the person who helps to do the verification needs to import it, and the user name is enough for the person who issued the version) + +##### 2.2.1 Import public key + +```shell +curl https://downloads.apache.org/hertzbeat/KEYS > KEYS # Download KEYS +gpg --import KEYS # Import KEYS to local +``` + +##### 2.2.2 About trusting the public key + +:::tip Verifying a signature does not require trusting the key +`gpg --verify` prints `Good signature` for an untrusted key as well, it only adds a warning: + +```text +WARNING: This key is not certified with a trusted signature! +``` + +**That warning is expected. As long as `Good signature` appears, the check passes.** + +If you still want to silence it, you can set a trust level as shown below. Note that +`5 = ultimate` means "this is my own key" in GPG terms, and marking someone else's key ultimate +pollutes your local web of trust, so `4 = fully` is usually the better choice. +::: + +Set the trust level of the KEY used in this version (optional): + +```shell +$ gpg --edit-key xxxxxxxxxx #KEY user used in this version +gpg (GnuPG) 2.2.21; Copyright (C) 2020 Free Software Foundation, Inc. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Secret key is available. +gpg> trust #trust +Please decide how far you trust this user to correctly verify other users' keys +(by looking at passports, checking fingerprints from different sources, etc.) + + 1 = I don't know or won't say + 2 = I do NOT trust + 3 = I trust marginally + 4 = I trust fully + 5 = I trust ultimately + m = back to the main menu + +Your decision? 5 #choose 5 +Do you really want to set this key to ultimate trust? (y/N) y #choose y + +gpg> + +``` + +##### 2.2.3 Check the gpg signature + +```shell +# cover *.zip as well, the Windows native collector package is a zip and a +# *.tar.gz-only loop skips it silently +for i in *.tar.gz *.zip; do echo $i; gpg --verify $i.asc $i; done +``` + +check result + +> If something like the following appears, it means the signature is correct. Keyword: **`Good signature`** + +```shell +apache-hertzbeat-${release_version}-src.tar.gz +gpg: Signature made XXXX +gpg: using RSA key XXXXX +gpg: Good signature from "XXX " +``` + +#### 2.3 Check sha512 hash + +```shell +for i in *.tar.gz *.zip; do echo $i; sha512sum --check "$i.sha512"; done + +# on macOS, if sha512sum is missing, use the bundled shasum instead +# for i in *.tar.gz *.zip; do echo $i; shasum -a 512 -c "$i.sha512"; done +``` + +#### 2.4 Check the binary package + +unzip `apache-hertzbeat-${release.version}-bin.tar.gz` + +```shell +tar -xzvf apache-hertzbeat-${release.version}-bin.tar.gz +``` + +check as follows: + +- [ ] Check whether the source package contains unnecessary files, which makes the tar package too large +- [ ] There are `LICENSE` and `NOTICE` files +- [ ] The year in the `NOTICE` file is correct +- [ ] Only text files exist, not binary files +- [ ] All files have ASF license at the beginning +- [ ] Able to compile correctly +- [ ] ..... + +#### 2.5 Check the native collector packages + +The native collector packages (`apache-hertzbeat-collector-native-{version}-*`) are **pre-compiled +native executables**. The source build check below does not apply to them, so check them separately. + +```shell +tar -xzf apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz +cd apache-hertzbeat-collector-native-{version}-linux-amd64-bin +MANAGER_HOST=127.0.0.1 ./bin/startup.sh +tail -f logs/startup.log +``` + +Check the following: + +- [ ] `LICENSE`, `NOTICE` and the `licenses/` directory exist +- [ ] it starts: the log shows `Started Collector` and `Registered N collect strategies` +- [ ] the process is still alive ten seconds later (**a crash can happen after `Started Collector`**, + so that line alone is not enough) + +:::caution The native packages have hard runtime requirements +When they are not met the process exits instantly with no log output at all, which is easy to +mistake for a corrupted artifact. Check your environment first: + +- **x86 packages need AVX2**: Intel Haswell (2013) and later, AMD Zen (2017) and later. Some + Atom-family low-end chips, Rosetta 2 on Apple Silicon and older Windows on ARM emulation do not + support it +- **Linux packages need glibc 2.34 or newer**: Ubuntu 22.04+, Debian 12+, RHEL/Rocky 9+ work; + Ubuntu 20.04, Debian 11, RHEL 8 and CentOS 7 do not +- **the Windows package needs** Windows 10 / Server 2016 or newer with the Microsoft Visual C++ + 2015-2022 Redistributable installed + +An unmet requirement is a known limitation, not a reason to vote -1. Please state the environment +you verified on in your reply. +::: + +#### 2.6 Check the source package + +> If the binary/web-binary package is uploaded, check the binary package. + +Unzip `apache-hertzbeat-${release_version}-src.tar.gz` + +```shell +cd apache-hertzbeat-${release_version}-src +``` + +compile the source code: [Build HertzBeat Binary Package](https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-package) + +and check as follows: + +- [ ] There are `LICENSE` and `NOTICE` files +- [ ] The year in the `NOTICE` file is correct +- [ ] All text files have ASF license at the beginning +- [ ] Check the third-party dependent license: +- [ ] Compatible with third-party dependent licenses +- [ ] All third-party dependent licenses are named in the `LICENSE` file +- [ ] If you are relying on the Apache license and there is a `NOTICE` file, then these `NOTICE` files also need to be added to the version of the `NOTICE` file +- [ ] ..... + +You can refer to this article: [ASF Third Party License Policy](https://apache.org/legal/resolved.html) + +### 3. Email reply + +If you initiate a posting vote, you can refer to this response example to reply to the email after verification + +:::caution Attention +When replying to the email, you must bring the information that you have checked by yourself. Simply replying to `+1 approve` is invalid. + +When new PMC votes in the [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) hertzbeat community, Please bring the binding suffix to indicate that it has a binding vote for the vote in the hertzbeat community, and it is convenient to count the voting results. +::: + +Non-PMC member: + +```text ++1 (non-binding) +I checked: + 1. All download links are valid + 2. Checksums and signatures are OK for all artifacts, including the .zip + 3. LICENSE and NOTICE exist and are correct + 4. Built successfully from source on + 5. Native collector package starts and registers its collect strategies + 6. +``` + +PMC member: + +```text ++1 (binding) +I checked: + 1. All download links are valid + 2. Checksums and signatures are OK for all artifacts, including the .zip + 3. LICENSE and NOTICE exist and are correct + 4. Built successfully from source on + 5. Native collector package starts and registers its collect strategies + 6. +``` + +When you find a problem, give enough detail for the release manager to reproduce it: + +```text +-1 (binding) + +The is missing its .sha512 checksum. + +Checked on: macOS 26 / arm64 +Steps: + 1. svn co https://dist.apache.org/repos/dist/dev/hertzbeat/1.9.0-RC2/ + 2. for i in *.tar.gz *.zip; do [ -e "$i.sha512" ] || echo "missing: $i"; done +Output: + missing: apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip +``` + +--- diff --git a/home/versioned_docs/version-1.9.0/community/mailing_lists.md b/home/versioned_docs/version-1.9.0/community/mailing_lists.md new file mode 100644 index 0000000000..938b1b5160 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/mailing_lists.md @@ -0,0 +1,61 @@ +--- +id: 'mailing_lists' +title: 'Mailing Lists' +sidebar_position: 1 +--- + + + +The [Developer Mailing List](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) is the community-recommended way to communicate and obtain the latest information. + +Before you post anything to the mailing lists, be sure that you already **subscribe** to them. + +## Usages + +### Developer List + +- Use this list for your HertzBeat questions +- Used by HertzBeat contributors to discuss development of HertzBeat + +| List Name | Address | Subscribe | Unsubscribe | Archive | +|--------------------|--------------------------|--------------------------------------------------------|------------------------------------------------------------|------------------------------------------------------------------------| +| **Developer List** | [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) | [subscribe](mailto:dev-subscribe@hertzbeat.apache.org) | [unsubscribe](mailto:dev-unsubscribe@hertzbeat.apache.org) | [archive](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) | + +### Notification List + +- Notifications on changes to the HertzBeat codebase + +| List Name | Address | Subscribe | Unsubscribe | Archive | +|-----------------------|------------------------------------|------------------------------------------------------------------|----------------------------------------------------------------------|----------------------------------------------------------------------------------| +| **Notification List** | [notifications@hertzbeat.apache.org](mailto:notifications@hertzbeat.apache.org) | [subscribe](mailto:notifications-subscribe@hertzbeat.apache.org) | [unsubscribe](mailto:notifications-unsubscribe@hertzbeat.apache.org) | [archive](https://lists.apache.org/list.html?notifications@hertzbeat.apache.org) | + +## Steps for Subscription + +Sending a subscription email is also very simple. The steps are as follows: + +- 1、**Subscribe**: Click the **subscribe** button in the above table, and it redirects to your mail client. The subject and content are arbitrary. + After that, you will receive a confirmation email from [dev-help@hertzbeat.apache.org](mailto:dev-help@hertzbeat.apache.org) (if not received, please confirm whether the email is automatically classified as SPAM, promotion email, subscription email, etc.). +- 2、**Confirm**: Reply directly to the confirmation email, or click on the link in the email to reply quickly. The subject and content are arbitrary. +- 3、**Welcome**: After completing the above steps, you will receive a welcome email with the subject WELCOME to [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), and you have successfully subscribed to the Apache HertzBeat mailing list. + +## Post Plain Text Mails + +When posting to the mailing lists, please use plain text emails. +**Do not use HTML emails**. +HTML emails are more likely to be targeted as spam mails and rejected. +It may get malformed through different mail clients and not easily readable by others. diff --git a/home/versioned_docs/version-1.9.0/community/maturity.md b/home/versioned_docs/version-1.9.0/community/maturity.md new file mode 100644 index 0000000000..f0698ccff9 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/maturity.md @@ -0,0 +1,92 @@ +--- +id: maturity +title: Maturity +sidebar_position: 0 +--- + +## Maturity Assessment for Apache HertzBeat™ + +The goals of this maturity model are to describe how Apache projects operate in a concise and high-level way, and to +provide a basic framework that projects may choose to use to evaluate themselves. + +More details can be found in +the [Apache Project Maturity Model](https://community.apache.org/apache-way/apache-project-maturity-model.html). + +## Status of this assessment + +This assessment is evaluated during HertzBeat's Incubating. + +## Maturity model assessment + +The following table is filled according to +the [Apache Maturity Model](https://community.apache.org/apache-way/apache-project-maturity-model.html). Mentors and +community members are welcome to comment and modify it. + +### CODE + +| **ID** | **Description** | **Status** | +|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **CD10** | The project produces Open Source software for distribution to the public, at no charge. | **YES** The project source code is licensed under the `Apache License 2.0`. | +| **CD20** | Anyone can easily discover and access the project's code.. | **YES** The [official website](https://hertzbeat.apache.org/) includes `GitHub` link which can access the project's repository on GitHub directly. | +| **CD30** | Anyone using standard, widely-available tools, can build the code in a reproducible way. | **YES** Apache HertzBeat provide `how-to-build` document for every component to tell user how to compile on bare metal, such as the [core's](https://hertzbeat.apache.org/docs/community/development). | +| **CD40** | The full history of the project's code is available via a source code control system, in a way that allows anyone to recreate any released version. | **YES** It depends on git, and anyone can view the full history of the project via commit logs. | +| **CD50** | The source code control system establishes the provenance of each line of code in a reliable way, based on strong authentication of the committer. When third parties contribute code, commit messages provide reliable information about the code provenance. | **YES** The project uses GitHub and managed by Apache Infra, it ensuring provenance of each line of code to a committer. And the third-party contributions are accepted in accordance with the contributing guides. | + +### LICENSE + +| **ID** | **Description** | **Status** | +|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **LC10** | The Apache License, version 2.0, covers the released code. | **YES** The [LICENSE](https://github.com/apache/hertzbeat/blob/master/LICENSE) is in GitHub repository. And all source files are with APLv2 header, checked by Github Action. | +| **LC20** | Libraries that are mandatory dependencies of the project's code do not create more restrictions than the Apache License does. | **YES** All dependencies are listed. | +| **LC30** | The libraries mentioned in LC20 are available as Open Source software. | **YES** All dependencies are listed are available as Open Source software | +| **LC40** | Committers are bound by an Individual Contributor Agreement (the "Apache iCLA") that defines which code they may commit and how they need to identify code that is not their own. | **YES** All committers have iCLAs. | +| **LC50** | The project clearly defines and documents the copyright ownership of everything that the project produces. | **YES** And all source files are with APLv2 header, checked by GitHub Action. | + +### Releases + +| **ID** | **Description** | **Status** | +|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **RE10** | Releases consist of source code, distributed using standard and open archive formats that are expected to stay readable in the long term. | **YES** Source release is distributed via [dist.apache.org](https://dist.apache.org/repos/dist/release/incubator/hertzbeat/) and linked from [download page](https://hertzbeat.apache.org/docs/download). | +| **RE20** | The project's PPMC (Project Management Committee, see CS10) approves each software release in order to make the release an act of the Foundation. | **YES** All releases have been voted at [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org) and [general@incubator.apache.org](mailto:general@incubator.apache.org), and have at least 3 PPMC member's votes. | +| **RE30** | Releases are signed and/or distributed along with digests that anyone can reliably use to validate the downloaded archives. | **YES** All releases are signed, and the [KEYS](https://dist.apache.org/repos/dist/release/hertzbeat/KEYS) are available. | +| **RE40** | The project can distribute convenience binaries alongside source code, but they are not Apache Releases, they are provided with no guarantee. | **YES** User can easily build binaries from source code, and we do not provide binaries as Apache Releases. | +| **RE50** | The project documents a repeatable release process so that someone new to the project can independently generate the complete set of artifacts required for a release. | **YES** We can follow the [Release guide](https://hertzbeat.apache.org/docs/community/how_to_release) to make a new Apache HertzBeat release, and so far we had 4 different release managers. | + +### Quality + +| **ID** | **Description** | **Status** | +|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **QU10** | The project is open and honest about the quality of its code. Various levels of quality and maturity for various modules are natural and acceptable as long as they are clearly communicated. | **YES** We encourage user to [report issues](https://github.com/apache/hertzbeat/issues). | +| **QU20** | The project puts a very high priority on producing secure software. | **YES** All security reports are actively handled. | +| **QU30** | The project provides a well-documented, secure and private channel to report security issues, along with a documented way of responding to them. | **Yes** The official Github Repo provides a [security doc](https://github.com/apache/hertzbeat/blob/master/SECURITY.md) | +| **QU40** | The project puts a high priority on backwards compatibility and aims to document any incompatible changes and provide tools and documentation to help users transition to new features. | **Yes** We follow semantic versions. As long as it's within one major version, it's backward compatible. And when any breaking changes added, we provide corresponding upgrade guides. | +| **QU50** | The project strives to respond to documented bug reports in a timely manner. | **YES** The project has resolved 743+ issues and 2348+ pull requests so far, with very prompt response. | + +### Community + +| **ID** | **Description** | **Status** | +|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **CO10** | The project has a well-known homepage that points to all the information required to operate according to this maturity model. | **YES** The [official website](https://hertzbeat.apache.org/) includes all information user need to run Apache HertzBeat. | +| **CO20** | The community welcomes contributions from anyone who acts in good faith and in a respectful manner, and who adds value to the project. | **Yes** We provide contributing guides for every component. And we also have a [general contributing guide](https://hertzbeat.apache.org/docs/community/contribution) | +| **CO30** | Contributions include source code, documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. | **YES** All good contributions including code and non-code are welcomed. | +| **CO40** | The community strives to be meritocratic and gives more rights and responsibilities to contributors who, over time, add value to the project. | **YES** The community has elected 3 new PMC members and 13 new committers so far. | +| **CO50** | The project documents how contributors can earn more rights such as commit access or decision power, and applies these principles consistently. | **YES** The community has clear docs on nominating committers and PPMC members | +| **CO60** | The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects. | **YES** All decisions are made after vote by community members. | +| **CO70** | The project strives to answer user questions in a timely manner. | **YES** We use [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), [GitHub issue](https://github.com/apache/hertzbeat/issues) and [GitHub discussion](https://github.com/apache/hertzbeat/discussions) to do this in a timely manner. | + +### Consensus + +| **ID** | **Description** | **Status** | +|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------| +| **CS10** | The project maintains a public list of its contributors who have decision power. The project's PPMC (Project Management Committee) consists of those contributors. | **Yes** See [members](https://hertzbeat.apache.org/team/) with all PPMC members and committers. | +| **CS20** | Decisions require a consensus among PPMC members and are documented on the project's main communications channel. The PPMC takes community opinions into account, but the PPMC has the final word. | **YES** All decisions are made by votes on [dev@hertzbeat.apache.org](mailto:dev@hertzbeat.apache.org), and with at least 3 +1 votes from PPMC. | +| **CS30** | The project uses documented voting rules to build consensus when discussion is not sufficient. | **YES** The project uses the standard ASF voting rules. | +| **CS40** | In Apache projects, vetoes are only valid for code commits. The person exercising the veto must justify it with a technical explanation, as per the Apache voting rules defined in CS30. | **YES** Apache HertzBeat community has not used the veto power yet except for code commits. | +| **CS50** | All "important" discussions happen asynchronously in written form on the project's main communications channel. Offline, face-to-face or private discussions that affect the project are also documented on that channel. | **YES** All important discussions and conclusions are recorded in written form. | + +### Independence + +| **ID** | **Description** | **Status** | +|----------|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **IN10** | The project is independent from any corporate or organizational influence. | **YES** The PPMC members and committer of Apache HertzBeat are from several different companies, and majority of them are NOT From the company that donated this project. | +| **IN20** | Contributors act as themselves, not as representatives of a corporation or organization. | **YES** The contributors act on their own initiative without representing a corporation or organization. | diff --git a/home/versioned_docs/version-1.9.0/community/new_committer_process.md b/home/versioned_docs/version-1.9.0/community/new_committer_process.md new file mode 100644 index 0000000000..b190b9f1ed --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/new_committer_process.md @@ -0,0 +1,287 @@ +--- +id: 'new_committer_process' +title: 'New Committer Process' +sidebar_position: 4 +--- + + + +[Apache New Committer Guideline](https://community.apache.org/newcommitter.html#new-committer-process) + +## The process of new Committer + +- Call a vote in mailing `private@hertzbeat.apache.org` + + see **Committer Vote Template** + +- Close the vote + + see **Close Vote Template** + +- If the result is positive, invite the new committer + + see **Committer Invite Template** + +- If accepted, then: Accept the committer + + see **Committer Accept Template** + +- New Committer sign CLA and wait for CLA is recorded + +- Request creation of the committer account + + see **Committer Account Creation** + + - Wait until root says it is done + - [Roster](https://whimsy.apache.org/roster/ppmc/hertzbeat) add the new committer +- Announce the new committer + + see **Announce New Committer Template** + +## Template + +Note that, there are three placeholder in template should be replaced before using + +- NEW_COMMITTER_NAME This Must Be Public Name, Not Github Name Or Id. +- NEW_COMMITTER_EMAIL +- NEW_COMMITTER_APACHE_NAME + +### Committer Vote Template + +:::note +NEW_COMMITTER_NAME This Must Be Public Name, Not Github Name Or Id. +::: + +```text +To: private@hertzbeat.apache.org +Subject: [VOTE] New committer: `NEW_COMMITTER_NAME` +``` + +```text +Hi HertzBeat PMC, + +This is a formal vote about inviting `NEW_COMMITTER_NAME` as our community new committer. + +Work list: https://github.com/apache/hertzbeat/commits?author=xxx + +Here is the list of `NEW_COMMITTER_NAME`'s contributions in HertzBeat Community: + +> [27 commits](https://github.com/apache/hertzbeat/commits?author=xxx) +> +> 7,495 ++ 627 -- + +Submitted PR (27 commits) +- [ISSUE #4534] [feature] add new feature in hertzbeat #3445 +- xxx + +Submitted Issues (18 commits) + +- [bug] find some bugs in hertzbeat nodes #6565 +- xxx + +Please vote: + ++1: I support this proposal and will welcome `NEW_COMMITTER_NAME` as a committer. ++0: I don't care. +-1: I object to this proposal and here are my reasons. + +This vote will be open for at least 7 days. + +See voting guidelines at +https://community.apache.org/newcommitter.html + +Best Wishes, +ttt +``` + +Note that, Voting ends one week from today, i.e. +[midnight UTC on YYYY-MM-DD](https://www.timeanddate.com/counters/customcounter.html?year=YYYY&month=MM&day=DD) +[Apache Voting Guidelines](https://community.apache.org/newcommitter.html) + +### Close Vote Template + +```text +To: private@hertzbeat.apache.org +Subject: [RESULT] [VOTE] New committer: `NEW_COMMITTER_NAME` +``` + +```text +Hi HertzBeat PMC, + +The vote has now closed. The results are: + +Binding Votes: + ++1 [TOTAL BINDING +1 VOTES] + 0 [TOTAL BINDING +0/-0 VOTES] +-1 [TOTAL BINDING -1 VOTES] + +The vote is ***successful/not successful*** +``` + +### Committer Invite Template + +```text +To: NewCommiter@domain.com +Cc: private@hertzbeat.apache.org +Subject: Invitation to become HertzBeat committer: [Candidate Name] + +``` + +```text +Hello [Candidate Name], + +The HertzBeat Project Management Committee (PMC) +hereby offers you committer privileges to the project + +These privileges are offered on the understanding that you'll use them +reasonably and with common sense. We like to work on trust +rather than unnecessary constraints. + +Being a committer enables you to more easily make +changes without needing to go through the patch +submission process. + +Being a committer does not require you to +participate any more than you already do. It does +tend to make one even more committed. You will +probably find that you spend more time here. + +Of course, you can decline and instead remain as a +contributor, participating as you do now. + +This personal invitation is a chance for you to accept or decline in private. +Please let us know in reply to this message whether you accept or decline. +Also, please refrain from sharing that you were invited before the official +announcement by the PMC. + +If you accept, you will need an Apache account (id) with privileges. +Please follow these instructions. + +A. If you already have an ICLA on file: + + 1. If you already have an Apache account, let us know your id and we +will grant you privileges on the project repositories. + + 2. If you have previously sent an ICLA, let us know the email address +and public name used on the ICLA and your preferred Apache id, and +we will request your account. + + 3. If the email address on the previously submitted ICLA is no longer +valid, let us know the email address and public name used on the new ICLA, +and your preferred Apache id. Continue to step B below and file your new ICLA. + +Look to see if your preferred ID is already taken at +https://people.apache.org/committer-index.html + +B. If there is not already an ICLA on file, you need to submit an ICLA: + + 1. Details of the ICLA and the forms are found + through this link: https://www.apache.org/licenses/#clas + + 2. Instructions for its completion and return to + the Secretary of the ASF are found at + https://www.apache.org/licenses/contributor-agreements.html#submitting + + Do not copy the project or any other individual on your message + to Secretary, as the form contains Personally Identifiable Information + that should be kept private. + + 3. When you complete the ICLA form, be sure to include in the form + the Apache HertzBeat project and choose a + unique Apache ID. Look to see if your preferred + ID is already taken at + https://people.apache.org/committer-index.html + This will allow the Secretary to notify the PMC + when your ICLA has been recorded. + +When recording of your ICLA is noted, you will +receive a follow-up message with the next steps for +establishing you as a committer. +``` + +### Committer Accept Template + +```text +To: `NEW_COMMITTER_EMAIL` +Cc: private@hertzbeat.apache.org +Subject: Re: invitation to become HertzBeat committer +``` + +```text +Welcome. Here are the next steps in becoming a project committer. After that +we will make an announcement to the dev@hertzbeat.apache.org list. + +You need to send a Contributor License Agreement to the ASF. +Normally you would send an Individual CLA. If you also make +contributions done in work time or using work resources, +see the Corporate CLA. Ask us if you have any issues. +https://www.apache.org/licenses/#clas. + +You need to choose a preferred ASF user name and alternatives. +In order to ensure it is available you can view a list of taken IDs at +https://people.apache.org/committer-index.html + +Please notify us when you have submitted the CLA and by what means +you did so. This will enable us to monitor its progress. + +We will arrange for your Apache user account when the CLA has +been recorded. + +After that is done, please make followup replies to the dev@hertzbeat.apache.org list. +We generally discuss everything there and keep the +private@hertzbeat.apache.org list for occasional matters which must be private. + +The developer section of the website describes roles within the ASF and provides other +resources: + https://www.apache.org/foundation/how-it-works.html + https://www.apache.org/dev/ + +The incubator also has some useful information for new committers +in incubating projects: + https://incubator.apache.org/guides/committer.html + https://incubator.apache.org/guides/ppmc.html + +Just as before you became a committer, participation in any ASF community +requires adherence to the ASF Code of Conduct: + https://www.apache.org/foundation/policies/conduct.html + +Yours, +The Apache HertzBeat new PMC +``` + +### Announce New Committer Template + +```text +To: dev@hertzbeat.apache.org, `NEW_COMMITTER_EMAIL` +Subject: [ANNOUNCE] New committer: `NEW_COMMITTER_NAME` +``` + +```text +Hello Community, + +The Podling Project Management Committee (new PMC) for Apache HertzBeat +has invited `NEW_COMMITTER_NAME` to become a committer and we are pleased to +announce that he has accepted. + +`NEW_COMMITTER_NAME` is active in the Apache HertzBeat community, hope to see your +further interactions with the community! +Thanks for your contributions. + +Best Wishes! +``` diff --git a/home/versioned_docs/version-1.9.0/community/new_pmc_member_process.md b/home/versioned_docs/version-1.9.0/community/new_pmc_member_process.md new file mode 100644 index 0000000000..ca7b2acbe3 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/new_pmc_member_process.md @@ -0,0 +1,308 @@ +--- +id: 'new_pmc_ember_process' +title: 'new PMC Member Process' +sidebar_position: 5 +--- + + + +[Apache New Committer Guideline](https://community.apache.org/newcommitter.html#new-committer-process) + +## The process of new PMC member + +- Call a vote in mailing `private@hertzbeat.apache.org` + + see **PMC Member Vote Template** + +- Close the vote + + see **Close Vote Template** + +- Board Approval of new PMC member + + see **Board Approval of new PMC member** + +- If the result is positive, invite the new PMC member + + see **PMC member Invite Template** + +- If accept, then: Accept the PMC member + + see **PMC Member Accept Template** + +- Notify the PMC member of completion + + see **PMC Member Done Template** + +- Announce the new PMC member + + see **PMC Member Announce Template** + +## Template + +Note that, there are three placeholder in template should be replaced before using + +- NEW_PMC_NAME +- NEW_PMC_EMAIL +- NEW_PMC_APACHE_NAME + +### PMC member Vote Template + +```text +To: private@hertzbeat.apache.org +Subject: [VOTE] new PMC member candidate: `NEW_PMC_NAME` +``` + +```text +Hi HertzBeat PMC, + +This is a formal vote about inviting `NEW_PMC_NAME` as our new PMC member. + +${Work list}[1] + +[1] https://github.com/apache/hertzbeat/commits?author=`NEW_PMC_NAME` +``` + +Note that, Voting ends one week from today, i.e. [midnight UTC on YYYY-MM-DD](https://www.timeanddate.com/counters/customcounter.html?year=YYYY&month=MM&day=DD) +[Apache Voting Guidelines](https://community.apache.org/newcommitter.html) + +### Close Vote Template + +```text +To: private@hertzbeat.apache.org +Subject: [RESULT] [VOTE] new PMC member: `NEW_PMC_NAME` +``` + +```text +Hi HertzBeat PMC, + +The vote has now closed. The results are: + +Binding Votes: + ++1 [TOTAL BINDING +1 VOTES] + 0 [TOTAL BINDING +0/-0 VOTES] +-1 [TOTAL BINDING -1 VOTES] + +The vote is ***successful/not successful*** +``` + +### Board Approval of new PMC member Template + +```text +To: board@apache.org +Cc: private@``.apache.org +Subject: [NOTICE] `NEW_PMC_NAME` for HertzBeat PMC member +``` + +```text +HertzBeat proposes to invite `NEW_PMC_NAME` to join the PMC. + +The vote result is available here: https://lists.apache.org/... +``` + +[Apache New Pmc Guide](https://www.apache.org/dev/pmc.html#newpmc) + +### PMC member Invite Template + +```text +To: `NEW_PMC_EMAIL` +Cc: private@hertzbeat.apache.org +Subject: Invitation to become HertzBeat PMC member: `NEW_PMC_NAME` +``` + +```text +Hello [Candidate Name], + +The HertzBeat Project Management Committee (PMC) +hereby offers you PMC members privileges to the project +These privileges are offered on the understanding that you'll use them +reasonably and with common sense. We like to work on trust +rather than unnecessary constraints. + +Being a PMC member enables you +to guide the direction of the project. + +Being a committer does not require you to +participate any more than you already do. It does +tend to make one even more committed. You will +probably find that you spend more time here. + +Of course, you can decline and instead remain as a +contributor, participating as you do now. + +This personal invitation is a chance for you to accept or decline in private. +Please let us know in reply to this message whether you accept or decline. +Also, please refrain from sharing that you were invited before the official +announcement by the PMC. + +If you accept, you will need an Apache account (id) with privileges. +Please follow these instructions. + +A. If you already have an ICLA on file: + + 1. If you already have an Apache account, let us know your id and we +will grant you privileges on the project repositories. + + 2. If you have previously sent an ICLA, let us know the email address +and public name used on the ICLA and your preferred Apache id, and +we will request your account. + + 3. If the email address on the previously submitted ICLA is no longer +valid, let us know the email address and public name used on the new ICLA, +and your preferred Apache id. Continue to step B below and file your new ICLA. + +Look to see if your preferred ID is already taken at +https://people.apache.org/committer-index.html + +B. If there is not already an ICLA on file, you need to submit an ICLA: + + 1. Details of the ICLA and the forms are found + through this link: https://www.apache.org/licenses/#clas + + 2. Instructions for its completion and return to + the Secretary of the ASF are found at + https://www.apache.org/licenses/contributor-agreements.html#submitting + + Do not copy the project or any other individual on your message + to Secretary, as the form contains Personally Identifiable Information + that should be kept private. + + 3. When you complete the ICLA form, be sure to include in the form + the Apache HertzBeat project and choose a + unique Apache ID. Look to see if your preferred + ID is already taken at + https://people.apache.org/committer-index.html + This will allow the Secretary to notify the PMC + when your ICLA has been recorded. + +When recording of your ICLA is noted, you will +receive a follow-up message with the next steps for +establishing you as a PMC. +``` + +### PMC member Accept Template + +```text +To: `NEW_PMC_EMAIL` +Cc: private@hertzbeat.apache.org +Subject: Re: invitation to become HertzBeat PMC member +``` + +```text +Welcome. Here are the next steps in becoming a project PMC. After that +we will make an announcement to the dev@hertzbeat.apache.org list. + +You need to send a Contributor License Agreement to the ASF. +Normally you would send an Individual CLA. If you also make +contributions done in work time or using work resources, +see the Corporate CLA. Ask us if you have any issues. +https://www.apache.org/licenses/#clas. + +You need to choose a preferred ASF user name and alternatives. +In order to ensure it is available you can view a list of taken IDs at +https://people.apache.org/committer-index.html + +Please notify us when you have submitted the CLA and by what means +you did so. This will enable us to monitor its progress. + +We will arrange for your Apache user account when the CLA has +been recorded. + +After that is done, please make followup replies to the dev@hertzbeat.apache.org list. +We generally discuss everything there and keep the +private@hertzbeat.apache.org list for occasional matters which must be private. + +The developer section of the website describes roles within the ASF and provides other +resources: + https://www.apache.org/foundation/how-it-works.html + https://www.apache.org/dev/ + +The incubator also has some useful information for new PMC +in incubating projects: + https://incubator.apache.org/guides/committer.html + https://incubator.apache.org/guides/ppmc.html + +Just as before you became a PMC member, participation in any ASF community +requires adherence to the ASF Code of Conduct: + https://www.apache.org/foundation/policies/conduct.html + +Yours, +The Apache HertzBeat PMC +``` + +### PMC member Done Template + +```text +To: private@hertzbeat.apache.org, `NEW_PMC_EMAIL` +Subject: account request: `NEW_PMC_NAME` +``` + +```text +`NEW_PMC_EMAIL`, as you know, the ASF Infrastructure has set up your +committer account with the username '`NEW_PMC_APACHE_NAME`'. + +Please follow the instructions to set up your SSH, +svn password, svn configuration, email forwarding, etc. +https://www.apache.org/dev/#committers + +You have commit access to specific sections of the +ASF repository, as follows: + +The general "committers" at: + https://svn.apache.org/repos/private/committers + +If you have any questions during this phase, then please +see the following resources: + +Apache developer's pages: https://www.apache.org/dev/ +Incubator committer guide: https://incubator.apache.org/guides/committer.html + +Naturally, if you don't understand anything be sure to ask us on the dev@hertzbeat.apache.org mailing list. +Documentation is maintained by volunteers and hence can be out-of-date and incomplete - of course +you can now help fix that. + +A PMC member will announce your election to the dev list soon. +``` + +### PMC member Announce Template + +```text +To: dev@hertzbeat.apache.org +[ANNOUNCE] new PMC member: `NEW_PMC_NAME` +``` + +```text +Hi HertzBeat Community, + +The Podling Project Management Committee (PMC) for Apache HertzBeat +has invited `NEW_PMC_NAME` to become our PMC member and +we are pleased to announce that he has accepted. + +### add specific details here ### + +Please join me in congratulating `NEW_PMC_NAME`! + +Being a committer enables easier contribution to the +project since there is no need to go via the patch +submission process. This should enable better productivity. +A PMC member helps manage and guide the direction of the project. + +Thanks, +On behalf of the Apache HertzBeat PMC +``` diff --git a/home/versioned_docs/version-1.9.0/community/submit-code.md b/home/versioned_docs/version-1.9.0/community/submit-code.md new file mode 100644 index 0000000000..c58670ef2f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/community/submit-code.md @@ -0,0 +1,72 @@ +--- +id: 'submit_code' +title: 'Submit Code' +sidebar_position: 2 +--- + + +* First from the remote repository [https://github.com/apache/hertzbeat.git](https://github.com/apache/hertzbeat.git) fork a copy of the code into your own repository + +* The remote dev and merge branch is `master`. + +* Clone your repository to your local + +```shell +git clone git@github.com:/hertzbeat.git +``` + +* Add remote repository address, named upstream + +```shell +git remote add upstream git@github.com:apache/hertzbeat.git +``` + +* View repository + +```shell +git remote -v +``` + +> At this time, there will be two repositories: origin (your own repository) and upstream (remote repository) + +* Get/Update remote repository code + + ```shell + git fetch upstream + ``` + +* Synchronize remote repository code to local repository + + ```shell + git checkout origin/dev + git merge --no-ff upstream/dev + ``` + +* **⚠️Note that you must create a new branch to develop features `git checkout -b feature-xxx`. It is not recommended to use the master branch for direct development** +* After modifying the code locally, submit it to your own repository: + **Note that the submission information does not contain special characters** + + ```shell + git commit -m 'commit content' + git push + ``` + +* Submit changes to the remote repository, you can see a green button "Compare & pull request" on your repository page, click it. +* Select the modified local branch and the branch you want to merge with the past, you need input the message carefully, describe doc is important as code, click "Create pull request". +* Then the community Committers will do CodeReview, and then he will discuss some details (design, implementation, performance, etc.) with you, afterward you can directly update the code in this branch according to the suggestions (no need to create a new PR). When this pr is approved, the commit will be merged into the master branch +* Finally, congratulations, you have become an official contributor to HertzBeat ! You will be added to the contributor wall, you can contact the community to obtain a contributor certificate. diff --git a/home/versioned_docs/version-1.9.0/download.md b/home/versioned_docs/version-1.9.0/download.md new file mode 100644 index 0000000000..f0fb3ed0dd --- /dev/null +++ b/home/versioned_docs/version-1.9.0/download.md @@ -0,0 +1,132 @@ +--- +id: download +title: Download Apache HertzBeat - Latest Release +sidebar_label: Download +description: Download Apache HertzBeat monitoring system - server, collector, source code, and Docker Compose packages with signatures and checksums. +--- + +## How to Download HertzBeat? + +Download the latest Apache HertzBeat™ release (v1.9.0) as server binary, collector binary, source code, or Docker Compose package. All releases include GPG signatures and SHA512 checksums for verification. + +**Latest Version:** v1.9.0 (Released: September 17, 2026) + +**Quick Download:** + +- [Server Binary](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-bin.tar.gz) +- [Collector Binary](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-1.9.0-bin.tar.gz) +- [Source Code](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-src.tar.gz) + +## Download Package Types + +| Package Type | Size | Purpose | Platform | +|-------------|------|---------|----------| +| **Server Binary** | ~364MB | Main monitoring server | Linux, macOS, Windows | +| **Collector Binary** | ~163MB | Distributed collectors | Linux, macOS, Windows | +| **Native Collector** | ~77MB | Distributed collectors, no JVM required | linux-amd64, linux-arm64, windows-amd64 | +| **Source Code** | ~3MB | Build from source | Any with Java 25+ | +| **Docker Compose** | ~45KB | Full stack deployment | Docker environments | + +:::tip Native Collector Recommendation +If you do not need external JDBC drivers from `ext-lib`, you can choose the native collector package for faster startup and lower memory usage. MySQL, MariaDB, and OceanBase are included in this native-friendly path when `mysql-connector-j` is not provided. TiDB follows the same rule for its SQL query metric set. + +Trade-offs: native packages are platform-specific and do not support runtime `ext-lib` JDBC loading. See [Native Collector Guide](start/native-collector). +::: + +:::tip Security Verification +Verify downloads using GPG signatures and SHA512 checksums. See [Apache Verification Guide](https://www.apache.org/dyn/closer.cgi#verify) and [HertzBeat KEYS](https://downloads.apache.org/hertzbeat/KEYS). +::: + +## Latest Release (Recommended) + +:::tip Security Notice +Previous releases may contain security vulnerabilities. Always use the latest version. +::: + +| Version | Date | Download | Release | +|---------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------| +| v1.9.0 | 2026.09.17 | [apache-hertzbeat-1.9.0-bin.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-bin.tar.gz) (Server) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-bin.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-bin.tar.gz.sha512) )
[apache-hertzbeat-collector-1.9.0-bin.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-1.9.0-bin.tar.gz) (Collector) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-1.9.0-bin.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-1.9.0-bin.tar.gz.sha512) )
[apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz) (Native Collector linux-amd64) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz.sha512) )
[apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz) (Native Collector linux-arm64) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-linux-arm64-bin.tar.gz.sha512) )
[apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip) (Native Collector windows-amd64) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip.sha512) )
[apache-hertzbeat-1.9.0-src.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-src.tar.gz) (Source Code) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-src.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-src.tar.gz.sha512) )
[apache-hertzbeat-1.9.0-docker-compose.tar.gz](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-docker-compose.tar.gz) (Docker Compose) ( [signature](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-docker-compose.tar.gz.asc) , [sha512](https://dlcdn.apache.org/hertzbeat/1.9.0/apache-hertzbeat-1.9.0-docker-compose.tar.gz.sha512) ) | [note](https://github.com/apache/hertzbeat/releases/tag/v1.9.0) | + +## Release Docker Image + +> Apache HertzBeat™ provides a docker image for each release. You can pull the image from the [Docker Hub](https://hub.docker.com/r/apache/hertzbeat). + +- HertzBeat [https://hub.docker.com/r/apache/hertzbeat](https://hub.docker.com/r/apache/hertzbeat) +- HertzBeat Collector [https://hub.docker.com/r/apache/hertzbeat-collector](https://hub.docker.com/r/apache/hertzbeat-collector) + +## All Archived Releases + +For older releases, please check the [archive](https://archive.apache.org/dist/incubator/hertzbeat/). + +## Download FAQ + +### Which package should I download? + +**Server Binary** - For most users. Includes the main HertzBeat monitoring server with web UI. + +**Collector Binary** - For distributed deployments. Deploy collectors in remote networks to report to the main server. +Native collector downloads are platform-specific, for example `apache-hertzbeat-collector-native-{version}-linux-amd64-bin.tar.gz` or `apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip`. + +If you are deciding between JVM and native collector packages, start with [Native Collector Guide](start/native-collector). + +**Source Code** - For developers who want to build, modify, or contribute to HertzBeat. + +**Docker Compose** - For quick all-in-one deployment with database and time-series storage. + +### How do I verify the download? + +1. Download the GPG signature (.asc) and checksum (.sha512) files +2. Verify signature: `gpg --verify apache-hertzbeat-*.tar.gz.asc apache-hertzbeat-*.tar.gz` +3. Verify checksum: `sha512sum -c apache-hertzbeat-*.tar.gz.sha512` + +Import Apache HertzBeat KEYS first: `wget https://downloads.apache.org/hertzbeat/KEYS && gpg --import KEYS` + +### What are the system requirements? + +**Server Binary Requirements:** + +- Java 25 or higher +- 4GB RAM minimum (8GB recommended) +- 2 CPU cores minimum +- 20GB disk space + +**Collector Binary Requirements:** + +- Java 25 or higher +- 2GB RAM minimum +- 1 CPU core minimum +- 5GB disk space + +Native collector packages are published per target platform, while the JVM collector package remains cross-platform. + +### Can I use Docker instead of binary packages? + +Yes. Docker is the recommended installation method: + +```bash +docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat +``` + +### How do I extract and run the binary? + +```bash +tar -xzf apache-hertzbeat-1.9.0-bin.tar.gz +cd apache-hertzbeat-1.9.0 +./bin/startup.sh +``` + +Access web UI at `http://localhost:1157` with credentials admin/hertzbeat + +### What's the difference between releases? + +Each release includes bug fixes, security patches, and new features. The release notes link in the download table details specific changes. + +**Always use the latest release** for security and stability. + +### Where can I find old versions? + +Previous versions are archived at [https://archive.apache.org/dist/incubator/hertzbeat/](https://archive.apache.org/dist/incubator/hertzbeat/) + +### How often are new versions released? + +HertzBeat follows a regular release schedule with new versions approximately every 2-3 months. Security patches may be released more frequently. diff --git a/home/versioned_docs/version-1.9.0/en/help/redis_sentinel.md b/home/versioned_docs/version-1.9.0/en/help/redis_sentinel.md new file mode 100644 index 0000000000..10b048e0f3 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/en/help/redis_sentinel.md @@ -0,0 +1,106 @@ +--- +id: redis_sentinel +title: Monitoring Redis Sentinel +sidebar_label: Redis Sentinel +keywords: [open-source monitoring system, open-source database monitoring, Redis Sentinel monitoring] +--- + +> Collect and monitor Redis Sentinel instances for key performance metrics. + +## Pre-monitoring Requirements + +> Before adding the Redis Sentinel monitor, please ensure the following: + +1. The Redis Sentinel service is running and the sentinel port (default **26379**) is accessible from the HertzBeat server. +2. If authentication is configured on the Sentinel instance, prepare the username and password. +3. No firewall rules are blocking the sentinel port between HertzBeat and the target host. + +## Configuration Parameters + +| Parameter | Parameter Help Description | +| --------- | -------------------------- | +| Target Host | The IPv4, IPv6 address or domain name of the host being monitored. Note: do not include protocol headers, e.g. `192.168.0.1`. | +| Port | The listening port of the Redis Sentinel instance. Default: **26379**. | +| Timeout | Timeout value for the connection, in milliseconds. Default: `3000`. | +| Username | The username used to authenticate with the Redis Sentinel instance. Optional. | +| Password | The password used to authenticate with the Redis Sentinel instance. Optional. | +| Collection Interval | How often HertzBeat polls this monitor, in seconds. Minimum value: 30s. | +| Description/Remarks | Additional notes and descriptions for this monitor. | + +## Collection Metrics + +### Metric Set: sentinel + +> Sentinel overview metrics collected via `INFO sentinel`. + +| Metric Name | Metric Unit | Metric Help Description | +| ----------- | ----------- | ----------------------- | +| sentinel_masters | None | Total number of Redis master nodes monitored by this Sentinel instance. | +| sentinel_tilt | None | Whether the Sentinel is currently in TILT mode (time-skew safety mode). `1` means TILT is active, `0` means normal. | +| sentinel_running_scripts | None | Number of Lua scripts currently being executed by the Sentinel. | +| sentinel_timedout_scripts | None | Number of scripts that have timed out. | +| sentinel_scripts_queue_length | None | Number of scripts currently waiting in the execution queue. | +| sentinel_simulate_failure_flags | None | Bitmask flags used for failure simulation testing (via `SENTINEL SIMULATE-FAILURE`). | + +### Metric Set: master_status + +> Status information for each monitored Redis master node. + +| Metric Name | Metric Unit | Metric Help Description | +| ----------- | ----------- | ----------------------- | +| master0 | None | Status string for the first monitored master, e.g. `name=mymaster,status=ok,address=127.0.0.1:6379,slaves=1,sentinels=3`. | +| master1 | None | Status string for the second monitored master (if present). | +| master2 | None | Status string for the third monitored master (if present). | + +### Metric Set: server + +> Server-level information for the Sentinel process, collected via `INFO server`. + +| Metric Name | Metric Unit | Metric Help Description | +| ----------- | ----------- | ----------------------- | +| redis_version | None | Version string of the Redis (Sentinel) binary. | +| os | None | Operating system on which the Sentinel is running. | +| arch_bits | None | CPU architecture (32 or 64 bits). | +| process_id | None | PID of the Sentinel server process. | +| tcp_port | None | The TCP port on which the Sentinel is listening. | +| uptime_in_seconds | s | Number of seconds since the Sentinel process started. | +| uptime_in_days | d | Number of days since the Sentinel process started. | +| hz | None | Frequency of the server's background event loop (calls per second). | +| executable | None | Absolute path to the server executable. | +| config_file | None | Absolute path to the sentinel configuration file. | + +### Metric Set: clients + +> Client connection statistics, collected via `INFO clients`. + +| Metric Name | Metric Unit | Metric Help Description | +| ----------- | ----------- | ----------------------- | +| connected_clients | None | Number of client connections currently open (excluding connections from replicas). | +| blocked_clients | None | Number of clients blocked waiting on a blocking command (e.g. BLPOP, WAIT). | +| maxclients | None | The configured maximum number of client connections allowed. | +| client_recent_max_input_buffer | None | Largest input buffer size (in bytes) seen across all current client connections. | +| client_recent_max_output_buffer | None | Largest output buffer size (in bytes) seen across all current client connections. | + +### Metric Set: stats + +> General statistics, collected via `INFO stats`. + +| Metric Name | Metric Unit | Metric Help Description | +| ----------- | ----------- | ----------------------- | +| total_connections_received | None | Total number of connections accepted by the server since startup. | +| total_commands_processed | None | Total number of commands processed by the server since startup. | +| instantaneous_ops_per_sec | None | Number of commands processed per second (real-time snapshot). | +| rejected_connections | None | Number of connections rejected because the `maxclients` limit was reached. | +| total_net_input_bytes | None | Total bytes of data received from clients since startup. | +| total_net_output_bytes | None | Total bytes of data sent to clients since startup. | + +### Metric Set: cpu + +> CPU consumption statistics, collected via `INFO cpu`. + +| Metric Name | Metric Unit | Metric Help Description | +| ----------- | ----------- | ----------------------- | +| used_cpu_sys | None | System CPU time consumed by the Sentinel server process (kernel mode). | +| used_cpu_user | None | User CPU time consumed by the Sentinel server process (user mode). | +| used_cpu_sys_children | None | System CPU time consumed by the background child processes (kernel mode). | +| used_cpu_user_children | None | User CPU time consumed by the background child processes (user mode). | diff --git a/home/versioned_docs/version-1.9.0/help/activemq.md b/home/versioned_docs/version-1.9.0/help/activemq.md new file mode 100644 index 0000000000..7c88012ca6 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/activemq.md @@ -0,0 +1,145 @@ +--- +id: activemq +title: Monitoring Apache ActiveMQ +sidebar_label: Apache ActiveMQ +keywords: [open source monitoring tool, monitoring Apache ActiveMQ metrics] +--- + +> Monitoring the running status of Apache ActiveMQ message middleware, nodes, topics and other related metrics. + +**Use Protocol: JMX** + +## Pre-monitoring Operations +> +> You need to enable the `JMX` service on ActiveMQ, HertzBeat uses the JMX protocol to collect metrics from ActiveMQ. + +1. Modify the `conf/activemq.xml` file in the installation directory to enable JMX + + > Add `userJmx="true"` attribute in `broker` tag + + ```xml + + + + ``` + +2. Modify the `bin/env` file in the installation directory, configure the JMX port IP, etc. + + The original configuration information will be as follows + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=`ACTIVEMQ_CONF`/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=`ACTIVEMQ_CONF`/jmx.access" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` + + Update to the following configuration, ⚠️ pay attention to modify `local external IP` + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=`ACTIVEMQ_CONF`/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=`ACTIVEMQ_CONF`/jmx.access" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` + +3. Restart the ACTIVEMQ service, and add the corresponding ActiveMQ monitoring in HertzBeat. The parameters use the IP port configured by JMX. + +### Configuration parameters + +| Parameter name | Parameter help description | +|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | The peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | The name that identifies this monitoring, and the name needs to be unique. | +| JMX port | The HTTP port provided by JMX, the default is 11099. | +| JMX URL | Optional, customize the JMX URL connection | +| Username | Username used for authentication | +| password | password used for authentication | +| Acquisition Interval | Interval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful | +| Description Remarks | More remark information to identify and describe this monitoring, users can remark information here | + +### Collect Metrics + +#### metrics: broker + +| Metric Name | Unit | Description | +|-------------------------|------|-----------------------------------------------------------------------| +| BrokerName | None | The name of the broker. | +| BrokerVersion | None | The version of the broker. | +| Uptime | None | Uptime of the broker. | +| UptimeMillis | ms | Uptime of the broker in milliseconds. | +| Persistent | None | Messages are synchronized to disk. | +| MemoryPercentUsage | % | Percent of memory limit used. | +| StorePercentUsage | % | Percent of store limit used. | +| TempPercentUsage | % | Percent of temp limit used. | +| CurrentConnectionsCount | None | Attribute exposed for management | +| TotalConnectionsCount | None | Attribute exposed for management | +| TotalEnqueueCount | None | Number of messages that have been sent to the broker. | +| TotalDequeueCount | None | Number of messages that have been acknowledged on the broker. | +| TotalConsumerCount | None | Number of message consumers subscribed to destinations on the broker. | +| TotalProducerCount | None | Number of message producers active on destinations on the broker. | +| TotalMessageCount | None | Number of unacknowledged messages on the broker. | +| AverageMessageSize | None | Average message size on this broker | +| MaxMessageSize | None | Max message size on this broker | +| MinMessageSize | None | Min message size on this broker | + +#### metrics: topic + +| Metric Name | Unit | Description | +|--------------------|------|-------------------------------------------------------------------------------------------| +| Name | None | Name of this destination. | +| MemoryLimit | MB | Memory limit, in bytes, used by undelivered messages before paging to temporary storage. | +| MemoryPercentUsage | None | The percentage of the memory limit used | +| ProducerCount | None | Number of producers attached to this destination | +| ConsumerCount | None | Number of consumers subscribed to this destination. | +| EnqueueCount | None | Number of messages that have been sent to the destination. | +| DequeueCount | None | Number of messages that has been acknowledged (and removed) from the destination. | +| ForwardCount | None | Number of messages that have been forwarded (to a networked broker) from the destination. | +| InFlightCount | None | Number of messages that have been dispatched to, but not acknowledged by, consumers. | +| DispatchCount | None | Number of messages that has been delivered to consumers, including those not acknowledged | +| ExpiredCount | None | Number of messages that have been expired. | +| StoreMessageSize | B | The memory size of all messages in this destination's store. | +| AverageEnqueueTime | ms | Average time a message was held on this destination. | +| MaxEnqueueTime | ms | The longest time a message was held on this destination | +| MinEnqueueTime | ms | The shortest time a message was held on this destination | +| TotalBlockedTime | ms | Total time (ms) messages have been blocked by flow control | +| AverageMessageSize | B | Average message size on this destination | +| MaxMessageSize | B | Max message size on this destination | +| MinMessageSize | B | Min message size on this destination | + +#### metrics: memory_pool + +| Metric Name | Unit | Description | +|-------------|------|--------------| +| name | | metrics name | +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### metrics: class_loading + +| Metric Name | Unit | Description | +|-----------------------|------|--------------------------| +| LoadedClassCount | | Loaded Class Count | +| TotalLoadedClassCount | | Total Loaded Class Count | +| UnloadedClassCount | | Unloaded Class Count | + +#### metrics: thread + +| Metric Name | Unit | Description | +|-------------------------|------|----------------------------| +| TotalStartedThreadCount | | Total Started Thread Count | +| ThreadCount | | Thread Count | +| PeakThreadCount | | Peak Thread Count | +| DaemonThreadCount | | Daemon Thread Count | +| CurrentThreadUserTime | ms | Current Thread User Time | +| CurrentThreadCpuTime | ms | Current Thread Cpu Time | diff --git a/home/versioned_docs/version-1.9.0/help/ai_agent.md b/home/versioned_docs/version-1.9.0/help/ai_agent.md new file mode 100644 index 0000000000..9607c5ce66 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/ai_agent.md @@ -0,0 +1,360 @@ +--- +id: ai_agent +title: HertzBeat AI Agent User Guide +sidebar_label: HertzBeat AI +keywords: [AI, Chat, Agent, Monitoring, AI Agent, OpenAI] +--- + +> HertzBeat AI Agent is an intelligent monitoring AI Agent that helps you manage monitors, configure alerts, and optimize your infrastructure monitoring through natural language conversation. + +## Overview + +The HertzBeat AI Agent feature provides an interactive chat interface where you can: + +**Monitor Management:** + +- 🔍 Query and filter existing monitors by status, type, host, and labels +- ➕ Add new monitors for websites, APIs, databases, and services +- 📊 Get detailed information about available monitor types and their parameters +- ⚡ Check monitor status and troubleshoot monitoring issues + +**Alert Management:** + +- 🚨 Query active alerts with comprehensive filtering (type, status, search) +- 📈 Get alert summary statistics and distribution +- 🔔 View both single and grouped alerts +- 📋 Analyze alert patterns and trends + +**Metrics Analysis:** + +- 📊 Retrieve real-time metrics data for any monitor +- 📈 Access historical metrics with customizable time ranges +- 💾 Check warehouse storage system status +- 🔍 Query specific metric fields and labels + +**Alert Rule Management:** + +- ⚙️ Configure alert rules and thresholds +- 📝 Manage alert definitions for different monitor types +- 🎯 Set up custom alerting criteria + +## Prerequisites + +Before using the AI Agent, ensure: + +1 **OpenAI Configuration**: Valid OpenAI API key must be configured. Optionally, you can change the model in `application.yml` under `spring.ai.openai.chat.options.model` (default is `gpt-4.1-nano`). +2 **Database Connection**: HertzBeat database must be accessible for monitor operations + +## Configuration + +### OpenAI API Key Setup + +The AI Agent uses OpenAI's GPT models. You need to configure an OpenAI API key in this ways: + +#### Database Configuration via UI + +1. Navigate to the AI Agent interface +2. If no API key is configured, you'll see a configuration dialog +3. Enter your OpenAI API key +4. Click **Save Configuration** + +### Configuration Priority + +- **Database configuration** takes priority over YAML configuration +- Configuration changes are applied immediately without restart +- Invalid API keys are automatically validated before saving + +## Using the AI Agent + +### Accessing the Chat Interface + +1. Navigate to the **AI Agent** section in HertzBeat web interface +2. You'll see the HertzBeat Monitoring AI Agent welcome screen +3. Start typing your questions in the chat input field + +### Sample Conversations + +#### Adding a New Monitor + +```text +You: Add a new HTTP monitor for my website https://example.com +AI Agent: I'll help you add an HTTP monitor for https://example.com. +Let me create that monitor with the following configuration: +- Name: example.com Website Monitor +- Type: HTTP +- Host: example.com +- Port: 443 (HTTPS) +- Path: / +- Interval: 60 seconds + +Monitor created successfully with ID: 12345 +``` + +#### Listing Existing Monitors + +```text +You: Show me all my current monitors +AI Agent: Here are your current monitors: + +1. **Linux Server** (ID: 1001) + - Status: ✅ Online + - Host: 192.168.1.100 + - Last Check: 2 minutes ago + +2. **MySQL Database** (ID: 1002) + - Status: ⚠️ Warning + - Host: db.example.com + - Last Check: 30 seconds ago + +3. **Website Monitor** (ID: 1003) + - Status: ✅ Online + - Host: https://example.com + - Last Check: 1 minute ago + +Would you like details on any specific monitor? +``` + +#### Getting Monitor Type Information + +```text +You: What parameters do I need to monitor a PostgreSQL database? +AI Agent: To monitor a PostgreSQL database, you'll need these parameters: + +**Required Parameters:** +- **Host**: Database server IP/hostname +- **Port**: PostgreSQL port (default: 5432) +- **Database**: Database name to connect to +- **Username**: Database username +- **Password**: Database password + +**Optional Parameters:** +- **Timeout**: Connection timeout (default: 6000ms) +- **Query Timeout**: SQL query timeout (default: 3000ms) +- **SSL**: Enable SSL connection (default: false) + +Would you like me to help you add a PostgreSQL monitor? +``` + +#### Alert Management + +```text +You: Show me all critical alerts from the last 24 hours +AI Agent: Here are the critical alerts from the last 24 hours: + +🚨 **Active Alerts (3 firing)** +1. **High CPU Usage** - Linux Server (ID: 1001) + - Status: 🔥 Firing + - Triggered: 2 hours ago + - Severity: Critical + - Message: CPU usage 95% > threshold 90% + +2. **Database Connection Failed** - MySQL Database (ID: 1002) + - Status: 🔥 Firing + - Triggered: 45 minutes ago + - Severity: Critical + - Message: Connection timeout after 10 seconds + +3. **Website Response Time** - Website Monitor (ID: 1003) + - Status: ⚠️ Warning + - Triggered: 15 minutes ago + - Severity: Warning + - Message: Response time 5.2s > threshold 3s + +**Alert Summary:** +- Total alerts: 12 +- Firing: 3 (2 critical, 1 warning) +- Resolved: 9 + +Would you like me to help you investigate any specific alert? +``` + +#### Metrics Analysis + +```text +You: Show me the CPU usage for my Linux server over the last 6 hours +AI Agent: Here's the CPU usage data for your Linux server (Monitor ID: 1001) over the last 6 hours: + +📊 **CPU Usage Metrics - Last 6 Hours** +``` + +Time | Usage (%) | Load Avg | Processes +14:00-15:00 | 45.2% | 1.2 | 156 +15:00-16:00 | 67.8% | 2.1 | 178 +16:00-17:00 | 89.4% | 3.8 | 195 +17:00-18:00 | 92.1% | 4.2 | 203 +18:00-19:00 | 94.7% | 4.8 | 210 +19:00-20:00 | 88.3% | 3.5 | 188 + +``` text + +**Analysis:** +- Peak usage: 94.7% at 19:00 +- Average usage: 79.6% +- Trend: High usage sustained for 3+ hours +- Current status: Decreasing (88.3%) + +**Real-time metrics:** +- Current CPU: 76.2% +- Memory usage: 82.1% +- Disk I/O: Normal + +Would you like me to check historical data for comparison or investigate the high usage cause? +``` + +#### Alert Rule Configuration + +```text +You: Set up an alert rule for when my website response time exceeds 5 seconds +AI Agent: I'll help you create an alert rule for website response time monitoring. + +**Alert Rule Configuration:** +- **Monitor Type**: HTTP/Website +- **Metric**: Response Time +- **Condition**: Greater than 5 seconds +- **Severity**: Warning +- **Evaluation**: Check every 60 seconds +- **Notification**: Email + Dashboard + +**Proposed Rule:** +```yaml +name: "Website Response Time Alert" +condition: "response_time > 5000ms" +severity: "warning" +description: "Alert when website response time exceeds 5 seconds" +evaluation_interval: 60s +for: 2m # Alert after condition persists for 2 minutes +``` + +This rule will: + +1. Monitor response time every minute +2. Trigger alert if response time > 5s for 2+ minutes +3. Send notifications via configured channels +4. Show in dashboard with warning status + +Would you like me to apply this configuration or modify any settings? + +``` text + +### Chat Features + +#### Message History + +- All conversations are automatically saved +- Access previous conversations from the sidebar +- Search through conversation history +- Export conversation logs + +#### Real-time Responses + +- Streaming responses for immediate feedback +- Typing indicators show when the assistant is processing +- Cancel ongoing requests if needed + +#### Conversation Management + +- Create new conversations for different topics +- Rename conversations for better organization +- Delete old conversations to keep things clean +Note: Conversations are not saved in the database + +## Troubleshooting + +### Common Issues + +#### Chat Interface Not Loading + +**Symptoms**: Chat interface shows loading spinner indefinitely +**Solutions**: + +1. Check browser console for JavaScript errors +2. Ensure network connectivity to HertzBeat server + +#### "Service Unavailable" Message + +**Symptoms**: Chat shows "HertzBeat AI monitoring service unavailable" +**Solutions**: +1.Verify OpenAI API key configuration +2.Check application logs for errors +3.Ensure database connectivity + +#### Invalid API Key Error + +**Symptoms**: Configuration dialog shows "Invalid API key" error +**Solutions**: + +1. Verify your OpenAI API key starts with `sk-` +2. Check API key has sufficient credits/quota +3. Test API key directly with OpenAI API +4. Ensure no extra spaces in the API key + +#### Monitor Creation Failures + +**Symptoms**: AI suggests monitor configuration but creation fails +**Solutions**: + +1. Verify you have permissions to create monitors +2. Check if monitor with same name already exists +3. Ensure target host/service is accessible +4. Review monitor parameter validation errors + +### Debug Mode + +Enable debug logging by setting log level to DEBUG for: + +```yaml +logging: + level: + org.apache.hertzbeat.ai.agent: DEBUG +``` + +## Best Practices + +### Effective Chat Usage + +1. **Be Specific**: "Add HTTP monitor for api.example.com port 8080" vs "add a monitor" +2. **Provide Context**: Mention if you want production vs test monitors +3. **Ask Follow-ups**: Request configuration details if needed +4. **Use Natural Language**: The AI understands conversational requests + +### Monitor Management + +1. **Naming Convention**: Use descriptive monitor names +2. **Documentation**: Ask the AI to document complex configurations + +### Security Considerations + +1. **API Key Security**: Store OpenAI API keys securely +2. **Access Control**: Limit AI chat access to authorized users +3. **Data Privacy**: Be mindful of sensitive information in chat logs +4. **Network Security**: Ensure secure connections to OpenAI API + +## Advanced Features + +### Bulk Operations + +```text +You: Add HTTP monitors for all services in my staging environment: +- api-staging.example.com:8080 +- web-staging.example.com:80 +- admin-staging.example.com:3000 +``` + +## Limitations + +- Requires active internet connection for OpenAI API +- OpenAI API usage incurs costs based on token consumption +- Complex multi-step operations may require multiple interactions +- Some advanced configurations may need manual setup +- Rate limiting may apply based on OpenAI plan + +## Support + +For issues with AI Agent: + +1. Check this documentation first +2. Review application logs for errors +3. Test OpenAI API connectivity independently +4. Contact HertzBeat support with specific error messages + +--- diff --git a/home/versioned_docs/version-1.9.0/help/airflow.md b/home/versioned_docs/version-1.9.0/help/airflow.md new file mode 100644 index 0000000000..e64b00f71b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/airflow.md @@ -0,0 +1,38 @@ +--- +id: airflow +title: Monitoring Apache Airflow +sidebar_label: Apache Airflow +keywords: [open source monitoring system, open source database monitoring, Apache Airflow monitoring] +--- + +> Collect and monitor general performance metrics for the Apache Airflow. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | IP address, IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ without protocol prefix (e.g., https://, http://). | +| Task Name | Name identifying this monitoring, ensuring uniqueness. | +| Port | Port number of the database exposed to the outside, default is 8080. | +| Query Timeout | Set timeout for unresponsive connections, in milliseconds (ms), default is 3000ms. | +| HTTPS | Whether to enable HTTPS. | +| Collection Interval | Interval for periodic data collection during monitoring, in seconds, with a minimum interval of 30 seconds. | +| Whether to detect | Whether to perform a probe check for monitoring availability before adding a new monitor; operations proceed if successful. | +| Description | Additional information to identify and describe this monitoring, where users can add remarks. | + +### Collection Metrics + +#### Metric Set: airflow_health + +| Metric Name | Metric Unit | Metric Description | +|--------------|-------------|--------------------| +| metadatabase | N/A | Response time | +| scheduler | N/A | scheduler health | +| triggerer | N/A | triggerer health | + +#### Metric Set: airflow_version + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|---------------------| +| value | N/A | Airflow version | +| git_version | N/A | Airflow git version | diff --git a/home/versioned_docs/version-1.9.0/help/alarm_center.md b/home/versioned_docs/version-1.9.0/help/alarm_center.md new file mode 100644 index 0000000000..5623c10827 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alarm_center.md @@ -0,0 +1,57 @@ +--- +id: alarm_center +title: Alarm Center +sidebar_label: Alarm Center +keywords: + [open-source monitoring system, alarm center, alarm management, alarm display] +--- + +> The Alarm Center serves as a comprehensive visualization platform that displays all alarms after undergoing grouping, consolidation, suppression, and silencing processes. It encompasses both internally triggered threshold-based alarms and integrated third-party notifications. + +## Alarm Sources + +The HertzBeat Alarm Center manages notifications from two primary sources: + +1. Internal Threshold-Triggered Alarms + - Generated when monitoring metrics exceed predefined thresholds + - Directly correlated with monitoring tasks and threshold rules configured within the system + - Manageable through adjustment of monitoring parameters and threshold configurations +2. Third-Party Integrated Alarms + - Received through API interfaces from external systems + - Compatible with various monitoring systems and alarm platforms + - Processed through identical workflow as internal alarms + +## Alarm Processing Mechanism + +Before appearing in the Alarm Center, all notifications undergo several processing stages: + +1. Grouping + - Categorizes related alarms based on source, type, severity, and other attributes (labels) + - Facilitates efficient management of high-volume alarms + - Supports customizable grouping rules for diverse scenarios +2. Consolidation + - Mitigates notification fatigue from multiple similar alarms within short intervals + - Presents consolidated alarms in a streamlined format, eliminating redundancy +3. Suppression + - Manages alarm dependencies + - Suppresses secondary alarms when primary alarms are triggered + - Supports configurable suppression rules based on alarm dependencies +4. Silencing + - Temporarily mutes specific alarms during designated periods + - Ideal for system maintenance windows and known issue handling + - Enables time-based silence rule configuration + +## Alarm Center Interface + +![alarm_center](/img/docs/help/alarm-center-1.png) + +The Alarm Center provides a comprehensive view of all system alarms: + +1. Alarm Display + - Lists all alarms with crucial information including status, source, labels, and timestamps + - Offers detailed view functionality for comprehensive alarm information and context +2. Search Functionality + - Enables rapid alarm identification + - Supports multiple search criteria (labels, annotations, alarm status) +3. Alarm Management + - Alarm Deletion: Removes alarms no longer requiring attention diff --git a/home/versioned_docs/version-1.9.0/help/alarm_group.md b/home/versioned_docs/version-1.9.0/help/alarm_group.md new file mode 100644 index 0000000000..8fa142979f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alarm_group.md @@ -0,0 +1,24 @@ +--- +id: alarm_group +title: Alarm Grouping +sidebar_label: Alarm Grouping +keywords: [Open source monitoring system, alarm reduce, alarm grouping] +--- + +> Group convergence supports grouping and convergence of alarms for specified packet labels, deduplication and convergence of the same repeated alarms for the time period. When the threshold rule triggers the alarm or external alarm reporting, it will enter the packet convergence to alarm grouping to deduplicate the alarm to avoid a large number of alarm messages causing alarm storms. + +## Grouping Policy Parameter Configuration + +- Strategy Name: The name that uniquely identifies the grouping policy +- Group Labels: Alarm grouping tag, support up to 10 tags + + > Tag source: monitoring, threshold rules, tags carried by external alarms + +- Wait Time: Waiting time after a new alarm is generated. The same alarms received during this time will be grouped, with a default of 30 seconds. + + > When a new (unable to join an existing group) alarm is generated, the group convergence will wait according to the `wait time`, during which time, the same alarm or the alarm that meets the grouping conditions will be grouped. The alarm after the grouping is sent to the alarm suppression module for subsequent processing until the time interval between the current time and the first alarm generation in the packet exceeds the `wait time`. + +- Interval time: The minimum time interval for sending group alarm notifications to avoid excessive alarm notifications, default 5 minutes +- Repeat interval: The minimum notification interval for repeated alarms. For continuously triggered alarms, avoid repeated notifications, default 4 hours + +**Note**: Only grouped alarms can be suppressed using suppression rules. diff --git a/home/versioned_docs/version-1.9.0/help/alarm_inhibit.md b/home/versioned_docs/version-1.9.0/help/alarm_inhibit.md new file mode 100644 index 0000000000..f0a16a94d8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alarm_inhibit.md @@ -0,0 +1,45 @@ +--- +id: alarm_inhibit +title: Alarm Inhibition +sidebar_label: Alarm Inhibition +keywords: [ Open Source Monitoring System, Alarm Convergence, Alarm Inhibition ] +--- + +> Alarm inhibition is used to configure the inhibition relationship between alarms. When an alarm occurs, other alarms can be suppressed. It can be understood as "important" alarms suppressing " +> unimportant" alarms. For example, the alarm generated by a server crash suppresses the alarms generated by other services on this server. + +## Prerequisites + +- Correctly configure the alarm grouping rule + +## Inhibit rule configuration + +- Inhibit Rule Name: The name that uniquely identifies the suppression rule + +- Source Labels: When the alarm contains these tags, the target alarm will be suppressed. Multiple tags can be added. + +> Identify the tag of the "important" alarm. The alarm tag needs to contain all source tags to suppress the alarm marked by the target tag. + +- Target Labels: Alarms matching these tags will be suppressed. + +> Identify the label of "unimportant" alarms. Alarm labels need to contain all target labels to be suppressed. + +- Equal Labels: Labels for determining alarm correlation. Supports up to 10 labels. +- Enabled: Enable or disable this inhibit rule + +## Example + +Scenario: Use HertzBeat to monitor two Centos servers 192.168.1.1, 192.168.1.2, and Redis services Redis-1 and Redis-2 deployed on the two servers. +And configure the following threshold rules: + +- Monitor Centos Linux / Monitor availability. Bind label `server-status:down` +- Monitor Redis database / Monitor availability. Bind label `redis-status:down` + +If you need to achieve that when the Centos downtime alarm is generated, the Redis alarm will no longer be generated, you can configure the following alarm suppression rules: + +- Source label: `server-status:down` +- Target label: `redis-status:down` +- Equal label: `instancehost` + +When the Centos 192.168.1.1 downtime alarm is generated, the Redis-1 unavailable alarm will no longer be generated. And at the same time, when Centos 192.168.1.2 is running normally and Redis-2 is +unavailable, the alarm notifying Redis-2 unavailable will be generated normally. diff --git a/home/versioned_docs/version-1.9.0/help/alarm_silence.md b/home/versioned_docs/version-1.9.0/help/alarm_silence.md new file mode 100644 index 0000000000..c3867ce13f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alarm_silence.md @@ -0,0 +1,29 @@ +--- +id: alarm_silence +title: Alarm Silence +sidebar_label: Alarm Silence +keywords: [ Open Source Monitoring System, Alert Silence ] +--- + +> The alert silence management allows you to configure silence policies to suppress alert notifications during specified time periods, such as during system maintenance or when you don’t want to be disturbed by alerts at night or on weekends. Alert silence rules support both one-time and periodic time periods, and can match specific alerts using labels and alert levels. + +## One-Time Time Period Silence Configuration + +- Silence Strategy Name: A unique name to identify the silence policy; +- Match All: Whether to enable this silence policy for all alerts; +- Label Match: When "Apply to All" is disabled, you can match alerts to be silenced based on specified labels; +- Silence Type: Select "One Time Silence"; +- Silence Period: After selecting "One Time Silence", the silence period configuration is shown in the following image, which can be configured as needed + ![alarm_silence](/img/docs/help/alert-silence-1-en.png) +- Enable: Enable or disable the silence policy. + +## Periodic Time Period Silence Configuration + +- Silence Strategy Name: A unique name to identify the silence policy; +- Match All: Whether to enable this silence policy for all alerts; +- Label Match: When "Apply to All" is disabled, you can match alerts to be silenced based on specified labels; +- Silence Type: Select "Periodic Silence"; +- Choose Date: After selecting "Periodic Silence", you can configure the dates when alerts should be silenced; +- Silence Period: After selecting "Periodic Silence", the silence period configuration is shown in the following image, which can be configured as needed (e.g., silencing alerts during weekends) + ![alarm_silence](/img/docs/help/alert-silence-2-en.png) +- Enable: Enable or disable the silence policy. diff --git a/home/versioned_docs/version-1.9.0/help/alert_console.md b/home/versioned_docs/version-1.9.0/help/alert_console.md new file mode 100644 index 0000000000..83515f9fcc --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_console.md @@ -0,0 +1,18 @@ +--- +id: alert_console +title: Custom console address in alarm template +sidebar_label: Console address in alarm template +--- + +> After the threshold is triggered, send the alarm information. When you notify through DingDing / enterprise Wechat / FeiShu robot or email, the alarm content has a detailed link to log in to the console. + +## Custom settings + +In our startup configuration file application.yml, find the following configuration + +```yml +alerter: + console-url: #Here is our custom console address +``` + +The default value is the official console address of HertzBeat. diff --git a/home/versioned_docs/version-1.9.0/help/alert_dingtalk.md b/home/versioned_docs/version-1.9.0/help/alert_dingtalk.md new file mode 100644 index 0000000000..fdc612c055 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_dingtalk.md @@ -0,0 +1,41 @@ +--- +id: alert_dingtalk +title: Alert DingDing robot notification +sidebar_label: Alert DingDing robot notification +keywords: [open source monitoring tool, open source alerter, open source DingDing robot notification] +--- + +> After the threshold is triggered send alarm information and notify the recipient by DingDing robot. + +## Operation steps + +1. **【DingDing desktop client】-> 【Group settings】-> 【Intelligent group assistant】-> 【Add new robot-select custom】-> 【Set robot name and avatar】-> 【Note⚠️Set custom keywords: HertzBeat】 ->【Copy its webhook address after adding successfully】** + + > Note⚠️ When adding a robot, its custom keywords need to be set in the security setting block: HertzBeat. Other security settings or the IP segment don't need to be filled in. + + ![email](/img/docs/help/alert-notice-8.png) + +2. **【Save access_token value of the WebHook address of the robot】** + + > eg: webHook address:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > Its robot access_token value is `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + +3. **【Alarm notification】->【Add new recipient】 ->【Select DingDing robot notification method】->【Set DingDing robot ACCESS_TOKEN】-> 【Confirm】** + + ![email](/img/docs/help/alert-notice-9.png) + +4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** + + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + + ![email](/img/docs/help/alert-notice-4.png) + +### DingDing robot common issues + +1. DingDing group did not receive the robot alarm notification. + + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether DingDing robot is configured with security custom keywords :HertzBeat. + > Please check whether the robot ACCESS_TOKEN is configured correctly and whether the alarm strategy association is configured. + +Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_discord.md b/home/versioned_docs/version-1.9.0/help/alert_discord.md new file mode 100644 index 0000000000..6eb18982db --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_discord.md @@ -0,0 +1,68 @@ +--- +id: alert_discord +title: Alert Discord Bot Notifications +sidebar_label: Alert Discord bot notification +keywords: [open source monitoring tool, open source alerter, open source Discord bot notification] +--- + +> Send an alarm message after the threshold is triggered, and notify the recipient through the Discord robot. + +## Steps + +### Create an application in Discord, create a robot under the application, and get the robot Token + +1. Visit [https://discord.com/developers/applications](https://discord.com/developers/applications) to create an application + + ![bot](/img/docs/help/discord-bot-1.png) + +2. Create a robot under the application and get the robot Token + + ![bot](/img/docs/help/discord-bot-2.png) + + ![bot](/img/docs/help/discord-bot-3.png) + +3. Authorize the bot to the chat server + + > Authorize the robot under the OAuth2 menu, select `bot` for `SCOPES`, `BOT PERMISSIONS` select `Send Messages` + + ![bot](/img/docs/help/discord-bot-4.png) + + > Obtain the URL generated at the bottom, and the browser accesses this URL to officially authorize the robot, that is, to set which chat server the robot will join. + +4. Check if your chat server has joined robot members + + ![bot](/img/docs/help/discord-bot-5.png) + +### Enable developer mode and get Channel ID + +1. Personal Settings -> Advanced Settings -> Enable Developer Mode + + ![bot](/img/docs/help/discord-bot-6.png) + +2. Get channel Channel ID + + > Right-click the chat channel you want to send the robot message to, click the COPY ID button to get the Channel ID + + ![bot](/img/docs/help/discord-bot-7.png) + +### Add an alarm notification person in HertzBeat, the notification method is Discord Bot + +1. **[Alarm notification] -> [Add recipient] -> [Select Discord robot notification method] -> [Set robot Token and ChannelId] -> [OK]** + + ![email](/img/docs/help/discord-bot-8.png) + +2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** + + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + + ![email](/img/docs/help/alert-notice-policy.png) + +### Discord Bot Notification FAQ + +1. Discord doesn't receive bot alert notifications + + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the robot Token and ChannelId are configured correctly, and whether the alarm policy association has been configured + > Please check whether the bot is properly authorized by the Discord chat server + +Other questions can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_email.md b/home/versioned_docs/version-1.9.0/help/alert_email.md new file mode 100644 index 0000000000..ac41cd621b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_email.md @@ -0,0 +1,33 @@ +--- +id: alert_email +title: Alert email notification +sidebar_label: Alert email notification +keywords: [open source monitoring tool, open source alerter, open source email notification] +--- + +> After the threshold is triggered send alarm information and notify the recipient by email. + +## Operation steps + +1. **【Alarm notification】->【Add new recipient】 ->【Select email notification method】** + + ![email](/img/docs/help/alert-notice-1.png) + +2. **【Get verification code】-> 【Enter email verification code】-> 【Confirm】** + ![email](/img/docs/help/alert-notice-2.png) + + ![email](/img/docs/help/alert-notice-3.png) + +3. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** + + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + + ![email](/img/docs/help/alert-notice-4.png) + +### Email notification common issues + +1. HertzBeat deployed on its own intranet cannot receive email notifications + + > HertzBeat needs to configure its own mail server. Please confirm whether you have configured its own mail server in application.yml + +Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_enterprise_wechat_app.md b/home/versioned_docs/version-1.9.0/help/alert_enterprise_wechat_app.md new file mode 100644 index 0000000000..f97bbd3bf2 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_enterprise_wechat_app.md @@ -0,0 +1,34 @@ +--- +id: alert_enterprise_wechat_app +title: Alert Enterprise Wechat App notification +sidebar_label: Alert Enterprise Wechat App notification +keywords: [open source monitoring tool, open source alerter, open source Enterprise Wechat App notification] +--- + +> After the threshold is triggered send alarm information and notify the recipient by enterprise WeChat App. + +## Operation steps + +1. **【Enterprise Wechat backstage】-> 【App Management】-> 【Create an app】-> 【Set App message】->【Copy AgentId and Secret adding successfully】** + + ![email](/img/docs/help/alert-wechat-1.jpg) + +2. **【Alarm notification】->【Add new recipient】 ->【Select Enterprise WeChat App notification method】->【Set Enterprise WeChat ID,Enterprise App ID and Enterprise App Secret 】-> 【Confirm】** + + ![email](/img/docs/help/alert-wechat-2.jpg) + +3. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** + + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + + ![email](/img/docs/help/alert-wechat-3.jpg) + +### Enterprise WeChat App common issues + +1. Enterprise WeChat App did not receive the alarm notification. + + > Please check if the user has application permissions. + > Please check if the enterprise application callback address settings are normal. + > Please check if the server IP is on the enterprise application whitelist. + +Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_feishu.md b/home/versioned_docs/version-1.9.0/help/alert_feishu.md new file mode 100644 index 0000000000..19060bdde3 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_feishu.md @@ -0,0 +1,38 @@ +--- +id: alert_feishu +title: Alert FeiShu robot notification +sidebar_label: Alert FeiShu robot notification +keywords: [open source monitoring tool, open source alerter, open source feishu bot notification] +--- + +> After the threshold is triggered send alarm information and notify the recipient by FeiShu robot. + +## Operation steps + +1. **【FeiShu client】-> 【Group settings】-> 【Bots】-> 【Add Bot】-> 【Custom Bot】 -> 【Set robot name and avatar】-> 【Copy its webhook URL after adding successfully】** + +2. **【Save the key value of the WebHook address of the robot】** + + > eg: webHook address:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + +3. **【Alarm notification】->【Add new recipient】 ->【Select FeiShu robot notification method】->【Set FeiShu robot KEY】-> 【Confirm】** + +4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** + + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + + ![email](/img/docs/help/alert-notice-4.png) + +### FeiShu robot notification common issues + +1. FeiShu group did not receive the robot alarm notification. + + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. + +2. How to @someone in alarm notification + + > In the form for adding recipients, fill in the `User ID`. If you need to @everyone, you can enter `all` in the `User ID` field. Multiple user IDs are also supported, separated by commas `,`. For detailed instructions on how to get the Feishu user ID, please refer to: [Get feishu user id](https://open.feishu.cn/document/faq/trouble-shooting/how-to-get-internal-user-id). + +Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_feishu_app.md b/home/versioned_docs/version-1.9.0/help/alert_feishu_app.md new file mode 100644 index 0000000000..026d536294 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_feishu_app.md @@ -0,0 +1,75 @@ +--- +id: alert_feishu_app +title: Alert FeiShu app notification +sidebar_label: Alert FeiShu app notification +keywords: [Alert FeiShu app notification , open source alerter, open source feishu app notification] +--- + +> After the threshold is triggered send alarm information and notify the recipient by FeiShu app. + +## Operation steps + +1. **【[FeiShu Open Platform](https://open.feishu.cn/)】->【Create Custom App】->【Create】->【Add Features:Bot】** + +2. **【Development Configuration】->【Permissions & Scopes】:Different types of notification objects require different API permissions, which can be opened as needed** + + | Permission Name | Permission code | Designated User | Designated Group Chat | Designated Department | All User | + |-----------------------------------------------------------------|-----------------------------------|:---------------:|:---------------------:|:---------------------:|:--------:| + | Obtain user ID | contact:user.employee_id:readonly | ✓ | | | ✓ | + | Send messages as an app | im:message:send_as_bot | ✓ | ✓ | ✓ | ✓ | + | Obtain employee information in FeiShu CoreHR (Standard version) | ehr:employee:readonly | | | | ✓ | + | Send batch messages to members from one or more departments | im:message:send_multi_depts | | | ✓ | | + | Send batch messages to multiple users | im:message:send_multi_users | | | | ✓ | + + > Attention⚠️:In the designated notification type of group chat,the application needs to be added as a robot to the group chat, to @someone, you need to enable the permission to 'obtain user ID' + > + > Batch import scopes + > + > ```json + > { + > "scopes": { + > "tenant": [ + > "contact:user.employee_id:readonly", + > "im:message:send_as_bot", + > "ehr:employee:readonly", + > "im:message:send_multi_depts", + > "im:message:send_multi_users" + > ], + > "user": [] + > } + > } + > ``` + +3. **【App Versions】->【Version Management & Release】->【Create a version】->【Save】->【Publish】** + +4. **【Basic Info】->【Credentials & Basic Info】->【copy and save AppID and AppSecret】** + +5. **【Notice Receiver】->【New Receiver】 ->【Choose FeiShu App method】->【Set AppID and AppSecret】-> 【Select Notice Object Type】-> 【Set the corresponding ID】** + +6. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** + + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + + ![email](/img/docs/help/alert-notice-4.png) + +### FeiShu app notification common issues + +1. FeiShu app did not receive the robot alarm notification. + + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the AppID and AppSecret is configured correctly and whether the alarm strategy association is configured. + > Please check if the user was within the available range when the application was published. + +2. How to @someone in a designated group chat + + > In the form for adding recipients, fill in the `User ID`. If you need to @everyone, you can enter `all` in the `User ID` field. Multiple user IDs are also supported, separated by commas `,`. For detailed instructions on how to get the FeiShu user ID, please refer to: [Get FeiShu user id](https://open.feishu.cn/document/faq/trouble-shooting/how-to-obtain-user-id#529e21a9) + +3. How to obtain a chat ID + + > Please refer to: [Chat ID description](https://open.feishu.cn/document/server-docs/group/chat/chat-id-description#394516c9) + +4. How to obtain party ID + + > Please refer to: [Department resource introduction](https://open.feishu.cn/document/server-docs/contact-v3/department/field-overview#9c02ed7a) + +Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_integration.md b/home/versioned_docs/version-1.9.0/help/alert_integration.md new file mode 100644 index 0000000000..d83638617e --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_integration.md @@ -0,0 +1,38 @@ +--- +id: alert_integration +title: Alert Integration +sidebar_label: Alert Integration +keywords: + [ + open-source monitoring, + alert integration, + alert management, + multi-source alerts, + ] +--- + +> The alert integration module of HertzBeat is designed to achieve unified reception, standardized processing, and intelligent dispatching of alerts from various third-party monitoring and observability platforms. As a centralized "Alert Center," HertzBeat efficiently ingests external alert information and applies flexible alert management strategies. + +## Core Capabilities + +- **Multi-Source Alert Ingestion**: Supports receiving alert messages from major platforms such as Webhook, Prometheus, Alertmanager, SkyWalking, and Tencent Cloud. +- **Alert Format Standardization**: Converts alerts from different platforms into a unified internal format within HertzBeat for easier processing. +- **Comprehensive Alert Processing Mechanisms**, including: + - **Grouping and Convergence**: Manage alerts by grouping them based on labels and deduplicate repeated alerts within a specific time window. + - **Inhibition**: Automatically suppresses secondary alerts when specific conditions are met. + - **Silencing**: Temporarily disables alert notifications during system maintenance or known issues to avoid unnecessary noise. + +### Supported Alert Sources + +HertzBeat currently supports alert integration from the following third-party monitoring platforms: + +- **Webhook**: A generic integration method supporting customized alert format push. +- **Prometheus**: You can configure HertzBeat’s service address directly in the Prometheus Server's Alertmanager configuration, allowing HertzBeat to replace Alertmanager for receiving and handling Prometheus Server alerts. +- **Alertmanager**: Supports forwarding alerts from Prometheus AlertManager to the HertzBeat alert platform. +- **SkyWalking**: Sends SkyWalking alerts to the HertzBeat alert platform via Webhook. +- **Tencent Cloud Monitoring**: Sends Tencent Cloud alerts to the HertzBeat alert platform via Webhook. +- **And more**:HertzBeat is actively expanding its integration support. If the integration you need is not yet available, the community is actively contributing and can assist in adding it. + +You can view the detailed integration methods and configuration examples through the "Integration" interface in HertzBeat. + +![integration](/img/docs/help/alert_integration_en.png) diff --git a/home/versioned_docs/version-1.9.0/help/alert_notification_template.md b/home/versioned_docs/version-1.9.0/help/alert_notification_template.md new file mode 100644 index 0000000000..f11235ffac --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_notification_template.md @@ -0,0 +1,124 @@ +--- +id: alert_notification_template +title: Notification Template +sidebar_label: Notification Template +keywords: [Template, Alert Template, Alarm Template, Notification Template, Message Notification, Alert Webhook Callback Notification] +--- + +> HertzBeat supports custom notification templates. Templates use placeholder variables for rendering, and the system automatically replaces variables with actual alert data during push notifications. + +## Template Configuration + +【Notification】->【Notice Template】->【Template Configuration】 + +![Template Configuration](/img/docs/help/alert-notification-template-1-en.png) + +## Template Rendering + +HertzBeat notification templates are based on FreeMarker syntax, supporting variable placeholders, conditional judgments, loops, formatting, and other advanced features. During template rendering, the system injects alert data objects (e.g., GroupAlert, SingleAlert) into the template, and variables are automatically replaced with actual values. + +## Available Variables and Data Structures + +### GroupAlert Structure Fields + +[GroupAlert Definition](https://github.com/apache/hertzbeat/blob/master/hertzbeat-common-spring/src/main/java/org/apache/hertzbeat/common/entity/alerter/GroupAlert.java) + +- `id`:Primary key of the alert group +- `groupKey`: Unique identifier for the group +- `status`:Group status (e.g., firing, resolved) +- `groupLabels`:Group labels (Map) +- `commonLabels`:Common labels (Map) +- `commonAnnotations`:Common annotations (Map) +- `alertFingerprints`:List of alert fingerprints +- `creator`、`modifier`、`gmtCreate`、`gmtUpdate`:Metadata +- `alerts`:List of alert details (`List`) + +### SingleAlert Structure Fields + +[SingleAlert Definition](https://github.com/apache/hertzbeat/blob/master/hertzbeat-common-spring/src/main/java/org/apache/hertzbeat/common/entity/alerter/SingleAlert.java) + +- `id`:Primary key of the detail +- `fingerprint`:Unique fingerprint +- `labels`:Labels (Map) +- `annotations`:Annotations (Map) +- `content`:Alert content +- `status`:Status (firing|resolved) +- `triggerTimes`:Number of triggers +- `startAt`、`activeAt`、`endAt`:Timestamps +- `creator`、`modifier`、`gmtCreate`、`gmtUpdate`:Metadata + +## Template Variables and Syntax Explanation + +- **Global Variables**: + - ``status``:Alert status (e.g., alert, recovery, etc.) + - ``groupKey``:Unique identifier for the group + - `${commonLabels.xxx}`、`${commonAnnotations.xxx}`:Common labels and annotations, accessed via `xxx` + +- **Alert Details List**: + - ``alerts``:Collection of alert details, usually traversed with `<#list alerts as alert>` + - `${alert.labels.xxx}`、`${alert.annotations.xxx}`:Labels and annotations for a single alert + - `${alert.content}`:Alert content + - `${alert.triggerTimes}`:Number of triggers + - `${alert.startAt}`:First trigger time + +- **Template Syntax Support**: + - Supports FreeMarker syntax, including conditional statements `<#if>`, loops `<#list>`, JSON stringification `?json_string`, time formatting `?number_to_datetime`, string formatting `?string('yyyy-MM-dd HH:mm:ss')`, etc. + - Allows flexible combination of variables and template syntax to achieve complex message customization. + - For more syntax, refer to the [FreeMarker Documentation](https://freemarker.apache.org/) + +## Template Example + +```json +{ + "title": "🔔 HertzBeat Alert Notification", + "status": "${status!"UNKNOWN"}", + "commonLabels": { + <#if commonLabels?? && commonLabels.severity??> + "severity": "${commonLabels.severity?switch("critical", "❤️ Critical", "warning", "💛 Warning", "info", "💚 Info", "Unknown")}"<#if commonLabels.alertname??>, + + <#if commonLabels?? && commonLabels.alertname??> + "alertName": "${commonLabels.alertname}" + + }, + "alerts": [ + <#if alerts?? && alerts?size gt 0> + <#list alerts as alert> + { + "index": ${alert?index + 1}, + "labels": { + <#if alert.labels?? && alert.labels?size gt 0> + <#list alert.labels?keys as key> + "`key`": "${alert.labels[key]?json_string}"<#if key?has_next>, + + + }, + <#if alert.content?? && alert.content != ""> + "content": "${alert.content?json_string}", + + "triggerTimes": ${alert.triggerTimes!0}, + "startAt": "${((alert.startAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}", + <#if alert.activeAt?? && alert.activeAt gt 0> + "activeAt": "${((alert.activeAt!0)?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}", + + <#if alert.endAt?? && alert.endAt gt 0> + "endAt": "${(alert.endAt?number_to_datetime)?string('yyyy-MM-dd HH:mm:ss')}"<#if alert.annotations?? && alert.annotations?size gt 0>, + + <#if alert.annotations?? && alert.annotations?size gt 0> + "annotations": { + <#list alert.annotations?keys as key> + "`key`": "${alert.annotations[key]?json_string}"<#if key?has_next>, + + } + + }<#if alert?has_next>, + + + ], + "commonAnnotations": { + <#if commonAnnotations?? && commonAnnotations?size gt 0> + <#list commonAnnotations?keys as key> + "`key`": "${commonAnnotations[key]?json_string}"<#if key?has_next>, + + + } +} diff --git a/home/versioned_docs/version-1.9.0/help/alert_slack.md b/home/versioned_docs/version-1.9.0/help/alert_slack.md new file mode 100644 index 0000000000..7b5c395c72 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_slack.md @@ -0,0 +1,35 @@ +--- +id: alert_slack +title: Alert Slack Webhook Notifications +sidebar_label: Alert Slack Webhook Notification +keywords: [open source monitoring tool, open source alerter, open source slack webhook notification] +--- + +> Send an alarm message after the threshold is triggered, and notify the recipient through the Slack Webhook. + +## Steps + +### Open Webhook in Slack, get Webhook URL + +Refer to the official website document [Sending messages using Incoming Webhooks](https://api.slack.com/messaging/webhooks) + +### Add an alarm notifier to HertzBeat, and the notification method is Slack Webhook + +1. **【Alarm Notification】->【Add Recipient】->【Select Slack Webhook Notification Method】->【Set Webhook URL】-> 【OK】** + + ![email](/img/docs/help/slack-bot-1.png) + +2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** + + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + + ![email](/img/docs/help/alert-notice-policy.png) + +### Slack Notification FAQ + +1. Slack did not receive the robot warning notification + + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the slack webhook url are configured correctly, and whether the alarm policy association has been configured + +Other questions can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_smn.md b/home/versioned_docs/version-1.9.0/help/alert_smn.md new file mode 100644 index 0000000000..b85176992a --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_smn.md @@ -0,0 +1,43 @@ +--- +id: alert_smn +title: Alert Huawei Cloud SMN Notifications +sidebar_label: Alert Huawei Cloud SMN Notifications +keywords: [ open source monitoring tool, open source alerter, open source Huawei Cloud SMN notification ] +--- + +> Send an alarm message after the threshold is triggered, and notify the recipient through the Huawei Cloud SMN. + +## 操作步骤 + +1. **According to [Huawei Cloud SMN Official Document](https://support.huaweicloud.com/qs-smn/smn_json.html) activate the SMN service and configure SMN** + + ![alert-notice-10](/img/docs/help/alert-notice-10.png) + +2. **Save topic URN for SMN** + + ![alert-notice-11](/img/docs/help/alert-notice-11.png) + +3. **According to [Huawei Cloud Signature Document](https://support.huaweicloud.com/devg-apisign/api-sign-provide.html) obtain AK, SK, and project ID** + + ![alert-notice-12](/img/docs/help/alert-notice-12.png) + + ![alert-notice-13](/img/docs/help/alert-notice-13.png) + +4. **【Alarm Notification】->【Add Recipient】->【Select Slack Webhook Notification Method】->【Set Huawei Cloud SMN AK, SK and other configurations】-> 【OK】** + + ![alert-notice-14](/img/docs/help/alert-notice-14.png) + +5. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** + + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + + ![email](/img/docs/help/alert-notice-4.png) + +### Huawei Cloud SMN Notification FAQ + +1. Huawei Cloud SMN did not receive the robot warning notification + + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the Huawei Cloud SMN AK, SK and other configurations are configured correctly, and whether the alarm policy association has been configured + +Other questions can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_sms.md b/home/versioned_docs/version-1.9.0/help/alert_sms.md new file mode 100644 index 0000000000..7c2ba190dc --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_sms.md @@ -0,0 +1,282 @@ +--- +id: alert_sms +title: Alert SMS notification +sidebar_label: Alert SMS notification +keywords: [open source monitoring tool, open source alerter, open source SMS alert notification] +--- + +> After the threshold is triggered send alarm information and notify the recipient by SMS. + +## SMS Service Configuration + +Only when you successfully configure your own SMS service will the alert SMS triggered within the monitoring system be sent correctly. +HertzBeat provides two ways to configure the SMS service: modifying the `application.yml` configuration file directly or configuring it through the HertzBeat frontend interface (Settings > Message Server Setting). + +> ⚠️ Note: Only one method can be effective at a time. If both methods are configured and enabled, HertzBeat will prioritize the SMS service configured in the frontend interface. + +### Tencent Cloud SMS Configuration + +Add/Fill in the following Tencent Cloud SMS server configuration to `application.yml` (replace parameters with your own SMS server configuration): + +```yaml +alerter: + sms: + enable: true # Whether to enable + type: tencent # SMS provider type, supports "tencent" + tencent: # Tencent Cloud SMS configuration + secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY + secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA + app-id: 1435441637 + sign-name: HertzBeat + template-id: 1343434 +``` + +1. Create a signature (sign-name) in Tencent Cloud SMS + ![image](/img/docs/help/alert-sms-tencent-cloud-signature.png) + +2. Create a message template (template-id) in Tencent Cloud SMS + + ```text + Monitor: {1}, Alert Level: {2}. Content: {3} + ``` + + ![image](/img/docs/help/alert-sms-tencent-cloud-template.png) + +3. Create an application (app-id) in Tencent Cloud SMS + ![image](/img/docs/help/alert-sms-tencent-cloud-app.png) + +4. Obtain Tencent Cloud Access Management credentials (secret-id, secret-key) + ![image](/img/docs/help/alert-sms-tencent-cloud-access.png) + +### Alibaba Cloud SMS Configuration + +To activate and use Alibaba Cloud SMS service, you can refer to the official Alibaba Cloud documentation: [SMS Getting Started Guide](https://help.aliyun.com/zh/sms/getting-started/get-started-with-sms) + +You can configure the Alibaba Cloud SMS service either through the graphical interface or in the `application.yml` file. +To use `application.yml`, add/fill in the following Alibaba Cloud SMS configuration (replace parameters with your own SMS server configuration): + +```yaml +alerter: + sms: + enable: true # Whether to enable + type: alibaba # SMS provider type, supports "alibaba" + alibaba: # Alibaba Cloud SMS configuration + access-key-id: # Your AccessKey ID + access-key-secret: # Your AccessKey Secret + sign-name: # SMS signature + template-code: # SMS template code +``` + +1. Create an Alibaba Cloud account and activate SMS service + - Visit [Alibaba Cloud SMS Console](https://dysms.console.aliyun.com/) + - Activate SMS service + +2. Create a signature (sign-name) + - Log in to [SMS Console](https://dysms.console.aliyun.com/) + - Select Domestic/International SMS service + - Go to "Signature Management" page and click "Add Signature" + - Fill in signature information and submit for review + - Wait for signature approval + +3. Create a message template (template-code) + - Go to "Template Management" page + - Click "Add Template" + - Create a template with the following content (Aliyun placeholders use the `${...}` syntax, and the template must declare exactly these three variables — no more, no less — otherwise sending fails with a "template variable/placeholder mismatch" error): + + ```text + Monitor: ${instance}, Alert Level: ${priority}. Content: ${content} + ``` + + - Submit the template for review + +4. Obtain Access Key credentials (access-key-id, access-key-secret) + :::tip + Alibaba Cloud officially recommends using RAM user AccessKey with minimal permissions. + ::: + - [Go to RAM Access Control](https://ram.console.aliyun.com/users) to manage RAM users + - Create user and select "Access Key for API Access" + - Securely save the AccessKey ID and AccessKey Secret + - Grant SMS service permission "AliyunDysmsFullAccess" to the user + +Now you can configure this information in your hertzbeat application. + +### UniSMS Configuration + +UniSMS is an aggregated SMS service platform. You can refer to [UniSMS Documentation](https://unisms.apistd.com/docs/tutorials) for configuration. + +Add/Fill in the following UniSMS configuration to `application.yml` (replace parameters with your own SMS server configuration): + +```yaml +alerter: + sms: + enable: true # Whether to enable + type: unisms # SMS provider type, set to unisms + unisms: # UniSMS configuration + # auth-mode: simple or hmac + auth-mode: simple + access-key-id: YOUR_ACCESS_KEY_ID + # hmac mode need to fill in access-key-secret + access-key-secret: YOUR_ACCESS_KEY_SECRET + signature: YOUR_SMS_SIGNATURE + template-id: YOUR_TEMPLATE_ID +``` + +1. Register UniSMS account + - Visit [UniSMS website](https://unisms.apistd.com/) + +2. Create signature + - Log in to [UniSMS Console](https://unisms.apistd.com/console/) + - Go to "SMS Filing - Signature Management" page + - Click "Add Signature" + - Fill in signature information and submit for review + - Wait for signature approval + +3. Create message template + - Go to "SMS Filing - Template Management" page + - Click "Add Template" + - Create a template with the following format: + + ```text + Monitor: {instance}, Alert Level: {priority}. Content: {content} + ``` + + - Submit the template for review + +4. Obtain `access-key-id` and `access-key-secret` + - Log in to [UniSMS Console](https://unisms.apistd.com/console/) + - Go to "Credential Management" page + - Get AccessKey ID and AccessKey Secret + - Securely save the AccessKey ID and AccessKey Secret + + :::note + UniSMS provides two authentication methods for developers to choose from, which can be set in Console - Credential Management, with Simple Mode as default. + - Simple Mode [Default]: This mode only verifies AccessKey ID without request parameter signature, making it easier for developers to integrate quickly. + - HMAC Mode: This mode requires signing request parameters with AccessKey Secret to enhance the security and authenticity of requests. + ::: + +Now you can configure this information in your hertzbeat application. + +### Smslocal SMS Configuration + +SMSLocal is an all-in-one SMS service for businesses, with features like multi-way sending, strong security, and 24/7 support. You can refer to smslocal's [Developer Documentation](https://www.smslocal.com/developer/) for configuration. + +Add/Fill in the following Smslocal configuration to `application.yml` (replace parameters with your own SMS server configuration): + +```yaml +alerter: + sms: + enable: true # Whether to enable + type: smslocal # SMS provider type, set to smslocal + smslocal: # Smslocal configuration + api-key: YOUR_API_KEY_HERE +``` + +1. Register smslocal account + - Visit [Smslocal Website](https://www.smslocal.com/) + +2. Obtain `api-key` + - Log in to [Smslocal Api Access](https://secure.smslocal.com/cpaas/pages/profile/settings/api-reference) + - Go to "API Access" page + - Click the eye button + - Copy the displayed access key + - Then you can configure the `application.yml` file + +Now you can configure this information in your hertzbeat application. + +### AWS Cloud SMS Configuration + +To activate and use the AWS Cloud SMS service, refer to the official AWS documentation: [SMS Getting Started Guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/what-is-sms-mms.html) + +You can configure the AWS Cloud SMS service either through the graphical interface or in the `application.yml` file. +To use `application.yml`, add/fill in the following AWS Cloud SMS configuration (replace parameters with your own SMS server configuration): + +```yaml +alerter: + sms: + enable: true # Whether to enable + type: aws # SMS provider type, supports "aws" + aws: # AWS Cloud SMS configuration + access-key-id: # Your AccessKey ID + access-key-secret: # Your AccessKey Secret + region: # Region Of Your AWS +``` + +1. Create an AWS Cloud account + - If you don’t already have an AWS account, sign up at [AWS Cloud SMS Console](https://aws.amazon.com/console/) + +2. Obtain Access Key credentials (access-key-id, access-key-secret) + - Go to the AWS IAM (Identity and Access Management) Console. + - Create an IAM user with programmatic access and attach the necessary permissions. + - Retrieve your Access Key ID and Secret Access Key (You will need these for configuration). + +3. Select a Specific AWS Region for SMS Messaging + - Choose a region that supports AWS End User Messaging (SMS Service). + - You can check the supported regions [guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html). + +4. Move from the AWS SMS Sandbox to Production + - By default, AWS SMS operates in sandbox mode, which restricts SMS delivery to verified phone numbers. + To send messages to any number, you must move your account to production mode. follow this [guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/sandbox.html#sandbox-sms-move-to-production) + +5. Verify Destination Phone Numbers (for Sandbox Mode) + - if you are still in sandbox mode, you can only send SMS messages to verified phone numbers. To add a verified number, follow this [guide](https://docs.aws.amazon.com/sms-voice/latest/userguide/verify-destination-phone-number.html) + - Note: You do not need to create an Origination Identity or Origination Simulator—just use the AWS CLI to add verified phone numbers. + + > The message template is fixed as follows: "Instance: {}, Priority: {}, Content: {}" + + Now you can configure this information in your hertzbeat application. + +### Twilio SMS Configuration + +To activate and use the Twilio SMS service, refer to the official Twilio documentation: [SMS Getting Started Guide](https://www.twilio.com/docs/sms/quickstart) + +You can configure the Twilio SMS service either through the graphical interface or in the `application.yml` file. +To use `application.yml`, add/fill in the following Twilio SMS configuration (replace parameters with your own SMS server configuration): + +```yaml +alerter: + sms: + enable: true # Whether to enable + type: twilio # SMS provider type, supports "twilio" + twilio: # Twilio SMS configuration + account-sid: # Your Twilio Account SID + auth-token: # Your Twilio Auth Token + twilio-phone-number: # Your Twilio Phone Number +``` + +1. Create a Twilio account + + - If you don't have a Twilio account, sign up at [Twilio Console](https://www.twilio.com/console) + - You'll get a free trial account that allows you to test the SMS service + +2. Obtain Twilio credentials + + - After signing in, locate your Account SID and Auth Token on the dashboard + - These credentials will be used to authenticate API requests + +3. Get a Twilio Phone Number + + - In the Twilio Console, navigate to "Phone Numbers" > "Manage" > "Active Numbers" + - Click "Buy a Number" or use the trial number provided by Twilio + - Make sure the number has SMS capabilities enabled + - This number will be used as the sender for your SMS alerts + - A phone number is required for the Twilio SMS service to work + +4. Testing Your Configuration on Twilio + + - Twilio provides a sandbox environment for testing + - If you are in the trial period, you will only be able to send SMS to verified phone numbers + - To verify a phone number, add it to your verified phone numbers list in the Twilio Console + + > The message follows the format: "Instance: {}, Priority: {}, Content: {}" + + This information can be configured in the HertzBeat application. + +## Operation steps + +1. **【Alarm notification】->【Add new recipient】 ->【Select SMS notification method】** + +2. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** + + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + +If you have any issues, please provide feedback through the communication group or ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_telegram.md b/home/versioned_docs/version-1.9.0/help/alert_telegram.md new file mode 100644 index 0000000000..f2923b847f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_telegram.md @@ -0,0 +1,65 @@ +--- +id: alert_telegram +title: Alert Telegram Bot Notification +sidebar_label: Alert Telegram bot notification +keywords: [open source monitoring tool, open source alerter, open source Telegram bot notification] +--- + +> Send an alarm message after the threshold is triggered, and notify the recipient through the Telegram robot. + +## Steps + +### Create a bot in Telegram, get Bot Token and UserId + +1. Use [@BotFather](https://t.me/BotFather) to create your own bot and get an access token `Token` + + ![telegram-bot](/img/docs/help/telegram-bot-1.png) + +2. Get the `User ID` of the recipient + + **Use the recipient account you want to notify to send a message to the newly created Bot account**, + Visit ```https://api.telegram.org/bot``/getUpdates```, **`use the Bot Token from the previous step to replace the `**, and respond to the first in the `Json` data A `result.message.from.id` value is the recipient's `User ID` + + ```json + { + "ok": true, + "result": [ + { + "update_id": 632299191, + "message": { + "from":{ + "id": "User ID" + }, + "chat":{ + }, + "date": 1673858065, + "text": "111" + } + } + ] + } + ``` + +3. Record and save the `Token` and `User Id` we got + +### Add an alarm notification person to HertzBeat, the notification method is Telegram Bot + +1. **【Alarm Notification】->【Add Recipient】->【Select Telegram Robot Notification Method】->【Set Robot Token and UserId】-> 【OK】** + + ![email](/img/docs/help/telegram-bot-2.png) + +2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** + + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + + ![email](/img/docs/help/alert-notice-policy.png) + +### Telegram Bot Notification FAQ + +1. Telegram did not receive the robot warning notification + + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the robot Token and UserId are configured correctly, and whether the alarm policy association has been configured + > UserId should be the UserId of the recipient of the message + +Other questions can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_threshold.md b/home/versioned_docs/version-1.9.0/help/alert_threshold.md new file mode 100644 index 0000000000..be8e90bc5f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_threshold.md @@ -0,0 +1,198 @@ +--- +id: alert_threshold +title: Alarm Threshold Configuration +sidebar_label: Alarm Threshold +--- + +:::tip +Alarm Threshold are the core function of `HertzBeat`, users can configure the trigger conditions of the alarm through the threshold rules. +Threshold rules support real-time threshold and scheduled threshold, and can be applied to **monitoring metrics** and **log data** data types. Real-time thresholds can directly trigger alerts when monitoring data is collected, and scheduled thresholds support PromQL, SQL and other expressions to calculate trigger alerts within a specified time period. +Support visual page configuration or more flexible expression rule configuration, support configuring trigger times, alarm levels, notification templates, associated specified monitoring and so on. Notification templates support object nested access, which can display alarm information more flexibly. +::: + +![threshold](/img/docs/help/alert-threshold-1.png) + +## Real-time Threshold + +> Real-time threshold means that the alarm is triggered directly when the monitoring data is collected, which is suitable for scenarios with high real-time requirements. Supports both monitoring metrics and log data types. + +### Creating Real-time Threshold Rules + +> System Page -> Alerting -> Alert Threshold -> New Threshold -> Select Real-time Threshold -> Select Data Type (Monitoring Metrics/Log Data) + +#### Monitoring Metrics Real-time Threshold + +> HertzBeat Page -> Alerting -> Threshold -> New Threshold -> ReadTime Threshold Rule + +Configure the threshold, for example: Select the SSL certificate metric object, configure the alarm expression-triggered when the metric `expired` is `true`, that is, `equals(expired,"true")`, set the alarm level notification template information, etc. + +![HertzBeat](/img/docs/start/ssl_5.png) + +Configuration item details: + +- **Threshold Name**: Unique name defining this threshold rule +- **Data Type**: Select monitoring metrics or log data +- **Metric Object**: Select the monitoring metric object for which we need to configure the threshold. For example: Under website monitoring type -> response time metric +- **Threshold Rule**: Configure the alarm trigger rules for specific indicators, support graphical interface and expression rules. For expression environment variables and operators, see the page prompts. For detailed help on threshold expressions, see [Threshold Expression Help](alert_threshold_expr) +- **Associated Monitors**: Apply this threshold rule to the specified monitoring object (support direct binding and label association). If not configured, it will be applied to all monitoring objects that meet this threshold type rule +- **Alert Level**: The alert level triggered by the threshold, from low to high: warning, critical, emergency +- **Trigger Count**: Set how many times the threshold must be triggered before the alert is actually triggered +- **Notification Template**: The template for the notification message sent after the alert is triggered. Template variables are provided on the page, supports object nested access. For example: `__instancename__`, metric value is `responseTime`, which is greater than 50 triggering the alert, also supports accessing object properties like `${log.attributes.hostname}` +- **Additional Labels**: Add labels to this threshold rule. When an alert is generated, these labels will also be attached to the alert +- **Additional Annotations**: Add annotation information to this threshold rule (the annotation content supports environment variables). When an alarm is generated, this annotation information will be rendered and attached to the alarm +- **Enable Alert**: Enable or disable this alert threshold configuration + +#### Log Data Real-time Threshold + +Configure real-time alert rules for log data, supporting condition judgment on log content, attributes, resource information, etc. + +For example, trigger an alert when 60 error logs are received within 300 seconds. + +![log_realtime](/img/docs/help/alert-threshold-3.png) + +Configuration item details: + +- **Threshold Name**: Unique name defining this threshold rule +- **Data Type**: Select log data +- **Threshold Rule**: Configure log alert trigger rules, support graphical interface and expression rules: + - **Graphical Interface**: Visual configuration of log field conditions, supports `log.level`, `log.message`, `log.attributes.*`, `log.resource.*` and other fields + - **Expression Rules**: Use custom expressions, supports object nested access, for example: `equals(log.level,"ERROR")` or `contains(log.attributes.hostname,"server-01")` +- **Time Window**: Set the time window for log aggregation, in seconds, minimum 60 seconds. Logs within this time window will be aggregated and processed +- **Alert Level**: The alert level triggered by the threshold, from low to high: warning, critical, emergency +- **Alert Mode**: Select alert sending method: + - **Window Group Mode (group)**: Send all logs that meet the conditions within the time window as one alert + - **Individual Mode (individual)**: Send each log that meets the conditions as a separate alert +- **Trigger Count**: Set how many logs that meet the conditions within the time window will trigger the alert +- **Notification Template**: The template for the notification message sent after the alert is triggered, supports object nested access: + - Basic variables: ``__instancename__``, ``__alertname__``, etc. + - Log fields: `${log.level}`, `${log.message}`, `${log.timestamp}`, etc. + - Nested attributes: `${log.attributes.hostname}`, `${log.resource.service.name}`, etc. +- **Additional Labels**: Add labels to this threshold rule. When an alert is generated, these labels will also be attached to the alert +- **Additional Annotations**: Add annotation information to this threshold rule (the annotation content supports environment variables). When an alarm is generated, this annotation information will be rendered and attached to the alarm +- **Enable Alert**: Enable or disable this alert threshold configuration + +**The threshold alert configuration is complete, and alerts that have been successfully triggered can be viewed in the [Alarm Center].** +**If you need to send alert notifications via email, WeChat, DingTalk, or Feishu, you can configure it in [Notification].** + +## Scheduled Threshold + +> **Scheduled Threshold Rules** refer to rules where the system evaluates an expression (such as PromQL, SQL) at specified periodic intervals to determine whether monitoring data or log data within a given time range meets alert conditions. These rules are suitable for scenarios requiring trend analysis or aggregated data evaluation, rather than immediate reactions to single real-time data points. Supports both monitoring metrics and log data types. + +### Syntax for Scheduled Threshold Expressions + +Scheduled threshold rules use a dedicated expression language based on ANTLR syntax, supporting different query syntax based on data type: + +#### Monitoring Metrics Expression Syntax (PromQL) + +Supports PromQL-style queries. For specific syntax, please refer to the official documentation of your configured time-series database regarding PromQL. The syntax includes: + +1. **Query Expressions**: Used to reference monitoring data + + ```text + cpu_usage + memory{__field__="field1"} + ``` + +2. **Comparison Expressions**: Used to compare values against thresholds + + ```text + cpu_usage > 80 + memory_usage >= 90.5 + response_time < 1000 + ``` + +3. **Logical Expressions**: Used to combine multiple conditions + + ```text + cpu_usage > 80 and memory_usage > 70 + disk_usage > 90 or inode_usage > 85 + cpu_usage > 80 unless maintenance_mode == 1 + ``` + +4. **Parenthesis Expressions**: Used to control the order of evaluation + + ```text + (cpu_usage > 80 or memory_usage > 90) and service_status == 1 + ``` + +#### Log Data Expression Syntax (SQL) + +Supports standard SQL syntax to query log data and filter data, allowing aggregated queries on log tables: + +```sql +-- Query error log count +SELECT COUNT(*) as error_count +FROM hertzbeat_logs +WHERE level = 'ERROR' +AND timestamp >= NOW() - INTERVAL 5 MINUTE + +-- Group by service to count errors +SELECT service_name, COUNT(*) as error_count +FROM hertzbeat_logs +WHERE level = 'ERROR' +GROUP BY service_name +HAVING COUNT(*) > 10 +``` + +### Creating Scheduled Threshold Rules + +> System Page -> Alerting -> Alert Threshold -> New Threshold -> Select Scheduled Threshold -> Select Data Type (Monitoring Metrics/Log Data) + +#### Monitoring Metrics Scheduled Threshold + +Configure scheduled thresholds for monitoring metrics. For example: define the expression `cpu_usage{instance="server1"}` > 80` for a group of CPU metrics, and trigger an alert when the expression is satisfied. + +![threshold](/img/docs/help/alert-threshold-2.png) + +Configuration Items Explained: + +- **Rule Name**: A unique identifier for the threshold rule +- **Data Type**: Select monitoring metrics +- **Query Language**: Select PromQL as the query language +- **Threshold Expression**: The expression that defines the alert condition. It will be evaluated periodically according to the "Execution Interval". Supported elements include: + - **Query Identifiers**: References to monitoring metrics (e.g., `cpu_usage`, `memory{instance="server1"}`) + - **Comparison Operators**: `>`, `>=`, `<`, `<=`, `==`, `!=` + - **Logical Operators**: `and`, `or`, `unless` + - **Parentheses**: Used for grouping and controlling evaluation order + - **Numeric Literals**: Threshold values (e.g., `80`, `90.5`) +- **Execution Interval**: The time interval (in seconds) at which the expression is evaluated. For example, `300` means the rule is checked every 5 minutes +- **Alert Level**: The severity level triggered when the condition is met. Available levels: `warning`, `critical`, `emergency` +- **Trigger Count**: The number of consecutive times the expression must evaluate to true before an alert is actually triggered +- **Notification Template**: The message template sent when an alert is triggered. Template variables are available on the configuration page, supports object nested access +- **Additional Labels**: Custom labels that will be attached to the alert when it is generated +- **Additional Annotations**: Custom annotation information (supports environment variables) that will be rendered and attached to the alert +- **Enable Alerting**: Controls whether this threshold rule is active or not + +#### Log Data Scheduled Threshold + +Configure scheduled thresholds for log data, performing aggregated analysis and alert judgment on logs through SQL queries. + +![threshold](/img/docs/help/alert-threshold-4.png) + +Configuration Items Explained: + +- **Rule Name**: A unique identifier for the threshold rule +- **Data Type**: Select log data +- **Query Language**: Select SQL as the query language +- **Log Query Expression**: Use standard SQL syntax to query log data, supporting aggregation functions, grouping, filtering and other operations. For example: + +```sql +SELECT COUNT(*) as error_count FROM hertzbeat_logs +WHERE level = 'ERROR' AND timestamp >= NOW() - INTERVAL 5 MINUTE +``` + +- **Execution Interval**: The time interval (in seconds) at which the SQL query is executed. For example, `300` means the query is executed every 5 minutes +- **Alert Level**: The severity level triggered when the condition is met. Available levels: `warning`, `critical`, `emergency` +- **Alert Mode**: Select alert sending method: + - **Window Group Mode (group)**: Send the query result as a single alert + - **Individual Mode (individual)**: Send each row in the query result as a separate alert +- **Trigger Count**: The number of consecutive times the query result meets the alert condition before an alert is actually triggered +- **Notification Template**: The message template sent when an alert is triggered, supports accessing fields in the query result, for example: + - Query result fields: ``error_count``, ``service_name``, etc. + - Basic variables: ``__alertname__``, ``__severity__``, etc. +- **Additional Labels**: Custom labels that will be attached to the alert when it is generated +- **Additional Annotations**: Custom annotation information (supports environment variables) that will be rendered and attached to the alert +- **Enable Alerting**: Controls whether this threshold rule is active or not + +**Once the threshold rules are configured, successfully triggered alerts will be displayed in the [Alert Center].** +**To send alert notifications via Email, WeChat, DingTalk, or Feishu, please go to [Notification Configuration] to set up the appropriate channels.** diff --git a/home/versioned_docs/version-1.9.0/help/alert_threshold_expr.md b/home/versioned_docs/version-1.9.0/help/alert_threshold_expr.md new file mode 100644 index 0000000000..439bfb3c1f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_threshold_expr.md @@ -0,0 +1,66 @@ +--- +id: alert_threshold_expr +title: Threshold Trigger Expression +sidebar_label: Threshold Trigger Expression +--- + +> When configuring threshold alerts, it is necessary to set up threshold trigger expressions. The system calculates whether to trigger an alert based on the expression and the monitored metric values. Here, we provide a detailed explanation of expression usage. + +## Supported Operators in Expressions + +| Operator (Visual Configuration) | Operator (Expression Configuration) | Supported Types | Description | +|---------------------------------|-------------------------------------|-----------------------|--------------------------------------------| +| Equals | equals(str1,str2) | String | Check if strings are equal | +| Not Equals | !equals(str1,str2) | String | Check if strings are not equal | +| Contains | contains(str1,str2) | String | Check if string contains | +| Not Contains | !contains(str1,str2) | String | Check if string does not contain | +| Matches | matches(str1,str2) | String | Check if string matches regex | +| Not Matches | !matches(str1,str2) | String | Check if string does not match regex | +| Exists | exists(obj) | String, Numeric, Time | Check if value exists | +| Not Exists | !exists(obj) | String, Numeric, Time | Check if value does not exist | +| Greater than | obj1 > obj2 | Numeric, Time | Check if value is greater than | +| Less than | `obj1 < obj2` | Numeric, Time | Check if value is less than | +| Greater than or Equal to | obj1 >= obj2 | Numeric, Time | Check if value is greater than or equal to | +| Less than or Equal to | `obj1 <= obj2` | Numeric, Time | Check if value is less than or equal to | +| Not Equal to | obj1 != obj2 | Numeric, Time | Check if values are not equal | +| Equal to | obj1 == obj2 | Numeric, Time | Check if values are equal | + +### Expression Function Library List + +| Supported Function Library | Description | +|--------------------------------------------|------------------------------------------------------------------------------------------| +| condition ? trueExpression : falseExpression | Ternary operator | +| toDouble(str) | Convert string to Double type | +| toBoolean(str) | Convert string to Boolean type | +| toInteger(str) | Convert string to Integer type | +| array[n] | Retrieve the nth element of an array | +| * | Multiplication | +| / | Division | +| % | Modulo | +| ( and ) | Parentheses for controlling the order of operations in logical or mathematical expressions | +| + | Addition | +| - | Subtraction | +| && | Logical AND operator | +| \|\| | Logical OR operator | + +#### Supported Environment Variables + +> Environment variables refer to variables supported by metric values, used in expressions. During threshold calculation and judgment, these variables will be replaced with actual values. + +Non-fixed Environment Variables: These variables change dynamically based on the selected monitoring metric. For example, if we choose **response time metric for website monitoring**, the environment variable would be `responseTime - this represents response time variable`. If we want to set an alert trigger for **response time greater than 400 for website monitoring**, the expression would be `responseTime>400`. + +Fixed Environment Variables (Less commonly used): `instance: instance value` +This variable is mainly used for calculations involving multiple instances. For instance, if we collect usage metrics for C drive and D drive (`usage` being a non-fixed environment variable), and we only want to set an alert for **usage greater than 80 for the C drive**, the expression would be `equals(instance,"c")&&usage>80`. + +#### Expression Configuration Examples + +1. Website Monitoring -> Alert when response time is greater than or equal to 400ms + `responseTime>=400` +2. API Monitoring -> Alert when response time is greater than 3000ms + `responseTime>3000` +3. Overall Monitoring -> Alert when response time for URL (instance) path '[https://baidu.com](https://baidu.com)' is greater than 200ms + `equals(instance,"https://baidu.com")&&responseTime>200` +4. MYSQL Monitoring -> Alert when 'threads_running' metric under 'status' exceeds 7 + `threads_running>7` + +If you encounter any issues, feel free to discuss and provide feedback through our community group or ISSUE tracker! diff --git a/home/versioned_docs/version-1.9.0/help/alert_webhook.md b/home/versioned_docs/version-1.9.0/help/alert_webhook.md new file mode 100644 index 0000000000..cbaf4d21f8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_webhook.md @@ -0,0 +1,66 @@ +--- +id: alert_webhook +title: Alert WebHook callback notification +sidebar_label: Alert webHook notification +keywords: [open source monitoring tool, open source alerter, open source webhook notification] +--- + +> After the threshold is triggered send alarm information and call the Webhook interface through post request to notify the recipient. + +## Operation steps + +1. **【Alarm notification】->【Add new recipient】 ->【Select WebHook notification method】-> 【Set WebHook callback address】 -> 【Confirm】** + + ![email](/img/docs/help/alert-notice-5.png) + +2. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** + + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + + ![email](/img/docs/help/alert-notice-4.png) + +### WebHook callback POST body BODY content + +Content format:JSON + +```json +{ + "alarmId": 76456, + "target": "`target`", + "thresholdId": 33455, + "priority": 0, + "content": "udp_port monitoring availability alert, code is FAIL", + "status": 0, + "times": 1, + "triggerTime": "2022-02-25T13:32:13", + "tags": { + "app": "windows", + "monitorId": "180427708350720", + "metrics": "availability", + "code": "UN_CONNECTABLE", + "thresholdId": "112", + "monitorName": "WINDOWS_192.168.124.12" + } +} +``` + +| | | +|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| alarmId | integer($int64) title: Alarm record entity primary key index ID 告警记录实体主键索引ID | +| target | string title: Alert target object: monitor availability-available metrics-app.metrics.field 告警目标对象: 监控可用性-available 指标-app.metrics.field | +| thresholdId | integer($int64) title: Alarm definition ID associated with the alarm 告警关联的告警定义ID | +| priority | string($byte) title: Alarm level 0: high-emergency-critical alarm-red 1: medium-critical-critical alarm-orange 2: low-warning-warning alarm-yellow 告警级别 0:高-emergency-紧急告警-红色 1:中-critical-严重告警-橙色 2:低-warning-警告告警-黄色 | +| content | string title: The actual content of the alarm notification 告警通知实际内容 | +| status | string($byte) title: Alarm status: 0-normal alarm (to be processed) 1-threshold triggered but not reached the number of alarms 2-recovered alarm 3-processed 告警状态: 0-正常告警(待处理) 1-阈值触发但未达到告警次数 2-恢复告警 3-已处理 | +| times | integer($int32) title: Alarm threshold trigger times 告警阈值触发次数 | +| triggerTime | integer($int64) title: Alarm trigger time (timestamp in milliseconds) 首次告警触发时间(毫秒时间戳) | +| tags | example: `{key1:value1}` | + +### Webhook notification common issues + +1. WebHook callback did not take effect + + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the configured webhook callback address is correct. + +Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/alert_wework.md b/home/versioned_docs/version-1.9.0/help/alert_wework.md new file mode 100644 index 0000000000..75abadb520 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/alert_wework.md @@ -0,0 +1,38 @@ +--- +id: alert_wework +title: Alert enterprise Wechat notification +sidebar_label: Alert enterprise Wechat notification +keywords: [open source monitoring tool, open source alerter, open source WeWork notification] +--- + +> After the threshold is triggered send alarm information and notify the recipient by enterprise Wechat robot. + +## Operation steps + +1. **【Enterprise Wechat】-> 【Group settings】-> 【Group robot】-> 【Add new robot】-> 【Set robot name and avatar】-> 【Copy its webhook address after adding successfully】** + + ![email](/img/docs/help/alert-notice-6.jpg) + +2. **【Save the key value of the WebHook address of the robot】** + + > eg: webHook address:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + +3. **【Alarm notification】->【Add new recipient】 ->【Select enterprise Wechat robot notification method】->【Set enterprise Wechat robot KEY】-> 【Confirm】** + + ![email](/img/docs/help/alert-notice-7.png) + +4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** + + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + +![email](/img/docs/help/alert-notice-4.png) + +### Enterprise Wechat robot common issues + +1. The enterprise wechat group did not receive the robot alarm notification. + + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. + +Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-1.9.0/help/almalinux.md b/home/versioned_docs/version-1.9.0/help/almalinux.md new file mode 100644 index 0000000000..5f4e3de242 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/almalinux.md @@ -0,0 +1,114 @@ +--- +id: almalinux +title: Monitoring AlmaLinux Operating System +sidebar_label: AlmaLinux Operating System +keywords: [open-source monitoring system, open-source operating system monitoring, AlmaLinux operating system monitoring] +--- + +> Collect and monitor common performance metrics of the AlmaLinux operating system. + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/api.md b/home/versioned_docs/version-1.9.0/help/api.md new file mode 100644 index 0000000000..3cef36988e --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/api.md @@ -0,0 +1,36 @@ +--- +id: api +title: Monitoring HTTP API +sidebar_label: HTTP API +keywords: [ open source monitoring tool, monitoring http api ] +--- + +> Call HTTP API interface, check whether the interface is available, and monitor its response time and other Metrics. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Ports provided by website, http generally defaults to 80 and https generally defaults to 443 | +| Relative path | Suffix path of website address except IP port. For example, the relative path of `www.tancloud.io/console` website is `/console` | +| Request mode | Set the request mode of interface call:GET, POST, PUT, DELETE | +| Enable HTTPS | Whether to access the website through HTTPS. Note⚠️When HTTPS is enabled, the default corresponding port needs to be changed to 443 | +| Username | User name used for interface Basic authentication or Digest authentication | +| Password | Password used for interface Basic authentication or Digest authentication | +| Headers | HTTP request headers | +| Params | HTTP query params, support [time expression](time_expression) | +| Content-Type | Set the resource type when carrying the BODY request body data request | +| Request BODY | Set the carry BODY request body data, which is valid when PUT or POST request method is used, support [time expression](time_expression) | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:summary + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|-------------------------| +| responseTime | ms | Website response time | diff --git a/home/versioned_docs/version-1.9.0/help/apollo.md b/home/versioned_docs/version-1.9.0/help/apollo.md new file mode 100644 index 0000000000..e1e7dc0b43 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/apollo.md @@ -0,0 +1,61 @@ +--- +id: apollo +title: Apollo Configuration Center +sidebar_label: Apollo Configuration Center +keywords: [ Open Source Monitoring System, Open Source Middleware Monitoring, Apollo configuration center monitoring ] +--- + +> Monitoring of general metrics for the Apollo Configuration Center service is performed by calling the Prometheus +> interface of the Apollo Configuration Center. + +## Prerequisites + +1. Set up the Apollo configuration center according to + the [deployment documentation](https://www.apolloconfig.com/#/en/deployment/quick-start). +2. Visit ```http://${someIp:somePort}/prometheus``` to verify if you can access the metrics data. + For more details, please refer + to: [Apollo Monitoring Documentation](https://www.apolloconfig.com/#/en/design/apollo-design?id=v-monitoring-related) +3. Note⚠️: Starting from version 1.5.0, the Apollo server supports exposing Prometheus-formatted metrics + via `/prometheus`. + +### Configuration parameters + +| Parameter Name | Parameter Help Description | +|-------------------|-----------------------------------------------------------------------------------------------------------------------| +| Target Host | The monitored peer's IPv4, IPv6, or domain name. Note⚠️: Do not include protocol headers (e.g., https://, http://). | +| Port | Pulsar's webServicePort value, defaulting to 8080. | +| Task Name | The name identifying this monitoring task. The name must be unique. | +| Query Timeout | Set the connection timeout in milliseconds (ms). Default is 3000 ms. | +| Monitoring Cycle | The interval time for periodic data collection, measured in seconds. The minimum configurable interval is 30 seconds. | +| Binding Tags | Used for classifying and managing monitored resources | +| Description Notes | Additional identifiers and descriptive notes for this monitoring task. Users can add notes here. | + +### Collection Metrics + +#### Metric Set: Basic Information Metrics + +| Metric Name | Unit | Metric Help Description | +|--------------------------------|---------|--------------------------------------------------------------------------| +| application_ready_time_seconds | Seconds | Time taken for the application to transition from startup to ready state | +| process_uptime_seconds | seconds | Total time the process has been running | +| process_cpu_usage | % | Current process CPU usage | + +#### Metric Set: : JVM + +| Metric Name | Unit | Metric Help Description | +|-----------------------------------|------|---------------------------------------------------------------| +| system_cpu_usage | % | System CPU Usage | +| system_load_average_1m | None | System load average over the past minute | +| jvm_memory_committed_bytes | MB | Size of memory requested by the JVM from the operating system | +| jvm_memory_used_bytes | MB | JVM's current actual memory usage | +| jvm_memory_max_bytes | MB | Maximum memory limit available to the JVM | +| jvm_gc_pause_seconds_count | None | Total number of JVM GC pause events | +| jvm_gc_pause_seconds_sum | None | Total time spent in JVM GC pauses | +| jvm_memory_usage_after_gc_percent | None | JVM memory usage after garbage collection | + +#### Metric Set: System Resources + +| Metric Name | Unit | Metric Help Description | +|--------------------------|------|--------------------------------------------------------------------| +| process_files_max_files | None | Limit on the maximum number of file descriptors a process may open | +| process_files_open_files | None | Number of file descriptors currently opened by the process | diff --git a/home/versioned_docs/version-1.9.0/help/bulletin.md b/home/versioned_docs/version-1.9.0/help/bulletin.md new file mode 100644 index 0000000000..0bfd704ef8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/bulletin.md @@ -0,0 +1,48 @@ +--- +id: bulletin +title: Customizable bulletins +sidebar_label: Customized bulletins +keywords: [bulletin, custom] +--- + +> Customize a bulletin to show a table of self-selected metrics for some kind of monitoring. + +## Add Bulletin Item + +1. Click the `New` button in the toolbar to open the bulletin creation dialog. + +2. Enter the `Bulletin Name`, select the `Monitor Type`, and then select the associated `Monitor Task Name`. + + - The `Monitor Task Name` is a multi-select field. Type in its search box to filter monitors by **name, label key, or label value**; each option also shows its labels as `key:value` tags. + +3. In the `Monitor Metrics` tree, check the metrics you want to show. The tree is grouped by metric, and checking a parent node selects all of its fields at once. + +4. Click the `OK` button to finish creating the customized bulletin. + + ![new-bulletin](/img/docs/help/bulletin-1.png) + +## Edit Bulletin Item + +1. Click a bulletin name in the tab bar to make it the current bulletin. + +2. Click the `...` (more) button in the toolbar and choose `Edit`. The dialog opens pre-filled with the current bulletin's name, monitor tasks, and selected metrics. + + - The `Monitor Type` cannot be changed while editing. To use a different monitor type, create a new bulletin instead. + +3. Adjust the name, monitor tasks, or metrics as needed, then click `OK` to save. + + ![edit-bulletin](/img/docs/help/bulletin-2.png) + +## Viewing Multiple Bulletins + +1. Each bulletin appears as a tab. Click the name of a bulletin in the tab bar to view its details. + + ![dashboard-bulletin](/img/docs/help/bulletin-3.png) + +## Deleting Bulletins + +1. Select the bulletin you want to remove, click the `...` (more) button in the toolbar, and choose `Delete Bulletin` to delete the current bulletin. + +2. Choose `Batch Delete Bulletin` from the same `...` menu to select and delete multiple bulletins at once. + + ![bulletin](/img/docs/help/bulletin-4.png) diff --git a/home/versioned_docs/version-1.9.0/help/centos.md b/home/versioned_docs/version-1.9.0/help/centos.md new file mode 100644 index 0000000000..c2733aa95f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/centos.md @@ -0,0 +1,114 @@ +--- +id: centos +title: CentOS operating system monitoring +sidebar_label: CentOS operating system +keywords: [open source monitoring tool, open source os monitoring tool, monitoring CentOS operating system metrics] +--- + +> Collect and monitor the general performance Metrics of CentOS operating system. + +## Configuration parameter + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/clickhouse.md b/home/versioned_docs/version-1.9.0/help/clickhouse.md new file mode 100644 index 0000000000..778e0bd1a9 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/clickhouse.md @@ -0,0 +1,95 @@ +--- +id: clickhouse +title: Monitoring ClickHouse Database +sidebar_label: ClickHouse Database +keywords: [open source monitoring system, open source database monitoring, ClickHouse database monitoring] +--- + +> Collect and monitor general performance metrics for the ClickHouse database. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | IP address, IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ without protocol prefix (e.g., https://, http://). | +| Task Name | Name identifying this monitoring, ensuring uniqueness. | +| Port | Port number of the database exposed to the outside, default is 8123. | +| Query Timeout | Timeout for SQL queries to respond, in milliseconds (ms), default is 6000ms. | +| Database Name | Name of the database instance, optional. | +| Username | Username for database connection, optional. | +| Password | Password for database connection, optional. | +| Collection Interval | Interval for periodic data collection during monitoring, in seconds, with a minimum interval of 30 seconds. | +| Tag Binding | Used for categorizing and managing monitored resources. | +| Description | Additional information to identify and describe this monitoring, where users can add remarks. | + +### Collected Metrics + +#### Metric Set: ping Availability + +| Metric Name | Metric Unit | Metric Description | +|--------------|-------------|--------------------| +| responseTime | N/A | Response time | + +#### Metric Set: Data from system.metrics table + +| Metric Name | Metric Unit | Metric Description | +|----------------------|-------------|----------------------------------------------------------| +| Query | N/A | Number of queries being executed | +| Merge | N/A | Number of background merges being executed | +| Move | N/A | Number of background moves being executed | +| PartMutation | N/A | Number of table mutations | +| ReplicatedFetch | N/A | Number of data blocks fetched from replicas | +| ReplicatedSend | N/A | Number of data blocks sent to replicas | +| ReplicatedChecks | N/A | Number of consistency checks on data blocks | +| QueryPreempted | N/A | Number of queries stopped or waiting | +| TCPConnection | N/A | Number of TCP connections | +| HTTPConnection | N/A | Number of HTTP connections | +| OpenFileForRead | N/A | Number of open readable files | +| OpenFileForWrite | N/A | Number of open writable files | +| QueryThread | N/A | Number of threads processing queries | +| ReadonlyReplica | N/A | Number of Replicated tables in read-only state | +| EphemeralNode | N/A | Number of ephemeral nodes in ZooKeeper | +| ZooKeeperWatch | N/A | Number of ZooKeeper event subscriptions | +| StorageBufferBytes | Bytes | Bytes in Buffer tables | +| VersionInteger | N/A | ClickHouse version number | +| RWLockWaitingReaders | N/A | Number of threads waiting for read-write lock on a table | +| RWLockWaitingWriters | N/A | Number of threads waiting for write lock on a table | +| RWLockActiveReaders | N/A | Number of threads holding read lock on a table | +| RWLockActiveWriters | N/A | Number of threads holding write lock on a table | +| GlobalThread | N/A | Number of threads in global thread pool | +| GlobalThreadActive | N/A | Number of active threads in global thread pool | +| LocalThread | N/A | Number of threads in local thread pool | +| LocalThreadActive | N/A | Number of active threads in local thread pool | + +#### Metric Set: Data from system.events table + +| Metric Name | Metric Unit | Metric Description | +|------------------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Query | N/A | Number of queries to parse and possibly execute. Excludes queries rejected due to AST size limits, quota limits, or simultaneous query limits. May include internal queries initiated by ClickHouse. Subqueries are not counted. | +| SelectQuery | N/A | Number of Select queries possibly executed | +| InsertQuery | N/A | Number of Insert queries possibly executed | +| InsertedRows | N/A | Number of rows inserted into all tables | +| InsertedBytes | Bytes | Number of bytes inserted into all tables | +| FailedQuery | N/A | Number of failed queries | +| FailedSelectQuery | N/A | Number of failed Select queries | +| FileOpen | N/A | Number of file openings | +| MergeTreeDataWriterRows | N/A | Number of data rows written to MergeTree tables | +| MergeTreeDataWriterCompressedBytes | Bytes | Number of compressed data bytes written to MergeTree tables | + +#### Metric Set: Data from system.asynchronous_metrics table + +| Metric Name | Metric Unit | Metric Description | +|------------------------------------------|-------------|-------------------------------------------------------| +| AsynchronousMetricsCalculationTimeSpent | N/A | Time spent calculating asynchronous metrics (seconds) | +| jemalloc.arenas.all.muzzy_purged | N/A | Number of purged muzzy pages | +| jemalloc.arenas.all.dirty_purged | N/A | Number of purged dirty pages | +| BlockReadBytes_ram1 | N/A | Number of bytes read from ram1 block | +| jemalloc.background_thread.run_intervals | N/A | Number of intervals jemalloc background thread ran | +| BlockQueueTime_nbd13 | N/A | Queue wait time for nbd13 block | +| jemalloc.background_thread.num_threads | N/A | Number of jemalloc background threads | +| jemalloc.resident | N/A | Physical memory size allocated by jemalloc (bytes) | +| InterserverThreads | N/A | Number of Interserver threads | +| BlockWriteMerges_nbd7 | N/A | Number of block write merges for nbd7 block | +| MarkCacheBytes | N/A | Size of marks cache in StorageMergeTree | +| MarkCacheFiles | N/A | Number of files in marks cache for StorageMergeTree | +| MaxPartCountForPartition | N/A | Maximum active data blocks in partitions | diff --git a/home/versioned_docs/version-1.9.0/help/collector.md b/home/versioned_docs/version-1.9.0/help/collector.md new file mode 100644 index 0000000000..2f27b10a78 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/collector.md @@ -0,0 +1,134 @@ +--- +id: collector +title: HertzBeat Collector +sidebar_label: Collector +keywords: [monitoring, observability, collector, metrics] +--- + +> HertzBeat Collector is a lightweight data collection module that enables metrics collection, high availability deployments, and cloud-edge collaboration in Apache HertzBeat. + +## Introduction + +HertzBeat Collector is a versatile and lightweight metrics collection module within the Apache HertzBeat™ monitoring system. It's designed to gather monitoring data from various targets and send the collected metrics to the main HertzBeat server for processing, alerting, and visualization. + +With the collector module, you can implement: + +- **High Availability**: Deploy multiple collectors to ensure continuous monitoring even if some collector instances fail +- **Load Balancing**: Distribute monitoring tasks across multiple collectors to improve performance +- **Cloud-Edge Collaboration**: Monitor resources in isolated networks while managing everything from a central HertzBeat server + +## Collector Architecture + +The collector module is built with a modular design to make it easily extensible for various monitoring scenarios. The architecture consists of: + +1. **Collector Entry Point**: The main entry point for running the collector module, from which collection tasks are executed after startup. + +2. **collector-basic**: Contains implementations for common protocols like HTTP, JDBC, SSH, SNMP, etc. These collectors typically don't require additional proprietary dependencies and can handle most basic monitoring needs. + +3. **collector-common**: Provides general utility classes and methods, such as connection pools and caching mechanisms that other modules can reuse. + +4. **collector-xxx**: Extension modules for specific services or protocols (MongoDB, RocketMQ, Kafka, NebulaGraph, etc.). These modules often require specific dependencies for their respective services. + +## Supported Protocols + +HertzBeat Collector supports an extensive list of monitoring protocols: + +| Protocol Category | Protocols | +| ----------------- | ------------------------------------------------------------------------------------- | +| Web/API | `http`, `ssl_cert`, `websocket` | +| Databases | `jdbc`, `redis`, `mongodb`, `memcached` | +| Operating Systems | `ssh`, `ipmi` | +| Network | `icmp` (ping), `telnet`, `snmp`, `modbus` | +| Messaging | `mqtt`, `rocketmq`, `kafka` | +| Email | `pop3`, `smtp`, `imap` | +| Cloud Services | `prometheus`, `nebulagraph`, `ngql` | +| Others | `jmx`, `dns`, `ftp`, `ntp`, `udp`, `nginx`, `redfish`, `script`, `registry`, `httpsd` | + +## Deployment Options + +You can deploy HertzBeat Collector in several ways depending on your environment and needs, once you log in to the HertzBeat web interface and go to the collector, you can see the deployment options. + +Parameters explanation: + +- `-e IDENTITY=custom-collector-name`: (Optional) Set a unique identifier for this collector. Must be unique across all collectors. +- `-e MODE=public`: Set the running mode (public or private), for public cluster or private cloud-edge mode. +- `-e MANAGER_HOST=192.168.1.100`: Important! Set the IP address of the main HertzBeat server. Replace with your actual server IP. +- `-e MANAGER_PORT=1158`: (Optional) Set the port of the main HertzBeat server, default is 1158. +- `-v $(pwd)/ext-lib:/opt/hertzbeat-collector/ext-lib`: (Optional) Mount external JDBC driver jars to the local collector. +- `-v $(pwd)/logs:/opt/hertzbeat-collector/logs`: (Optional) Mount the log files to the local host. + +The collector image keeps `/opt/hertzbeat-collector` as a version-independent root path, so `logs` and `ext-lib` mounts remain stable across upgrades. + +## Operating Modes + +HertzBeat Collector supports two operating modes: + +### Public Mode (Cluster Mode) + +In public mode, collectors form a cluster with the main HertzBeat server. Tasks are automatically distributed among collectors, providing high availability and load balancing. + +- Set `MODE=public` when deploying the collector +- All collectors must have connectivity to the main HertzBeat server +- Great for horizontal scaling to handle large numbers of monitoring tasks + +### Private Mode (Cloud-Edge Mode) + +In private mode, collectors operate in isolated networks while still reporting to a central HertzBeat server. This allows monitoring of resources in multiple separate networks. + +- Set `MODE=private` when deploying the collector +- Collectors need outbound connectivity to the HertzBeat server, but inbound connectivity is not required +- Ideal for monitoring resources across different data centers, cloud providers, or network segments + +## Configuration Parameters + +| Parameter | Description | Default | +| -------------- | ----------------------------------- | ------------------------- | +| `identity` | Unique identifier for the collector | Auto-generated if not set | +| `mode` | Operating mode (public/private) | public | +| `manager-host` | IP address of the HertzBeat server | IP | +| `manager-port` | Port of the HertzBeat server | 1158 | + +## Collector Management + +You can manage collectors through the HertzBeat web interface: + +1. Navigate to the Overview page to see all registered collectors +2. Monitor collector status (online/offline), metrics tasks, and system information +3. Enable or disable collectors as needed + +## High Availability Setup + +To achieve high availability with HertzBeat collectors: + +1. Deploy multiple collector instances across different servers or containers +2. Ensure all collectors have the same `mode` setting +3. Connect all collectors to the same HertzBeat server +4. HertzBeat will automatically distribute monitoring tasks and handle failover + +If a collector goes offline, its tasks will be reassigned to other available collectors. When the collector comes back online, it will receive new tasks based on the current load distribution. + +## Cloud-Edge Collaboration + +For monitoring across isolated networks: + +1. Deploy HertzBeat Server in your central management network +2. Deploy collectors in each isolated network you need to monitor +3. Configure collectors with: + - `MODE=private` + - `MANAGER_HOST=` pointing to your central HertzBeat server +4. Ensure outbound connectivity from each isolated network to the central server +5. Manage all monitoring tasks from the central HertzBeat dashboard + +## Advanced Features + +### Custom Protocol Support + +HertzBeat's architecture allows for extending the collector with custom protocols. Developers can create new collector modules following the project's modular design. + +### Task Scheduling + +The collector automatically handles task scheduling based on task priority, available resources, and current system load. Tasks are processed with intelligent prioritization to ensure critical monitoring is performed first. + +### Resource Utilization + +Collectors are designed to be lightweight and efficient with system resources, making them suitable for deployment on various hardware, from small edge devices to powerful servers. diff --git a/home/versioned_docs/version-1.9.0/help/consul_sd.md b/home/versioned_docs/version-1.9.0/help/consul_sd.md new file mode 100644 index 0000000000..203c12ecea --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/consul_sd.md @@ -0,0 +1,108 @@ +--- +id: consul_sd +title: Monitoring Consul Service Discovery +sidebar_label: Consul Service Discovery +keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring Consul service discovery] +--- + +> HertzBeat integrates with Consul registry to automatically discover service instances and create monitoring tasks for them. + +## Overview + +Consul Service Discovery allows HertzBeat to connect to your Consul server and automatically discover all registered service instances. When a new service instance is registered or an existing instance goes offline, HertzBeat will automatically create or delete corresponding monitoring tasks, achieving automated monitoring in microservice environments. + +### PreRequisites + +#### Deploy Consul Server + +1. Deploy Consul server according to [Consul official documentation](https://developer.hashicorp.com/consul/docs/fundamentals/install). +2. Ensure Consul server is accessible from HertzBeat. +3. Verify that you can access Consul UI at `http://your-consul-server:8500/ui/` +4. Ensure the Consul HTTP API is accessible (default port: 8500) + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Target Name | Identify the name of this monitoring. The name needs to be unique. | +| Consul Host | Consul server IP address or domain name. Note⚠️Without protocol header (eg: https://, http://). Example: `consul-server` or `192.168.1.100` | +| Consul Port | Port provided by the Consul server. The default is 8500 | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Usage Steps + +1. **Create Service Discovery Monitoring** + - In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring** + - Select monitoring type: **Consul Service Discovery** + - Fill in the basic configuration parameters + +2. **Configure Monitoring Template** + - After creating the service discovery monitoring, you need to specify a monitoring template + - The template defines what type of monitoring to create for discovered service instances + - For example: If discovered instances are HTTP services, you can select HTTP monitoring template + - Common template types: Port, HTTP, HTTPS, Ping, etc. + +3. **Automatic Discovery** + - HertzBeat will periodically query Consul server based on the collection interval + - Automatically create monitoring tasks for newly registered service instances + - Automatically delete monitoring tasks for offline service instances + +4. **View Discovered Instances** + - In the monitoring list, you can see all automatically created sub-monitoring tasks + - Each sub-monitoring task corresponds to a discovered service instance + +### Example of usage + +Suppose your Consul server is running at `192.168.1.100:8500`, and you want to automatically monitor all service instances registered in it. + +Configuration example: + +- **Target Name**: `Consul-Service-Discovery` +- **Consul Host**: `192.168.1.100` +- **Consul Port**: `8500` +- **Collection interval**: `60` seconds +- **Monitoring Template**: Select `Port` monitoring (to detect instance availability) + +After configuration: + +1. HertzBeat connects to Consul server via HTTP API +2. Retrieves all registered service instances +3. Automatically creates Port monitoring for each instance (e.g., `api-service-192.168.1.101:8080`) +4. Every 60 seconds, checks for newly registered or offline services and updates monitoring tasks accordingly + +### Notes + +- **Network Connectivity**: Ensure HertzBeat can access the Consul server address and port (default: 8500) +- **Monitoring Templates**: Service discovery only discovers service instance addresses, you need to configure appropriate monitoring templates to actually monitor the instances +- **Collection Interval**: Recommended minimum interval is 60 seconds to avoid excessive requests to Consul server +- **ACL Token**: If Consul is configured with ACL (Access Control List), you may need to configure the appropriate token +- **Service Health**: Consul service discovery will discover both healthy and unhealthy instances +- **Datacenter**: By default, discovers services in the local datacenter. If you need to discover services in a specific datacenter, additional configuration may be required +- **Instance Naming**: Automatically created monitoring tasks are named in the format: `{ServiceName}-{Host}:{Port}` + +### Collection Metric + +#### Metric set: Monitor Target + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|--------------------------------------------| +| target | none | Discovered service instance target | +| host | none | Service instance host address | +| port | none | Service instance port number | + +### Use Cases + +- **Microservice Architecture**: Automatically monitor all microservice instances registered in Consul +- **Service Mesh**: Monitor services using Consul Connect service mesh +- **Multi-Datacenter**: Monitor service instances across multiple Consul datacenters +- **Dynamic Scaling**: Automatically adapt to service instances added/removed due to autoscaling +- **Health Check**: Combine with Consul's health check mechanism to monitor service health status +- **Service Governance**: Centrally manage monitoring of all services in the Consul service ecosystem + +### Integration with Consul Features + +- **Service Health**: Consul service discovery can leverage Consul's health check information +- **Service Tags**: Service instances discovered from Consul may include tag information +- **KV Storage**: Can be used in conjunction with Consul KV storage to achieve more flexible service discovery +- **Service Mesh**: Supports service discovery in Consul Connect service mesh environment diff --git a/home/versioned_docs/version-1.9.0/help/dahua.md b/home/versioned_docs/version-1.9.0/help/dahua.md new file mode 100644 index 0000000000..82707663a1 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/dahua.md @@ -0,0 +1,60 @@ +--- +id: dahua +title: Monitor Dahua Devices +sidebar_label: Dahua +keywords: [ monitor, dahua ] +--- + +> Monitor Dahua devices through HTTP interface to collect health data. + +## Configuration + +| Parameter | Description | +| ----------- | ----------- | +| Host | Target IP/Domain | +| Name | Unique monitor name | +| Port | Network port (default 80) | +| Timeout | Request timeout in ms | +| Username | Device username | +| Password | Device password | +| SSL | Enable HTTPS | +| Interval | Collection interval (≥30s) | + +## Metrics + +### Network Info + +- Default Interface +- Domain Name +- Hostname +- eth0 IP Address +- eth0 Gateway +- eth0 MAC +- eth0 Subnet Mask +- eth0 MTU +- DNS Servers + +### User Info + +- Client Address +- Username +- Login Type +- Login Time + +### NTP Info + +- NTP Server +- NTP Port +- Sync Interval + +## Implementation + +Access device APIs via: + +1. Network: `/cgi-bin/configManager.cgi?action=getConfig&name=Network` + +2. Users: `/cgi-bin/userManager.cgi?action=getActiveUserInfoAll` + +3. NTP: `/cgi-bin/configManager.cgi?action=getConfig&name=NTP` + +Using Digest Auth and parsing config format responses. diff --git a/home/versioned_docs/version-1.9.0/help/darwin.md b/home/versioned_docs/version-1.9.0/help/darwin.md new file mode 100644 index 0000000000..4a9eaf9290 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/darwin.md @@ -0,0 +1,111 @@ +--- +id: darwin +title: darwin operating system monitoring +sidebar_label: darwin operating system +keywords: [open source monitoring tool, open source os monitoring tool, monitoring darwin operating system metrics] +--- + +> Collect and monitor the general performance Metrics of darwin operating system. + +## Configuration parameter + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage (to be fixed) | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information - to be finished + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/db2.md b/home/versioned_docs/version-1.9.0/help/db2.md new file mode 100644 index 0000000000..61e12cc53f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/db2.md @@ -0,0 +1,87 @@ +--- +id: db2 +title: Monitoring:DB2 database monitoring +sidebar_label: DB2 Database +keywords: [ open source monitoring tool, open source database monitoring tool, monitoring DB2 database metrics ] +--- + + +> Collect and monitor general performance metrics (tablespace, session status, process count, locks, slow queries, etc.) +> for DB2 databases. + +## Note: DB2 JDBC Driver JAR Must be Added + +- Download the DB2 JDBC driver JAR package, for + example, [jcc.jar](https://repo1.maven.org/maven2/com/ibm/db2/jcc/11.5.9.0/jcc-11.5.9.0.jar). +- Copy the JAR package to the `hertzbeat/ext-lib` directory. +- Restart the HertzBeat service. + +:::important Collector package selection +DB2 monitoring requires external JDBC driver loading from `ext-lib`. + +- Use HertzBeat server built-in collector or the JVM collector package for DB2 monitoring +- Do not use the native collector package for DB2 monitoring +::: + +### Configuration Parameters + +The following are the required configuration parameters for DB2 monitoring: + +| Parameter Name | Parameter Description | +|:---------------------|:---------------------------------------------------------------------------------------------------------------------------------------| +| **Target Host** | The IPv4, IPv6, or domain name of the monitored DB2 database server. | +| **Port** | The port provided by the DB2 database, default is `50000`. | +| **Database Name** | The name of the DB2 database to connect to. | +| **Username** | The username for the database connection. | +| **Password** | The password for the database connection. | +| **Query Timeout** | Sets the timeout for when an SQL query does not return data, in milliseconds (ms), default is `6000`. | +| **Reuse Connection** | Whether to reuse the database connection, boolean value, default is `true`. | +| **URL** | The database connection URL, optional. If configured, it will override the database name, username, and password parameters set above. | + +### Collected Metrics + +#### Metric Set: Basic Info + +| Metric Name | Metric Unit | Metric Description | +|:-------------------|:------------|:------------------------| +| `database_version` | None | Database Version. | +| `instance_name` | None | Database Instance Name. | +| `status` | None | Instance Status. | +| `num_db` | None | Number of Databases. | + +#### Metric Set: Tablespace Usage + +| Metric Name | Metric Unit | Metric Description | +|:------------------|:---------------|:-------------------| +| `tablespace_name` | None | Tablespace Name. | +| `status` | None | Type. | +| `total` | MB | Total Size. | +| `used` | MB | Used Size. | +| `free` | MB | Free Size. | +| `used_percentage` | Percentage (%) | Used Percentage. | + +#### Metric Set: Session Status + +| Metric Name | Metric Unit | Metric Description | +|:--------------|:------------|:----------------------------------| +| `status_type` | None | Session Status Type. | +| `count` | None | Count of sessions in that status. | + +#### Metric Set: Application Process Count + +| Metric Name | Metric Unit | Metric Description | +|:----------------|:------------|:-----------------------------------------------------------------------------------| +| `process_count` | None | Total number of application processes/sessions. | + +#### Metric Set: Locks + +| Metric Name | Metric Unit | Metric Description | +|:----------------|:------------|:-----------------------------------| +| `waiting_locks` | None | Number of currently waiting locks. | + +#### Metric Set: Slow Query + +| Metric Name | Metric Unit | Metric Description | +|:---------------|:------------|:----------------------------| +| `avg_exe_time` | ms | Average Execution Time. | +| `sql_text` | None | SQL Text of the slow query. | diff --git a/home/versioned_docs/version-1.9.0/help/debian.md b/home/versioned_docs/version-1.9.0/help/debian.md new file mode 100644 index 0000000000..4974c5069f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/debian.md @@ -0,0 +1,114 @@ +--- +id: debian +title: Monitoring Debian System +sidebar_label: Debian +keywords: [Open Source Monitoring System, Operating System Monitoring, Debian Monitoring] +--- + +> Collect and monitor general performance metrics of the Debian system. + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/deepseek.md b/home/versioned_docs/version-1.9.0/help/deepseek.md new file mode 100644 index 0000000000..e0ff87a3df --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/deepseek.md @@ -0,0 +1,35 @@ +--- +id: deepseek +title: Monitoring Deepseek Account Status +sidebar_label: Deepseek Account Status +keywords: [Open Source Monitoring System, Open Source Network Monitoring, Deepseek Account Monitoring] +--- + +## Preparation + +### Obtain Session Key + +Log in to the Deepseek backend and visit the `https://platform.deepseek.com/api_keys` page to obtain the session key. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +| ------------- | --------------------- | +| Monitoring Host | Enter `api.deepseek.com` here. | +| Task Name | The name that identifies this monitoring task, which must be unique. | +| Session Key | The session key obtained in the preparation step. | +| Collector | Configure which collector is used to schedule data collection for this monitoring. | +| Monitoring Interval | The interval for periodically collecting data, in seconds. The minimum interval that can be set is 30 seconds. | +| Bound Tags | Tags for categorizing and managing monitoring resources. | +| Description/Remarks | Additional remarks to identify and describe this monitoring. Users can add notes here. | + +### Collection Metrics + +#### Metric Set: Billing + +| Metric Name | Metric Unit | Metric Description | +| ---------- | ---------- | ----------------- | +| Currency | None | Currency, either RMB or USD. | +| Available Balance | RMB/USD | Total available balance, including bonus and recharge balance. | +| Unexpired Bonus Balance | RMB/USD | Unexpired bonus balance. | +| Recharge Balance | RMB/USD | Recharge balance. | diff --git a/home/versioned_docs/version-1.9.0/help/dm.md b/home/versioned_docs/version-1.9.0/help/dm.md new file mode 100644 index 0000000000..436e722c69 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/dm.md @@ -0,0 +1,48 @@ +--- +id: dm +title: Monitoring DM database +sidebar_label: DM Database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring DM database metrics] +--- + +> Collect and monitor the general performance metrics of the DM database. DM8+ is supported. + +## Configuration parameters + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | Monitored peer IPV4, IPV6 or domain name. Note ⚠️ without protocol headers (eg: https://, http://). | +| Monitor Name | Identifies the name of this monitor. The name needs to be unique. | +| Port | The port provided by the database externally, the default is 5236. | +| Query Timeout | Set the timeout when the SQL query does not respond to data, in ms milliseconds, the default is 3000 milliseconds. | +| database name | database instance name, optional. | +| username | database connection username, optional | +| password | database connection password, optional | +| URL | Database connection URL, optional | +| Collection Interval | Monitor periodical collection data interval, in seconds, the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and then continue to add and modify operations if the detection is successful | +| Description Remarks | More remarks that identify and describe this monitoring, users can remark information here | + +### Collect metrics + +#### Metric collection: basic + +| Metric Name | Metric Unit | Metric Help Description | +|--------------|-------------|-------------------------------| +| PORT_NUM | None | Database exposed service port | +| CTL_PATH | None | Control File Path | +| MAX_SESSIONS | None | Maximum database connections | + +#### Metric collection: status + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|----------------------------------| +| status$ | None | Open/Close status of DM database | + +#### Metric collection: thread + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------------------------------------------| +| dm_sql_thd | None | Thread for writing dmsql dmserver | +| dm_io_thd | None | IO threads, controlled by IO_THR_GROUPS parameter, default is 2 threads | +| dm_quit_thd | None | Thread used to perform a graceful shutdown of the database | diff --git a/home/versioned_docs/version-1.9.0/help/dns.md b/home/versioned_docs/version-1.9.0/help/dns.md new file mode 100644 index 0000000000..6afb2d2e27 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/dns.md @@ -0,0 +1,71 @@ +--- +id: dns +title: Monitoring DNS +sidebar_label: DNS Monitor +keywords: [ open source monitoring tool, open source DNS monitoring tool, monitoring DNS metrics ] +--- + +> Collect and monitor the general performance Metrics of DNS. + +**Protocol Use:DNS** + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6. Note⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique. | +| Monitoring port | The port for DNS service provided to the outside,default is 53. | +| Address For DNS | The address for domain name resolution. | +| Connect Timeout | Set the timeout for connecting to the DNS server, default is 6000 milliseconds. | +| Record Type | The type of DNS record to query. Optional values include `A`, `AAAA`, `MX`, `NS`, `SRV`, and `ANY`. | +| Query Class | Resource class for DNS query. Optional values include `IN`, `CHAOS`, `HESIOD`, `NONE`, and `ANY`,default is IN. | +| Use TCP Protocol | DNS queries use the TCP protocol. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Bind Tags | Used to classify and manage monitoring resources. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Collection Metrics + +#### Metrics Set:Header + +| Metric name | Metric unit | Metric help description | +|-------------------------|-------------|---------------------------------------------------| +| Response Time | ms | Time taken for DNS server to respond to requests. | +| Opcode | none | Type of the current message. | +| Response Status | none | Status code of the response. | +| Response Flags | none | Response flags. | +| Question Record Count | none | Number of question records. | +| Answer Record Count | none | Number of answer records. | +| Authority Record Count | none | Number of authoritative resource records. | +| Additional Record Count | none | Number of additional resource records. | + +### Metrics Set: Question + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------| +| Section | none | Question record information, including the queried domain name, resource type, resource record class, and additional information. | + +### Metrics Set: Answer + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|----------------------------------------------------------------------------------------------------------------------------| +| Section0 | none | Answer record information, including the queried domain name, TTL, resource record class, resource type, and query result. | + +> The metric set collects up to 10 records, with metric names from Section0 to Section9. + +### Metrics Set: Authority + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| +| Section0 | none | SOA (Start of Authority) record for the domain name, including queried domain name, TTL, resource type, resource record class, and other information. | + +> The metric set collects up to 10 records, with metric names from Section0 to Section9. + +### Metrics Set: Additional + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-----------------------------------------| +| Section0 | none | Additional information for DNS queries. | + +> The metric set collects up to 10 records, with metric names from Section0 to Section9. diff --git a/home/versioned_docs/version-1.9.0/help/dns_sd.md b/home/versioned_docs/version-1.9.0/help/dns_sd.md new file mode 100644 index 0000000000..0e442ab1ff --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/dns_sd.md @@ -0,0 +1,223 @@ +--- +id: dns_sd +title: Monitoring DNS Service Discovery +sidebar_label: DNS Service Discovery +keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring DNS service discovery] +--- + +> HertzBeat integrates with DNS service to automatically discover service instances through DNS records and create monitoring tasks for them. + +## Overview + +DNS Service Discovery allows HertzBeat to discover service instances by querying DNS records. This is a simple and reliable service discovery method that utilizes standard DNS infrastructure to find service instances. It is particularly suitable for environments using DNS SRV records or environments that need to discover services through DNS. + +### PreRequisites + +#### Configure DNS Records + +Ensure your DNS server has properly configured service discovery records. Different record types have different formats: + +1. **SRV Records**: Used for service discovery, containing service host and port information +2. **A Records**: Return IPv4 addresses +3. **AAAA Records**: Return IPv6 addresses +4. **MX Records**: Mail server records +5. **NS Records**: Name server records + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Target Name | Identify the name of this monitoring. The name needs to be unique. | +| DNS Host | DNS server address. Example: `8.8.8.8` or `192.168.1.1` | +| DNS Port | DNS server port. The default is 53 | +| Record Type | Type of DNS record to query. Options: `SRV`, `A`, `AAAA`, `MX`, `NS` | +| Record Name | Name of the DNS record to query. Example: `_http._tcp.example.com` for SRV records | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Usage Steps + +1. **Create Service Discovery Monitoring** + - In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring** + - Select monitoring type: **DNS Service Discovery** + - Fill in the basic configuration parameters + +2. **Configure Monitoring Template** + - After creating the service discovery monitoring, you need to specify a monitoring template + - The template defines what type of monitoring to create for discovered service instances + - For SRV records, commonly used templates include Port, HTTP, etc. + - For A/AAAA records, Ping or Port monitoring can be used + +3. **Automatic Discovery** + - HertzBeat will periodically query the DNS server based on the collection interval + - Automatically create monitoring tasks for newly discovered service instances + - Automatically delete monitoring tasks for disappeared service instances + +4. **View Discovered Instances** + - In the monitoring list, you can see all automatically created sub-monitoring tasks + - Each sub-monitoring task corresponds to a discovered service instance + +### Example of usage + +#### Example 1: SRV Record Discovery + +Suppose you have an SRV record for your web service: + +- **SRV Record**: `_http._tcp.example.com` +- **DNS Server**: `8.8.8.8` +- **Expected discovery**: Automatically discover all HTTP service instances + +Configuration example: + +- **Target Name**: `DNS-SRV-Discovery` +- **DNS Host**: `8.8.8.8` +- **DNS Port**: `53` +- **Record Type**: Select `SRV` +- **Record Name**: `_http._tcp.example.com` +- **Collection interval**: `60` seconds +- **Monitoring Template**: Select `Port` monitoring (using the port from SRV record) + +After configuration: + +1. HertzBeat queries the SRV record for `_http._tcp.example.com` +2. Extracts host and port information from the SRV record response +3. Automatically creates Port monitoring for each service instance + +#### Example 2: A Record Discovery + +Discover service instances through A records: + +- **A Record**: `services.example.com` +- This domain may resolve to multiple IP addresses + +Configuration example: + +- **DNS Host**: `192.168.1.1` (Internal DNS server) +- **DNS Port**: `53` +- **Record Type**: Select `A` +- **Record Name**: `services.example.com` +- **Monitoring Template**: Select `Ping` or `Port` monitoring + +#### Example 3: MX Record Discovery + +Discover mail servers through MX records: + +- **DNS Host**: `8.8.8.8` +- **Record Type**: Select `MX` +- **Record Name**: `example.com` +- **Monitoring Template**: Select `Port` monitoring (port 25) + +### DNS Record Types + +#### SRV Records (Recommended) + +SRV records are the most commonly used record type for service discovery, containing service name, port number, and priority information. + +Format: `_service._protocol.example.com` + +Example: `_http._tcp.example.com` + +Typical SRV record response contains: + +- Target domain name +- Port number +- Priority and weight + +#### A Records + +A records map domain names to IPv4 addresses. If a domain name resolves to multiple IPs, all IPs can be discovered. + +Example: `services.example.com` → `192.168.1.10`, `192.168.1.11`, `192.168.1.12` + +#### AAAA Records + +AAAA records map domain names to IPv6 addresses. + +Example: `services.example.com` → `2001:db8::1` + +#### MX Records + +MX records specify mail servers for a domain and include priority information. + +Example: `example.com` → `mail.example.com` + +#### NS Records + +NS records specify name servers for a domain. + +Example: `example.com` → `ns1.example.com` + +### Notes + +- **DNS Server**: Ensure the specified DNS server is accessible and contains the service discovery records +- **Record Name**: Record name must be accurate, including the service and protocol prefix for SRV records +- **Port Information**: + - SRV records contain port information + - A/AAAA records do not contain port information; a default port needs to be specified in the monitoring template +- **Monitoring Templates**: Service discovery only discovers service instance addresses; you need to configure appropriate monitoring templates to actually monitor the instances +- **Collection Interval**: Recommended minimum interval is 60 seconds to avoid excessive DNS queries +- **DNS Caching**: DNS responses may be cached; the actual update frequency depends on the DNS record's TTL value +- **Network Connectivity**: Ensure HertzBeat can access the specified DNS server and port (default: 53) +- **Firewall**: Ensure firewalls allow DNS query traffic (UDP/TCP 53) + +### Collection Metric + +#### Metric set: Monitor Target + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|--------------------------------------------| +| target | none | Discovered service instance target | +| host | none | Service instance host address | +| port | none | Service instance port number | + +### Use Cases + +- **Kubernetes Headless Services**: Discover Kubernetes pod instances through DNS +- **Cloud Services**: Discover cloud service instances (AWS Route53, Azure DNS, GCP Cloud DNS) +- **Traditional DNS**: Use existing DNS infrastructure for service discovery +- **Load Balancing**: Discover all backend server instances +- **Mail Servers**: Discover mail server instances through MX records +- **Multi-Environment**: Use different DNS records for service discovery across different environments + +### Common SRV Record Formats + +Different services use different SRV record formats: + +- **HTTP**: `_http._tcp.example.com` +- **HTTPS**: `_https._tcp.example.com` +- **LDAP**: `_ldap._tcp.example.com` +- **FTP**: `_ftp._tcp.example.com` +- **MySQL**: `_mysql._tcp.example.com` +- **PostgreSQL**: `_postgresql._tcp.example.com` + +### Kubernetes Integration + +In Kubernetes clusters, DNS service discovery can be used to discover pod instances: + +1. **Headless Services**: Kubernetes creates DNS A records for each pod of headless services +2. **Service Discovery**: Use DNS service discovery to monitor all pods of a specific service + +Example: + +- **DNS Host**: Kubernetes cluster DNS service IP (usually `10.96.0.10`) +- **Record Type**: `A` +- **Record Name**: `my-service.default.svc.cluster.local` +- **Monitoring Template**: `Port` monitoring + +### DNS Server Examples + +Commonly used DNS servers: + +- **Google Public DNS**: `8.8.8.8`, `8.8.4.4` +- **Cloudflare DNS**: `1.1.1.1`, `1.0.0.1` +- **Quad9 DNS**: `9.9.9.9` +- **OpenDNS**: `208.67.222.222`, `208.67.220.220` +- **Internal DNS**: Usually the enterprise's internal DNS server address + +### Best Practices + +1. **Use SRV Records**: SRV records are the recommended method for service discovery as they contain complete host and port information +2. **Set Proper TTL**: Set an appropriate DNS record TTL to balance real-time performance and DNS server load +3. **Redundancy**: Configure multiple DNS servers to ensure high availability +4. **Monitoring**: Regularly check DNS record validity and availability +5. **Security**: Ensure DNS queries are secure, consider using DNS over HTTPS (DoH) or DNS over TLS (DoT) diff --git a/home/versioned_docs/version-1.9.0/help/docker.md b/home/versioned_docs/version-1.9.0/help/docker.md new file mode 100644 index 0000000000..63fe3b03a1 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/docker.md @@ -0,0 +1,101 @@ +--- +id: docker +title: Monitor:Docker Monitor +sidebar_label: Docker Monitor +keywords: [open source monitoring tool, open source docker monitoring tool, monitoring docker metrics] +--- + +> Collect and monitor general performance Metrics of Docker containers. + +## Pre-monitoring operations + +If you want to monitor the container information in `Docker`, you need to open the port according to the following steps, so that the collection request can obtain the corresponding information. + +**1. Edit the docker.server file:** + +````shell +vi /usr/lib/systemd/system/docker.service +```` + +Find the **[Service]** node, modify the ExecStart property, and add `-H tcp://0.0.0.0:2375` + +````shell +ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -H tcp://0.0.0.0:2375 +```` + +This is equivalent to the **2375** port that is open to the outside world. Of course, it can be modified to other ports according to your own situation. + +**2. Reload the Docker configuration to take effect:** + +```shell +systemctl daemon-reload +systemctl restart docker +``` + +**Note: Remember to open the `2375` port number in the server console.** + +**3. If the above method does not work:** + +Open the `2375` port number inside the server. + +```shell +firewall-cmd --zone=public --add-port=2375/tcp --permanent +firewall-cmd --reload +``` + +### Configuration parameters + +| Parameter name | Parameter help description | +|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | Monitored peer IPV4, IPV6 or domain name. Note ⚠️ without protocol headers (eg: https://, http://). | +| Monitor Name | Identifies the name of this monitor. The name needs to be unique. | +| Port | The port provided by the database externally, the default is 2375. | +| Query Timeout | Set the timeout when getting the Docker server API interface, in ms, the default is 3000 ms. | +| Container Name | Generally monitors all running container information. | +| username | connection username, optional | +| password | connection password, optional | +| URL | Database connection URL, optional, if configured, the parameters such as database name, username and password in the URL will override the parameters configured above | +| Collection Interval | Monitor periodical collection data interval, in seconds, the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and then continue to add and modify operations if the detection is successful | +| Description Remarks | More remarks that identify and describe this monitoring, users can remark information here | + +### Collect metrics + +#### Metric collection: system + +| Metric Name | Metric Unit | Metric Help Description | +|--------------------|-------------|----------------------------------------------------| +| Name | None | Server Name | +| version | none | docker version number | +| os | none | server version eg: linux x86_64 | +| root_dir | none | docker folder directory eg: /var/lib/docker | +| containers | None | Total number of containers (running + not running) | +| containers_running | None | Number of running containers | +| containers_paused | none | number of containers in pause | +| images | None | The total number of container images. | +| ncpu | none | ncpu | +| mem_total | MB | Total size of memory used | +| system_time | none | system time | + +#### Metric collection: containers + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|----------------------------------------------| +| id | None | The ID of the container in Docker | +| name | None | The container name in the Docker container | +| image | None | Image used by the Docker container | +| command | None | Default startup command in Docker | +| state | None | The running state of the container in Docker | +| status | None | Update time in Docker container | + +#### Metrics collection: stats + +| Metric Name | Metric Unit | Metric Help Description | +|------------------|-------------|------------------------------------------------------------| +| name | None | The name in the Docker container | +| available_memory | MB | The amount of memory that the Docker container can utilize | +| used_memory | MB | The amount of memory already used by the Docker container | +| memory_usage | None | Memory usage of the Docker container | +| cpu_delta | None | The number of CPUs already used by the Docker container | +| number_cpus | None | The number of CPUs that the Docker container can use | +| cpu_usage | None | Docker container CPU usage | diff --git a/home/versioned_docs/version-1.9.0/help/dolphinscheduler.md b/home/versioned_docs/version-1.9.0/help/dolphinscheduler.md new file mode 100644 index 0000000000..5a38033fec --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/dolphinscheduler.md @@ -0,0 +1,106 @@ +--- +id: dolphinscheduler +title: Monitoring: Apache DolphinScheduler +sidebar_label: Apache DolphinScheduler +keywords: [ Open Source Monitoring System, Monitor Apache DolphinScheduler ] +--- + +> Collect monitoring metrics for Apache DolphinScheduler. + +## Pre-monitoring operations + +> Support Apache DolphinScheduler version 3.3.0 or later + +You need to create a token in Apache DolphinScheduler. + + +Please refer to [Open API](https://dolphinscheduler.apache.org/zh-cn/docs/3.2.2/guide/api/open-api) to create a new token.The main steps are as follows + +1. Log in to the Apache DolphinScheduler system, click "Security", then click "Token manage" on the left, and click "Create token" to create a token. +2. Select the "Expiration time" (Token validity time), select "User" (choose the specified user to perform the API operation), click "Generate token", copy the Token string, and click "Submit". + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|---------------------|-----------------------------------------------------------------------------------------------------------------| +| Target Host | The monitored endpoint's IPV4, IPV6, or domain name. Note ⚠️ no protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring task, which needs to be unique. | +| Port | The monitoring port opened by DolphinScheduler, default value: 12345. | +| SSL | Whether SSL is enabled for connecting to DolphinScheduler. | +| Token | Apache DolphinScheduler token string. | +| Query Timeout | Set the timeout for unresponsive queries, in milliseconds (ms), default 6000 ms. | +| Collection Interval | The interval time for periodic data collection, in seconds; the minimum interval that can be set is 30 seconds. | +| Binding Tags | Used for categorizing and managing monitoring resources. | +| Description Notes | Additional identification and description notes for this monitoring; users can add notes here. | + +## Collected Metrics + +### Metric Set: Master + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|---------------|-------------------------| +| host | None | Host | +| port | None | Port | +| serverStatus | None | Server Status | +| processId | None | Process Id | +| runningTime | Day | Running Time | +| cpuUsage | Percentage(%) | CPU Usage | +| memoryUsage | Percentage(%) | Memory Usage | +| diskUsage | Percentage(%) | Disk Usage | +| jvmCpuUsage | Percentage(%) | JVM CPU Usage | +| jvmMemoryUsage | Percentage(%) | JVM Memory Usage | +| jvmHeapUsed | None | JVM Heap Used | +| jvmNonHeapUsed | None | JVM NonHeap Used | +| jvmHeapMax | None | JVM Heap Max | +| jvmNonHeapMax | None | JVM NonHeap Max | + +### Metric Set: Worker + +| Metric Name | Metric Unit | Metric Help Description | +|------------------|---------------|-------------------------| +| host | None | Host | +| port | None | Port | +| serverStatus | None | Server Status | +| processId | None | Process Id | +| runningTime | Day | Running Time | +| cpuUsage | Percentage(%) | CPU Usage | +| memoryUsage | Percentage(%) | Memory Usage | +| diskUsage | Percentage(%) | Disk Usage | +| jvmCpuUsage | Percentage(%) | JVM CPU Usage | +| jvmMemoryUsage | Percentage(%) | JVM Memory Usage | +| jvmHeapUsed | None | JVM Heap Used | +| jvmNonHeapUsed | None | JVM NonHeap Used | +| jvmHeapMax | None | JVM Heap Max | +| jvmNonHeapMax | None | JVM NonHeap Max | +| workerHostWeight | None | Weight | +| threadPoolUsage | None | Thread Pool Usage | +| workerGroup | None | Worker Group | + +### Metric Set: Alert Server + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|---------------|-------------------------| +| host | None | Host | +| port | None | Port | +| serverStatus | None | Server Status | +| processId | None | Process Id | +| runningTime | Day | Running Time | +| cpuUsage | Percentage(%) | CPU Usage | +| memoryUsage | Percentage(%) | Memory Usage | +| diskUsage | Percentage(%) | Disk Usage | +| jvmCpuUsage | Percentage(%) | JVM CPU Usage | +| jvmMemoryUsage | Percentage(%) | JVM Memory Usage | +| jvmHeapUsed | None | JVM Heap Used | +| jvmNonHeapUsed | None | JVM NonHeap Used | +| jvmHeapMax | None | JVM Heap Max | +| jvmNonHeapMax | None | JVM NonHeap Max | + +### Metric Set: Database + +| Metric Name | Metric Unit | Metric Help Description | +|---------------------------|-------------|-----------------------------| +| dbType | None | Database Type | +| state | None | State | +| maxConnections | None | Max Connections | +| threadsConnections | None | Threads Connections | +| threadsRunningConnections | Day | Threads Running Connections | diff --git a/home/versioned_docs/version-1.9.0/help/doris_be.md b/home/versioned_docs/version-1.9.0/help/doris_be.md new file mode 100644 index 0000000000..a21cedf05d --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/doris_be.md @@ -0,0 +1,170 @@ +--- +id: doris_be +title: Monitoring DORIS Database BE +sidebar_label: DORIS Database BE +keywords: [Open Source Monitoring System, Open Source Database Monitoring, DORIS Database BE Monitoring] +--- + +> Collect and monitor general performance metrics for DORIS database BE. Supports DORIS 2.0.0. + +## Pre-monitoring operations + +| Parameter Name | Parameter Description | +|--------|-----------------------------------------------------| +| Monitor Host | The monitored target's IPV4, IPV6, or domain name. Note: Without the protocol header (e.g., https://, http://) | +| Task Name | A unique name identifying this monitoring task | +| Port | The port provided by the database to the outside, default is 8040 ,get the value of the`http_port` configuration item | +| Query Timeout | The timeout for the connection to not respond, in milliseconds, default is 3000 milliseconds | +| Database Name | Optional database instance name | +| Collection Interval | The interval between periodic data collections for monitoring, in seconds, with a minimum interval of 30 seconds | +| Probe Required | Whether to probe and check the availability of monitoring before adding new monitoring, continue with the addition or modification operation only if the probe is successful | +| Description | Additional notes and descriptions for this monitoring task | + +### Collection Indicators + +#### Metric Set:doris_be_load_channel_count + +| Metric Name | Metric Unit | Metric help description | +|-------|------|-----------------------| +| value | None | The current number of load channels | + +#### Metric Set:doris_be_memtable_flush_total + +| Metric Name | Metric Unit | Metric help description | +|-------|------|--------------------| +| value | None | Cumulative number of memtable writes to disk | + +#### Metric Set:doris_be_plan_fragment_count + +| Metric Name | Metric Unit | Metric help description | +|-------|------|------------------------------| +| value | None | Number of fragment instances currently received | + +#### Metric Set:doris_be_process_thread_num + +| Metric Name | Metric Unit | Metric help description | +|-------|------|---------------------------------| +| value | None | Number of BE process threads, collected through /proc/pid/task | + +#### Metric Set:doris_be_query_scan_rows + +| Metric Name | Metric Unit | Metric help description | +|-------|------|------------------------------------------------------------------------------| +| value | None | Cumulative number of rows read. This only counts the data volume read from OLAP tables, and it represents RawRowsRead (some data rows may be skipped by the index and not actually read, but they are still recorded in this value). | + +#### Metric Set:doris_be_result_buffer_block_count + +| Metric Name | Metric Unit | Metric help description | +|-------|------|---------------------| +| value | None | Number of queries in the current query result cache | + +#### Metric Set:doris_be_send_batch_thread_pool_queue_size + +| Metric Name | Metric Unit | Metric help description | +|-------|------|---------------------| +| value | None | Number of tasks in the queue of the thread pool used for sending data packets during import | + +#### Metric Set:doris_be_tablet_base_max_compaction_score + +| Metric Name | Metric Unit | Metric help description | +|-------|------|-----------------------------| +| value | None | Current maximum Base Compaction Score | + +#### Metric Set:doris_be_timeout_canceled_fragment_count + +| Metric Name | Metric Unit | Metric help description | +|-------|------|----------------------------------| +| value | None | Cumulative number of fragment instances cancelled due to timeout | + +#### Metric Set:doris_be_load_rows + +| Metric Name | Metric Unit | Metric help description | +|-------|------|------------------------| +| value | None | Cumulative number of rows sent through tablet sink | + +#### Metric Set:doris_be_all_rowsets_num + +| Metric Name | Metric Unit | Metric help description | +|-------|------|-----------------| +| value | None | Current number of rowsets | + +#### Metric Set:doris_be_all_segments_num + +| Metric Name | Metric Unit | Metric help description | +|-------|------|------------------| +| value | None | Current number of segments | + +#### Metric Set:doris_be_heavy_work_max_threads + +| Metric Name | Metric Unit | Metric help description | +|-------|------|-------------------| +| value | None | Number of threads in the brpc heavy thread pool | + +#### Metric Set:doris_be_light_work_max_threads + +| Metric Name | Metric Unit | Metric help description | +|-------|------|-------------------| +| value | None | Number of threads in the brpc light thread pool| + +#### Metric Set:doris_be_heavy_work_pool_queue_size + +| Metric Name | Metric Unit | Metric help description | +|-------|------|---------------------------------| +| value | None | Maximum queue length of the brpc heavy thread pool; if exceeded, work submissions will be blocked | + +#### Metric Set:doris_be_light_work_pool_queue_size + +| Metric Name | Metric Unit | Metric help description | +|-------|------|---------------------------------| +| value | None | Maximum queue length of the brpc light thread pool; if exceeded, work submissions will be blocked | + +#### Metric Set:doris_be_heavy_work_active_threads + +| Metric Name | Metric Unit | Metric help description | +|-------|------|--------------------| +| value | None | Number of active threads in the brpc heavy thread pool | + +#### Metric Set:doris_be_light_work_active_threads + +| Metric Name | Metric Unit | Metric help description | +|-------|------|--------------------| +| value | None | Number of active threads in the brpc light thread pool | + +#### Metric Set:doris_be_compaction_bytes_total + +| Metric Name | Metric Unit | Metric help description | +|------------|------|------------------------------| +| base | Bytes | Cumulative data volume of Base Compaction | +| cumulative | Bytes | Cumulative data volume of Cumulative Compaction | + +#### Metric Set:doris_be_disks_avail_capacity + +| Metric Name | Metric Unit | Metric help description | +|-------|------|--------------------------------------------| +| path | None | Specify data directory | +| value | Bytes | `{path="/path1/"}` represents the remaining disk space of the /path1 directory's disk. | + +#### Metric Set:doris_be_disks_total_capacity + +| Metric Name | Metric Unit | Metric help description | +|-------|------|--------------------------------------------| +| path | None | Specify data directory | +| value | Bytes | `{path="/path1/"}` represents the total disk space of the disk where the /path1 directory is located. | + +#### Metric Set:doris_be_local_bytes_read_total + +| Metric Name | Metric Unit | Metric help description | +|-------|------|----------------------------| +| value | Bytes | Number of bytes read by LocalFileReader | + +#### Metric Set:doris_be_local_bytes_written_total + +| Metric Name | Metric Unit | Metric help description | +|-------|------|----------------------------| +| value | Bytes | Number of bytes written by LocalFileWriter | + +#### Metric Set:doris_be_memory_allocated_bytes + +| Metric Name | Metric Unit | Metric help description | +|-------|------|------------------------------------------| +| value | Bytes | Physical memory size of the BE process, retrieved from /proc/self/status/VmRSS | diff --git a/home/versioned_docs/version-1.9.0/help/doris_fe.md b/home/versioned_docs/version-1.9.0/help/doris_fe.md new file mode 100644 index 0000000000..b6899d95fa --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/doris_fe.md @@ -0,0 +1,132 @@ +--- +id: doris_fe +title: Monitoring DORIS Database FE +sidebar_label: DORIS Database FE +keywords: [Open Source Monitoring System, Open Source Database Monitoring, DORIS Database FE Monitoring] +--- + +> Collect and monitor general performance metrics for DORIS database FE. Supports DORIS 2.0.0. + +**Protocol: HTTP** + +## Pre-monitoring operations + +Check the `fe/conf/fe.conf` file to obtain the value of the `http_port` configuration item, which is used for monitoring. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | The monitored target's IPV4, IPV6, or domain name. Note: Without the protocol header (e.g., https://, http://) | +| Task Name | A unique name identifying this monitoring task | +| Port | The port provided by the database to the outside, default is 8030 ,get the value of the`http_port` configuration item | +| Query Timeout | The timeout for the connection to not respond, in milliseconds, default is 3000 milliseconds | +| Database Name | Optional database instance name | +| Collection Interval | The interval between periodic data collections for monitoring, in seconds, with a minimum interval of 30 seconds | +| Probe Required | Whether to probe and check the availability of monitoring before adding new monitoring, continue with the addition or modification operation only if the probe is successful | +| Description | Additional notes and descriptions for this monitoring task | + +### Collection Indicators + +#### Metric Set: doris_fe_connection_total + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|----------------------------------------------------| +| value | None | The current number of MySQL port connections on FE | + +#### Metric Set: doris_fe_edit_log_clean + +Should not fail; if it does, manual intervention is required. + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|---------------------------------------------------------------| +| success | None | The number of successful cleanups of historical metadata logs | +| failed | None | The number of failed cleanups of historical metadata logs | + +#### Metric Set: doris_fe_edit_log + +| Metric Name | Metric Unit | Metric help description | +|-------------------|-------------|---------------------------------------------| +| write | None | The count of metadata log write operations | +| read | None | The count of metadata log read operations | +| current | None | The current number of metadata logs | +| accumulated_bytes | Bytes | The cumulative value of metadata log writes | +| current_bytes | Bytes | The current value of metadata logs | + +#### Metric Set: doris_fe_image_clean + +Should not fail; if it does, manual intervention is required. + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|----------------------------------------------------------------------| +| success | None | The number of successful cleanups of historical metadata image files | +| failed | None | The number of failed cleanups of historical metadata image files | + +#### Metric Set: doris_fe_image_write + +Should not fail; if it does, manual intervention is required. + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------------------------------| +| success | None | The number of successful generations of metadata image files | +| failed | None | The number of failed generations of metadata image files | + +#### Metric Set: doris_fe_query_err + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-------------------------------------------| +| value | None | The cumulative value of erroneous queries | + +#### Metric Set: doris_fe_max_journal_id + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| value | None | The current maximum metadata log ID on the FE node. If it is a Master FE, it is the maximum ID currently written; if it is a non-Master FE, it represents the maximum metadata log ID currently being replayed. Used to observe if there is a large gap between the IDs of multiple FEs. A large gap indicates issues with metadata synchronization | + +#### Metric Set: doris_fe_max_tablet_compaction_score + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| value | None | The largest compaction score value among all BE nodes. This value can observe the current cluster's maximum compaction score to judge if it is too high. If too high, there may be delays in queries or writes | + +#### Metric Set: doris_fe_qps + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|---------------------------------------------------------------------------------| +| value | None | The number of queries per second on the current FE (only counts query requests) | + +#### Metric Set: doris_fe_query_err_rate + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------------| +| value | None | The number of erroneous queries per second | + +#### Metric Set: doris_fe_report_queue_size + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| value | None | The length of the queue for various regular reporting tasks on the BE side at the FE end. This value reflects the degree of blocking of reporting tasks on the Master FE node. A larger value indicates insufficient processing capacity on the FE | + +#### Metric Set: doris_fe_rps + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|------------------------------------------------------------------------------------------------------| +| value | None | The number of requests per second on the current FE (includes queries and other types of statements) | + +#### Metric Set: doris_fe_scheduled_tablet_num + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| value | None | The number of tablets currently being scheduled by the Master FE node. This includes tablets that are being repaired and tablets that are being balanced. This value can reflect the number of tablets currently migrating in the cluster. If there is a value for a long time, it indicates that the cluster is unstable | + +#### Metric Set: doris_fe_txn_status + +Can observe the number of import transactions in various states to determine if there is a backlog. + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-------------------------| +| unknown | None | Unknown state | +| prepare | None | In preparation | +| committed | None | Committed | +| visible | None | Visible | +| aborted | None | Aborted / Revoked | diff --git a/home/versioned_docs/version-1.9.0/help/dynamic_tp.md b/home/versioned_docs/version-1.9.0/help/dynamic_tp.md new file mode 100644 index 0000000000..17a3ab9ee4 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/dynamic_tp.md @@ -0,0 +1,101 @@ +--- +id: dynamic_tp +title: Monitoring DynamicTp ThreadPool +sidebar_label: DynamicTp Monitor +keywords: [open source monitoring tool, open source dynamicTp monitoring tool, monitoring DynamicTp metrics] +--- + +> Collect and monitor the thread pool performance Metrics exposed by DynamicTp actuator. + +## PreRequisites + +1. Integration Using `DynamicTp` + + `DynamicTp` is a lightweight dynamic thread pool based on the configuration center of the Jvm language. It has built-in monitoring and alarm functions, which can be realized through SPI custom extensions. + + For integrated use, please refer to the document [Quick Start](https://dynamictp.cn/guide/use/quick-start.html) + +2. Open SpringBoot Actuator Endpoint to expose `DynamicTp` Metric interface + + ```yaml + management: + endpoints: + web: + exposure: + include: '*' + ``` + + Test whether the access Metric interface `ip:port/actuator/dynamic-tp` has response json data as follows: + + ```json + [ + { + "poolName": "commonExecutor", + "corePoolSize": 1, + "maximumPoolSize": 1, + "queueType": "LinkedBlockingQueue", + "queueCapacity": 2147483647, + "queueSize": 0, + "fair": false, + "queueRemainingCapacity": 2147483647, + "activeCount": 0, + "taskCount": 0, + "completedTaskCount": 0, + "largestPoolSize": 0, + "poolSize": 0, + "waitTaskCount": 0, + "rejectCount": 0, + "rejectHandlerName": null, + "dynamic": false, + "runTimeoutCount": 0, + "queueTimeoutCount": 0 + }, + { + "maxMemory": "4GB", + "totalMemory": "444MB", + "freeMemory": "250.34 MB", + "usableMemory": "3.81GB" + } + ] + ``` + +3. Add DynamicTp monitoring under HertzBeat middleware monitoring + +### Configuration parameters + +| Parameter name | Parameter help description | +|-------------------|-------------------------------------------------------------------------| +| Monitoring Host | The peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | The name that identifies this monitoring, and the name needs to be unique. | +| Port | The port provided by the application service, the default is 8080. | +| Enable HTTPS | Whether to access the website through HTTPS, note ⚠️Enable HTTPS, the default corresponding port needs to be changed to 443 | +| Base Path | Exposed interface path prefix, default /actuator | +| Acquisition Interval | Interval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful | +| Description Remarks | More remark information to identify and describe this monitoring, users can remark information here | + +### Collect metrics + +#### Metric collection: thread_pool + +| Metric Name | Metric Unit | Metric Help Description | +|--------------------------|-------------|---------------------------------------------| +| pool_name | None | Thread pool name | +| core_pool_size | None | Number of core threads | +| maximum_pool_size | None | Maximum number of threads | +| queue_type | None | Task queue type | +| queue_capacity | MB | task queue capacity | +| queue_size | None | The current occupied size of the task queue | +| fair | None | Queue mode, SynchronousQueue will be used | +| queue_remaining_capacity | MB | task queue remaining size | +| active_count | None | Number of active threads | +| task_count | None | Total number of tasks | +| completed_task_count | None | Number of completed tasks | +| largest_pool_size | None | The largest number of threads in history | +| pool_size | none | current number of threads | +| wait_task_count | None | Number of tasks waiting to be executed | +| reject_count | None | Number of rejected tasks | +| reject_handler_name | None | Reject policy type | +| dynamic | None | Dynamic thread pool or not | +| run_timeout_count | None | Number of running timeout tasks | +| queue_timeout_count | None | Number of tasks waiting for timeout | diff --git a/home/versioned_docs/version-1.9.0/help/elasticsearch.md b/home/versioned_docs/version-1.9.0/help/elasticsearch.md new file mode 100644 index 0000000000..8112ac069c --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/elasticsearch.md @@ -0,0 +1,63 @@ +--- +id: elasticsearch +title: Monitoring:ElasticSearch +sidebar_label: ElasticSearch +keywords: [ open source monitoring tool, monitoring ElasticSearch metrics ] +--- + +> Collect and monitor the general performance Metrics of ElasticSearch + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6. Note⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique. | +| Monitoring port | The HTTP API port opened by Elasticsearch,default is 9200. | +| SSL | Whether SSL is enabled for connecting to Elasticsearch. | +| Auth Type | Authentication type,Optional. | +| Username | Username,Optional. | +| Password | Password,Optional. | +| Connect Timeout | Set the timeout for elasticsearch query, default is 6000 milliseconds. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Bind Tags | Used to classify and manage monitoring resources. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Collection Metrics + +#### Metrics Set:health + +| Metric name | Metric unit | Metric help description | +|-----------------------|-------------|-------------------------------------------| +| cluster_name | none | Cluster Name | +| status | none | status | +| nodes | none | Number of nodes in the cluster. | +| data_nodes | none | Number of data nodes in the cluster. | +| active_primary_shards | none | Number of active shards on primary nodes. | +| active_shards | none | Number of active shards. | +| active_percentage | % | Active Percentage | +| initializing_shards | none | Number of initialized shards. | +| unassigned_shards | none | Number of unassigned shards. | + +#### Metrics Set:nodes + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------| +| total | none | Number of nodes. | +| successful | none | Number of online nodes. | +| failed | none | Number of offline nodes. | + +#### Metrics Set:nodes_detail + +| Metric name | Metric unit | Metric help description | +|-------------------|-------------|-------------------------| +| node_name | none | Node Name | +| ip | none | IP Address | +| cpu_load_average | none | Cpu Load Average | +| cpu_percent | % | Cpu Percent | +| heap_used | MB | Heap Used | +| heap_used_percent | % | Heap Used Percent | +| heap_total | MB | Heap Total | +| disk_free | GB | Disk Free | +| disk_total | GB | Disk Total | +| disk_used_percent | % | Disk Used Percent | diff --git a/home/versioned_docs/version-1.9.0/help/etcd.md b/home/versioned_docs/version-1.9.0/help/etcd.md new file mode 100644 index 0000000000..e9395a85eb --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/etcd.md @@ -0,0 +1,65 @@ +--- +id: etcd +title: Monitoring:etcd monitoring +sidebar_label: etcd +keywords: [open source monitoring tool, open source middleware monitoring tool, monitoring etcd metrics] +--- + +> HertzBeat monitors the etcd key-value store by collecting metrics from the Prometheus metrics endpoint that etcd exposes. +> +> etcd 3.4+ is supported (the database size metric `etcd_mvcc_db_total_size_in_bytes` replaced the old `etcd_debugging_*` name in 3.4). + +## PreRequisites + +### Make sure HertzBeat can reach etcd's metrics endpoint + +etcd exposes Prometheus-format metrics on its client port (default `2379`) at the `/metrics` path. Make sure this address is reachable from HertzBeat: + +1. If etcd only listens on localhost, or client mutual TLS is enabled on the client port, configure a dedicated metrics listener via [`--listen-metrics-urls`](https://etcd.io/docs/latest/op-guide/configuration/). It serves the metrics and health-check endpoints; if exposed without TLS, restrict it to a trusted network. +2. Access `{metrics-host}:{metrics-port}/metrics` (the client port `2379` by default) from the HertzBeat host to confirm metrics data can be fetched. + +More information see [etcd monitoring documentation](https://etcd.io/docs/latest/op-guide/monitoring/). + +### Configuration parameter + +| Parameter name | Parameter help description | +|----------------------|---------------------------------------------------------------------------------------------| +| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Port | Port of the etcd metrics endpoint, default 2379 when using the client listener | +| Query Timeout | HTTP request timeout in milliseconds, default 6000 | +| HTTPS | Whether to use HTTPS to request the metrics endpoint | +| Headers | Optional extra HTTP request headers | +| Auth Type | Optional Basic/Digest auth if the metrics endpoint sits behind an auth proxy | +| Username / Password | Credentials used when Auth Type is set | + +### Collection Metric + +#### Metric set:etcd_server_has_leader + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|---------------------------------------------------------------| +| hasLeader | none | Whether this etcd member has a raft leader (1=yes, 0=no) | + +#### Metric set:etcd_mvcc_db_total_size_in_bytes + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------------------------------------| +| dbSize | MB | Total size of the underlying database physically allocated | + +#### Metric set:etcd_server_leader_changes_seen_total + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|-------------------------------------------| +| leaderChanges | none | Total number of leader changes observed | + +#### Metric set:process_cpu_seconds_total + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|---------------------------------------------------| +| cpuSeconds | second | Cumulative user and system CPU time consumed | + +#### Metric set:process_resident_memory_bytes + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-----------------------------------| +| memory | MB | Resident memory size of the process | diff --git a/home/versioned_docs/version-1.9.0/help/euleros.md b/home/versioned_docs/version-1.9.0/help/euleros.md new file mode 100644 index 0000000000..a7d9495b29 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/euleros.md @@ -0,0 +1,114 @@ +--- +id: euleros +title: Monitoring EulerOS +sidebar_label: EulerOS +keywords: [ Open Source Monitoring System, Open Source OS Monitoring, EulerOS Monitoring ] +--- + +> Collect and monitor general performance metrics for EulerOS (system information, CPU, memory, disk, network interface, file system, top resource processes, etc.). + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/eureka_sd.md b/home/versioned_docs/version-1.9.0/help/eureka_sd.md new file mode 100644 index 0000000000..e2ac9bf8bb --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/eureka_sd.md @@ -0,0 +1,94 @@ +--- +id: eureka_sd +title: Monitoring Eureka Service Discovery +sidebar_label: Eureka Service Discovery +keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring Eureka service discovery] +--- + +> HertzBeat integrates with Eureka registry to automatically discover service instances and create monitoring tasks for them. + +## Overview + +Eureka Service Discovery allows HertzBeat to connect to your Eureka server and automatically discover all registered service instances. When a new service instance is registered or an existing instance goes offline, HertzBeat will automatically create or delete corresponding monitoring tasks, achieving automated monitoring in microservice environments. + +### PreRequisites + +#### Deploy Eureka Server + +1. Deploy Eureka server according to [Eureka official documentation](https://spring.io/guides/gs/service-registration-and-discovery/). +2. Ensure Eureka server is accessible from HertzBeat. +3. Verify that you can access Eureka dashboard at `http://your-eureka-server:port/` + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|-------------------------------------------------------------------------------------------------------------------------| +| Target Name | Identify the name of this monitoring. The name needs to be unique | +| Eureka Service Discovery Url | Eureka server address. Example: `http://eureka-server:8761/eureka` | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Usage Steps + +1. **Create Service Discovery Monitoring** + - In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring** + - Select monitoring type: **Eureka Service Discovery** + - Fill in the basic configuration parameters + +2. **Configure Monitoring Template** + - After creating the service discovery monitoring, you need to specify a monitoring template + - The template defines what type of monitoring to create for discovered service instances + - For example: If discovered instances are HTTP services, you can select HTTP monitoring template + - Common template types: Port, HTTP, HTTPS, etc. + +3. **Automatic Discovery** + - HertzBeat will periodically query Eureka server based on the collection interval + - Automatically create monitoring tasks for newly registered service instances + - Automatically delete monitoring tasks for offline service instances + +4. **View Discovered Instances** + - In the monitoring list, you can see all automatically created sub-monitoring tasks + - Each sub-monitoring task corresponds to a discovered service instance + +### Example of usage + +Suppose your Eureka server is running at `http://192.168.1.100:8761/eureka`, and you want to automatically monitor all service instances registered in it. + +Configuration example: + +- **Target Name**: `Eureka-Service-Discovery` +- **Eureka Service Discovery Url**: `http://192.168.1.100:8761/eureka` +- **Collection interval**: `60` seconds +- **Monitoring Template**: Select `Port` monitoring (to detect instance availability) + +After configuration: + +1. HertzBeat connects to Eureka server +2. Retrieves all registered application instances +3. Automatically creates Port monitoring for each instance (e.g., `USER-SERVICE-192.168.1.101:8080`) +4. Every 60 seconds, checks for newly registered or offline services and updates monitoring tasks accordingly + +### Notes + +- **Network Connectivity**: Ensure HertzBeat can access the Eureka server address +- **Monitoring Templates**: Service discovery only discovers service instance addresses, you need to configure appropriate monitoring templates to actually monitor the instances +- **Collection Interval**: Recommended minimum interval is 60 seconds to avoid excessive requests to Eureka server +- **Permission Requirements**: Eureka server does not require authentication by default, but if authentication is configured, the URL needs to include username and password +- **Instance Naming**: Automatically created monitoring tasks are named in the format: `{ApplicationName}-{Host}:{Port}` + +### Collection Metric + +#### Metric set: Monitor Target + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|--------------------------------------------| +| target | none | Discovered service instance target | +| host | none | Service instance host address | +| port | none | Service instance port number | + +### Use Cases + +- **Microservice Architecture**: Automatically monitor all microservice instances registered in Eureka +- **Dynamic Scaling**: Automatically adapt to service instances added/removed due to autoscaling +- **Unified Monitoring**: Centrally manage monitoring of all services in the microservice environment +- **Operation and Maintenance**: Reduce manual configuration work and improve operation efficiency diff --git a/home/versioned_docs/version-1.9.0/help/fedora.md b/home/versioned_docs/version-1.9.0/help/fedora.md new file mode 100644 index 0000000000..e7e4605383 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/fedora.md @@ -0,0 +1,114 @@ +--- +id: fedora +title: Monitoring Fedora Operating System +sidebar_label: Fedora OS Operating System +keywords: [ Open Source Monitoring System, Open Source OS Monitoring, Fedora OS Monitoring ] +--- + +> Collect and monitor general performance metrics for Fedora operating systems (system information, CPU, memory, disk, network interface, file system, top resource processes, etc.). + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/flink.md b/home/versioned_docs/version-1.9.0/help/flink.md new file mode 100644 index 0000000000..38cff62789 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/flink.md @@ -0,0 +1,35 @@ +--- +id: flink +title: Monitoring Flink +sidebar_label: Flink +keywords: [open source monitoring tool, open source flink monitoring tool] +--- + +> Collect and monitor the general performance Metrics of Flink. + +## Configuration parameter + +| Parameter Name | Parameter Help Description | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | The monitored peer IPV4, IPV6, or domain name. Note: Do not include protocol headers (e.g., https://, http://). | +| Task Name | Identifier for this monitoring task, name must be unique. | +| Port | Monitoring port. | +| Query Timeout | Sets the timeout for JVM connection in milliseconds, default is 3000 milliseconds. | +| SSL | Whether to enable SSL (default is off). | +| Username | Connection username. | +| Password | Connection password. | +| Collection Interval | Interval for periodic data collection during monitoring, in seconds. The minimum settable interval is 30 seconds. | +| Whether to detect | Whether to perform a probe check for monitoring availability before adding a new monitor; operations proceed if successful. | +| Description Remarks | Additional identifiers and descriptions for this monitoring, where users can note information. | + +### Collection Metrics + +#### Metrics Set:Overview + +| Metric Name | Metric Unit | Metric Help Description | +|--------------|-------------|-------------------------| +| slots_total | Units | Total number of slots. | +| slots_used | Units | Number of slots used. | +| task_total | Units | Total number of tasks. | +| jobs_running | Units | Number of jobs running. | +| jobs_failed | Units | Number of jobs failed. | diff --git a/home/versioned_docs/version-1.9.0/help/flink_on_yarn.md b/home/versioned_docs/version-1.9.0/help/flink_on_yarn.md new file mode 100644 index 0000000000..bc6bd97058 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/flink_on_yarn.md @@ -0,0 +1,137 @@ +# Flink On Yarn Monitoring + +> Measurement and monitoring of general metrics for Flink stream engine in Yarn running mode. + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|---------------------|---------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | The monitored peer's IPV4, IPV6, or domain name. Note ⚠️ do not include protocol headers (e.g., https://, http://). | +| Task Name | The name identifying this monitoring task. The name must be unique. | +| Yarn Port | The Yarn port, corresponding to the port in `yarn.resourcemanager.webapp.address`. | +| Query Timeout | The timeout for JVM connections, in milliseconds, default is 3000 ms. | +| Enable SSL | Whether to enable SSL | +| Username | Connection username | +| Password | Connection password | +| Monitoring Interval | Interval for periodic data collection, in seconds, minimum interval is 30 seconds. | +| Tags | Used for categorizing and managing monitoring resources. | +| Description | Additional notes and descriptions for this monitoring task. Users can add notes here. | + +### Collected Metrics + +#### Metrics Set: JobManager Metrics + +| Metric Name | Metric Unit | Metric Help Description | +|-------------------------------------------------------|-------------|----------------------------------------------------| +| Status.JVM.Memory.NonHeap.Committed | Bytes | Non-heap memory committed | +| Status.JVM.Memory.Mapped.TotalCapacity | Bytes | Total capacity of mapped memory | +| Status.JVM.Memory.NonHeap.Used | Bytes | Non-heap memory used | +| Status.JVM.Memory.Metaspace.Max | Bytes | Maximum capacity of metaspace | +| Status.JVM.GarbageCollector.G1_Old_Generation.Count | Count | Count of old generation garbage collections | +| Status.JVM.Memory.Direct.MemoryUsed | Bytes | Direct memory used | +| Status.JVM.Memory.Mapped.MemoryUsed | Bytes | Mapped memory used | +| Status.JVM.GarbageCollector.G1_Young_Generation.Count | Count | Count of young generation garbage collections | +| Status.JVM.Memory.Direct.TotalCapacity | Bytes | Total capacity of direct memory | +| Status.JVM.GarbageCollector.G1_Old_Generation.Time | ms | Time spent on old generation garbage collections | +| Status.JVM.Memory.Heap.Committed | Bytes | Heap memory committed | +| Status.JVM.Memory.Mapped.Count | Count | Count of mapped memory | +| Status.JVM.Memory.Metaspace.Used | Bytes | Metaspace memory used | +| Status.JVM.Memory.Direct.Count | Count | Count of direct memory | +| Status.JVM.Memory.Heap.Used | Bytes | Heap memory used | +| Status.JVM.Memory.Heap.Max | Bytes | Maximum capacity of heap memory | +| Status.JVM.GarbageCollector.G1_Young_Generation.Time | ms | Time spent on young generation garbage collections | +| Status.JVM.Memory.NonHeap.Max | Bytes | Maximum capacity of non-heap memory | + +#### Metrics Set: JobManager Config + +| Metric Name | Metric Unit | Metric Help Description | +|--------------------------------------------|-------------|----------------------------------------------------| +| internal.jobgraph-path | - | Internal job graph path | +| env.java.home | - | Java environment path | +| classloader.check-leaked-classloader | - | Whether to check for leaked class loaders | +| env.java.opts | - | Java options | +| high-availability.cluster-id | - | High availability cluster ID | +| jobmanager.rpc.address | - | JobManager's RPC address | +| jobmanager.memory.jvm-overhead.min | Bytes | Minimum JVM overhead for JobManager | +| jobmanager.web.port | Port | JobManager's Web port | +| webclient.port | Port | Web client port | +| execution.savepoint.ignore-unclaimed-state | - | Whether to ignore unclaimed state | +| io.tmp.dirs | Path | Temporary file directories | +| parallelism.default | - | Default parallelism | +| taskmanager.memory.fraction | - | TaskManager memory fraction | +| taskmanager.numberOfTaskSlots | - | Number of task slots for TaskManager | +| yarn.application.name | - | Yarn application name | +| taskmanager.heap.mb | MB | Heap memory size for TaskManager | +| taskmanager.memory.process.size | GB | Process memory size for TaskManager | +| web.port | Port | Web port | +| classloader.resolve-order | - | Class loader resolve order | +| jobmanager.heap.mb | MB | Heap memory size for JobManager | +| jobmanager.memory.off-heap.size | Bytes | Off-heap memory size for JobManager | +| state.backend.incremental | - | Whether the state backend is incremental | +| execution.target | - | Execution target | +| jobmanager.memory.process.size | GB | Process memory size for JobManager | +| web.tmpdir | Path | Web temporary directory | +| yarn.ship-files | Path | Yarn shipped files | +| jobmanager.rpc.port | Port | JobManager's RPC port | +| internal.io.tmpdirs.use-local-default | - | Whether to use local default temporary directories | +| execution.checkpointing.interval | ms | Checkpointing interval | +| execution.attached | - | Whether to execute attached | +| internal.cluster.execution-mode | - | Internal cluster execution mode | +| execution.shutdown-on-attached-exit | - | Whether to shutdown on attached exit | +| pipeline.jars | Path | Pipeline JAR files | +| rest.address | - | REST address | +| state.backend | - | State backend type | +| jobmanager.memory.jvm-metaspace.size | Bytes | JVM metaspace size for JobManager | +| $internal.deployment.config-dir | Path | Internal deployment configuration directory | +| $internal.yarn.log-config-file | Path | Internal Yarn log configuration file path | +| jobmanager.memory.heap.size | Bytes | Heap memory size for JobManager | +| state.checkpoints.dir | Path | State checkpoints directory | +| jobmanager.memory.jvm-overhead.max | Bytes | Maximum JVM overhead for JobManager | + +#### TaskManager Metrics + +| Metric Name | Metric Unit | Metric Help Description | +|---------------------------------------|-------------|---------------------------------------------------| +| Container ID | - | Container ID for uniquely identifying a container | +| Path | - | Container path | +| Data Port | Port | Data transmission port | +| JMX Port | Port | JMX (Java Management Extensions) port | +| Last Heartbeat | Timestamp | Last heartbeat time | +| All Slots | Count | Total number of task slots in the container | +| Free Slots | Count | Number of free task slots in the container | +| totalResourceCpuCores | Cores | Total number of CPU cores in the container | +| totalResourceTaskHeapMemory | MB | Total task heap memory size in the container | +| totalResourceManagedMemory | MB | Total managed memory size in the container | +| totalResourceNetworkMemory | MB | Total network memory size in the container | +| freeResourceCpuCores | Cores | Number of free CPU cores in the container | +| freeResourceTaskHeapMemory | MB | Free task heap memory size in the container | +| freeResourceTaskOffHeapMemory | MB | Free task off-heap memory size in the container | +| freeResourceManagedMemory | MB | Free managed memory size in the container | +| freeResourceNetworkMemory | MB | Free network memory size in the container | +| CPU Cores | Cores | Number of CPU cores | +| Physical MEM | MB | Size of physical memory | +| JVM Heap Size | MB | Size of JVM heap memory | +| Flink Managed MEM | MB | Size of Flink managed memory | +| Framework Heap | MB | Size of framework heap memory | +| Task Heap | MB | Size of task heap memory | +| Framework Off-Heap | MB | Size of framework off-heap memory | +| memoryConfigurationTaskOffHeap | Bytes | Task off-heap memory configuration | +| Network | MB | Network memory configuration | +| Managed Memory | MB | Managed memory configuration | +| JVM Metaspace | MB | Size of JVM metaspace | +| JVM Overhead | MB | JVM overhead | +| memoryConfigurationTotalFlinkMemory | Bytes | Total Flink memory configuration | +| memoryConfigurationTotalProcessMemory | Bytes | Total process memory configuration | + +#### TaskManager Status Metrics + +| Metric Name | Metric Unit | Metric Help Description | +|-----------------------------------|-------------|------------------------------------| +| Status.Shuffle.Netty.TotalMemory | MB | Total memory used by Netty Shuffle | +| Status.Flink.Memory.Managed.Used | MB | Managed memory used by Flink | +| Status.JVM.Memory.Metaspace.Used | MB | Used JVM metaspace memory | +| Status.JVM.Memory.Metaspace.Max | MB | Maximum JVM metaspace memory | +| Status.JVM.Memory.Heap.Used | MB | Used JVM heap memory | +| Status.JVM.Memory.Heap.Max | MB | Maximum JVM heap memory | +| Status.Flink.Memory.Managed.Total | MB | Total managed memory by Flink | +| Status.Shuffle.Netty.UsedMemory | MB | Used memory by Netty Shuffle | diff --git a/home/versioned_docs/version-1.9.0/help/freebsd.md b/home/versioned_docs/version-1.9.0/help/freebsd.md new file mode 100644 index 0000000000..7d873892e1 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/freebsd.md @@ -0,0 +1,94 @@ +--- +id: freebsd +title: Monitoring FreeBSD Operating System +sidebar_label: FreeBSD Operating System +keywords: [ Open Source Monitoring System, Open Source Operating System Monitoring, FreeBSD Operating System Monitoring ] +--- + +> Collect and monitor general performance metrics (system information, CPU, memory, disk, network cards, file systems, top resource processes, etc.) of the FreeBSD operating system. + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Collection Metrics + +#### Metric Set: Basic Info + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Info + +| Metric Name | Metric Unit | Metric help description | +|----------------|-------------|----------------------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load for the last 1/5/15 minutes | +| context_switch | None | Current context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Info + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-------------------------| +| physmem | Mb | Physical memory | +| usermem | Mb | User program memory | +| realmem | Mb | Actual memory | +| availmem | Mb | Available memory | + +#### Metric Set: Disk Free + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-------------------------| +| filesystem | None | File system name | +| used | Mb | Used disk space | +| available | Mb | Available disk space | +| usage | % | Usage percentage | +| mounted | None | Mount point directory | + +#### Metric Set: Top10 CPU Process + +Statistics of the top 10 processes using CPU. Statistics include: Process ID, CPU usage, memory usage, executed command. + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top10 Memory Process + +Statistics of the top 10 processes using memory. Statistics include: Process ID, memory usage, CPU usage, executed command. + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/ftp.md b/home/versioned_docs/version-1.9.0/help/ftp.md new file mode 100644 index 0000000000..0d87457beb --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/ftp.md @@ -0,0 +1,60 @@ +--- +id: ftp +title: Monitoring FTP +sidebar_label: FTP Monitor +keywords: [ open source monitoring tool, open source ftp server monitoring tool, monitoring ftp metrics ] +--- + +> Collect and monitor the general performance Metrics of FTP server. + +**Protocol Use:FTP** + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: ftp://). | +| Monitoring name | Identify the name of this monitoring, The name needs to be unique. | +| Port | Port provided by FTP server ,default is 21. | +| Direction | Directory on the FTP server. | +| Timeout | Timeout for connecting to FTP server. | +| Username | Username for connecting to the FTP server, optional. | +| Password | Password for connecting to the FTP server, optional. | +| SFTP | Use SFTP instead of FTP. SFTP requires a username and password. | +| Host key fingerprints | Trusted SFTP server SHA-256 fingerprints, one per line or separated by commas. Required unless verification is explicitly skipped. | +| Skip host key verification | **Dangerous option.** Use only for a controlled diagnostic; it does not authenticate the SFTP server. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Bind Tags | Used to classify and manage monitoring resources. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +## SFTP host key verification + +HertzBeat accepts only the configured SFTP host keys. Obtain the server keys, +then verify their fingerprints through a trusted channel such as the server +console, configuration management, or an administrator. `ssh-keyscan` alone +does not authenticate a server. + +```shell +ssh-keyscan -p 22 sftp.example.com > /tmp/sftp-host-keys +ssh-keygen -lf /tmp/sftp-host-keys -E sha256 +``` + +Copy the verified `SHA256:...` values into **SFTP Host Key Fingerprints**. The +field accepts one value per line or comma-separated values. + +For a planned host-key rotation, verify the new key first, add both the current +and new fingerprints, rotate the server key, and remove the old fingerprint +only after all HertzBeat collectors use the new key. + +SFTP monitors and imported configurations must pin at least one fingerprint +unless the operator explicitly selects the dangerous skip-verification option. +HertzBeat does not enable that option automatically. + +### Collection Metrics + +#### Metrics Set:Basic + +| Metric name | Metric unit | Metric help description | +|---------------|-------------|----------------------------------------------------------| +| Is Active | none | Check if the directory exists and has access permission. | +| Response Time | ms | Response Time | diff --git a/home/versioned_docs/version-1.9.0/help/fullsite.md b/home/versioned_docs/version-1.9.0/help/fullsite.md new file mode 100644 index 0000000000..193b33531b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/fullsite.md @@ -0,0 +1,34 @@ +--- +id: fullsite +title: Monitoring Full site +sidebar_label: Full site Monitor +keywords: [open source monitoring tool, open source website monitoring tool, monitoring sitemap metrics] +--- + +> Available or not to monitor all pages of the website. +> A website often has multiple pages provided by different services. We monitor the full site by collecting the SiteMap exposed by the website. +> Note⚠️ This monitoring requires your website to support SiteMap. We support SiteMap in XML and TXT formats. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Ports provided by website, http generally defaults to 80 and https generally defaults to 443 | +| SiteMap | Relative path of website SiteMap address, eg:/sitemap.xml | +| Enable HTTPS | Whether to access the website through HTTPS. Note⚠️When HTTPS is enabled, the default corresponding port needs to be changed to 443 | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:summary + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|------------------------------------------------------| +| url | none | URL path of web page | +| statusCode | none | Response HTTP status code for requesting the website | +| responseTime | ms | Website response time | +| errorMsg | none | Error message feedback after requesting the website | diff --git a/home/versioned_docs/version-1.9.0/help/grafana_dashboard.md b/home/versioned_docs/version-1.9.0/help/grafana_dashboard.md new file mode 100644 index 0000000000..fd8bf0ff61 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/grafana_dashboard.md @@ -0,0 +1,78 @@ +--- +id: grafana_dashboard +title: Grafana Dashboard +sidebar_label: Grafana Historical Charts +keywords: [Grafana, Historical Dashboard] +--- + +> `Grafana` is an open source visualization and analytics platform that helps you easily create, share and monitor dashboards. In this article, we will cover how to use `Grafana` to display historical data in `HertzBeat`. + +## Prerequisites + +- We recommend using the latest version of Grafana. Earlier versions may not support the exposed API. +- The `Grafana` service is started and the account password is configured. +- The `HertzBeat` service is started and the `VictoriaMetrics` time-series database is configured (note: the `VictoriaMetrics` data source is required). + +:::caution Caution. +`Grafana` can only show historical data for `Prometheus` type of monitoring, currently it does not support monitoring data defined by `yml` in `HertzBeat`. +::: + +### Enable Grafana embedded features and configure anonymous authentication with role-based permissions + +ref: [https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/](https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/). +In the `Grafana` configuration file `grafana.ini`, set the configuration parameters. +Or run `Grafana` via `Docker`. + +Modify the following configuration parameters in the `Grafana` configuration file `grafana.ini`: + +```ini +[auth.proxy] +enabled = true + +[auth.anonymous] +enabled = true +org_role = Admin + +[users] +viewers_can_edit = true + +[security] +allow_embedding = true +``` + +Or run `Grafana` via `Docker` using the following command: + +```bash +docker run -d -p 3000:3000 --name=grafana \ + -v "$PWD/data:/var/lib/grafana" \ + -e "GF_AUTH_PROXY_ENABLED=true" \ + -e "GF_AUTH_ANONYMOUS_ENABLED=true" \ + -e "GF_AUTH_ANONYMOUS_ORG_ROLE=Admin" \ + -e "GF_USERS_VIEWERS_CAN_EDIT=true" \ + -e "GF_SECURITY_ALLOW_EMBEDDING=true" \ + grafana/grafana:latest +``` + +### Configuring Grafana in HertzBeat + +In the configuration file `application.yml` in `HertzBeat`, configure the `Grafana` data source. + +```yaml +grafana: + enabled: true + url: http://127.0.0.1:3000 + username: admin + password: admin +``` + +### Upload Grafana monitor template json file in HertzBeat monitor + +In `HertzBeat`, when creating or editing a `Prometheus` type monitor, click Enable Grafana Templates and select the Grafana template json file to upload. +The monitor template json file can be downloaded at [https://grafana.com/grafana/dashboards/](https://grafana.com/grafana/dashboards/). +For example, create a new monitor in `HertzBeat` for `VictoriaMetrics` single node, then open [https://grafana.com/grafana/dashboards/10229-victoriametrics-single-node/](https://grafana.com/grafana/dashboards/10229-victoriametrics-single-node/), click `Download JSON` button on the right side. `Download JSON` button on the right to download the template json file. Upload the template json file in the `HertzBeat` monitor, save it. + ![grafana-1.png](/img/docs/help/grafana-1.png) + +### View Grafana historical charts + +On the `HertzBeat` monitoring page, click the `Grafana` button, select `Grafana` Historical Charts, select a monitoring template, and click the `Query` button to view the `Grafana` historical charts. + ![grafana-2.png](/img/docs/help/grafana-2.png) diff --git a/home/versioned_docs/version-1.9.0/help/greenplum.md b/home/versioned_docs/version-1.9.0/help/greenplum.md new file mode 100644 index 0000000000..4250eecffa --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/greenplum.md @@ -0,0 +1,55 @@ +--- +id: greenplum +title: Monitoring:GreenPlum database monitoring +sidebar_label: GreenPlum database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring greenplum database metrics] +--- + +> Collect and monitor the general performance Metrics of GreenPlum database. Support GreenPlum 6.23.0+. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored Host address. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 5432 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|-------------------------------------------| +| server_version | none | Version number of the database server | +| port | none | Database server exposure service port | +| server_encoding | none | Character set encoding of database server | +| data_directory | none | Database storage data disk address | +| max_connections | connections | Database maximum connections | + +#### Metric set:state + +| Metric name | Metric unit | Metric help description | +|----------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| name | none | Database name, or share-object is a shared object | +| conflicts | times | The number of queries canceled in the database due to a conflict with recovery | +| deadlocks | number | Number of deadlocks detected in the database | +| blks_read | times | The number of disk blocks read in the database | +| blks_hit | times | Times the disk block has been found to be in the buffer, so there is no need to read it once (This only includes hits in the GreenPlum buffer, not in the operating system file system buffer) | +| blk_read_time | ms | Time spent by the backend reading data file blocks in the database | +| blk_write_time | ms | Time spent by the backend writing data file blocks in the database | +| stats_reset | none | The last time these statistics were reset | + +#### Metric set:activity + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------------------| +| running | connections | Number of current client connections | diff --git a/home/versioned_docs/version-1.9.0/help/guide.md b/home/versioned_docs/version-1.9.0/help/guide.md new file mode 100644 index 0000000000..57daea58ba --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/guide.md @@ -0,0 +1,148 @@ +--- +id: guide +title: Help Center +sidebar_label: Help Center +--- + +> HertzBeat - An open source, real-time monitoring tool with custom-monitor and agentless. +> Help documents and auxiliary information during use + +## 🔬 Monitoring services + +> Regularly collect and monitor the performance Metrics exposed by end-to-end services, provide visual interfaces, and process data for alarm and other service scheduling. +> Planned monitoring type:application service, database, operating system, cloud native, open source middleware. + +### Application service monitoring + + 👉 [Website monitoring](website)
+ 👉 [HTTP API](api)
+ 👉 [PING Connectivity](ping)
+ 👉 [Port availability](port)
+ 👉 [Full site monitoring](fullsite)
+ 👉 [SSL Cert monitoring](ssl_cert)
+ 👉 [DNS monitoring](dns)
+ 👉 [FTP monitoring](ftp)
+ 👉 [Websocket monitoring](websocket)
+ 👉 [MQTT connection monitoring](mqtt)
+ +### Program monitoring + + 👉 [Process](process)
+ 👉 [JVM monitoring](jvm)
+ 👉 [SpringBoot2.0](springboot2)
+ 👉 [SpringBoot3.0](springboot3)
+ 👉 [DynamicTp](dynamic_tp)
+ +### Database monitoring + + 👉 [MYSQL database monitoring](mysql)
+ 👉 [MariaDB database monitoring](mariadb)
+ 👉 [PostgreSQL database monitoring](postgresql)
+ 👉 [SqlServer database monitoring](sqlserver)
+ 👉 [Oracle database monitoring](oracle)
+ 👉 [DM database monitoring](dm)
+ 👉 [OpenGauss database monitoring](opengauss)
+ 👉 [IoTDB database monitoring](iotdb)
+ 👉 [TiDB database monitoring](tidb)
+ 👉 [MongoDB database monitoring](mongodb)
+ 👉 [NebulaGraph cluster monitoring](nebulagraph_cluster)
+ +### Cache monitoring + + 👉 [Redis monitoring](redis)
+ 👉 [Memcached monitoring](memcached)
+ +### Operating system monitoring + + 👉 [Linux operating system monitoring](linux)
+ 👉 [Windows operating system monitoring](windows)
+ 👉 [Ubuntu operating system monitoring](ubuntu)
+ 👉 [Centos operating system monitoring](centos)
+ 👉 [FreeBSD operating system monitoring](freebsd)
+ 👉 [RedHat operating system monitoring](redhat)
+ 👉 [Rocky Linux operating system monitoring](rockylinux)
+ 👉 [EulerOS monitoring](euleros)
+ +### Middleware monitoring + + 👉 [Zookeeper](zookeeper)
+ 👉 [Kafka](kafka)
+ 👉 [Tomcat](tomcat)
+ 👉 [ShenYu](shenyu)
+ 👉 [DynamicTp](dynamic_tp)
+ 👉 [RabbitMQ](rabbitmq)
+ 👉 [ActiveMQ](activemq)
+ 👉 [Jetty](jetty)
+ 👉 [Nacos](nacos)
+ +### CloudNative monitoring + + 👉 [Docker](docker)
+ 👉 [Kubernetes](kubernetes)
+ +### Bigdata monitoring + + 👉 [Clickhouse](clickhouse)
+ 👉 [ElasticSearch](elasticsearch)
+ 👉 [Flink](flink)
+ +### Ai LLM monitoring + + 👉 [openai](openai)
+ +### Network monitoring + + 👉 [Huawei-switch](huawei_switch)
+ +### Server monitoring + +*** + +## 💡 Alarm service + +> More liberal threshold alarm configuration (calculation expression), supports email, SMS, WebHook, DingDing, WeChat and FeiShu for alarm notification. +> The positioning of alarm service is to trigger the threshold accurately and timely, and the alarm notification can be reached in time. + +### Alarm center + +> The triggered alarm information center provides query and filtering of alarm deletion, alarm processing, mark unprocessed, alarm level status, etc. + +More details see 👉 [Alarm center](alarm_center) + +### Alarm configuration + +> The Metric threshold configuration provides the Metric threshold configuration in the form of expression, which can set the alarm level, trigger times, alarm notification template and whether it is enabled, correlation monitoring and other functions. + +More details see 👉 [Threshold alarm](alert_threshold)
+   👉 [Threshold expression](alert_threshold_expr) + +### Alarm reduce + +> Combine related alarms through alarm grouping, alarm suppression and other functions to reduce the alarm storm caused by one event, reduce alarm noise and improve alarm response efficiency. + +More details see 👉 [Alarm grouping](alarm_group)
+   👉 [Alarm inhibit](alarm_inhibit) + +### Alarm notification + +> After triggering the alarm information, in addition to being displayed in the alarm center list, it can also be notified to the designated recipient in a specified way (e-mail, wechat and FeiShu etc.) +> Alarm notification provides different types of notification methods, such as email recipient, enterprise wechat robot notification, DingDing robot notification, and FeiShu robot notification. +> After setting the receiver, you need to set the associated alarm notification strategy to configure which alarm information is sent to which receiver. + + 👉 [Configure Email Notification](alert_email)
+ 👉 [Configure SMS Notification](alert_sms)
+ 👉 [Configure WebHook Notification](alert_webhook)
+ 👉 [Configure Discord Notification](alert_discord)
+ 👉 [Configure Slack Notification](alert_slack)
+ 👉 [Configure Telegram Notification](alert_telegram)
+ 👉 [Configure enterprise WeChat Robot Notification](alert_wework)
+ 👉 [Configure enterprise WeChat App Notification](alert_enterprise_wechat_app)
+ 👉 [Configure DingDing Robot Notification](alert_dingtalk)
+ 👉 [Configure FeiShu Robot Notification](alert_feishu)
+ 👉 [Configure FeiShu App Notification](alert_feishu_app)
+ 👉 [Configure Huawei Cloud SMN Notification](alert_smn)
+ 👉 [Notification Template](alert_notification_template)
+ +### Plugins + + 👉 [Plugin](plugin)
diff --git a/home/versioned_docs/version-1.9.0/help/h2.md b/home/versioned_docs/version-1.9.0/help/h2.md new file mode 100644 index 0000000000..5143ccb362 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/h2.md @@ -0,0 +1,200 @@ +--- +id: h2 +title: H2 Database - TESTING ONLY, NOT FOR PRODUCTION +sidebar_label: H2 Database (Testing Only) +keywords: [open source monitoring tool, H2 database, testing, not for production, security warning] +--- + +> ⚠️ **CRITICAL SECURITY WARNING**: H2 Database is **NOT suitable for production environments**. It is provided for local testing and development purposes only. Using H2 in production exposes your server to serious security vulnerabilities. Please read this page carefully before using H2 with HertzBeat. + +## 🔴 Security Risks - READ BEFORE USING + +### What is H2 Database? + +H2 is an open-source Java SQL database. HertzBeat ships with H2 as its **default embedded database** to enable quick testing and evaluation without requiring a separate database installation. + +### Why H2 Is Dangerous in Production + +H2 has a built-in feature called `CREATE ALIAS` that allows arbitrary Java code execution within database queries. This means: + +```sql +-- Example of EXTREMELY dangerous H2 capability: +CREATE ALIAS EXEC AS $$ +String exec(String cmd) throws Exception { + Runtime.getRuntime().exec(cmd); + return null; +} +$$; + +-- This can execute shell commands on the server: +CALL EXEC('rm -rf /important-data'); +``` + +If your HertzBeat H2 database is accessible to malicious actors (or even unauthorized internal users), they can: + +- **Execute arbitrary shell commands** on the HertzBeat server +- **Read any file** accessible to the HertzBeat process +- **Compromise the entire server** running HertzBeat +- **Access all monitoring data** including sensitive credentials + +📖 For complete details, read the official [H2 Security Documentation](https://h2database.com/html/security.html). + +### Network Exposure Risk + +H2 can run in server mode, potentially exposing a database management interface on the network. By default, H2 uses ports **8082** (web console) and **9092** (TCP server). If these are accessible externally, any user can connect directly to your database. + +--- + +## ✅ H2 is Appropriate For + +- **Local Development**: Quick setup for evaluating HertzBeat features +- **Automated Testing**: CI/CD pipelines in isolated environments +- **Demos**: Showcasing HertzBeat to stakeholders +- **Learning**: Understanding HertzBeat before production deployment + +--- + +## 🚫 H2 is NOT Appropriate For + +- Production deployments +- Multi-user environments +- Systems with sensitive monitoring data +- Internet-accessible HertzBeat instances +- Environments requiring data persistence across restarts +- High-availability setups + +--- + +## 🔒 Migrating to a Production Database + +For production use, migrate to one of these supported databases: + +### MySQL / MariaDB (Recommended for most deployments) + +1. Install MySQL 5.7+ or MariaDB 10.5+ +2. Create a dedicated database and user: + + ```sql + CREATE DATABASE hertzbeat; + CREATE USER 'hertzbeat'@'localhost' IDENTIFIED BY 'strong_password_here'; + GRANT ALL PRIVILEGES ON hertzbeat.* TO 'hertzbeat'@'localhost'; + FLUSH PRIVILEGES; + ``` + +3. Update `application.yml`: + + ```yaml + spring: + datasource: + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8 + username: hertzbeat + password: strong_password_here + driver-class-name: com.mysql.cj.jdbc.Driver + ``` + +4. Download MySQL JDBC driver and place in `ext-lib/` +5. Restart HertzBeat + +📖 See the full [MySQL monitoring guide](./mysql.md) for setup details. + +### PostgreSQL (Recommended for enterprise deployments) + +1. Install PostgreSQL 12+ +2. Create database and user: + + ```sql + CREATE USER hertzbeat WITH PASSWORD 'strong_password_here'; + CREATE DATABASE hertzbeat OWNER hertzbeat; + GRANT ALL PRIVILEGES ON DATABASE hertzbeat TO hertzbeat; + ``` + +3. Update `application.yml`: + + ```yaml + spring: + datasource: + url: jdbc:postgresql://localhost:5432/hertzbeat + username: hertzbeat + password: strong_password_here + driver-class-name: org.postgresql.Driver + ``` + +4. Download PostgreSQL JDBC driver and place in `ext-lib/` +5. Restart HertzBeat + +📖 See the full [PostgreSQL monitoring guide](./postgresql.md) for setup details. + +--- + +## ⚙️ H2 Configuration (Testing Only) + +If you are using H2 for **testing purposes** in a **sandboxed environment**, the default HertzBeat configuration uses H2 with these settings: + +| Configuration | Default Value | Description | +|--------------|---------------|-------------| +| Database type | H2 | Embedded Java database | +| Database file | `./data/hertzbeat` | Local file storage | +| Web console | Port 8082 | H2 web management UI | +| Auto-create | Enabled | Creates schema automatically | + +### Checking Your Current Configuration + +View your current database configuration in `application.yml`: + +```yaml +spring: + datasource: + # H2 configuration (testing only) + url: jdbc:h2:./data/hertzbeat + driver-class-name: org.h2.Driver +``` + +--- + +## 🛡️ If You Must Use H2 Temporarily + +If you absolutely must use H2 while transitioning to a production database, take these precautions: + +1. **Restrict Network Access**: Ensure HertzBeat is not accessible from the internet +2. **Disable H2 Console**: Comment out or remove H2 console configuration +3. **Firewall Rules**: Block ports 8082 and 9092 externally +4. **Limit User Access**: Only trusted administrators should access HertzBeat +5. **Monitor Access Logs**: Watch for unusual SQL queries +6. **Plan Migration**: Set a deadline to migrate to MySQL or PostgreSQL + +```yaml +# Disable H2 web console in application.yml: +spring: + h2: + console: + enabled: false # IMPORTANT: Disable in any non-local environment +``` + +--- + +## 📋 Security Checklist Before Going to Production + +Before deploying HertzBeat in any non-testing environment, verify: + +- [ ] H2 database has been replaced with MySQL or PostgreSQL +- [ ] H2 web console is disabled +- [ ] Database credentials are strong and unique +- [ ] Database is not directly accessible from the internet +- [ ] HertzBeat is running behind a reverse proxy with SSL +- [ ] Monitoring credentials are encrypted and access-controlled +- [ ] Regular database backups are configured + +--- + +## 🆘 Help and Support + +If you need help migrating from H2 to a production database: + +- 📖 [HertzBeat Documentation](https://hertzbeat.apache.org/docs/) +- 💬 [Apache HertzBeat Mailing List](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) +- 🐛 [GitHub Issues](https://github.com/apache/hertzbeat/issues) +- 💡 [GitHub Discussions](https://github.com/apache/hertzbeat/discussions) + +--- + +> **Remember**: The convenience of H2 for testing comes at the cost of security. Always plan to migrate to a production-grade database before deploying HertzBeat in any real environment. diff --git a/home/versioned_docs/version-1.9.0/help/hadoop.md b/home/versioned_docs/version-1.9.0/help/hadoop.md new file mode 100644 index 0000000000..ed8b7e474d --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/hadoop.md @@ -0,0 +1,89 @@ +--- +id: hadoop +title: Monitoring Hadoop +sidebar_label: Apache Hadoop +keywords: [Open Source Monitoring System, Open Source Java Monitoring, Hadoop JVM Monitoring] +--- + +> Collect and monitor general performance metrics for the JVM virtual machine in Hadoop. + +**Protocol used: JMX** + +## Pre-monitoring steps +> +> You need to enable JMX service in the Hadoop application before monitoring. HertzBeat uses the JMX protocol to collect performance metrics from Hadoop's JVM. + +### Steps to enable JMX protocol in the Hadoop application + +Add JVM parameters when the application starts. ⚠️Note that you can customize the exposed port and external IP. + +- 1.Enter the hadoop-env.sh configuration file and enter the following command in the terminal: + +```shell +vi $HADOOP_HOME/etc/hadoop/hadoop-env.sh +``` + +- 2.Add the following parameters, where `port` is the number of the custom-exposed port + +```shell +export HADOOP_OPTS= "$HADOOP_OPTS +-Djava.rmi.server.hostname=external-ip-address +-Dcom.sun.management.jmxremote.port=9999 +-Dcom.sun.management.jmxremote.ssl=false +-Dcom.sun.management.jmxremote.authenticate=false " +``` + +- 3.Save and exit, and then execute "start-all.sh" in the "$HADOOP_HOME/sbin" directory to restart the service. + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by JMX | +| Username | JMX connection user name, optional | +| Password | JMX connection password, optional | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:memory_pool + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| name | | metrics name | +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:code_cache (Only Support JDK8) + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:class_loading + +| Metric name | Metric unit | Metric help description | +|-----------------------|-------------|--------------------------| +| LoadedClassCount | | Loaded Class Count | +| TotalLoadedClassCount | | Total Loaded Class Count | +| UnloadedClassCount | | Unloaded Class Count | + +#### Metrics Set:thread + +| Metric name | Metric unit | Metric help description | +|-------------------------|-------------|----------------------------| +| TotalStartedThreadCount | | Total Started Thread Count | +| ThreadCount | | Thread Count | +| PeakThreadCount | | Peak Thread Count | +| DaemonThreadCount | | Daemon Thread Count | +| CurrentThreadUserTime | ms | Current Thread User Time | +| CurrentThreadCpuTime | ms | Current Thread Cpu Time | diff --git a/home/versioned_docs/version-1.9.0/help/hbase_master.md b/home/versioned_docs/version-1.9.0/help/hbase_master.md new file mode 100644 index 0000000000..d30c8d4bdf --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/hbase_master.md @@ -0,0 +1,59 @@ +--- +id: hbase_master +title: Monitoring Hbase Master +sidebar_label: HbaseMaster Monitoring +keywords: [Open Source Monitoring System, Open Source Database Monitoring, HbaseMaster Monitoring] +--- + +> Collect monitoring data for general performance metrics of Hbase Master. + +**Protocol: HTTP** + +## Pre-monitoring steps + +Check the `hbase-site.xml` file to obtain the value of the `hbase.master.info.port` configuration item, which is used for monitoring. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Target Host | The IPv4, IPv6, or domain name of the monitored peer. Note: without protocol header (e.g., https://, http://). | +| Port | The port number of the Hbase master, default is 16010. That is, the value of the`hbase.master.info.port` parameter. | +| Task Name | The name identifying this monitoring, which needs to be unique. | +| Query Timeout | Set the connection timeout in ms, the default is 3000 milliseconds. | +| Collection Interval | The periodic collection interval for monitoring data, in seconds, with the minimum allowable interval being 30 seconds. | +| Probe | Whether to probe and check the availability of monitoring before adding new monitoring, and proceed with the addition or modification operation only if the probe is successful. | +| Description | Additional notes and descriptions for this monitoring, users can add notes here. | + +### Collected Metrics + +#### Metric Set: server + +| Metric Name | Unit | Metric Description | +|----------------------|------|-----------------------------------------| +| numRegionServers | none | Number of currently alive RegionServers | +| numDeadRegionServers | none | Number of currently dead RegionServers | +| averageLoad | none | Cluster average load | +| clusterRequests | none | Total number of cluster requests | + +#### Metric Set: Rit + +| Metric Name | Unit | Metric Description | +|----------------------|------|----------------------------------| +| ritnone | none | Current number of RIT | +| ritnoneOverThreshold | none | Number of RIT over the threshold | +| ritOldestAge | ms | Duration of the oldest RIT | + +#### Metric Set: basic + +| Metric Name | Unit | Metric Description | +|-------------------------|------|---------------------------------------------| +| liveRegionServers | none | List of currently active RegionServers | +| deadRegionServers | none | List of currently offline RegionServers | +| zookeeperQuorum | none | Zookeeper list | +| masterHostName | none | Master node | +| BalancerCluster_num_ops | none | Number of cluster load balancing operations | +| numActiveHandler | none | Number of RPC handlers | +| receivedBytes | MB | Cluster received data volume | +| sentBytes | MB | Cluster sent data volume (MB) | +| clusterRequests | none | Total number of cluster requests | diff --git a/home/versioned_docs/version-1.9.0/help/hbase_regionserver.md b/home/versioned_docs/version-1.9.0/help/hbase_regionserver.md new file mode 100644 index 0000000000..5fec8b9014 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/hbase_regionserver.md @@ -0,0 +1,93 @@ +--- +id: hbase_regionserver +title: Monitoring HBase RegionServer +sidebar_label: HBase RegionServer Monitoring +keywords: [Open-source monitoring system, Open-source database monitoring, RegionServer monitoring] +--- + +> Collect and monitor common performance metrics for HBase RegionServer. + +**Protocol:** HTTP + +## Pre-Monitoring Operations + +Review the `hbase-site.xml` file to obtain the value of the `hbase.regionserver.info.port` configuration item, which is used for monitoring. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| +| Target Host | The IPV4, IPV6, or domain name of the monitored entity. Note ⚠️ Do not include the protocol header (e.g., https://, http://). | +| Port | The port number of the HBase regionserver, default is 16030, i.e., the value of the`hbase.regionserver.info.port` parameter | +| Task Name | A unique name to identify this monitoring task. | +| Query Timeout | Set the connection timeout in ms, the default is 3000 milliseconds. | +| Collection Interval | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Probe Before Adding | Whether to probe and check the availability of monitoring before adding new monitoring, only proceed with the addition if the probe is successful. | +| Description Note | Additional notes to identify and describe this monitoring, users can add notes here. | + +### Collection Metrics + +> All metric names are directly referenced from the official fields, hence there may be non-standard naming. + +#### Metric Set: server + +| Metric Name | Unit | Metric Description | +|-----------------------------------|-------|---------------------------------------------------------------------------| +| regionCount | None | Number of Regions | +| readRequestCount | None | Number of read requests since cluster restart | +| writeRequestCount | None | Number of write requests since cluster restart | +| averageRegionSize | MB | Average size of a Region | +| totalRequestCount | None | Total number of requests | +| ScanTime_num_ops | None | Total number of Scan requests | +| Append_num_ops | None | Total number of Append requests | +| Increment_num_ops | None | Total number of Increment requests | +| Get_num_ops | None | Total number of Get requests | +| Delete_num_ops | None | Total number of Delete requests | +| Put_num_ops | None | Total number of Put requests | +| ScanTime_mean | None | Average time of a Scan request | +| ScanTime_min | None | Minimum time of a Scan request | +| ScanTime_max | None | Maximum time of a Scan request | +| ScanSize_mean | bytes | Average size of a Scan request | +| ScanSize_min | None | Minimum size of a Scan request | +| ScanSize_max | None | Maximum size of a Scan request | +| slowPutCount | None | Number of slow Put operations | +| slowGetCount | None | Number of slow Get operations | +| slowAppendCount | None | Number of slow Append operations | +| slowIncrementCount | None | Number of slow Increment operations | +| slowDeleteCount | None | Number of slow Delete operations | +| blockCacheSize | None | Size of memory used by block cache | +| blockCacheCount | None | Number of blocks in Block Cache | +| blockCacheExpressHitPercent | None | Block cache hit ratio | +| memStoreSize | None | Size of Memstore | +| FlushTime_num_ops | None | Number of RS writes to disk/Memstore flushes | +| flushQueueLength | None | Length of Region Flush queue | +| flushedCellsSize | None | Size flushed to disk | +| storeFileCount | None | Number of Storefiles | +| storeCount | None | Number of Stores | +| storeFileSize | None | Size of Storefiles | +| compactionQueueLength | None | Length of Compaction queue | +| percentFilesLocal | None | Percentage of HFile in local HDFS Data Node | +| percentFilesLocalSecondaryRegions | None | Percentage of HFile for secondary region replicas in local HDFS Data Node | +| hlogFileCount | None | Number of WAL files | +| hlogFileSize | None | Size of WAL files | + +#### Metric Set: IPC + +| Metric Name | Unit | Metric Description | +|---------------------------|------|----------------------------------------| +| numActiveHandler | None | Current number of RITs | +| NotServingRegionException | None | Number of RITs exceeding the threshold | +| RegionMovedException | ms | Duration of the oldest RIT | +| RegionTooBusyException | ms | Duration of the oldest RIT | + +#### Metric Set: JVM + +| Metric Name | Unit | Metric Description | +|----------------------|------|-----------------------------------| +| MemNonHeapUsedM | None | Current active RegionServer list | +| MemNonHeapCommittedM | None | Current offline RegionServer list | +| MemHeapUsedM | None | Zookeeper list | +| MemHeapCommittedM | None | Master node | +| MemHeapMaxM | None | Cluster balance load times | +| MemMaxM | None | RPC handle count | +| GcCount | MB | Cluster data reception volume | diff --git a/home/versioned_docs/version-1.9.0/help/hdfs_datanode.md b/home/versioned_docs/version-1.9.0/help/hdfs_datanode.md new file mode 100644 index 0000000000..dd0523c887 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/hdfs_datanode.md @@ -0,0 +1,56 @@ +--- +id: hdfs_datanode +title: Monitoring Apache HDFS DataNode +sidebar_label: Apache HDFS DataNode +keywords: [big data monitoring system, distributed file system monitoring, Apache HDFS DataNode monitoring] +--- + +> HertzBeat monitors metrics for Apache HDFS DataNode nodes. + +**Protocol Used: HTTP** + +## Pre-monitoring Operations + +Retrieve the HTTP monitoring port for the Apache HDFS DataNode. Value: `dfs.datanode.http.address` + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|-----------------------------|-------------------------------------------------------------------------------------------| +| Target Host | IP(v4 or v6) or domain name of the target to be monitored. Exclude protocol. | +| Port | Monitoring port number for Apache HDFS DataNode, default is 50075. | +| Query Timeout | Timeout for querying Apache HDFS DataNode, in milliseconds, default is 6000 milliseconds. | +| Metrics Collection Interval | Time interval for monitoring data collection, in seconds, minimum interval is 30 seconds. | +| Probe Before Monitoring | Whether to probe and check monitoring availability before adding. | +| Description/Remarks | Additional description and remarks for this monitoring. | + +### Metrics Collected + +#### Metric Set: FSDatasetState + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|----------------------------------| +| DfsUsed | GB | DataNode HDFS usage | +| Remaining | GB | Remaining space on DataNode HDFS | +| Capacity | GB | Total capacity of DataNode HDFS | + +#### Metric Set: JvmMetrics + +| Metric Name | Metric Unit | Metric Description | +|----------------------|-------------|---------------------------------------------------| +| MemNonHeapUsedM | MB | Current usage of NonHeapMemory by JVM | +| MemNonHeapCommittedM | MB | Committed size of NonHeapMemory configured in JVM | +| MemHeapUsedM | MB | Current usage of HeapMemory by JVM | +| MemHeapCommittedM | MB | Committed size of HeapMemory by JVM | +| MemHeapMaxM | MB | Maximum size of HeapMemory configured in JVM | +| MemMaxM | MB | Maximum memory available for JVM at runtime | +| ThreadsRunnable | Count | Number of threads in RUNNABLE state | +| ThreadsBlocked | Count | Number of threads in BLOCKED state | +| ThreadsWaiting | Count | Number of threads in WAITING state | +| ThreadsTimedWaiting | Count | Number of threads in TIMED WAITING state | + +#### Metric Set: runtime + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------| +| StartTime | | Startup time | diff --git a/home/versioned_docs/version-1.9.0/help/hdfs_namenode.md b/home/versioned_docs/version-1.9.0/help/hdfs_namenode.md new file mode 100644 index 0000000000..0c0711312f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/hdfs_namenode.md @@ -0,0 +1,92 @@ +--- +id: hdfs_namenode +title: Monitoring HDFS NameNode +sidebar_label: Apache HDFS NameNode +keywords: [big data monitoring system, distributed file system monitoring, HDFS NameNode monitoring] +--- + +> HertzBeat monitors metrics for HDFS NameNode nodes. + +**Protocol Used: HTTP** + +## Pre-Monitoring Actions + +Ensure that you have obtained the JMX monitoring port for the HDFS NameNode. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|-----------------------------|-------------------------------------------------------------------------------------------| +| Target Host | The IPv4, IPv6, or domain name of the target being monitored. Exclude protocol headers. | +| Port | The monitoring port number of the HDFS NameNode, default is 50070. | +| Query Timeout | Timeout for querying the HDFS NameNode, in milliseconds, default is 6000 milliseconds. | +| Metrics Collection Interval | Time interval for collecting monitoring data, in seconds, minimum interval is 30 seconds. | +| Probe Before Monitoring | Whether to probe and check the availability of monitoring before adding it. | +| Description/Remarks | Additional description and remarks for this monitoring. | + +### Collected Metrics + +#### Metric Set: FSNamesystem + +| Metric Name | Metric Unit | Metric Description | +|---------------------------------|-------------|------------------------------------------------------------| +| CapacityTotal | | Total cluster storage capacity | +| CapacityTotalGB | GB | Total cluster storage capacity | +| CapacityUsed | | Used cluster storage capacity | +| CapacityUsedGB | GB | Used cluster storage capacity | +| CapacityRemaining | | Remaining cluster storage capacity | +| CapacityRemainingGB | GB | Remaining cluster storage capacity | +| CapacityUsedNonDFS | | Non-HDFS usage of cluster capacity | +| TotalLoad | | Total client connections in the cluster | +| FilesTotal | | Total number of files in the cluster | +| BlocksTotal | | Total number of BLOCKs | +| PendingReplicationBlocks | | Number of blocks awaiting replication | +| UnderReplicatedBlocks | | Number of blocks with insufficient replicas | +| CorruptBlocks | | Number of corrupt blocks | +| ScheduledReplicationBlocks | | Number of blocks scheduled for replication | +| PendingDeletionBlocks | | Number of blocks awaiting deletion | +| ExcessBlocks | | Number of excess blocks | +| PostponedMisreplicatedBlocks | | Number of misreplicated blocks postponed for processing | +| NumLiveDataNodes | | Number of live data nodes in the cluster | +| NumDeadDataNodes | | Number of data nodes marked as dead | +| NumDecomLiveDataNodes | | Number of decommissioned live nodes | +| NumDecomDeadDataNodes | | Number of decommissioned dead nodes | +| NumDecommissioningDataNodes | | Number of nodes currently being decommissioned | +| TransactionsSinceLastCheckpoint | | Number of transactions since the last checkpoint | +| LastCheckpointTime | | Time of the last checkpoint | +| PendingDataNodeMessageCount | | Number of DATANODE requests queued in the standby namenode | + +#### Metric Set: RPC + +| Metric Name | Metric Unit | Metric Description | +|--------------------|-------------|---------------------| +| ReceivedBytes | | Data receiving rate | +| SentBytes | | Data sending rate | +| RpcQueueTimeNumOps | | RPC call rate | + +#### Metric Set: runtime + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------| +| StartTime | | Start time | + +#### Metric Set: JvmMetrics + +| Metric Name | Metric Unit | Metric Description | +|---------------------------------|--------------|------------------------------------------| +| MemNonHeapUsedM | MB | Current usage of NonHeapMemory by JVM | +| MemNonHeapCommittedM | MB | Committed NonHeapMemory by JVM | +| MemHeapUsedM | MB | Current usage of HeapMemory by JVM | +| MemHeapCommittedM | MB | Committed HeapMemory by JVM | +| MemHeapMaxM | MB | Maximum HeapMemory configured for JVM | +| MemMaxM | MB | Maximum memory that can be used by JVM | +| GcCountParNew | Count | Number of ParNew GC events | +| GcTimeMillisParNew | Milliseconds | Time spent in ParNew GC | +| GcCountConcurrentMarkSweep | Count | Number of ConcurrentMarkSweep GC events | +| GcTimeMillisConcurrentMarkSweep | Milliseconds | Time spent in ConcurrentMarkSweep GC | +| GcCount | Count | Total number of GC events | +| GcTimeMillis | Milliseconds | Total time spent in GC events | +| ThreadsRunnable | Count | Number of threads in RUNNABLE state | +| ThreadsBlocked | Count | Number of threads in BLOCKED state | +| ThreadsWaiting | Count | Number of threads in WAITING state | +| ThreadsTimedWaiting | Count | Number of threads in TIMED WAITING state | diff --git a/home/versioned_docs/version-1.9.0/help/hikvision_isapi.md b/home/versioned_docs/version-1.9.0/help/hikvision_isapi.md new file mode 100644 index 0000000000..21454caf59 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/hikvision_isapi.md @@ -0,0 +1,60 @@ +--- +id: hikvision_isapi +title: Monitor Hikvision ISAPI +sidebar_label: Hikvision ISAPI +keywords: [ monitor, hikvision_isapi ] +--- + +> Monitor Hikvision devices through ISAPI interface to collect health data. + +## Monitor Configuration + +| Parameter | Description | +| ----------- | ----------- | +| Host | The IP or domain name of the monitored device. Note⚠️ Do not include protocol prefix (eg: https://, http://). | +| Name | The unique name that identifies this monitor. | +| Port | Network request port, default is 80. | +| Timeout | Timeout period, in milliseconds, default is 5000ms. | +| Username | Login username for Hikvision device. | +| Password | Login password for Hikvision device. | +| SSL | Whether to enable HTTPS, disabled by default. | +| Collection Interval | The interval time for periodic data collection, in seconds. The minimum interval is 30 seconds. | + +## Metrics + +### System Info + +- Device Name +- Device ID +- Firmware Version +- Device Model +- Mac Address + +### Status + +- CPU Utilization (%) +- Memory Usage (MB) +- Memory Available (MB) +- Cache Size (MB) +- Net Port 1 Speed (Mbps) +- Net Port 2 Speed (Mbps) +- Boot Time +- Device Uptime +- Last Calibration Time +- Last Calibration Time Diff (s) +- Avg Upload Time (ms) +- Max Upload Time (ms) +- Min Upload Time (ms) +- Last Calibration Mode +- Last Calibration Address +- Response Time (ms) + +## Implementation Principle + +The monitoring is implemented by accessing the Hikvision device's ISAPI interface: + +1. Collect system information through: `/ISAPI/System/deviceInfo` + +2. Collect device status through: `/ISAPI/System/status` + +It uses HTTP protocol with Digest Authentication to access the interfaces and parses XML response data to extract monitoring metrics. diff --git a/home/versioned_docs/version-1.9.0/help/hive.md b/home/versioned_docs/version-1.9.0/help/hive.md new file mode 100644 index 0000000000..a62562091c --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/hive.md @@ -0,0 +1,76 @@ +--- +id: hive +title: Monitoring Apache Hive +sidebar_label: Apache Hive +keywords: [open source monitoring tool, open source apache hive monitoring tool, monitoring apache hive metrics] +--- + +> Collect and monitor the general performance metrics exposed by the Apache Hive. + +## Pre-monitoring operations + +If you want to monitor information in `Apache Hive` with this monitoring type, you need to open your `Hive Server2` in remoting mode. + +**1、Enable metastore:** + +```shell +hive --service metastore & +``` + +**2. Enable hive server2:** + +```shell +hive --service hiveserver2 & +``` + +### Configure parameters + +| Parameter name | Parameter Help describes the | +|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | THE MONITORED PEER IPV4, IPV6 OR DOMAIN NAME. Note ⚠️ that there are no protocol headers (eg: https://, http://). | +| Monitoring Name | A name that identifies this monitoring that needs to be unique. | +| Port | The default port provided by the database is 10002. | +| Enable HTTPS | Whether to access the website through HTTPS, please note that ⚠️ when HTTPS is enabled, the default port needs to be changed to 443 | +| Collection interval | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds | +| Whether to probe | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation | +| Description Comment | For more information identifying and describing the remarks for this monitoring, users can remark the information here | + +### Collect metrics + +#### metric Collection: basic + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|-----------------------------------------------------------| +| vm_name | None | The name of the virtual machine (VM) running HiveServer2. | +| vm_vendor | None | The vendor or provider of the virtual machine. | +| vm_version | None | The version of the virtual machine. | +| up_time | None | The duration for which HiveServer2 has been running. | + +#### metric Collection: environment + +| Metric Name | metric unit | Metrics help describe | +|----------------------|-------------|-------------------------------------------------------------------| +| https_proxyPort | None | The port number used for HTTPS proxy communication. | +| os_name | None | The name of the operating system on which HiveServer2 is running. | +| os_version | None | The version of the operating system. | +| os_arch | None | The architecture of the operating system. | +| java_runtime_name | None | The name of the Java runtime environment used by HiveServer2. | +| java_runtime_version | None | The version of the Java runtime environment. | + +#### metric Collection: thread + +| Metric Name | metric unit | Metrics help describe | +|----------------------|-------------|----------------------------------------------------------------------| +| thread_count | None | The current number of threads being used by HiveServer2. | +| total_started_thread | None | The total count of threads started by HiveServer2 since its launch. | +| peak_thread_count | None | The highest number of threads used by HiveServer2 at any given time. | +| daemon_thread_count | None | The number of daemon threads currently active in HiveServer2. | + +#### metric Collection: code_cache + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|-------------------------------------------------------------------------| +| committed | MB | The amount of memory currently allocated for the memory pool. | +| init | MB | The initial amount of memory requested for the memory pool. | +| max | MB | The maximum amount of memory that can be allocated for the memory pool. | +| used | MB | The amount of memory currently being used by the memory pool. | diff --git a/home/versioned_docs/version-1.9.0/help/http_sd.md b/home/versioned_docs/version-1.9.0/help/http_sd.md new file mode 100644 index 0000000000..9e45cbee2e --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/http_sd.md @@ -0,0 +1,246 @@ +--- +id: http_sd +title: Monitoring HTTP Service Discovery +sidebar_label: HTTP Service Discovery +keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring HTTP service discovery] +--- + +> HertzBeat integrates with custom HTTP APIs to automatically discover service instances and create monitoring tasks for them. + +## Overview + +HTTP Service Discovery allows HertzBeat to discover service instances by calling your custom HTTP API. This is the most flexible service discovery method, suitable for any system that can expose service instance information via HTTP API. You only need to provide an HTTP endpoint that returns a list of target addresses in the specified format. + +### PreRequisites + +#### Prepare HTTP API + +You need to provide or develop an HTTP API that meets the following requirements: + +1. **HTTP Method**: Support GET requests +2. **Response Format**: Return JSON array format +3. **Response Structure**: Must be an array format, each element contains a `target` field (note: singular), which is a string array. Each string is a service instance address in the format `host:port` +4. **Accessibility**: The API must be accessible from HertzBeat + +#### API Response Example + +```json +[ + { + "target": [ + "192.168.1.101:8080", + "192.168.1.102:8080", + "192.168.1.103:8080", + "api.example.com:443" + ] + } +] +``` + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Target Name | Identify the name of this monitoring. The name needs to be unique. | +| Service Discovery Url | HTTP API address for service discovery. Must start with http:// or https://. Example: `http://api.example.com/services` | +| Auth Type | Authentication method, optional values: `Bearer Token`, `Basic Auth`, `Digest Auth`. Default: None | +| Access Token | Token for authentication when Auth Type is Bearer Token. | +| Username | Username for authentication when Auth Type is Basic Auth or Digest Auth. | +| Password | Password for authentication when Auth Type is Basic Auth or Digest Auth. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Credential upgrade behavior + +The access token and password parameters are encrypted before they are stored +and are returned by the monitor API as `******`. Submitting that mask while +editing an existing monitor keeps the stored credential unchanged. If the +service-discovery URL or authentication type changes, the credential must be +re-entered so that a stored value cannot be replayed to a new endpoint. + +On the first startup after upgrading, HertzBeat encrypts access tokens created +by older versions before scheduling service-discovery jobs. The migration is +idempotent and leaves already encrypted values unchanged. + +### Usage Steps + +1. **Prepare HTTP API** + - Develop or configure an API endpoint that returns service instance list + - Ensure the API returns JSON data in the correct format + - Test the API accessibility and response format + +2. **Create Service Discovery Monitoring** + - In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring** + - Select monitoring type: **HTTP Service Discovery** + - Fill in the basic configuration parameters + - Configure authentication information if needed + +3. **Configure Monitoring Template** + - After creating the service discovery monitoring, you need to specify a monitoring template + - The template defines what type of monitoring to create for discovered service instances + - Common template types: Port, HTTP, HTTPS, Ping, etc. + +4. **Automatic Discovery** + - HertzBeat will periodically call your HTTP API based on the collection interval + - Automatically create monitoring tasks for newly discovered service instances + - Automatically delete monitoring tasks for disappeared service instances + +### Example of usage + +#### Example 1: API Without Authentication + +Suppose you have a service management API: + +- **API URL**: `http://service-manager.example.com/api/v1/services` +- **Response**: + + ```json + [ + { + "target": [ + "10.0.1.10:8080", + "10.0.1.11:8080", + "10.0.1.12:8080" + ] + } + ] + ``` + +Configuration example: + +- **Target Name**: `HTTP-Service-Discovery` +- **Service Discovery Url**: `http://service-manager.example.com/api/v1/services` +- **Auth Type**: Leave empty (no authentication) +- **Collection interval**: `60` seconds +- **Monitoring Template**: Select `Port` monitoring + +#### Example 2: API With Bearer Token Authentication + +If your API requires Bearer Token authentication: + +- **API URL**: `https://api.example.com/services` +- **Auth Type**: `Bearer Token` +- **Access Token**: `your-bearer-token-here` + +Configuration example: + +- **Target Name**: `Secure-API-Discovery` +- **Service Discovery Url**: `https://api.example.com/services` +- **Auth Type**: Select `Bearer Token` +- **Access Token**: Enter your token +- **Monitoring Template**: Select `HTTP` monitoring + +#### Example 3: API With Basic Authentication + +If your API requires Basic authentication: + +- **API URL**: `http://api.internal.com/discover` +- **Auth Type**: `Basic Auth` +- **Username**: `admin` +- **Password**: `password123` + +Configuration example: + +- **Target Name**: `Basic-Auth-Discovery` +- **Service Discovery Url**: `http://api.internal.com/discover` +- **Auth Type**: Select `Basic Auth` +- **Username**: `admin` +- **Password**: `password123` +- **Monitoring Template**: Select appropriate template + +### Notes + +- **Response Format**: The API response must be in JSON array format, each element contains a `target` field (note: singular, string array) +- **Address Format**: Each target address should be in the format `host:port`, for example: + - `192.168.1.100:8080` + - `api.example.com:443` + - `localhost:3000` +- **Network Connectivity**: Ensure HertzBeat can access the HTTP API address +- **Monitoring Templates**: Service discovery only discovers service instance addresses, you need to configure appropriate monitoring templates to actually monitor the instances +- **Collection Interval**: Set a reasonable collection interval based on API performance and service change frequency +- **Authentication**: Choose the appropriate authentication method according to your API security requirements +- **HTTPS**: If using HTTPS, ensure SSL certificates are properly configured +- **API Performance**: Ensure the API can respond quickly to avoid affecting HertzBeat performance +- **Error Handling**: If the API returns an error or invalid format, HertzBeat will keep the current monitoring tasks unchanged + +### Collection Metric + +#### Metric set: Monitor Target + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|--------------------------------------------| +| target | none | Discovered service instance target | +| host | none | Service instance host address | +| port | none | Service instance port number | + +### Use Cases + +- **Custom Registry**: Integrate with your own service registry system +- **Cloud Platform**: Discover services from cloud platforms (AWS, GCP, Azure) +- **CMDB**: Integrate with CMDB systems to obtain service information +- **Service Gateway**: Discover service instances through API gateway +- **Container Platforms**: Obtain service lists from Kubernetes API or container orchestration platforms +- **Service Management Systems**: Integrate with existing service management platforms +- **Multi-Cloud Environments**: Unify service discovery across different cloud platforms + +### Advanced Usage + +#### Response with Additional Metadata + +While the basic requirement is just the `target` field, your API can include additional metadata for future extensions: + +```json +[ + { + "target": [ + "192.168.1.10:8080" + ], + "labels": { + "env": "production", + "version": "1.0.0" + } + } +] +``` + +Note: Currently, only the `target` field is used for service discovery, but future versions may support using label information. + +### API Implementation Examples + +#### Spring Boot Example + +```java +@RestController +@RequestMapping("/api/v1") +public class ServiceDiscoveryController { + + @GetMapping("/services") + public List> getServices() { + List targets = Arrays.asList( + "192.168.1.10:8080", + "192.168.1.11:8080", + "192.168.1.12:8080" + ); + + Map response = new HashMap<>(); + response.put("target", targets); + return Collections.singletonList(response); + } +} +``` + +#### Node.js Express Example + +```javascript +app.get('/api/services', (req, res) => { + const targets = [ + '192.168.1.10:8080', + '192.168.1.11:8080', + '192.168.1.12:8080' + ]; + + res.json([{ + target: targets + }]); +}); +``` diff --git a/home/versioned_docs/version-1.9.0/help/huawei_switch.md b/home/versioned_docs/version-1.9.0/help/huawei_switch.md new file mode 100644 index 0000000000..abc393f069 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/huawei_switch.md @@ -0,0 +1,53 @@ +--- +id: huawei_switch +title: Monitoring:Huawei switch +sidebar_label: Huawei switch +keywords: [ open source monitoring tool, network monitoring, Huawei switch ] +--- + +> Collect and monitor the general indicators (availability, system information, port traffic, etc.) of Huawei switches. + +**Protocol Use: SNMP** + +## Configuration parameter + +| Parameter name | Parameter help description | +|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Task Name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port of SNMP. The default is 161 | +| SNMP Version | SNMP version to use | +| SNMP Community | Used in SNMP v1 and SNMP v2c, used to complete authentication in SNMP Agent, in string form. Group name includes "read" and "write", when performing SNMP query operation, "read" group name is used for authentication; when performing SNMP setting operation, "write" group name is used for authentication. When performing SNMP query operation, "read" group name is used for authentication; when performing SNMP setting operation, "write" group name is used for authentication. | +| SNMP username | For SNMP v3, MSG username | +| SNMP contextName | For SNMP v3, used to determine the MIB view of the Context EngineID to the managed device | +| SNMP authPassword | For SNMP v3, SNMP authentication passwords | +| authPassword Encryption | For SNMP v3, SNMP authentication algorithm | +| SNMP privPassphrase | For SNMP v3, SNMP encrypted passwords | +| privPassword Encryption | For SNMP v3, SNMP encrypted algorithm | +| Timeout | Set the timeout time when querying unresponsive data, in milliseconds, the default is 6000 milliseconds | +| Intervals | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Description | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +Since there are too many metrics that can be queried on Huawei switches, detailed metrics can be queried +on [Huawei MIB Query Platform](https://info.support.huawei.com/info-finder/tool/en/enterprise/mib). + +This document only introduces the monitoring indicators queried in the monitor template. + +#### Metric set: huawei_core + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ifIndex | none | Interface index. This value is greater than zero and globally unique. | +| ifDescr | none | A textual string containing information about the interface. This string should include the name of the manufacturer, the product name and the version of the interface hardware/software. | +| ifMtu | octets | The size of the largest packet which can be sent/received on the interface. For interfaces that are used for transmitting network datagrams, this is the size of the largest network datagram that can be sent on the interface. | +| ifSpeed | bit/s | An estimate of the interface's current bandwidth. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth. If the bandwidth of the interface is greater than the maximum value reportable by this object then this object should report its maximum value (4,294,967,295) and ifHighSpeed must be used to report the interace's speed. For a sub-layer which has no concept of bandwidth, this object should be zero. | +| ifInOctets | octets | The total number of octets received on the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. | +| ifInDiscards | none | The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. | +| ifInErrors | none | For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. | +| ifOutOctets | octets | The total number of octets transmitted out of the interface, including framing characters. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. | +| ifOutDiscards | none | The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. | +| ifOutErrors | none | For packet-oriented interfaces, the number of outbound packets that could not be transmitted because of errors. For character-oriented or fixed-length interfaces, the number of outbound transmission units that could not be transmitted because of errors. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. | +| ifAdminStatus | none | The desired state of the interface. The testing(3) state indicates that no operational packets can be passed. When a managed system initializes, all interfaces start with ifAdminStatus in the down(2) state. As a result of either explicit management action or per configuration information retained by the managed system, ifAdminStatus is then changed to either the up(1) or testing(3) states (or remains in the down(2) state). | +| ifOperStatus | none | The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed. If ifAdminStatus is down(2) then ifOperStatus should be down(2). If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic; it should change to dormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection); it should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state; it should remain in the notPresent(6) state if the interface has missing (typically, hardware) components. | diff --git a/home/versioned_docs/version-1.9.0/help/hugegraph.md b/home/versioned_docs/version-1.9.0/help/hugegraph.md new file mode 100644 index 0000000000..fd6ed48814 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/hugegraph.md @@ -0,0 +1,140 @@ +--- +id: hugegraph +title: Monitoring HugeGraph +sidebar_label: Apache HugeGraph +keywords: [Open Source Monitoring System, Open Source Database Monitoring, HugeGraph Monitoring] +--- + +> Collect and monitor the general performance metrics of HugeGraph + +**Protocol used: HTTP** + +## Pre-monitoring Operations + +Check the `rest-server.properties` file to obtain the value of the `restserver_port` configuration item, which is used for monitoring. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|----------------------------------------------------------------------------------------------------------------------------| +| Target Host | The IPv4, IPv6, or domain name of the monitored endpoint. Note ⚠️ Do not include protocol headers (eg: https://, http://). | +| Port | Port number of the HugeGraph restserver, default is 8080. i.e., the value of the `restserver_port` parameter | +| Enable SSL | Enable SSL usage | +| Base Path | Base path, default is: /metrics, usually does not need to be modified | +| Task Name | Identifies the name of this monitoring, ensuring uniqueness. | +| Collection Interval | Interval for periodically collecting data for monitoring, in seconds, with a minimum interval of 30 seconds | +| Probe Enabled | Whether to probe before adding new monitoring, only continue with add/modify operations if the probe is successful | +| Description | Additional identification and description of this monitoring, users can add information here | + +### Metrics Collection + +#### Metric Set: gauges + +| Metric Name | Metric Unit | Metric Description | +|--------------------------------|-------------|----------------------------------------------------------------| +| edge-hugegraph-capacity | NONE | Indicates the capacity limit of edges in the current graph | +| edge-hugegraph-expire | NONE | Indicates the expiration time of edge data | +| edge-hugegraph-hits | NONE | Indicates the number of hits in the edge data cache | +| edge-hugegraph-miss | NONE | Indicates the number of misses in the edge data cache | +| edge-hugegraph-size | NONE | Indicates the number of edges in the current graph | +| instances | NONE | Indicates the number of currently running HugeGraph instances | +| schema-id-hugegraph-capacity | NONE | Indicates the capacity limit of schema IDs in the graph | +| schema-id-hugegraph-expire | NONE | Indicates the expiration time of schema ID data | +| schema-id-hugegraph-hits | NONE | Indicates the number of hits in the schema ID data cache | +| schema-id-hugegraph-miss | NONE | Indicates the number of misses in the schema ID data cache | +| schema-id-hugegraph-size | NONE | Indicates the number of schema IDs in the current graph | +| schema-name-hugegraph-capacity | NONE | Indicates the capacity limit of schema names in the graph | +| schema-name-hugegraph-expire | NONE | Indicates the expiration time of schema name data | +| schema-name-hugegraph-hits | NONE | Indicates the number of hits in the schema name data cache | +| schema-name-hugegraph-miss | NONE | Indicates the number of misses in the schema name data cache | +| schema-name-hugegraph-size | NONE | Indicates the number of schema names in the current graph | +| token-hugegraph-capacity | NONE | Indicates the capacity limit of tokens in the graph | +| token-hugegraph-expire | NONE | Indicates the expiration time of token data | +| token-hugegraph-hits | NONE | Indicates the number of hits in the token data cache | +| token-hugegraph-miss | NONE | Indicates the number of misses in the token data cache | +| token-hugegraph-size | NONE | Indicates the number of tokens in the current graph | +| users-hugegraph-capacity | NONE | Indicates the capacity limit of users in the graph | +| users-hugegraph-expire | NONE | Indicates the expiration time of user data | +| users-hugegraph-hits | NONE | Indicates the number of hits in the user data cache | +| users-hugegraph-miss | NONE | Indicates the number of misses in the user data cache | +| users-hugegraph-size | NONE | Indicates the number of users in the current graph | +| users_pwd-hugegraph-capacity | NONE | Indicates the capacity limit of user passwords | +| users_pwd-hugegraph-expire | NONE | Indicates the expiration time of user password data | +| users_pwd-hugegraph-hits | NONE | Indicates the number of hits in the user password data cache | +| users_pwd-hugegraph-miss | NONE | Indicates the number of misses in the user password data cache | +| users_pwd-hugegraph-size | NONE | Indicates the number of user passwords in the current graph | +| vertex-hugegraph-capacity | NONE | Indicates the capacity limit of vertices in the graph | +| vertex-hugegraph-expire | NONE | Indicates the expiration time of vertex data | +| vertex-hugegraph-hits | NONE | Indicates the number of hits in the vertex data cache | +| vertex-hugegraph-miss | NONE | Indicates the number of misses in the vertex data cache | +| vertex-hugegraph-size | NONE | Indicates the number of vertices in the current graph | +| batch-write-threads | NONE | Indicates the number of threads for batch write operations | +| max-write-threads | NONE | Indicates the maximum number of threads for write operations | +| pending-tasks | NONE | Indicates the number of pending tasks | +| workers | NONE | Indicates the current number of worker threads | +| average-load-penalty | NONE | Indicates the average load penalty | +| estimated-size | NONE | Indicates the estimated data size | +| eviction-count | NONE | Indicates the number of evicted data entries | +| eviction-weight | NONE | Indicates the weight of evicted data | +| hit-count | NONE | Indicates the total cache hits | +| hit-rate | NONE | Indicates the cache hit rate | +| load-count | NONE | Indicates the number of data loads | +| load-failure-count | NONE | Indicates the number of data load failures | +| load-failure-rate | NONE | Indicates the data load failure rate | +| load-success-count | NONE | Indicates the number of successful data loads | +| long-run-compilation-count | NONE | Indicates the number of long-running compilations | +| miss-count | NONE | Indicates the total cache misses | +| miss-rate | NONE | Indicates the cache miss rate | +| request-count | NONE | Indicates the total request count | +| total-load-time | NONE | Indicates the total data load time | +| sessions | NONE | Indicates the current number of active sessions | + +#### Metric Set: counters + +| Metric Name | Metric Unit | Metric Description | +|-----------------------------------------------------|-------------|--------------------------------------------------------------------------------| +| GET-SUCCESS_COUNTER | NONE | Records the number of successful GET requests | +| GET-TOTAL_COUNTER | NONE | Records the total number of GET requests | +| favicon-ico-GET-FAILED_COUNTER | NONE | Records the number of failed GET requests to retrieve favicon.ico | +| favicon-ico-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests to retrieve favicon.ico | +| graphs-HEAD-FAILED_COUNTER | NONE | Records the number of failed HEAD requests for graphs resources | +| graphs-HEAD-SUCCESS_COUNTER | NONE | Records the number of successful HEAD requests for graphs resources | +| graphs-HEAD-TOTAL_COUNTER | NONE | Records the total number of HEAD requests for graphs resources | +| graphs-hugegraph-graph-vertices-GET-SUCCESS_COUNTER | NONE | Records the number of successful GET requests for vertices in HugeGraph graphs | +| graphs-hugegraph-graph-vertices-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests for vertices in HugeGraph graphs | +| metrics-GET-FAILED_COUNTER | NONE | Records the number of failed GET requests to retrieve metrics | +| metrics-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests to retrieve metrics | +| metrics-GET-SUCCESS_COUNTER | NONE | Records the number of successful GET requests to retrieve metrics | +| metrics-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests to retrieve metrics | +| metrics-gauges-GET-SUCCESS_COUNTER | NONE | Records the number of successful GET requests to retrieve metrics gauges | +| metrics-gauges-GET-TOTAL_COUNTER | NONE | Records the total number of GET requests to retrieve metrics gauges | + +#### Metric Set: system + +| Metric Name | Metric Unit | Metric Description | +|---------------------------------------------|-------------|---------------------------------------------------------------------------------------------------------| +| mem | NONE | Indicates the total memory of the system | +| mem_total | NONE | Indicates the total memory of the system (same as mem) | +| mem_used | NONE | Indicates the currently used memory of the system | +| mem_free | NONE | Indicates the free memory of the system | +| mem_unit | NONE | Indicates the unit of memory (such as bytes, kilobytes, megabytes, etc.) | +| processors | NONE | Indicates the number of processors in the system | +| uptime | NONE | Indicates the system uptime, i.e., the time since booting | +| systemload_average | NONE | Indicates the average system load, reflecting the system's busyness | +| heap_committed | NONE | Indicates the committed size of JVM heap memory, i.e., the guaranteed heap memory size available to JVM | +| heap_init | NONE | Indicates the initial size of JVM heap memory | +| heap_used | NONE | Indicates the currently used JVM heap memory size | +| heap_max | NONE | Indicates the maximum available size of JVM heap memory | +| nonheap_committed | NONE | Indicates the committed size of JVM non-heap memory | +| nonheap_init | NONE | Indicates the initial size of JVM non-heap memory | +| nonheap_used | NONE | Indicates the currently used JVM non-heap memory size | +| nonheap_max | NONE | Indicates the maximum available size of JVM non-heap memory | +| thread_peak | NONE | Indicates the peak number of threads since JVM startup | +| thread_daemon | NONE | Indicates the current number of active daemon threads | +| thread_total_started | NONE | Indicates the total number of threads started since JVM startup | +| thread_count | NONE | Indicates the current number of active threads | +| garbage_collector_g1_young_generation_count | NONE | Indicates the number of young generation garbage collections by G1 garbage collector | +| garbage_collector_g1_young_generation_time | NONE | Indicates the total time spent in young generation garbage collections by G1 garbage collector | +| garbage_collector_g1_old_generation_count | NONE | Indicates the number of old generation garbage collections by G1 garbage collector | +| garbage_collector_g1_old_generation_time | NONE | Indicates the total time spent in old generation garbage collections by G1 garbage collector | +| garbage_collector_time_unit | NONE | Indicates the unit of garbage collection time (such as milliseconds, seconds, etc.) | diff --git a/home/versioned_docs/version-1.9.0/help/iceberg.md b/home/versioned_docs/version-1.9.0/help/iceberg.md new file mode 100644 index 0000000000..b806283b96 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/iceberg.md @@ -0,0 +1,76 @@ +--- +id: iceberg +title: Monitoring Apache Iceberg +sidebar_label: Apache Iceberg +keywords: [open source monitoring tool, open source apache hive monitoring tool, monitoring apache iceberg metrics] +--- + +> Collect and monitor the general performance metrics exposed by the Apache Iceberg. + +## Pre-monitoring operations + +If you want to monitor information in `Apache Iceberg` with this monitoring type, you need to open your `Hive Server2` in remoting mode. + +**1、Enable metastore:** + +```shell +hive --service metastore & +``` + +**2. Enable hive server2:** + +```shell +hive --service hiveserver2 & +``` + +### Configure parameters + +| Parameter name | Parameter Help describes the | +|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | THE MONITORED PEER IPV4, IPV6 OR DOMAIN NAME. Note ⚠️ that there are no protocol headers (eg: https://, http://). | +| Monitoring Name | A name that identifies this monitoring that needs to be unique. | +| Port | The default port provided by the database is 10002. | +| Enable HTTPS | Whether to access the website through HTTPS, please note that ⚠️ when HTTPS is enabled, the default port needs to be changed to 443 | +| Collection interval | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds | +| Whether to probe | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation | +| Description Comment | For more information identifying and describing the remarks for this monitoring, users can remark the information here | + +### Collect metrics + +#### metric Collection: basic + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|-----------------------------------------------------------| +| vm_name | None | The name of the virtual machine (VM) running HiveServer2. | +| vm_vendor | None | The vendor or provider of the virtual machine. | +| vm_version | None | The version of the virtual machine. | +| up_time | None | The duration for which HiveServer2 has been running. | + +#### metric Collection: environment + +| Metric Name | metric unit | Metrics help describe | +|----------------------|-------------|-------------------------------------------------------------------| +| https_proxyPort | None | The port number used for HTTPS proxy communication. | +| os_name | None | The name of the operating system on which HiveServer2 is running. | +| os_version | None | The version of the operating system. | +| os_arch | None | The architecture of the operating system. | +| java_runtime_name | None | The name of the Java runtime environment used by HiveServer2. | +| java_runtime_version | None | The version of the Java runtime environment. | + +#### metric Collection: thread + +| Metric Name | metric unit | Metrics help describe | +|----------------------|-------------|----------------------------------------------------------------------| +| thread_count | None | The current number of threads being used by HiveServer2. | +| total_started_thread | None | The total count of threads started by HiveServer2 since its launch. | +| peak_thread_count | None | The highest number of threads used by HiveServer2 at any given time. | +| daemon_thread_count | None | The number of daemon threads currently active in HiveServer2. | + +#### metric Collection: code_cache + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|-------------------------------------------------------------------------| +| committed | MB | The amount of memory currently allocated for the memory pool. | +| init | MB | The initial amount of memory requested for the memory pool. | +| max | MB | The maximum amount of memory that can be allocated for the memory pool. | +| used | MB | The amount of memory currently being used by the memory pool. | diff --git a/home/versioned_docs/version-1.9.0/help/idrac.md b/home/versioned_docs/version-1.9.0/help/idrac.md new file mode 100644 index 0000000000..7659aee1d8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/idrac.md @@ -0,0 +1,104 @@ +--- +id: idrac +title: Dell iDRAC Monitoring +sidebar_label: Server Monitor +keywords: [open source monitoring tool, open source server Monitoring, Dell iDRAC Monitoring] +--- + +> Collect and monitor the general performance Metrics of Dell Server using SNMP Protocol. + +**Protocol: SNMP** + +## Pre-monitoring steps + +1. The target Dell server supports the **SNMP protocol**. +2. The **iDRAC** (Integrated Dell Remote Access Controller) has been configured with a network interface, allowing access to the **SNMP port**. +3. **SNMP community string** or **user credentials** have been configured with appropriate **permissions**. + +These are basic checks you can follow, and for further details on enabling and configuring SNMP on Dell iDRAC, you can consult the specific user manual of the Dell server. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +| -------------- |----------------------------------------------------------------------------------------------------------------| +| Target Host | The IPv4, IPv6, or domain name of the monitored peer. Note: without protocol header (e.g., https://, http://). | +| Port | The port number of the server SNMP, default is 161. | +| SNMP Version | Choose between SNMPv1, SNMPv2c, or SNMPv3 | +| SNMP Community | SNMP community for v1 v2c | +| Username | SNMP username for v3 | +| Context Name | SNMP contextName for v3 | +| Auth Password | SNMP authPassword for v3 | +| Auth Encryption| Authentication encryption method for v3 (MD5 or SHA1) | +| Priv Password | SNMP privPassphrase for v3 | +| Priv Encryption| Privacy encryption method for v3 (DES or AES128) | + +### Collected Metrics + +#### Metric Set: System Status + +| Metric Name | Unit | Metric Description | +| ----------------------- | ---- | ------------------------------------------------------------ | +| Global System Status | none | Overall status of the system | +| System LCD Status | none | Status of the system LCD | +| Global Storage Status | none | Overall status of the storage subsystem | +| System Power State | none | Current power state of the system | +| System Power Up Time | day | Time since the system was last powered on | + +#### Metric Set: Power Supply + +| Metric Name | Unit | Metric Description | +| -------------- | ---- | ------------------------------------------------------------ | +| Index | none | Index of the power supply | +| Name | none | Name/Location of the power supply | +| Wattage | W | Output wattage of the power supply | +| Type | none | Type of the power supply (Linear, Switching, Battery, etc.) | +| Status | none | Current status of the power supply | + +#### Metric Set: Cooling Devices + +| Metric Name | Unit | Metric Description | +| -------------- | ---- | ------------------------------------------------------------ | +| Index | none | Index of the cooling device | +| Name | none | Name/Location of the cooling device | +| Type | none | Type of the cooling device (Fan, Blower, Heat Pipe, etc.) | +| Reading | RPM | Current rotation per minute reading | +| Status | none | Current status of the cooling device | + +#### Metric Set: Temperature Sensors + +| Metric Name | Unit | Metric Description | +| -------------- | ---- | ------------------------------------------------------------ | +| Index | none | Index of the temperature sensor | +| Name | none | Name/Location of the temperature sensor | +| Reading | °C | Current temperature reading | +| Status | none | Current status of the temperature sensor | + +#### Metric Set: Voltage Sensors + +| Metric Name | Unit | Metric Description | +| -------------- | ---- | ------------------------------------------------------------ | +| Index | none | Index of the voltage sensor | +| Name | none | Name/Location of the voltage sensor | +| Reading | V | Current voltage reading | +| Type | none | Type of voltage (3.3V, 5V, 12V, etc.) | +| Status | none | Current status of the voltage sensor | + +#### Metric Set: Memory Devices + +| Metric Name | Unit | Metric Description | +| -------------- | ---- | ------------------------------------------------------------ | +| Index | none | Index of the memory device | +| Name | none | Name/Location of the memory device | +| Type | none | Type of memory (DDR, DDR2, DDR3, DDR4, etc.) | +| Size | G | Size of the memory device | +| Status | none | Current status of the memory device | + +#### Metric Set: Processors + +| Metric Name | Unit | Metric Description | +| -------------- | ---- | ------------------------------------------------------------ | +| Index | none | Index of the processor | +| Name | none | Name/Location of the processor | +| Speed | MHz | Current speed of the processor | +| Family | none | Family of the processor (Pentium, Xeon, Core i7, etc.) | +| Status | none | Current status of the processor | diff --git a/home/versioned_docs/version-1.9.0/help/imap.md b/home/versioned_docs/version-1.9.0/help/imap.md new file mode 100644 index 0000000000..5493e79cbd --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/imap.md @@ -0,0 +1,47 @@ +--- +id: imap +title: Monitoring detailed mailbox info +sidebar_label: mailbox Monitor +keywords: [Open Source Monitoring System, Open Source Network Monitoring, mailbox Monitor] +--- + +> IMAP, or Internet Message Access Protocol, allows you to retrieve detailed information from your email server. +> You can click on `Create New QQ Email Monitoring` or `Create New Netease Email Monitoring` to configure, or select `More Actions` to import existing configurations. + +## Enable IMAP Service + +If you want to use this monitoring type to monitor your email information, please first enable the IMAP service in your email: + +For example, in QQ Mail (other emails are similar): + +1. Go to `Mail Settings` +2. Find and enable the `IMAP/SMTP option` in `General` +3. Obtain the IMAP server domain, port number, whether to use SSL, and authorization code from the help section +4. Use the above information to configure in HertzBeat and collect monitoring metrics + +### Configuration Parameters + +| Parameter Name | Parameter Help Description | +|:--------------------|------------------------------------------------------------------------------------------------------------| +| Monitoring Host | IMAP mail server domain. Note ⚠️ do not include protocol headers (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring task, which needs to be unique. | +| Enable SSL | Whether to enable SSL. | +| Port | The port provided by the website. | +| Connection Timeout | The wait timeout for the port connection, in milliseconds, default is 6000 ms. | +| IMAP Email Address | The email address to be monitored. | +| Authorization Code | The authorization code provided by the email server. | +| Monitoring Interval | The interval time for periodic data collection, in seconds, the minimum interval can be set to 30 seconds. | +| Binding Tags | Classification management tags for monitoring resources. | +| Description Notes | Additional identification and description notes for this monitoring task, users can leave notes here. | + +### Collection Metrics + +Collect information on each folder in the email (custom folders can be configured), as the metrics collected for each folder are the same, only a common set of metrics is listed below + +#### Metrics Collection: (Folder Name in Email) + +| Metric Name | Metric Unit | Metric Help Description | +|----------------------|-------------|-------------------------------------------------------| +| Total message count | None | The total number of emails in this folder | +| Recent message count | None | The number of recently received emails in this folder | +| Unseen message count | None | The number of unread emails in this folder | diff --git a/home/versioned_docs/version-1.9.0/help/influxdb.md b/home/versioned_docs/version-1.9.0/help/influxdb.md new file mode 100644 index 0000000000..cc2adc9ec6 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/influxdb.md @@ -0,0 +1,65 @@ +--- +id: influxdb +title: Monitoring InfluxDB Database +sidebar_label: InfluxDB Database +keywords: [open source monitoring system, open source database monitoring, InfluxDB database monitoring] +--- + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | The IPv4, IPv6, or domain name of the target being monitored. Note⚠️: Do not include the protocol header (e.g., https://, http://). | +| Task Name | A unique identifier for this monitoring task. | +| Port | The port on which the database is exposed. Default is 8086. | +| URL | The database connection URL, usually constructed from the host. No need to add it separately. | +| Collection Interval | The interval at which data is collected during monitoring, in seconds. The minimum interval that can be set is 30 seconds. | +| Probe Enabled | Whether to perform a probe check for monitoring availability before adding or modifying the monitoring task. | +| Description | Additional notes and remarks about this monitoring task. Users can provide information and descriptions here. | + +### Collected Metrics + +#### Metric Set: influxdb_info + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------| +| build_date | N/A | Creation date | +| os | N/A | Operating system | +| cpus | N/A | CPUs | +| version | N/A | Version number | + +#### Metric Set: http_api_request_duration_seconds + +| Metric Name | Metric Unit | Metric Description | +|---------------|-------------|--------------------| +| handler | N/A | Handler | +| path | N/A | Path | +| response_code | N/A | Response code | +| method | N/A | Request method | +| user_agent | N/A | User agent | +| status | N/A | Status | + +#### Metric Set: storage_compactions_queued + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------| +| bucket | N/A | Storage bucket | +| engine | N/A | Engine type | +| id | N/A | Identifier | +| level | N/A | Level | +| path | N/A | Data file path | + +#### Metric Set: http_write_request_bytes + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|-------------------------| +| endpoint | N/A | Endpoint | +| org_id | N/A | Organization identifier | +| status | N/A | Status | + +#### Metric Set: qc_requests_total + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|-------------------------| +| result | N/A | Result | +| org | N/A | Organization identifier | diff --git a/home/versioned_docs/version-1.9.0/help/influxdb_promql.md b/home/versioned_docs/version-1.9.0/help/influxdb_promql.md new file mode 100644 index 0000000000..1f3aedc3c8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/influxdb_promql.md @@ -0,0 +1,61 @@ +--- +id: influxdb_promql +title: Monitoring InfluxDB-PromQL +sidebar_label: InfluxDB-PromQL +keywords: [ Open Source Monitoring System, InfluxDB Monitoring, InfluxDB-PromQL Monitoring ] +--- + +> Monitor InfluxDB by querying generic metrics data from Prometheus server using Prometheus PromQL. This approach is suitable when Prometheus is already monitoring InfluxDB and you need to fetch InfluxDB's monitoring data from Prometheus server. + +## Configuration Parameters + +| Parameter Name | Parameter help description | +|---------------------|----------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | IP, IPv6, or domain name of the target being monitored. Note ⚠️: Do not include protocol header (e.g., https://, http://). | +| Monitoring name | Name to identify this monitoring, ensuring uniqueness of names. | +| Port | Prometheus API port, default: 9090. | +| Relative path | Relative path of Prometheus to query PromQL, default: /api/v1/query | +| Request mode | Set the request method for API calls: GET, POST, PUT, DELETE, default: GET | +| Enable HTTPS | Whether to access the website via HTTPS, note ⚠️: enabling HTTPS generally requires changing the corresponding port to 443 | +| Username | Username for Basic or Digest authentication when accessing the API. | +| Password | Password for Basic or Digest authentication when accessing the API. | +| Content-Type | Resource type when carrying BODY request data. | +| Request BODY | Set the BODY request data, effective for PUT and POST request methods. | +| Collection interval | Interval for periodic data collection in seconds, the minimum interval that can be set is 30 seconds | +| Description remarks | Additional remarks and descriptions for this monitoring. Users can add notes here. | + +### Metrics Collection + +#### Metric Set: basic_influxdb_memstats_alloc + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------| +| instance | None | Instance to which the metric belongs | +| timestamp | None | Timestamp of metric collection | +| value | None | Metric value | + +#### Metric Set: influxdb_database_numMeasurements + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------| +| job | None | Metric name | +| instance | None | Instance to which the metric belongs | +| database | None | Name of the database | +| timestamp | None | Timestamp of metric collection | +| value | None | Metric value | + +#### Metric Set: influxdb_query_rate_seconds + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------| +| instance | None | Instance to which the metric belongs | +| timestamp | None | Timestamp of metric collection | +| value | None | Metric value | + +#### Metric Set: influxdb_queryExecutor_queriesFinished_10s + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------| +| instance | None | Instance to which the metric belongs | +| timestamp | None | Timestamp of metric collection | +| value | None | Metric value | diff --git a/home/versioned_docs/version-1.9.0/help/iotdb.md b/home/versioned_docs/version-1.9.0/help/iotdb.md new file mode 100644 index 0000000000..f449c5fd87 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/iotdb.md @@ -0,0 +1,120 @@ +--- +id: iotdb +title: Monitoring Apache IoTDB Database +sidebar_label: IoTDB Database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring IotDB database metrics] +--- + +> Monitor the running status of the Apache IoTDB Internet of Things time series database (JVM-related), memory task clusters and other related Metrics. + +## Operation before monitoring + +You need to enable the `metrics` function in IoTDB, which will provide interface data in the form of prometheus metrics. + +To enable the `metrics` function, refer to [Official Documentation](https://iotdb.apache.org/UserGuide/V0.13.x/Maintenance-Tools/Metric-Tool.html) + +The main steps are as follows: + +1. The metric collection is disabled by default, you need to modify the parameters in `conf/iotdb-metric.yml` first, then restart the server + + ```yaml + # Whether to start the monitoring module, the default is false + enableMetric: true + + # Whether to enable operation delay statistics + enablePerformanceStat: false + + # Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default. + metricReporterList: + - JMX + - PROMETHEUS + + # The metric architecture used at the bottom layer, optional parameters: [MICROMETER, DROPWIZARD] + monitorType: MICROMETER + + # Initialize the level of the metric, optional parameters: [CORE, IMPORTANT, NORMAL, ALL] + metricLevel: IMPORTANT + + # Predefined metrics set, optional parameters: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] + predefinedMetrics: + - JVM + - FILE + ``` + +2. Restart IoTDB, open a browser or use curl to access http://servier_ip:9091/metrics, and you can see the metric data. + +3. Add the corresponding IoTDB monitoring in HertzBeat. + +### Configuration parameters + +| Parameter name | Parameter help description | +|----------------|---------------------------------------------------| +| Monitoring Host | The peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | The name that identifies this monitoring, and the name needs to be unique. | +| Port | The port provided by the IoTDB Metric interface, which is 9091 by default. | +| Timeout | HTTP request query timeout | +| Acquisition Interval | Interval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful | +| Description Remarks | More remark information to identify and describe this monitoring, users can remark information here | + +### Collect metrics + +#### Metric collection: cluster_node_status + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|---------------------------------| +| name | None | Node name IP | +| status | None | Node status, 1=online 2=offline | + +#### Metric collection: jvm_memory_committed_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|------------------------------------------------| +| area | none | heap memory or nonheap memory | +| id | none | memory block | +| value | MB | The memory size currently requested by the JVM | + +#### Metric collection: jvm_memory_used_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------| +| area | none | heap memory or nonheap memory | +| id | none | memory block | +| value | MB | JVM used memory size | + +#### Metric collection: jvm_threads_states_threads + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|---------------------------------------------------------| +| state | none | thread state | +| count | None | The number of threads corresponding to the thread state | + +#### Index collection: quantity business data + +| Metric Name | Metric Unit | Metric Help Description | +|--|------|----------------| +| name | None | Business name timeSeries/storageGroup/device/deviceUsingTemplate | +| type | none | type total/normal/template/template | +| value | None | The current timeSeries/storageGroup/device/The number of devices that have activated the template | + +#### Metric collection: cache_hit cache + +| Metric Name | Metric Unit | Metric Help Description | +| ----------- |------|-------------------------------| +| name | None | Cache name chunk/timeSeriesMeta/bloomFilter | +| value | % | chunk/timeSeriesMeta cache hit rate, bloomFilter interception rate | + +#### Metric collection: queue task queue + +| Metric Name | Metric Unit | Metric Help Description | +| ----------- |------|------------------------------| +| name | None | Queue name compaction_inner/compaction_cross/flush | +| status | none | status running/waiting | +| value | None | Number of tasks at current time | + +#### Metric collection: thrift_connections + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|----------------------------------| +| name | None | name | +| connection | none | thrift current connection number | diff --git a/home/versioned_docs/version-1.9.0/help/ipmi.md b/home/versioned_docs/version-1.9.0/help/ipmi.md new file mode 100644 index 0000000000..65a18528e7 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/ipmi.md @@ -0,0 +1,53 @@ +--- +id: ipmi +title: IPMI2 Monitoring +sidebar_label: Server Monitor +keywords: [open source monitoring tool, open source server Monitoring, IPMI Monitoring] +--- + +> Collect and monitor the general performance Metrics of Server using IPMI2. + +**Protocol: IPMI** + +## Pre-monitoring steps + +1. The target server supports the **IPMI2 protocol**. +2. The **BMC** (Baseboard Management Controller) has been configured with a network interface, allowing access to the **IPMI port**. +3. **User accounts** have been configured, and appropriate **permissions** have been assigned to the accounts. + +These are basic checks you can follow, and for further details on enabling and configuring IPMI over LAN, you can consult the specific user manual of the server manufacturer. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +| -------------- |----------------------------------------------------------------------------------------------------------------| +| Target Host | The IPv4, IPv6, or domain name of the monitored peer. Note: without protocol header (e.g., https://, http://). | +| Port | The port number of the server IPMI over LAN, default is 623. | +| Username | IPMI user name | +| Password | IPMI password | + +### Collected Metrics + +#### Metric Set: Chassis + +| Metric Name | Unit | Metric Description | +| -------------------- | ---- | ------------------------------------------------------------ | +| System Power | none | Current Power State. Power is on. | +| Power Overload | none | Power overload. System shutdown because of power overload condition. | +| Power Interlock | none | Power Interlock. | +| Main Power Fault | none | Power fault. Fault detected in main power subsystem. | +| Power Control Fault | none | Power control fault. Controller attempted to turn system power on or off, but systemdid not enter desired state. | +| Power Restore Policy | none | Power restore policy. | +| Last Power Event | none | Last Power Event. | +| Cooling/Fan Fault | none | Cooling/fan fault detected. | +| Drive Fault | none | Drive Fault. | +| Front-Panel Lockout | none | Front Panel Lockout active (power off and reset via chassispush-buttons disabled.) | + +#### Metric Set: Sensor + +| Metric Name | Unit | Metric Description | +| -------------- | ---- | ------------------------------------------------------------ | +| Sensor ID | none | Sensor ID. | +| Entity ID | none | Indicates the physical entity that the sensor is monitoring or is otherwiseassociated with the sensor. | +| Sensor Type | none | Sensor Type. | +| Sensor Reading | none | Current Sensor Reading. | diff --git a/home/versioned_docs/version-1.9.0/help/issue.md b/home/versioned_docs/version-1.9.0/help/issue.md new file mode 100644 index 0000000000..8ec67a9b3b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/issue.md @@ -0,0 +1,73 @@ +--- +id: issue +title: Common issues +sidebar_label: Common issues +--- + +## Monitoring common issues + +1. **Page feedback:monitor.host: Monitoring Host must be ipv4, ipv6 or domain name** + + > As shown in the information, the entered monitoring Host must be ipv4, ipv6 or domain name, and cannot carry a protocol header, such as http + +2. **The website API and other monitoring feedback statusCode:403 or 401, but the opposite end service itself does not need authentication, and the direct access of the browser is OK** + + > Please check whether it is blocked by the firewall. For example, BaoTa/aaPanel have set the blocking of `User-Agent=Apache-HttpClient` in the request header by default. If it is blocked, please delete this blocking rule. (user-agent has been simulated as a browser in the v1.0.beat5 version. This problem does not exist) + +3. Ping connectivity monitoring exception when installing hertzbeat for package deployment. + The hertzbeat installed and deployed by the installation package is not available for ping connectivity monitoring, but local direct ping is available 。 + + > The deployment of the installation package requires configuring the root permission of the Java virtual machine to start hertzbeat to use ICMP. If the root permission is not enabled, judge whether port 7 of telnet opposite end is opened. + > When you install HertzBeat via DockerDocker root is enabled by default. No such problem. + > See [https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address](https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address) + +4. Configured Kubernetes monitoring, but the actual monitoring is not executing at the correct interval + Please troubleshoot the issue by following these steps: + + > 1. First, check HertzBeat's error logs. If you see the message 'desc: SQL statement too long, check maxSQLLength config', + > 2. You need to adjust the TDengine configuration file. Create a taos.cfg file on the server and modify # max length of an SQL : maxSQLLength 654800, then restart TDengine. Ensure the configuration file is properly mounted. + > 3. If TDengine fails to restart, adjust the configuration in the mounted data file. Refer to .../taosdata/dnode/dnodeEps.json and change dnodeFqdn to the Docker ID of the failed startup instance, then run docker restart tdengine. + +5. Configured HTTP API monitoring for business interface probing to ensure service availability. The API has token authentication, e.g., "Authorization: Bearer eyJhbGciOiJIUzI1....". After configuration, testing returns "StatusCode 401". The server receives the token as "Authorization: Bearer%20eyJhbGciOiJIUzI1....". HertzBeat escapes spaces to %20, but the server does not unescape it, causing authentication failure. It is recommended to make the escaping feature optional. + +6. What is the task limit for a single collector? + + > In current versions, the default collector concurrency limit is `512` concurrent collection tasks when virtual threads are enabled. + > This default is intentionally higher than the legacy CPU-based pool size so a single HertzBeat node can carry more blocking collection work before you need extra collectors. + > If the runtime exceeds the configured collector limit, an error will appear: "the worker pool is full, reject this metrics task, put in queue again". + > You can tune this limit through `hertzbeat.vthreads.collector.max-concurrent-jobs` in `application.yml`. + > If a single node still cannot absorb the workload, configure additional collectors in public mode so HertzBeat can distribute tasks across them. + +### Docker Deployment common issues + +1. **MYSQL, TDENGINE and HertzBeat are deployed on the same host by Docker,HertzBeat use localhost or 127.0.0.1 connect to the database but fail** + The problems lies in Docker container failed to visit and connect localhost port. Because the docker default network mode is Bridge mode which can't access local machine through localhost. + + > Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. + > Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + +2. **According to the process deploy,visit [http://ip:1157/](http://ip:1157/) no interface** + Please refer to the following points to troubleshoot issues: + + > one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. + > two:Check whether dependent service, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + > three:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. + +3. **Log an error TDengine connection or insert SQL failed** + + > one:Check whether database account and password configured is correct, the database is created. + > two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. + +### Package Deployment common issues + +1. **According to the process deploy,visit [http://ip:1157/](http://ip:1157/) no interface** + Please refer to the following points to troubleshoot issues: + + > one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. + > two:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. + > three: Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. + +2. **Log an error TDengine connection or insert SQL failed** + + > one:Check whether database account and password configured is correct, the database is created. + > two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. diff --git a/home/versioned_docs/version-1.9.0/help/jenkins.md b/home/versioned_docs/version-1.9.0/help/jenkins.md new file mode 100644 index 0000000000..1d0389ede8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/jenkins.md @@ -0,0 +1,80 @@ +--- +id: jenkins +title: Monitoring Jenkins +sidebar_label: Jenkins +keywords: [ open-source, monitoring system, CI/CD, DevOps, Jenkins monitoring ] +--- + +> Monitoring of Jenkins' general metrics is performed by invoking the Jenkins Prometheus Plugin. + +## Prerequisites + +1. Set up Jenkins-related services according to + the [deployment documentation](https://www.jenkins.io/doc/book/installing/). +2. Requires installation of the [plugin](https://www.jenkins.io/doc/book/managing/plugins/) Exposed metric information + has been accessed; refer to the [prometheus-plugin](https://plugins.jenkins.io/prometheus/) for details. +3. The externally exposed metrics endpoint is ```/prometheus```. Verify whether you can access the metrics + data. + +### Configuration parameters + +| Parameter Name | Parameter Help Description | +|-------------------|-----------------------------------------------------------------------------------------------------------------------| +| Target Host | The monitored peer's IPv4, IPv6, or domain name. Note⚠️: Do not include protocol headers (e.g., https://, http://). | +| Port | Jenkins port value, default is 8080. | +| Task Name | The name identifying this monitoring task. The name must be unique. | +| Query Timeout | Set the connection timeout in milliseconds (ms). Default is 3000 ms. | +| Monitoring Cycle | The interval time for periodic data collection, measured in seconds. The minimum configurable interval is 30 seconds. | +| Binding Tags | Used for classifying and managing monitored resources | +| Description Notes | Additional identifiers and descriptive notes for this monitoring task. Users can add notes here. | + +### Collection indicators + +#### Indicator Set: System Information Indicators + +| Indicator name | Unit | Metric Help Description | +|------------------------------|-------------|-----------------------------| +| default_jenkins_uptime | millisecond | Jenkins runtime | +| default_jenkins_up | None | Jenkins still running | +| default_jenkins_version_info | None | Jenkins Version Information | +| jenkins_health_check_score | None | Jenkins Health Check Score | + +#### Metric Set: jvm + +| Indicator name | Unit | Metric Help Description | +|------------------------|-------------|-------------------------------------------| +| vm_uptime_milliseconds | millisecond | JVM runtime | +| system_cpu_load | None | System Load | +| vm_count | None | Total Number of JVM Threads | +| vm_memory_heap_max | MB | Maximum memory limit available to the JVM | +| vm_memory_heap_used | MB | Current memory usage of the JVM | + +#### Indicator set: Basic information indicators + +| Indicator name | Unit | Metric Help Description | +|-------------------------------------|------|----------------------------------------| +| jenkins_project_count_value | None | Number of projects | +| jenkins_project_enabled_count_value | None | Number of enabled items | +| jenkins_queue_size_value | None | Number of tasks in the build queue | +| jenkins_node_online_value | None | Number of currently online build nodes | + +#### Indicator Set: Actuator Information Indicators + +| Indicator name | Unit | Metric Help Description | +|--------------------------------------|------|-----------------------------------------| +| default_jenkins_executors_available | None | Number of available actuators | +| default_jenkins_executors_busy | None | Number of active actuators | +| default_jenkins_executors_connecting | None | Number of actuators currently connected | + +#### Indicator Set: Task Information Indicators + +| Indicator name | Unit | Metric Help Description | +|----------------------------------------------------------|----------------------------------------------------------|---------------------------------------------------| +| jenkins_job_count_value | None | Number of assignments | +| default_jenkins_builds_duration_milliseconds_summary_sum | millisecond | Task Construction Duration Summary | +| default_jenkins_builds_last_build_duration_milliseconds | millisecond | Time of the most recent build | +| default_jenkins_builds_success_build_count_total | None | Number of successful builds | +| default_jenkins_builds_failed_build_count_total | None | Number of build failures | +| default_jenkins_builds_unstable_build_count_total | None | Number of unstable builds | +| default_jenkins_builds_total_build_count_total | None | Total number of builds (excluding unbuilt states) | +| default_jenkins_builds_last_build_result_ordinal | 0=Success, 1=Unstable, 2=Failure, 3=Not Built, 4=Aborted | Task Build Status (Last Build) | diff --git a/home/versioned_docs/version-1.9.0/help/jetty.md b/home/versioned_docs/version-1.9.0/help/jetty.md new file mode 100644 index 0000000000..45453b3ec2 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/jetty.md @@ -0,0 +1,94 @@ +--- +id: jetty +title: Monitoring Jetty Web Server +sidebar_label: Jetty Web Server +keywords: [open source monitoring tool, open source jetty web server monitoring tool, monitoring jetty metrics] +--- + +> Collect and monitor general performance metrics of Jetty application server + +**Usage protocol: JMX** + +## Pre-monitoring Operations +> +> You need to enable the `JMX` service in the JVM application. HertzBeat uses the JMX protocol to collect metrics for the JVM. + +### Jetty application server opens JMX protocol steps + +[Refer to official documentation](https://www.eclipse.org/jetty/documentation/jetty-10/operations-guide/index.html#og-jmx-remote) + +1. Start the JMX JMX-REMOTE module in Jetty + + ```shell + java -jar $JETTY_HOME/start.jar --add-module=jmx + java -jar $JETTY_HOME/start.jar --add-module=jmx-remote + ``` + + Successful command execution will create ``JETTY_BASE`/start.d/jmx-remote.ini` configuration file + +2. Edit the ``JETTY_BASE`/start.d/jmx-remote.ini` configuration file to modify the JMX IP port and other parameters. + + **`localhost` needs to be modified to expose the IP** + + ```text + ## The host/address to bind the RMI server to. + # jetty.jmxremote.rmiserverhost=localhost + + ## The port the RMI server listens to (0 means a random port is chosen). + # jetty.jmxremote.rmiserverport=1099 + + ## The host/address to bind the RMI registry to. + # jetty.jmxremote.rmiregistryhost=localhost + + ## The port the RMI registry listens to. + # jetty.jmxremote.rmiregistryport=1099 + + ## The host name exported in the RMI stub. + -Djava.rmi.server.hostname=localhost + ``` + +3. Restart Jetty Server. + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by JMX | +| Username | JMX connection user name, optional | +| Password | JMX connection password, optional | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:memory_pool + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| name | | metrics name | +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:class_loading + +| Metric name | Metric unit | Metric help description | +|-----------------------|-------------|--------------------------| +| LoadedClassCount | | Loaded Class Count | +| TotalLoadedClassCount | | Total Loaded Class Count | +| UnloadedClassCount | | Unloaded Class Count | + +#### Metrics Set:thread + +| Metric name | Metric unit | Metric help description | +|-------------------------|-------------|----------------------------| +| TotalStartedThreadCount | | Total Started Thread Count | +| ThreadCount | | Thread Count | +| PeakThreadCount | | Peak Thread Count | +| DaemonThreadCount | | Daemon Thread Count | +| CurrentThreadUserTime | ms | Current Thread User Time | +| CurrentThreadCpuTime | ms | Current Thread Cpu Time | diff --git a/home/versioned_docs/version-1.9.0/help/jvm.md b/home/versioned_docs/version-1.9.0/help/jvm.md new file mode 100644 index 0000000000..38ec7f6493 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/jvm.md @@ -0,0 +1,76 @@ +--- +id: jvm +title: Monitoring JVM +sidebar_label: JVM Monitor +keywords: [open source monitoring tool, open source java jvm monitoring tool, monitoring jvm metrics] +--- + +> Collect and monitor the general performance Metrics of JVM. + +**Protocol Use:JMX** + +## JVM App Enable JMX Protocol + +1. Add JVM `VM options` When Start Server ⚠️ customIP + +Refer: [https://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote](https://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote) + +```shell +-Djava.rmi.server.hostname=customIP +-Dcom.sun.management.jmxremote.port=9999 +-Dcom.sun.management.jmxremote.ssl=false +-Dcom.sun.management.jmxremote.authenticate=false +``` + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by JMX | +| Username | JMX connection user name, optional | +| Password | JMX connection password, optional | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:memory_pool + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| name | | metrics name | +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:code_cache (Only Support JDK8) + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:class_loading + +| Metric name | Metric unit | Metric help description | +|-----------------------|-------------|--------------------------| +| LoadedClassCount | | Loaded Class Count | +| TotalLoadedClassCount | | Total Loaded Class Count | +| UnloadedClassCount | | Unloaded Class Count | + +#### Metrics Set:thread + +| Metric name | Metric unit | Metric help description | +|-------------------------|-------------|----------------------------| +| TotalStartedThreadCount | | Total Started Thread Count | +| ThreadCount | | Thread Count | +| PeakThreadCount | | Peak Thread Count | +| DaemonThreadCount | | Daemon Thread Count | +| CurrentThreadUserTime | ms | Current Thread User Time | +| CurrentThreadCpuTime | ms | Current Thread Cpu Time | diff --git a/home/versioned_docs/version-1.9.0/help/kafka.md b/home/versioned_docs/version-1.9.0/help/kafka.md new file mode 100644 index 0000000000..e296c0fb6c --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/kafka.md @@ -0,0 +1,89 @@ +--- +id: kafka +title: Monitor:Apache Kafka +sidebar_label: Apache Kafka +keywords: [open source monitoring tool, open source apache kafka monitoring tool, monitoring apache kafka metrics] +--- + +> Collect and monitor the general performance Metrics of Apache Kafka. + +**Protocol Use:JMX** + +## Kafka Enable JMX Protocol + +1. Install Kafka + +2. Modify `kafka-server-start.sh` + +Append content in kafka-server-start.sh, Attention Replace Port And IP. + +```shell +export JMX_PORT=9999; +export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"; + +# Already Has +exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@" +``` + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by JMX | +| Username | JMX connection user name, optional | +| Password | JMX connection password, optional | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:server_info + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| Version | | Kafka Version | +| StartTimeMs | ms | Start Time | +| CommitId | | Version Commit ID | + +#### Metrics Set:memory_pool + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| name | | metrics name | +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:active_controller_count + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------------| +| Value | | server active controller count | + +#### Metrics Set:broker_partition_count + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| Value | | broker partition count | + +#### Metrics Set:broker_leader_count + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| Value | | broker leader count | + +#### Metrics Set:broker_handler_avg_percent + +| Metric name | Metric unit | Metric help description | +|-------------------|-------------|-------------------------| +| EventType | | event type | +| RateUnit | | rate unit | +| Count | | percent count | +| OneMinuteRate | % | One Minute Rate | +| FiveMinuteRate | % | Five Minute Rate | +| MeanRate | % | Mean Rate | +| FifteenMinuteRate | % | Fifteen Minute Rate | diff --git a/home/versioned_docs/version-1.9.0/help/kafka_client.md b/home/versioned_docs/version-1.9.0/help/kafka_client.md new file mode 100644 index 0000000000..de3d6ed291 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/kafka_client.md @@ -0,0 +1,57 @@ +--- +id: kafka_client +title: Monitoring: Kafka Monitoring (Client-based) +sidebar_label: Kafka Monitoring (Client-based) +keywords: [open-source monitoring system, open-source message middleware monitoring, Kafka monitoring] +--- + +> Collect and monitor general metrics for Kafka. + +## Configuration Parameters + +| Parameter Name | Help Description | +|------------------|---------------------------------------------------------------| +| Monitoring Host | The monitored peer's IPv4, IPv6, or domain name. Note: ⚠️ Do not include protocol headers (e.g., https://, http://). | +| Monitoring Port | The monitored service port. | +| Task Name | The identifier for this monitoring task, which must be unique. | +| Collection Interval | The interval for periodic data collection, in seconds. The minimum allowable interval is 30 seconds. | +| Description/Remarks | Additional information to describe and identify this monitoring task. Users can add remarks here. | + +### Collected Metrics + +#### Metric Set: topic_list + +| Metric Name | Unit | Help Description | +|--------------|------|------------------| +| TopicName | None | Topic Name | + +#### Metric Set: topic_detail + +| Metric Name | Unit | Help Description | +|----------------------|------|------------------| +| TopicName | None | Topic Name | +| PartitionNum | None | Number of Partitions | +| PartitionLeader | None | Partition Leader | +| BrokerHost | None | Broker Host | +| BrokerPort | None | Broker Port | +| ReplicationFactorSize| None | Replication Factor Size | +| ReplicationFactor | None | Replication Factor | + +#### Metric Set: topic_offset + +| Metric Name | Unit | Help Description | +|---------------|------|------------------| +| TopicName | None | Topic Name | +| PartitionNum | None | Number of Partitions | +| earliest | None | Earliest Offset | +| latest | None | Latest Offset | + +#### Metric Set:consumer_detail + +| Metric Name | Unit | Help Description | +|-----------|--|------------------------------------| +| GroupId | None | Consumer Group Id | +| group_member_num | None | Number of Consumer Instances | +| Subscribed Topic Name | None | Topic Name Subscribed by the Group | +| offset_of_each_partition | None | Offsets for Each Partition | +| Lag | None | Lag of Consumer | diff --git a/home/versioned_docs/version-1.9.0/help/kafka_promql.md b/home/versioned_docs/version-1.9.0/help/kafka_promql.md new file mode 100644 index 0000000000..9cfabb9ba0 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/kafka_promql.md @@ -0,0 +1,66 @@ +--- +id: kafka_promql +title: Monitoring Kafka-PromQL +sidebar_label: Kafka-PromQL +keywords: [ Open Source Monitoring System, Open Source Middleware Monitoring, Kafka Monitoring, Kafka-PromQL Monitoring ] +--- + +> Monitor Kafka by querying generic metrics data from Prometheus server using Prometheus PromQL. This approach is suitable when Prometheus is already monitoring Kafka and you need to fetch Kafka's +> monitoring data from Prometheus server. + +## Prerequisites + +1. Deploy Kafka. +2. Deploy kafka_exporter. +3. Collect monitoring metrics exposed by kafka_exporter through Prometheus. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|----------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | IP, IPv6, or domain name of the target being monitored. Note ⚠️: Do not include protocol header (e.g., https://, http://). | +| Monitoring name | Name to identify this monitoring, ensuring uniqueness of names. | +| Port | Prometheus API port, default: 9090. | +| Relative path | Relative path of Prometheus to query PromQL, default: /api/v1/query | +| Request mode | Set the request method for API calls: GET, POST, PUT, DELETE, default: GET | +| Enable HTTPS | Whether to access the website via HTTPS, note ⚠️: enabling HTTPS generally requires changing the corresponding port to 443 | +| Username | Username for Basic or Digest authentication when accessing the API. | +| Password | Password for Basic or Digest authentication when accessing the API. | +| Content-Type | Resource type when carrying BODY request data. | +| Request BODY | Set the BODY request data, effective for PUT and POST request methods. | +| Collection interval | Interval for periodic data collection in seconds, the minimum interval that can be set is 30 seconds | +| Description remarks | Additional remarks and descriptions for this monitoring. Users can add notes here. | + +### Metrics Collection + +#### Metric Set: kafka_brokers + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------| +| __name__ | None | Metric name | +| instance | None | Instance to which the metric belongs | +| timestamp | None | Timestamp of metric collection | +| value | None | Metric value | + +#### Metric Set: kafka_topic_partitions + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------| +| __name__ | None | Metric name | +| instance | None | Instance to which the metric belongs | +| timestamp | None | Timestamp of metric collection | +| value | None | Metric value | + +#### Metric Set: kafka_server_brokertopicmetrics_bytesinpersec + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|--------------------------------------| +| __name__ | None | Metric name | +| instance | None | Instance to which the metric belongs | +| timestamp | None | Timestamp of metric collection | +| value | None | Metric value | + +### Other Kafka Monitoring Methods Supported by HertzBeat + +1. If Kafka is enabled with JMX monitoring, you can use [Kafka](kafka) Monitoring. +2. If Kafka cluster deploys kafka_exporter to expose monitoring metrics, you can refer to [Prometheus task](prometheus) to configure the Prometheus collection task to monitor kafka. diff --git a/home/versioned_docs/version-1.9.0/help/kingbase.md b/home/versioned_docs/version-1.9.0/help/kingbase.md new file mode 100644 index 0000000000..2a3f8c1448 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/kingbase.md @@ -0,0 +1,55 @@ +--- +id: kingbase +title: Monitoring:Kingbase database monitoring +sidebar_label: Kingbase database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring kingbase database metrics] +--- + +> Collect and monitor the general performance Metrics of Kingbase database. Support Kingbase V8R6+. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 5432 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|-------------------------------------------| +| server_version | none | Version number of the database server | +| port | none | Database server exposure service port | +| server_encoding | none | Character set encoding of database server | +| data_directory | none | Database storage data disk address | +| max_connections | connections | Database maximum connections | + +#### Metric set:state + +| Metric name | Metric unit | Metric help description | +|----------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| name | none | Database name, or share-object is a shared object | +| conflicts | times | The number of queries canceled in the database due to a conflict with recovery | +| deadlocks | number | Number of deadlocks detected in the database | +| blks_read | times | The number of disk blocks read in the database | +| blks_hit | times | Times the disk block has been found to be in the buffer, so there is no need to read it once (This only includes hits in the Kingbase buffer, not in the operating system file system buffer) | +| blk_read_time | ms | Time spent by the backend reading data file blocks in the database | +| blk_write_time | ms | Time spent by the backend writing data file blocks in the database | +| stats_reset | none | The last time these statistics were reset | + +#### Metric set:activity + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------------------| +| running | connections | Number of current client connections | diff --git a/home/versioned_docs/version-1.9.0/help/kubernetes.md b/home/versioned_docs/version-1.9.0/help/kubernetes.md new file mode 100644 index 0000000000..b09325cfc7 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/kubernetes.md @@ -0,0 +1,99 @@ +--- +id: kubernetes +title: Monitoring Kubernetes +sidebar_label: Kubernetes Monitor +keywords: [open source monitoring tool, open source kubernetes monitoring tool, monitoring kubernetes metrics] +--- + +> Collect and monitor the general performance metrics of Kubernetes. + +## Pre-monitoring operations + +If you want to monitor the information in 'Kubernetes', you need to obtain an authorization token that can access the API Server, so that the collection request can obtain the corresponding information. + +Refer to the steps to obtain token + +### method one + +1. Create a service account and bind the default cluster-admin administrator cluster role + + ```kubectl create serviceaccount dashboard-admin -n kube-system``` + +2. User Authorization + + ```shell + kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin + kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' + kubectl describe secret {secret} -n kube-system + ``` + +### method two + +```shell +kubectl create serviceaccount cluster-admin +kubectl create clusterrolebinding cluster-admin-manual --clusterrole=cluster-admin --serviceaccount=default:cluster-admin +kubectl create token --duration=1000h cluster-admin +``` + +### Configure parameters + +| Parameter name | Parameter Help describes the | +|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | THE MONITORED PEER IPV4, IPV6 OR DOMAIN NAME. Note ⚠️ that there are no protocol headers (eg: https://, http://). | +| Monitoring Name | A name that identifies this monitoring that needs to be unique. | +| APiServer port | K8s APiServer port, default 6443 | +| token | Authorize the Access Token | +| URL | The database connection URL is optional, if configured, the database name, user name and password parameters in the URL will override the parameter configured above | +| Collection interval | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds | +| Whether to probe | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation | +| Description Comment | For more information identifying and describing the remarks for this monitoring, users can remark the information here | + +### Collect metrics + +#### metric collection: nodes + +| Metric Name | metric unit | Metrics help describe | +|--------------------|-------------|-----------------------| +| node_name | None | Node name | +| is_ready | None | Node Status | +| capacity_cpu | None | CPU capacity | +| allocatable_cpu | None | CPU allotted | +| capacity_memory | None | Memory capacity | +| allocatable_memory | None | Memory allocated | +| creation_time | None | Node creation time | +| uid | None | UUID unique identifier| + +#### metric Collection: namespaces + +| Metric Name | metric unit | Metrics help describe | +|---------------|-------------|-----------------------| +| namespace | None | namespace name | +| status | None | Status | +| creation_time | None | Created | +| uid | None | UUID unique identifier| + +#### metric collection: pods + +| Metric Name | metric unit | Metrics help describe | +|---------------|-------------|-------------------------------| +| pod | None | Pod name | +| namespace | None | The namespace to which the pod belongs | +| status | None | Pod status | +| restart | None | Number of restarts | +| host_ip | None | The IP address of the host is | +| pod_ip | None | pod ip | +| creation_time | None | Pod creation time | +| start_time | None | Pod startup time | +| uid | None | UUID unique identifier | + +#### metric Collection: services + +| Metric Name | metric unit | Metrics help describe | +|---------------|-------------|-----------------------------------------------------------| +| service | None | Service Name | +| namespace | None | The namespace to which the service belongs | +| type | None | Service Type ClusterIP NodePort LoadBalancer ExternalName | +| cluster_ip | None | cluster ip | +| selector | None | tag selector matches | +| creation_time | None | Created | +| uid | None | UUID unique identifier | diff --git a/home/versioned_docs/version-1.9.0/help/linux.md b/home/versioned_docs/version-1.9.0/help/linux.md new file mode 100644 index 0000000000..441515439d --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/linux.md @@ -0,0 +1,114 @@ +--- +id: linux +title: Monitoring:Linux operating system monitoring +sidebar_label: Linux operating system +keywords: [open source monitoring tool, open source linux monitoring tool, monitoring linux metrics] +--- + +> Collect and monitor the general performance Metrics of Linux operating system. + +## Configuration parameter + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/linux_script.md b/home/versioned_docs/version-1.9.0/help/linux_script.md new file mode 100644 index 0000000000..a252d90fd5 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/linux_script.md @@ -0,0 +1,101 @@ +--- +id: linux_script +title: Monitoring:Using Scripts to Monitor Linux Operating System +sidebar_label: Using Scripts to Monitor Linux OS +keywords: [open source monitoring system, open source network monitoring, using scripts to monitor Linux OS] +--- + +## Preparation +> +> To monitor the local machine, simply deploy HertzBeat. To monitor other hosts, you need to deploy a collector on the target host. Refer to [this link](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package) for step 5 of the installation process. +If the collector is installed using Docker, it will cause the collector to be unable to monitor the process information on the host machine, because Docker containers run in an isolated environment, with each container having its own process space. +> When creating a monitoring task and selecting a collector, choose the corresponding collector deployed on the target host. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|:---------------|-----------------------------------------------------| +| Monitor Host | The IPv4, IPv6, or domain of the monitored endpoint. Note ⚠️ Do not include protocol headers (e.g., https://, http://). | +| Task Name | The name identifying this monitoring task, which needs to be unique. | +| Collector | Specifies which collector will be used for data collection in this monitoring task. | +| Monitoring Interval | The time interval for periodic data collection, in seconds. | +| Binding Tag | Classification management tags for monitoring resources. | +| Description Notes | Additional notes to describe this monitoring task. Users can add remarks here. | + +### Metrics Collection + +#### Metric Set: basic + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------------| +| hostname | None | Name of the host | +| version | None | Operating system version | +| uptime | None | System uptime | + +#### Metric Set: cpu + +| Metric Name | Metric Unit | Metric Description | +|----------------|-------------|-----------------------------------------------| +| info | None | CPU model | +| cores | Number | Number of CPU cores | +| interrupt | Count | Number of CPU interrupts | +| load | None | Average CPU load over the last 1/5/15 minutes | +| context_switch | Count | Current number of context switches | +| usage | % | CPU usage percentage | + +#### Metric Set: memory + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used by cache | +| available | Mb | Available memory capacity | +| usage | % | Memory usage percentage | + +#### Metric Set: disk + +| Metric Name | Metric Unit | Metric Description | +|---------------|-------------|-------------------------------------------| +| disk_num | Count | Total number of disks | +| partition_num | Count | Total number of partitions | +| block_write | Count | Total number of blocks written to disk | +| block_read | Count | Total number of blocks read from disk | +| write_rate | iops | Rate of blocks written to disk per second | + +#### Metric Set: interface + +| Metric Name | Metric Unit | Metric Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network interface name | +| receive_bytes | byte | Inbound data traffic (bytes) | +| transmit_bytes | byte | Outbound data traffic (bytes) | + +#### Metric Set: disk_free + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|------------------------| +| filesystem | None | Name of the filesystem | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Disk usage percentage | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 Programs by CPU Usage + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|-------------------------| +| id | None | Process ID | +| cpu | % | CPU usage percentage | +| ws | % | Memory usage percentage | +| command | None | Executed command | + +#### Metric Set: Top 10 Programs by Memory Usage + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|-------------------------| +| id | None | Process ID | +| cpu | % | CPU usage percentage | +| ws | % | Memory usage percentage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/lmstudio.md b/home/versioned_docs/version-1.9.0/help/lmstudio.md new file mode 100644 index 0000000000..d260ba5a95 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/lmstudio.md @@ -0,0 +1,49 @@ +--- +id: lmstudio +title: Monitoring LM Studio +sidebar_label: LM Studio +keywords: [ open source monitoring system, open source network monitoring, LM Studio monitoring, local LLM monitoring ] +--- + +## Prerequisites +> +> Ensure that the LM Studio server is running and the REST API is enabled. +> By default, LM Studio listens on `localhost:1234`. + +### Notes + +> 1. HertzBeat needs network access to the LM Studio server. Ensure the target host and port are reachable. +> 2. By default, LM Studio does not require authentication for API requests. To enable authentication so that only + requests with a valid API Token are accepted, toggle the switch in the Developers Page > Server Settings. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|:------------------|:-----------------------------------------------------------------------------------------------| +| Target Host | The IP address or domain of the LM Studio server. Default: `localhost`. | +| Port | The port of the LM Studio REST API. Default: `1234`. | +| HTTPS | Whether to enable HTTPS. | +| API Token | The API token for authentication (optional, required if API auth is enabled in LM Studio). | +| Task Name | Identify the name of this monitoring, ensuring uniqueness. | +| Collector | Configure which collector to use for scheduling collection for this monitoring. | +| Monitoring Period | Interval time for periodic data collection, in seconds, with a minimum interval of 30 seconds. | +| Bound Tags | Tags for managing classification of monitoring resources. | +| Description | Additional identification and description for this monitoring, users can leave remarks here. | + +### Collection Metrics + +#### Metric Set: Models + +| Metric Name | Metric Unit | Metric Description | +|--------------------|-------------|------------------------------------------| +| Model Key | None | Unique model identifier | +| Display Name | None | Human-readable model name | +| Model Type | None | Model category: llm or embedding | +| Publisher | None | Model creator identifier | +| Architecture | None | Model architecture (e.g., gemma3, llama) | +| Quantization | None | Quantization method (e.g., Q4_0, F16) | +| Quantization Bits | None | Bits per weight for quantization | +| Model Size | MB | Model file size | +| Parameters | None | Parameter count (e.g., 7B, 270M) | +| Max Context Length | None | Maximum token context window | +| Format | None | Model file format (gguf, mlx) | diff --git a/home/versioned_docs/version-1.9.0/help/log_integration.md b/home/versioned_docs/version-1.9.0/help/log_integration.md new file mode 100644 index 0000000000..b17c0cc50f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/log_integration.md @@ -0,0 +1,217 @@ +--- +id: log_integration +title: Log Integration (Beta) +sidebar_label: Log Integration (Beta) +keywords: [open source monitoring, log integration, log management, multi-source logs] +--- + +> HertzBeat's log integration module aims to achieve unified reception, standardized processing of log data from different third-party log systems and observability platforms. As a centralized "log center", HertzBeat can efficiently integrate log information from external systems and provide real-time log monitoring and analysis capabilities. + +:::warning +The log integration feature is currently in Beta (experimental) stage. There may be potential defects and limitations. The feature is under active development and iteration. +::: + +:::warning Upgrading from 1.8.x? The ingestion path changed +The 1.8.x endpoint `POST /api/logs/otlp/v1/logs` (and `POST /api/logs/ingest/otlp`) is replaced by `POST /api/otlp/v1/logs`. Update the `logs_endpoint` of every OpenTelemetry Collector / SDK exporter that points at HertzBeat. On 1.9.x the old paths still work as deprecated aliases (the response carries `Deprecation: true` and HertzBeat logs a warning); they are removed in 2.0. The query paths `/api/logs/**`, `/api/traces/**` and `/api/ingestion/otlp/**` moved to `/api/observability/**` with no alias. See the [Version Upgrade Guide](../start/upgrade) for the full old/new path table. +::: + +:::info HertzBeat 1.9.0 transition +Metrics, logs, and traces share `/api/otlp/v1/{signal}` for ingestion and `/api/observability/**` for queries. This release intentionally does not create or bind Entity records from telemetry. External OTLP signal tables are also separate from HertzBeat's internal self-telemetry tables. +::: + +## Core Capabilities + +- **Multi-source Log Integration**: Support receiving log data from mainstream platforms such as OpenTelemetry, Filebeat, Vector, Loki +- **Log Format Standardization**: Convert log data from different platforms to HertzBeat's internal unified format for subsequent processing and analysis +- **Real-time Log Processing**: Provide real-time log stream processing capabilities, supporting instant storage and distribution of log data +- **Intelligent Log Analysis**: Provide log search, filtering and other analysis functions + +### Supported Log Sources + +HertzBeat currently supports data integration from the following third-party log platforms: + +- **OTLP**: Support standard OpenTelemetry Log Protocol (OTLP) HTTP format, can directly receive log data from OpenTelemetry Collector and various applications that support OTLP. +- **More Protocol Support**: HertzBeat is actively expanding its log integration support, including Filebeat, Vector, Loki, etc. If you can't find the integration you need temporarily, the active community can also help you add it. + +You can view specific integration methods and configuration examples through HertzBeat's "Log Integration" interface. + +![log_integration](/img/docs/help/log_integration_en.png) + +## OpenTelemetry OTLP Protocol Integration + +### API Endpoint + +HertzBeat provides the following interface for receiving OTLP log data: + +```text +POST /api/otlp/v1/logs +``` + +### OTLP/gRPC Endpoint + +HertzBeat also runs an OTLP/gRPC listener when GreptimeDB storage is enabled, accepting metrics, logs +and traces. It expects the same `Authorization: Bearer {token}` credential as the HTTP endpoint. + +```text +{hertzbeat_host}:14317 +``` + +The port is 14317 on every deployment - the docker images publish it unchanged, so there is no +container-versus-host translation to remember. + +It is deliberately not the OpenTelemetry standard 4317: an OTel Collector, Jaeger or Tempo on the +same host normally holds that port already, and a clash on a published port stops the container from +starting at all. HertzBeat serves OTLP/HTTP on its own port too, so this is consistent with the rest +of the product rather than an exception. + +To use 4317 anyway, or to turn the listener off, set it in `application.yml` or through the matching +environment variables (and update the port mapping in `docker-compose.yaml` to match): + +```yaml +hertzbeat: + otlp: + grpc: + enabled: ${HERTZBEAT_OTLP_GRPC_ENABLED:true} + host: ${HERTZBEAT_OTLP_GRPC_HOST:0.0.0.0} + port: ${HERTZBEAT_OTLP_GRPC_PORT:14317} +``` + +If the port cannot be bound, HertzBeat logs the failure and starts without gRPC ingestion; OTLP/HTTP +on `/api/otlp/v1` keeps working. + +### Request Configuration + +#### Request Headers + +- `Content-Type`: `application/json` or `application/x-protobuf` +- `Authorization`: `Bearer {token}` + +#### Request Body Format + +Supports standard OTLP JSON-Protobuf format or Binary Protobuf format log data: + +```json +{ + "resourceLogs": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "my-service" + } + }, + { + "key": "service.version", + "value": { + "stringValue": "1.0.0" + } + } + ] + }, + "scopeLogs": [ + { + "scope": { + "name": "my-logger", + "version": "1.0.0" + }, + "logRecords": [ + { + "timeUnixNano": "1640995200000000000", + "severityNumber": 9, + "severityText": "INFO", + "body": { + "stringValue": "This is a log message" + }, + "attributes": [ + { + "key": "user.id", + "value": { + "stringValue": "12345" + } + } + ], + "traceId": "12345678901234567890123456789012", + "spanId": "1234567890123456" + } + ] + } + ] + } + ] +} +``` + +### Configuration Examples + +#### OpenTelemetry Collector Configuration + +Add HertzBeat as a log export target in the OpenTelemetry Collector configuration file: + +```yaml +exporters: + otlphttp: + logs_endpoint: http://{hertzbeat_host}:1157/api/otlp/v1/logs + compression: none + encoding: json + headers: + Authorization: "Bearer {token}" + +service: + pipelines: + logs: + receivers: [otlp] + processors: [batch] + exporters: [otlphttp] +``` + +### Log Data Format Description + +#### Core Fields + +- **timeUnixNano**: Log timestamp (nanosecond precision) +- **severityNumber**: Log level numeric value (1-24, corresponding to TRACE to FATAL) +- **severityText**: Log level text (such as "INFO", "ERROR", etc.) +- **body**: Log message content +- **attributes**: Log attribute key-value pairs +- **traceId**: Trace ID (optional) +- **spanId**: Span ID (optional) + +#### Resource Attributes + +Application and environment information can be set through `resource.attributes`: + +- `service.name`: Service name +- `service.version`: Service version +- `deployment.environment`: Deployment environment (dev/test/prod) +- `host.name`: Host name + +### Configuration Verification + +1. **Configure Log Sender**: Configure external systems to send OTLP logs to HertzBeat specified interface +2. **View Received Logs**: View received log data in HertzBeat real-time log module +3. **Verify Data Integrity**: Verify whether log data format, timestamp, attributes and other information are correct + +![log_stream](/img/docs/help/log_stream_en.png) + +### Common Issues + +#### Log Sending Failed + +- **Network Connection Issues**: Ensure HertzBeat service address can be accessed by external systems +- **Request Header Error**: Verify that request header Content-Type is set to `application/json` + +#### Log Format Error + +- **OTLP Format**: Ensure standard OTLP JSON-Protobuf or Binary Protobuf format is sent +- **Timestamp Format**: Check if timestamp format is Unix timestamp with nanosecond precision +- **Log Level**: Verify severityNumber value range (1-24) +- **Data Type**: Ensure data types of each field comply with OTLP specification + +### Related Resources + +- [OpenTelemetry Log Specification](https://opentelemetry.io/docs/specs/otel/logs/) +- [OpenTelemetry Collector Configuration Guide](https://opentelemetry.io/docs/collector/configuration/) + +For more log integration methods or technical issues, feel free to communicate with the community through [GitHub Issues](https://github.com/apache/hertzbeat/issues). diff --git a/home/versioned_docs/version-1.9.0/help/log_manage.md b/home/versioned_docs/version-1.9.0/help/log_manage.md new file mode 100644 index 0000000000..2440c6e3be --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/log_manage.md @@ -0,0 +1,117 @@ +--- +id: log_manage +title: Log Management (Beta) +sidebar_label: Log Management (Beta) +keywords: [open source monitoring, log management, log query, log statistics, log deletion] +--- + +> HertzBeat's log management feature provides comprehensive log data management capabilities, including log querying, statistical analysis, and batch deletion operations. Users can precisely search logs through various filter conditions, view detailed statistical charts, and clean up unnecessary log data. + +:::warning +The log management feature is currently in Beta (experimental) stage. There may be potential defects and limitations. The feature is under active development and iteration. +::: + +## Prerequisites + +**Before using the log management feature, you must first configure a database that supports log storage.** + +## Feature Overview + +In the HertzBeat interface, navigate to "Logs" -> "Log Management" page, where you'll see a comprehensive log management interface. + +![log_manage](/img/docs/help/log_manage_en.png) + +## Log Query Features + +### Filter Conditions + +Log management supports the following filter conditions for precise querying: + +| Filter Condition | Field Name | Data Type | Purpose | Example Value | Use Case | +|------------------|------------|-----------|---------|---------------|----------| +| **Time Range** | `timestamp` | DateTime | Specify query time window | `2024-01-01 00:00:00` to `2024-01-02 00:00:00` | Issue time period location, performance analysis | +| **Trace ID** | `traceId` | String | Request tracing in distributed systems | `1234567890abcdef` | Link tracing, request flow analysis | +| **Span ID** | `spanId` | String | Identifier for specific operations in traces | `abcdef1234567890` | Microservice call analysis | +| **Severity Number** | `severityNumber` | Number | OpenTelemetry standard level | `1-24` | Filter by numeric level | +| **Severity Text** | `severityText` | String | Human-readable log level | `ERROR`, `WARN`, `INFO` | Quick filtering by level | + +### Visualization Analysis Charts + +Visualization analysis charts include basic statistical indicator charts and aggregated statistical charts. Click the "Show Statistics" button to expand and view them. + +![log_manage_chart](/img/docs/help/log_manage_chart_en.png) + +#### Basic Statistical Indicators + +| Statistical Indicator | Description | Application Value | Anomaly Threshold Reference | +|----------------------|-------------|-------------------|----------------------------| +| **Total Logs** | Total number of logs matching query criteria | Evaluate system activity and data scale | Sudden increase/decrease over 50% needs attention | +| **FATAL Logs** | Fatal error level log statistics | Identify system critical failures | Any FATAL logs need immediate handling | +| **ERROR Logs** | Error level log statistics | Monitor system anomalies | Over 5% of total logs needs attention | +| **WARN Logs** | Warning level log statistics | Discover potential issues and performance bottlenecks | Continuous growth trend needs analysis | +| **INFO Logs** | Information level log statistics | Understand normal system operation status | Should be the main body of logs | +| **DEBUG Logs** | Debug level log statistics | Development debugging and issue troubleshooting | Should control quantity in production environment | + +#### Aggregated Statistical Charts + +| Chart Name | Chart Type | Display Content | Main Purpose | Included Metrics/Levels | +|------------|------------|-----------------|--------------|-------------------------| +| **Severity Distribution Chart** | Pie chart | Quantity distribution of different log levels | Quickly understand log severity distribution | FATAL, ERROR, WARN, INFO, DEBUG | +| **Trace Coverage Chart** | Pie chart | Proportion of logs with trace information | Analyze system trace coverage | Number of logs with Trace ID
Number of logs with Span ID
Number of logs with both Trace and Span
Number of logs without trace information | +| **Log Trend Chart** | Timeline chart | Hourly statistics of log quantity trends | Analyze log generation time patterns and anomaly peaks | Time granularity: Hourly statistics
Analysis dimension: Time pattern recognition, anomaly peak detection | + +### Column Display Configuration + +Click the "Column Settings" button to customize table column display: + +- **Time**: Log generation timestamp +- **Observed Time**: Time when log was observed +- **Severity**: Log level label +- **Log Content**: Main message content +- **Attributes**: Log additional attribute information +- **Resource**: Resource-related information +- **Trace ID**: Distributed tracing identifier +- **Span ID**: Operation span identifier +- **Trace Flags**: Trace flag information +- **Instrumentation Scope Info**: Instrumentation scope information +- **Dropped Count**: Number of dropped attributes + +## Log Details View + +Click any log entry in the table to open the details modal: + +![log_manage](/img/docs/help/log_manage_log_details_en.png) + +### Basic Information Section + +- **Severity**: Display level label and color identifier +- **Timestamp**: Formatted detailed time display +- **Trace ID**: Complete distributed tracing identifier +- **Span ID**: Complete operation span identifier + +### Complete JSON Data + +- **Raw Data**: Display complete JSON format of log entry +- **Copy Function**: Support one-click copy to clipboard +- **Formatted Display**: JSON data is formatted for easy reading + +## Batch Delete Feature + +1. **Select Logs**: Use checkboxes on the left side of the table to select logs for deletion +2. **Select All**: Use the checkbox in the table header to select all logs on the current page +3. **Batch Delete**: Click the "Batch Delete" button to delete selected logs +4. **Delete Count**: Button shows the number of currently selected logs + +## Troubleshooting + +### Unable to View Logs + +**Symptoms**: Page shows "No Data" or loading failure +**Solutions**: + +1. Check if time-series database is properly configured +2. Confirm database service is running normally +3. Verify database connection configuration is correct +4. Check if log data is being written to the database + +For more information about log management features or technical issues, feel free to engage with the community through [GitHub Issues](https://github.com/apache/hertzbeat/issues). diff --git a/home/versioned_docs/version-1.9.0/help/log_stream.md b/home/versioned_docs/version-1.9.0/help/log_stream.md new file mode 100644 index 0000000000..41fc1db061 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/log_stream.md @@ -0,0 +1,91 @@ +--- +id: log_stream +title: Log Stream (Beta) +sidebar_label: Log Stream (Beta) +keywords: [open source monitoring, log stream, real-time logs, log filtering] +--- + +> HertzBeat's log stream feature provides real-time log viewing and filtering capabilities, including real-time log monitoring, multi-dimensional filtering, and log detail viewing. Users can monitor system logs in real-time and perform precise filtering based on different conditions to quickly locate issues and analyze system status. + +:::warning +The log stream feature is currently in Beta (experimental) stage. There may be potential defects and limitations. The feature is under active development and iteration. +::: + +## Feature Overview + +In the HertzBeat interface, navigate to "Log" -> "Log Stream" page, where you will see a comprehensive real-time log monitoring interface. + +![log_stream](/img/docs/help/log_stream_en.png) + +## Real-time Log Viewing + +### Log Display + +- **Real-time Updates**: New logs automatically appear at the top of the list with highlight animation effects +- **Log Count**: Interface displays the current number of loaded logs (maximum 1000 entries retained) +- **Level Identification**: Following OpenTelemetry specifications, different log levels are identified with different colors: + - Gray: TRACE (1-4) + - Blue: DEBUG (5-8) + - Green: INFO (9-12) + - Orange: WARN (13-16) + - Red: ERROR (17-20) + - Volcano Red: FATAL (21-24) + +### Display Controls + +- **Pause/Resume**: Click the pause button to pause new log display, click again to resume +- **Clear Logs**: Clear all currently displayed log entries +- **Scroll to Top**: Quickly return to the latest log position +- **Auto Scroll**: System automatically scrolls to the latest logs by default. When users manually scroll to other positions, auto scroll will pause. Click "Scroll to Top" button or scroll to the top to re-enable auto scroll + +## Log Filtering + +Click the "Show Filters" button to expand the filter configuration area, supporting the following filter conditions: + +| Filter Condition | Field Name | Data Type | Purpose | Example Value | Use Case | +|------------------|------------|-----------|---------|---------------|----------| +| **Severity Number** | `severityNumber` | Number | OpenTelemetry standard level | `9` | Filter by numeric level precisely | +| **Severity Text** | `severityText` | String | Human-readable log level | `ERROR`, `WARN`, `INFO` | Quick filtering by level | +| **Trace ID** | `traceId` | String | Distributed system request chain tracking | `1234567890abcdef` | Trace analysis, request flow analysis | +| **Span ID** | `spanId` | String | Specific operation identifier within traces | `abcdef1234567890` | Microservice call analysis | + +## Log Detail Viewing Features + +Click any log entry to open the detail modal, providing complete log information display: + +![log_entry_details](/img/docs/help/log_stream_log_entry_details.png) + +### Basic Information Area + +- **Severity Level**: Display level label and color identification +- **Timestamp**: Formatted detailed time display +- **Trace ID**: Complete distributed trace identifier +- **Span ID**: Complete operation span identifier + +### Complete JSON Data + +- **Raw Data**: Display complete JSON format of the log entry +- **Copy Function**: Support one-click copy to clipboard +- **Formatted Display**: JSON data is formatted for easy reading + +## Troubleshooting + +### Connection Issues + +**Symptoms**: Shows "Disconnected" status +**Solutions**: + +- Check network connection +- Confirm HertzBeat service is running normally +- Check if browser supports SSE + +### No Log Display + +**Symptoms**: Connection is normal but no logs are displayed +**Solutions**: + +- Check if log data is being sent to HertzBeat +- Verify filter settings are not too restrictive +- Confirm log format meets expectations + +For more information about log stream features or technical issues, feel free to communicate with the community through [GitHub Issues](https://github.com/apache/hertzbeat/issues). diff --git a/home/versioned_docs/version-1.9.0/help/macos.md b/home/versioned_docs/version-1.9.0/help/macos.md new file mode 100644 index 0000000000..62d4bdae86 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/macos.md @@ -0,0 +1,116 @@ +--- +id: macos +title: macOS operating system monitoring +sidebar_label: macOS operating system +keywords: [open source monitoring tool, open source os monitoring tool, monitoring macOS operating system metrics] +--- + +> Collect and monitor the general performance Metrics of macOS operating system. + +## Pre-monitoring operations + +Please refer to [Allow a remote computer to access your Mac](https://support.apple.com/guide/mac-help/allow-a-remote-computer-to-access-your-mac-mchlp1066/mac) to enable remote login. + +## Configuration parameter + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +## Data Collection Metrics + +### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| load | None | Average CPU load (1/5/15 minutes) | +| usage | % | CPU usage | + +### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/mariadb.md b/home/versioned_docs/version-1.9.0/help/mariadb.md new file mode 100644 index 0000000000..e84a3f7d11 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/mariadb.md @@ -0,0 +1,69 @@ +--- +id: mariadb +title: Monitoring:MariaDB database monitoring +sidebar_label: MariaDB database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring mariadb database metrics] +--- + +> Collect and monitor the general performance Metrics of MariaDB database. Support MariaDB5+. + +## Driver selection + +MariaDB follows the same automatic routing as MySQL: + +- If `mysql-connector-j` is present in `ext-lib`, the JVM collector or built-in server collector automatically prefers JDBC. +- If `mysql-connector-j` is absent, HertzBeat automatically uses the built-in MySQL-compatible query engine. No extra JAR is required. +- Restart HertzBeat or the standalone JVM collector after adding or removing a JAR in `ext-lib`. + +:::important Collector package selection +MariaDB monitoring supports both JVM and native deployment now. + +- Built-in server collector or JVM collector package: automatically prefers JDBC when `mysql-connector-j` exists in `ext-lib` +- Native collector package: supported when you do not rely on `ext-lib` and want the built-in query engine +- If you explicitly need runtime `ext-lib` JDBC loading, choose the JVM collector package +::: + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 3306 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|------------------------------------| +| version | none | Database version | +| port | none | Database exposure service port | +| datadir | none | Database storage data disk address | +| max_connections | none | Database maximum connections | + +#### Metric set:status + +| Metric name | Metric unit | Metric help description | +|-------------------|-------------|------------------------------------| +| threads_created | none | MariaDB created total connections | +| threads_connected | none | MariaDB connected connections | +| threads_cached | none | MariaDB current cached connections | +| threads_running | none | MariaDB current active connections | + +#### Metric set:innodb + +| Metric name | Metric unit | Metric help description | +|---------------------|-------------|------------------------------------------------------| +| innodb_data_reads | none | innodb average number of reads from files per second | +| innodb_data_writes | none | innodb average number of writes from file per second | +| innodb_data_read | KB | innodb average amount of data read per second | +| innodb_data_written | KB | innodb average amount of data written per second | diff --git a/home/versioned_docs/version-1.9.0/help/mcp_server.md b/home/versioned_docs/version-1.9.0/help/mcp_server.md new file mode 100644 index 0000000000..a6c3061d5a --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/mcp_server.md @@ -0,0 +1,153 @@ +--- +id: mcp_server +title: MCP Server +sidebar_label: MCP Server +keywords: [MCP, StreamableHttp, streaming, server] +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This page explains how connect to the HertzBeat MCP server. The MCP server auto starts on the default port 1157 when you start the HertzBeat server. + +## Overview + +- Provides Streamable-Http protocol MCP server. +- Intended for MCP integrations and clients that consume streaming events. + +### Connect to the MCP server + +Make sure that hertzbeat server is up and running. If you are using any other port than 1157, replace the following accordingly + +- URL: `http://your-hertzbeat-server-host:1157/api/mcp` + +### Authentication + +You must authenticate each request using one of the following methods: + +- JWT bearer token + + - Header: `Authorization: Bearer ` + +Note: You can generate a JWT token from the HertzBeat web UI under the Log Integration or Alarm Integration Page. + +- Basic authentication + - Header: `Authorization: Basic ` + +### Editor MCP configuration + + + + +Claude Code use a global config file `~/.claude.json` to config mcp server. You can add HertzBeat MCP by CLI or edit this file directly. + +Method A: Use the CLI. + +```bash +claude mcp add -s user -t http hertzbeat-mcp http://your-hertzbeat-server-host:1157/api/mcp --header "Authorization: Bearer your_jwt_key" +``` + +Method B: Edit the file directly. + +Basic auth: + +```jsonc +{ + "mcpServers": { + "hertzbeat-mcp": { + "type": "sse", + "url": "http://your-hertzbeat-server-host:1157/api/mcp", + "headers": { + "Authorization": "Basic " + } + } + } +} +``` + +JWT bearer: + +```jsonc +{ + "mcpServers": { + "hertzbeat-mcp": { + "type": "sse", + "url": "http://your-hertzbeat-server-host:1157/api/mcp", + "headers": { + "Authorization": "Bearer " + } + } + } +} +``` + +After saving `~/.claude.json`, restart or reload Claude Code to make the new MCP configuration take effect. + + + + +Create or edit `.cursor/mcp.json` in your home directory or project root. + +Basic auth: + +```json +{ + "hertzbeat-mcp": { + "url": "http://your-hertzbeat-server-host:1157/api/mcp", + "headers": { + "Authorization": "Basic " + } + } +} +``` + +JWT bearer: + +```json +{ + "hertzbeat-mcp": { + "url": "http://your-hertzbeat-server-host:1157/api/mcp", + "headers": { + "Authorization": "Bearer " + } + } +} +``` + +After saving, reload MCP in Cursor or restart the editor. + + + + +### Tools available + +#### Monitor Management Tools + +- **query_monitors**: Query existing/configured monitors with comprehensive filtering, pagination, and status overview. Supports filtering by IDs, type, status, host, labels, and sorting. +- **add_monitor**: Add a new monitoring target to HertzBeat with comprehensive configuration. Handles different parameter requirements for each monitor type. +- **list_monitor_types**: List all available monitor types that can be added to HertzBeat. Shows all supported monitor types with their display names. +- **get_monitor_additional_params**: Get the parameter definitions required for a specific monitor type. Shows what parameters are needed when adding a monitor. + +#### Metrics Data Tools + +- **query_realtime_metrics**: Get real-time metrics data for a specific monitor. Returns current metrics values including CPU, memory, disk usage, etc. +- **get_historical_metrics**: Get historical metrics data for analysis and trending. Returns time-series data for specified metrics over a time range. +- **get_warehouse_status**: Check the status of the metrics storage warehouse system. Returns whether the metrics storage is operational and accessible. + +#### Alert Management Tools + +- **query_alerts**: Query alerts with comprehensive filtering and pagination options. Supports filtering by alert type (single/group), status (firing/resolved), search terms, and sorting. +- **get_alerts_summary**: Get alerts summary statistics including total counts, status distribution, and priority breakdown across all monitors. + +#### Alert Rule Definition Tools + +- **create_alert_rule**: Create a HertzBeat alert rule based on app hierarchy structure and user requirements. Supports threshold values, field conditions, and comprehensive alert configuration. +- **list_alert_rules**: List existing alert rules with filtering options. Shows configured thresholds and alert definitions with search and pagination. +- **get_alert_rule_details**: Get detailed information about a specific alert rule. Shows complete threshold configuration and rule settings. +- **toggle_alert_rule**: Enable or disable an alert rule. Allows activating or deactivating threshold monitoring for specific rules. +- **get_apps_metrics_hierarchy**: Get the hierarchical structure of all available apps and their metrics for alert rule creation. Returns structured JSON data with field parameters. +- **bind_monitors_to_alert_rule**: Bind monitors to an alert rule. Associates specific monitors with alert rules to enable monitoring and alerting. + +### Notes + +- If the connection drops, reconnect using the same headers. diff --git a/home/versioned_docs/version-1.9.0/help/memcached.md b/home/versioned_docs/version-1.9.0/help/memcached.md new file mode 100644 index 0000000000..d3646e7289 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/memcached.md @@ -0,0 +1,67 @@ +--- +id: memcached +title: Monitoring Memcached +sidebar_label: Memcached Monitor +keywords: [ open source monitoring tool, open source Memcached monitoring tool, monitoring memcached metrics ] +--- + +> Collect and monitor the general performance Metrics of Memcached. + +**Protocol Use:Memcached** + +```text +The default YML configuration for the memcache version is in compliance with 1.4.15. +You need to use the stats command to view the parameters that your memcache can monitor +``` + +**1、Obtain usable parameter indicators through commands such as stats、stats setting、stats settings. + +```shell +# telnet ip port +[root@server ~]# telnet localhost 11211 +Trying ::1... +Connected to localhost. +Escape character is '^]'. +stats +STAT pid 15168 +STAT uptime 11691 +STAT time 1702569246 +STAT version 1.4.15 +... +``` + +**There is help_doc: [https://www.runoob.com/memcached/memcached-stats.html](https://www.runoob.com/memcached/memcached-stats.html)** + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by Memcached | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:server_info + +| Metric name | Metric unit | Metric help description | +|------------------|-------------|---------------------------------------------------| +| pid | | Memcache server process ID | +| uptime | s | The number of seconds the server has been running | +| version | | Memcache version | +| curr_connections | | Current number of connections | +| auth_errors | | Number of authentication failures | +| threads | | Current number of threads | +| item_size | byte | The size of the item | +| item_count | | Number of items | +| curr_items | | The total number of data currently stored | +| total_items | | The total number of data stored since startup | +| bytes | byte | The current number of bytes occupied by storage | +| cmd_get | | Get command request count | +| cmd_set | | Set command request count | +| cmd_flush | | Flush command request count | +| get_misses | | Get command misses | +| delete_misses | | Delete command misses | diff --git a/home/versioned_docs/version-1.9.0/help/modbus.md b/home/versioned_docs/version-1.9.0/help/modbus.md new file mode 100644 index 0000000000..08604b6fec --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/modbus.md @@ -0,0 +1,80 @@ +--- +id: modbus +title: Monitoring Modbus +sidebar_label: Modbus Monitor +keywords: [ open source monitoring tool, Modbus monitoring ] +--- + +> The response of Modbus service and other related indicators are monitored. + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------| +| Host of Modbus Service | The IPv4, IPv6, or domain name of the Modbus device to be monitored. Note ⚠️ do not include the protocol header (e.g., https://, http://). | +| Task Name | A name that identifies this monitoring task; the name must be unique. | +| Port | The port used for Modbus network communication. | +| Slave ID (slaveId) | The ID of the slave device in the Modbus network. | +| Holding Register Address | Used for categorizing and managing monitored resources. | +| Coil Register Address | Additional notes and descriptions for this monitoring task; users can add remarks here. | +| Timeout | The allowed time for collecting a response. | + +### Collected Metrics + +#### Metric Set: holding-register + +1. The number of parameters must match the total number of coil register addresses specified in the parameters. +2. Alias format for parameters: holding-register:m or holding-register:m-n + +Parameter example: + +Coil register addresses: + +```text +1,2[3] +``` + +Parameter alias names: + +```yaml +aliasFields: + - responseTime + - holding-register:0 + - holding-register:1-0 + - holding-register:1-1 + - holding-register:1-2 +``` + +| Metric Name | Metric Unit | Metric Help Description | +|----------------------------|--------------|-----------------------------------------------------------------| +| Response Time | Milliseconds | The time required by the Modbus server to respond to a request. | +| Holding Register Parameter | | Setpoint for analog output | + +#### Metric Set: coil + +1. The number of parameters must match the total number of coil register addresses specified in the parameters. +2. Alias format for parameters: coil:m or coil:m-n + +Parameter example: + +Coil register addresses: + +```text +1,2[3] +``` + +Parameter alias names: + +```yaml +aliasFields: + - responseTime + - coil:0 + - coil:1-0 + - coil:1-1 + - coil:1-2 +``` + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|--------------|-----------------------------------------------------------------| +| Response Time | Milliseconds | The time required by the Modbus server to respond to a request. | +| Coil Status | | Coil status (0 or 1) | diff --git a/home/versioned_docs/version-1.9.0/help/mongodb.md b/home/versioned_docs/version-1.9.0/help/mongodb.md new file mode 100644 index 0000000000..02fc3d520c --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/mongodb.md @@ -0,0 +1,95 @@ +--- +id: mongodb +title: Monitoring:MongoDB +sidebar_label: MongoDB database +keywords: [ open source monitoring tool, open source database monitoring tool, monitoring MongoDB database metrics ] +--- + +> Collect and monitor the general performance Metrics of MongoDB database. + +## Configuration parameter + +| Parameter name | Parameter help description | +|------------------------|-------------------------------------------------------------------------------------------------------------------------| +| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique. | +| Port | Port provided by the database. The default is 27017. | +| Username | Username for MongoDB,Optional. | +| Password | Password for MongoDB,Optional. | +| database | Database name. | +| authenticationDatabase | Credentials Storage Database. | +| Connect Timeout(ms) | Set connection timeout for MongoDB, unit: ms, default: 6000ms. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Bind Tags | Used to classify and manage monitoring resources. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Collection Metric + +#### Metric set:Build Info + +| Metric name | Metric unit | Metric help description | +|------------------|-------------|-----------------------------------------------------------------------------------------| +| version | none | The version number of the MongoDB server. | +| gitVersion | none | The Git version of the MongoDB codebase. | +| sysInfo | none | System information, typically includes details about the operating system and platform. | +| loaderFlags | none | Loader flags used to link MongoDB binaries | +| compilerFlags | none | Compiler flags used when compiling MongoDB. | +| allocator | none | The memory allocator used by MongoDB. | +| javascriptEngine | none | The JavaScript engine used by MongoDB. | + +#### Metric set:Server Document + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-----------------------------------| +| deleted | none | The number of documents deleted. | +| inserted | none | The number of documents inserted. | +| returned | none | The number of documents returned. | +| updated | none | The number of documents updated. | + +#### Metric set:Server Operation + +| Metric name | Metric unit | Metric help description | +|----------------|-------------|------------------------------------------------------------------| +| scanAndOrder | none | The number of times a query required both scanning and ordering. | +| writeConflicts | none | The number of write conflicts that occurred. | + +#### Metric set: Max Connections + +| Metric name | Metric unit | Metric help description | +|------------------|-------------|--------------------------------------------| +| deletedDocuments | none | Number of deleted documents. | +| passes | none | Total number of passes for TTL operations. | + +#### Metric set:System Info + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|------------------------------------------------------| +| currentTime | none | Current system time. | +| hostname | none | Hostname of the server. | +| cpuAddrSize | MB | Size of CPU address in bits. | +| memSizeMB | MB | Total size of system memory in megabytes. | +| memLimitMB | MB | Memory limit for the MongoDB process in megabytes. | +| numCores | none | Total number of CPU cores. | +| cpuArch | none | CPU architecture. | +| numaEnabled | none | Whether NUMA (Non-Uniform Memory Access) is enabled. | + +#### Metric set:OS Info + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|----------------------------------| +| type | none | Type of the operating system. | +| name | none | Name of the operating system. | +| version | none | Version of the operating system. | + +#### Metric set:Extra Info + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|--------------------------------------------------------| +| versionString | none | String describing the version of the operating system. | +| libcVersion | none | Version of the C standard library (libc). | +| kernelVersion | none | Version of the operating system kernel. | +| cpuFrequencyMHz | none | Frequency of the CPU in megahertz. | +| cpuFeatures | none | Features supported by the CPU. | +| pageSize | none | Size of a memory page in bytes. | +| numPages | none | Total number of memory pages. | +| maxOpenFiles | none | Maximum number of open files allowed. | diff --git a/home/versioned_docs/version-1.9.0/help/mongodb_atlas.md b/home/versioned_docs/version-1.9.0/help/mongodb_atlas.md new file mode 100644 index 0000000000..f7a43a6766 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/mongodb_atlas.md @@ -0,0 +1,77 @@ +--- +id: mongodb_atlas +title: Monitoring MongoDB Atlas Database +sidebar_label: MongoDB Atlas Database +keywords: [open-source monitoring system, open-source database monitoring, MongoDB Atlas database monitoring] +--- + +> Collect and monitor general performance metrics of MongoDB Atlas databases. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| Target Host | The IP address, IPv4, IPv6, or domain name of the target to be monitored. Note: ⚠️ Do not include protocol headers (e.g., https://, http://). | +| Task Name | The name identifying this monitor, which must be unique. | +| Username | MongoDB username, optional. | +| Password | MongoDB password, optional. | +| Database | Name of the database. | +| Authentication Database | The name of the database storing user credentials. | +| Connection Timeout | Timeout for MongoDB connection when no response is received, in milliseconds (ms). Default is 6000 ms. | +| Cluster Mode | Value for MongoDB Atlas cluster: mongodb-atlas | +| Collection Interval | Interval for periodic data collection, in seconds. The minimum interval is 30 seconds. | +| Binding Tags | Used for categorizing and managing monitoring resources. | +| Description/Remarks | Additional labels and description for this monitor; users can add notes here. | + +### Collection Metrics + +#### Metric Set: Build Information + +| Metric Name | Unit | Metric Description | +|------------------|------|-----------------------------------| +| version | None | MongoDB version information | +| gitVersion | None | Source code git version | +| sysInfo | None | System information | +| allocator | None | Memory allocator used by MongoDB | +| javascriptEngine | None | JavaScript engine used by MongoDB | + +#### Metric Set: Server Document + +| Metric Name | Unit | Metric Description | +|-------------|------|---------------------------------------------------| +| delete | None | Number of deletions | +| insert | None | Number of insertions | +| update | None | Number of updates | +| query | None | Number of queries | +| getmore | None | Number of requests for remaining cursor documents | +| command | None | Total number of command operations | + +#### Metric Set: Network Operations + +| Metric Name | Unit | Metric Description | +|-------------|------|-----------------------------------------------------| +| Bytes In | None | Number of times a query needs to scan and sort data | +| Bytes Out | None | Number of write conflicts | +| Request Num | None | Number of requests | + +#### Metric Set: Connection Information + +| Metric Name | Unit | Metric Description | +|---------------------------|------|--------------------------------------| +| Current Connections | None | Number of current active connections | +| Available Connections | None | Number of available connections | +| Total Created Connections | None | Total number of connections created | + +#### Metric Set: Database Statistics + +| Metric Name | Unit | Metric Description | +|-------------------|-------|---------------------------| +| Database Name | None | Name of the database | +| Collections | None | Number of collections | +| Views | None | Number of views | +| Objects | None | Number of documents | +| Document Avg Size | Bytes | Average size of documents | +| Document Size | Bytes | Total size of documents | +| Storage Size | Bytes | Size of storage used | +| Indexes | None | Number of indexes | +| Index Size | Bytes | Total size of indexes | diff --git a/home/versioned_docs/version-1.9.0/help/mqtt.md b/home/versioned_docs/version-1.9.0/help/mqtt.md new file mode 100644 index 0000000000..379a89c817 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/mqtt.md @@ -0,0 +1,44 @@ +--- +id: mqtt +title: Monitoring MQTT Connection +sidebar_label: MQTT Connection +keywords: [ Open Source Monitoring System, MQTT Connection Monitoring ] +--- + +> Monitor MQTT connection status, supporting MQTT5 and MQTT3.1.1 protocols. + +**Protocol used: mqtt** + +:::tip +To check if topics can be subscribed to normally, HertzBeat will subscribe to a topic and then immediately unsubscribe; to verify if messages can be published correctly, HertzBeat will send a test +message to a topic (if the test message parameter is empty, this check will not be performed). +Please ensure that these operations will not affect your system. +::: + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|------------------------|------------------------------------------------------------------------------------------------------------------------------------| +| Target Host | The monitored target's IPv4, IPv6, or domain name. Note ⚠️: Do not include protocol headers (e.g., https://, http://). | +| Task Name | The name of this monitoring task, which needs to be unique. | +| Port | The port where the MQTT service is open, default is 1883. | +| Protocol Version | The MQTT protocol version, supporting MQTT5 and MQTT3.1.1. | +| Connection Timeout(ms) | Connection timeout in milliseconds, default is 6000 ms. | +| Client Id | MQTT client ID, default is `hertzbeat-mqtt-client`. | +| Topic | The topic to be monitored. | +| Test Message | Message content used to test whether a topic can be published to normally (optional; if empty, `canPublish` will always be false). | +| Username | MQTT authentication username (optional). | +| Password | MQTT authentication password (optional). | +| Intervals | Interval for periodic data collection, in seconds; the minimum interval that can be set is 30 seconds. | +| Binding Tag | Used for classification and management of monitoring resources. | +| Description | Additional notes to identify and describe this monitoring task, users can leave notes here. | + +### Collected Metrics + +#### Metric Set: Summary + +| Metric Name | Unit | Metric Description | +|--------------|------|---------------------------------------------------------| +| responseTime | none | Response time | +| canPublish | none | Whether messages can be published to the topic normally | +| canSubscribe | none | Whether the topic can be subscribed to normally | diff --git a/home/versioned_docs/version-1.9.0/help/mysql.md b/home/versioned_docs/version-1.9.0/help/mysql.md new file mode 100644 index 0000000000..842b2dec52 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/mysql.md @@ -0,0 +1,70 @@ +--- +id: mysql +title: Monitoring:MySQL database monitoring +sidebar_label: MySQL database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring mysql database metrics] +--- + +> Collect and monitor the general performance Metrics of MySQL database. Support MYSQL5+. + +## Driver selection + +HertzBeat now supports two MySQL query paths: + +- If `mysql-connector-j` is present in `ext-lib`, the JVM collector or built-in server collector automatically prefers JDBC. +- If `mysql-connector-j` is absent, HertzBeat automatically uses the built-in MySQL query engine. No extra JAR is required. +- Restart HertzBeat or the standalone JVM collector after adding or removing a JAR in `ext-lib`. +- The automatic decision only checks `ext-lib`. If you want to force one path, set `hertzbeat.collector.mysql.query-engine=jdbc`, `r2dbc`, or `auto`. + +:::important Collector package selection +MySQL monitoring supports both JVM and native deployment now. + +- Built-in server collector or JVM collector package: automatically prefers JDBC when `mysql-connector-j` exists in `ext-lib` +- Native collector package: supported when you do not rely on `ext-lib` and want the built-in MySQL query engine +- If you explicitly need runtime `ext-lib` JDBC loading, choose the JVM collector package +::: + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 3306 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|------------------------------------| +| version | none | Database version | +| port | none | Database exposure service port | +| datadir | none | Database storage data disk address | +| max_connections | none | Database maximum connections | + +#### Metric set:status + +| Metric name | Metric unit | Metric help description | +|-------------------|-------------|----------------------------------| +| threads_created | none | MySql created total connections | +| threads_connected | none | MySql connected connections | +| threads_cached | none | MySql current cached connections | +| threads_running | none | MySql current active connections | + +#### Metric set:innodb + +| Metric name | Metric unit | Metric help description | +|---------------------|-------------|------------------------------------------------------| +| innodb_data_reads | none | innodb average number of reads from files per second | +| innodb_data_writes | none | innodb average number of writes from file per second | +| innodb_data_read | KB | innodb average amount of data read per second | +| innodb_data_written | KB | innodb average amount of data written per second | diff --git a/home/versioned_docs/version-1.9.0/help/mysql_account_expiry.md b/home/versioned_docs/version-1.9.0/help/mysql_account_expiry.md new file mode 100644 index 0000000000..c89404b506 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/mysql_account_expiry.md @@ -0,0 +1,24 @@ +--- +id: mysql_account_expiry +title: "Monitoring: MySQL Account Expiry" +sidebar_label: "MySQL Account Expiry" +keywords: + - mysql account expiry + - mysql password expiration + - mysql security monitoring +--- + +> Monitor MySQL database account password expiration information. + +## Collection Metric + +### Metric set:account_expiry + +| Metric name | Metric unit | Metric help description | +|-----------------------|-------------|------------------------------------------------------| +| user | none | MySQL account username | +| host | none | Host from which the account is allowed to connect | +| password_lifetime | day | Password validity period in days | +| password_last_changed | timestamp | Time when the password was last changed | +| password_expired | none | Whether the account password is expired (true/false) | +| days_left | day | Remaining days before password expiration | diff --git a/home/versioned_docs/version-1.9.0/help/nacos.md b/home/versioned_docs/version-1.9.0/help/nacos.md new file mode 100644 index 0000000000..9b8d70caac --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/nacos.md @@ -0,0 +1,94 @@ +--- +id: nacos +title: Monitoring:Nacos Server monitoring +sidebar_label: Nacos Server +keywords: [open source monitoring tool, open source middleware monitoring tool, monitoring Nacos Server metrics] +--- + +> HertzBeat monitors metrics of the Nacos Server by calling the Nacos Metrics Api. + +## PreRequisites + +### Deploy Nacos cluster to expose metrics data + +1. Deploy the Nacos cluster according to [deployment document](https://nacos.io/en-us/docs/deployment.html). +2. Configure the application. properties file to expose metrics data. + + ```properties + management.endpoints.web.exposure.include=* + ``` + +3. Access ```{ip}:8848/nacos/actuator/prometheus``` to see if metrics data can be accessed. + +More information see [Nacos monitor guide](https://nacos.io/en-us/docs/monitor-guide.html). + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|-------------------------------------------------------------------------------------------------------------------------| +| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Target name | Identify the name of this monitoring. The name needs to be unique | +| Nacos Port | Port provided by the Nacos Server. The default is 8848 | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:jvm + +| Metric name | Metric unit | Metric help description | +|----------------------------|-------------|-------------------------| +| system_cpu_usage | none | cpu usage | +| system_load_average_1m | none | load | +| jvm_memory_used_bytes | byte | jvm memory used | +| jvm_memory_max_bytes | byte | jvm max memory | +| jvm_gc_pause_seconds_count | none | gc count | +| jvm_gc_pause_seconds_sum | second | gc time | +| jvm_threads_daemon | none | jvm threads count | + +#### Metric set:Nacos + +| Metric name | Metric unit | Metric help description | +|----------------------------------------|-------------|-----------------------------------------| +| http_server_requests_seconds_count | second | http requests count | +| http_server_requests_seconds_sum | second | http requests time | +| nacos_timer_seconds_sum | second | Nacos config notify time | +| nacos_timer_seconds_count | none | Nacos config notify count | +| nacos_monitor`{name="longPolling"}` | none | Nacos config connection count | +| nacos_monitor`{name="configCount"}` | none | Nacos configuration file count | +| nacos_monitor`{name="dumpTask"}` | none | Nacos config dump task count | +| nacos_monitor`{name="notifyTask"}` | none | Nacos config notify task count | +| nacos_monitor`{name="getConfig"}` | none | Nacos config read configuration count | +| nacos_monitor`{name="publish"}` | none | Nacos config update configuration count | +| nacos_monitor`{name="ipCount"}` | none | Nacos naming ip count | +| nacos_monitor`{name="domCount"}` | none | Nacos naming domain count(1.x version) | +| nacos_monitor`{name="serviceCount"}` | none | Nacos naming domain count(2.x version) | +| nacos_monitor`{name="failedPush"}` | none | Nacos naming push fail count | +| nacos_monitor`{name="avgPushCost"}` | second | Nacos naming push cost time(average) | +| nacos_monitor`{name="leaderStatus"}` | none | Nacos naming if node is leader | +| nacos_monitor`{name="maxPushCost"}` | second | Nacos naming push cost time(max) | +| nacos_monitor`{name="mysqlhealthCheck"}` | none | Nacos naming mysql health check count | +| nacos_monitor`{name="httpHealthCheck"}` | none | Nacos naming http health check count | +| nacos_monitor`{name="tcpHealthCheck"}` | none | Nacos naming tcp health check count | + +#### Metric set:Nacos exception + +| Metric name | Metric unit | Metric help description | +|----------------------------------------------------|-------------|------------------------------------------------| +| nacos_exception_total`{name="db"}` | none | database exception | +| nacos_exception_total`{name="configNotify"}` | none | Nacos config notify exception | +| nacos_exception_total`{name="unhealth"}` | none | Nacos config server health check exception | +| nacos_exception_total`{name="disk"}` | none | Nacos naming write disk exception | +| nacos_exception_total`{name="leaderSendBeatFailed"}` | none | Nacos naming leader send heart beat fail count | +| nacos_exception_total`{name="illegalArgument"}` | none | request argument illegal count | +| nacos_exception_total`{name="nacos"}` | none | Nacos inner exception | + +#### Metric set:client + +| Metric name | Metric unit | Metric help description | +|----------------------------------------|-------------|-----------------------------------| +| nacos_monitor`{name="subServiceCount"}` | none | subscribed services count | +| nacos_monitor`{name="pubServiceCount"}` | none | published services count | +| nacos_monitor`{name="configListenSize"}` | none | listened configuration file count | +| nacos_client_request_seconds_count | none | request count | +| nacos_client_request_seconds_sum | second | request time | diff --git a/home/versioned_docs/version-1.9.0/help/nacos_sd.md b/home/versioned_docs/version-1.9.0/help/nacos_sd.md new file mode 100644 index 0000000000..0fd31409dc --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/nacos_sd.md @@ -0,0 +1,99 @@ +--- +id: nacos_sd +title: Monitoring Nacos Service Discovery +sidebar_label: Nacos Service Discovery +keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring Nacos service discovery] +--- + +> HertzBeat integrates with Nacos registry to automatically discover service instances and create monitoring tasks for them. + +## Overview + +Nacos Service Discovery allows HertzBeat to connect to your Nacos server and automatically discover all registered service instances. When a new service instance is registered or an existing instance goes offline, HertzBeat will automatically create or delete corresponding monitoring tasks, achieving automated monitoring in microservice environments. + +### PreRequisites + +#### Deploy Nacos Server + +1. Deploy Nacos server according to [Nacos official documentation](https://nacos.io/en-us/docs/quick-start.html). +2. Ensure Nacos server is accessible from HertzBeat. +3. Verify that you can access Nacos console at `http://your-nacos-server:8848/nacos/` +4. Default credentials: username `nacos`, password `nacos` + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Target Name | Identify the name of this monitoring. The name needs to be unique. | +| Nacos Service Discovery Host | Nacos server IP address or domain name. Note⚠️Without protocol header (eg: https://, http://). Example: `nacos-server` or `192.168.1.100` | +| Nacos Service Discovery Port | Port provided by the Nacos server. The default is 8848 | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Usage Steps + +1. **Create Service Discovery Monitoring** + - In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring** + - Select monitoring type: **Nacos Service Discovery** + - Fill in the basic configuration parameters + +2. **Configure Monitoring Template** + - After creating the service discovery monitoring, you need to specify a monitoring template + - The template defines what type of monitoring to create for discovered service instances + - For example: If discovered instances are HTTP services, you can select HTTP monitoring template + - Common template types: Port, HTTP, HTTPS, etc. + +3. **Automatic Discovery** + - HertzBeat will periodically query Nacos server based on the collection interval + - Automatically create monitoring tasks for newly registered service instances + - Automatically delete monitoring tasks for offline service instances + +4. **View Discovered Instances** + - In the monitoring list, you can see all automatically created sub-monitoring tasks + - Each sub-monitoring task corresponds to a discovered service instance + +### Example of usage + +Suppose your Nacos server is running at `192.168.1.100:8848`, and you want to automatically monitor all service instances registered in it. + +Configuration example: + +- **Target Name**: `Nacos-Service-Discovery` +- **Nacos Service Discovery Host**: `192.168.1.100` +- **Nacos Service Discovery Port**: `8848` +- **Collection interval**: `60` seconds +- **Monitoring Template**: Select `Port` monitoring (to detect instance availability) + +After configuration: + +1. HertzBeat connects to Nacos server +2. Retrieves all registered service instances (including healthy and unhealthy instances) +3. Automatically creates Port monitoring for each instance (e.g., `user-service-192.168.1.101:8080`) +4. Every 60 seconds, checks for newly registered or offline services and updates monitoring tasks accordingly + +### Notes + +- **Network Connectivity**: Ensure HertzBeat can access the Nacos server address and port +- **Monitoring Templates**: Service discovery only discovers service instance addresses, you need to configure appropriate monitoring templates to actually monitor the instances +- **Collection Interval**: Recommended minimum interval is 60 seconds to avoid excessive requests to Nacos server +- **Namespace**: By default, discovers services in the public namespace. If you need to discover services in a specific namespace, you may need to configure it separately +- **Health Check**: Nacos service discovery will discover all instances, including unhealthy ones +- **Instance Naming**: Automatically created monitoring tasks are named in the format: `{ServiceName}-{Host}:{Port}` + +### Collection Metric + +#### Metric set: Monitor Target + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|--------------------------------------------| +| target | none | Discovered service instance target | +| host | none | Service instance host address | +| port | none | Service instance port number | + +### Use Cases + +- **Spring Cloud Alibaba**: Automatically monitor all microservice instances registered in Nacos +- **Dynamic Scaling**: Automatically adapt to service instances added/removed due to autoscaling +- **Unified Monitoring**: Centrally manage monitoring of all services in the microservice environment +- **Multi-Environment**: Manage services across development, testing, and production environments +- **Service Governance**: Combine with Nacos service governance capabilities for comprehensive service management diff --git a/home/versioned_docs/version-1.9.0/help/nebulagraph.md b/home/versioned_docs/version-1.9.0/help/nebulagraph.md new file mode 100644 index 0000000000..d5457bbd17 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/nebulagraph.md @@ -0,0 +1,72 @@ +--- +id: nebulaGraph +title: Monitoring NebulaGraph +sidebar_label: NebulaGraph Database +keywords: [ open source monitoring tool, open source NebulaGraph monitoring tool, monitoring NebulaGraph metrics ] +--- + +> Collect and monitor the general performance Metrics of nebulaGraph. + +**Protocol Use:nebulaGraph** + +```text +The monitoring has two parts,nebulaGraph_stats and rocksdb_stats. +nebulaGraph_stats is nebulaGraph's statistics, and rocksdb_stats is rocksdb's statistics. +``` + +**1、Obtain available parameters through the stats and rocksdb stats interfaces.** + +1.1、 If you only need to get nebulaGraph_stats, you need to ensure that you have access to stats, or you'll get errors. + +The default port is 19669 and the access address is [http://ip:19669/stats](http://ip:19669/stats) + +1.2、If you need to obtain additional parameters for rocksdb stats, you need to ensure that you have access to rocksdb +stats, otherwise an error will be reported. + +Once you connect to NebulaGraph for the first time, you must first register your Storage service in order to properly +query your data. + +**There is help_doc: [https://docs.nebula-graph.com.cn/3.4.3/4.deployment-and-installation/connect-to-nebula-graph/](https://docs.nebula-graph.com.cn/3.4.3/4.deployment-and-installation/connect-to-nebula-graph/)** + +**[https://docs.nebula-graph.com.cn/3.4.3/2.quick-start/3.quick-start-on-premise/3.1add-storage-hosts/](https://docs.nebula-graph.com.cn/3.4.3/2.quick-start/3.quick-start-on-premise/3.1add-storage-hosts/)** + +The default port is 19779 and the access address is:[http://ip:19779/rocksdb_stats](http://ip:19779/rocksdb_stats) + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| graphPort | Port of the Graph service provided by Nebula Graph | +| timePeriod | The value can be 5 seconds, 60 seconds, 600 seconds, or 3600 seconds, indicating the last 5 seconds, last 1 minute, last 10 minutes, and last 1 hour, respectively. | +| storagePort | Port of the storage service provided by Nebula Graph | +| Timeout | Allow collection response time | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:nebulaGraph_stats + +Too many indicators, related links are as follows +**[https://docs.nebula-graph.com.cn/3.4.3/6.monitor-and-metrics/1.query-performance-metrics/](https://docs.nebula-graph.com.cn/3.4.3/6.monitor-and-metrics/1.query-performance-metrics/)** + +| Metric name | Metric unit | Metric help description | +|---------------------------------------|-------------|--------------------------------------------------------------| +| num_queries_hit_memory_watermark_rate | | The rate of statements that reached the memory watermark. | +| num_queries_hit_memory_watermark_sum | | The sum of statements that reached the memory watermark. | +| num_reclaimed_expired_sessions_sum | | Number of expired sessions actively reclaimed by the server. | +| ... | | ... | + +#### Metrics Set:rocksdb_stats + +Too many indicators, related links are as follows +**[https://docs.nebula-graph.com.cn/3.4.3/6.monitor-and-metrics/2.rocksdb-statistics/](https://docs.nebula-graph.com.cn/3.4.3/6.monitor-and-metrics/2.rocksdb-statistics/)** + +| Metric name | Metric unit | Metric help description | +|----------------------------|-------------|-------------------------------------------------------------| +| rocksdb.backup.read.bytes | | Number of bytes read during the RocksDB database backup. | +| rocksdb.backup.write.bytes | | Number of bytes written during the RocksDB database backup. | +| ... | | ... | diff --git a/home/versioned_docs/version-1.9.0/help/nebulagraph_cluster.md b/home/versioned_docs/version-1.9.0/help/nebulagraph_cluster.md new file mode 100644 index 0000000000..5ded5ada9a --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/nebulagraph_cluster.md @@ -0,0 +1,91 @@ +--- +id: nebulagraph_cluster +title: Monitoring NebulaGraph Cluster +sidebar_label: NebulaGraph Cluster +keywords: [ Open Source Monitoring System, Open Source Database Monitoring, Open Source Graph Database Monitoring, NebulaGraph Cluster Monitoring ] +--- + +> Monitor basic information, nodes, tasks, etc., of the NebulaGraph cluster. + +**Protocol Use:ngql** + +## Configuration parameters + +| Parameter Name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------| +| Target Host | The IPv4, IPv6, or domain name of the monitored peer. Note ⚠️ without the protocol header (eg: https://, http://). | +| Task Name | Identifies the name of this monitor, ensuring uniqueness of the name. | +| Graph Port | The port where the graph service is open, default is 9669. | +| Connection Timeout | Timeout for connecting to the graph service, in milliseconds, default is 6000 milliseconds. | +| Username | Database connection username. | +| Password | Database connection password. | +| Collection Interval | Interval for periodically collecting data, in seconds. The minimum interval that can be set is 30 seconds. | +| Bind Labels | Used to categorize and manage monitored resources. | +| Description | Additional information for identifying and describing this monitor. Users can add remarks here. | + +### Collection Metric + +#### Metric Set: Base info + +| Metric Name | Metric Unit | Metric help description | +|--------------|-------------|-------------------------| +| responseTime | None | Response time | +| charset | None | Character set | +| collation | None | Character set collation | + +#### Metric Set: Session + +| Metric Name | Metric Unit | Metric help description | +|---------------------|-------------|----------------------------------| +| session | None | Number of sessions | +| running_query_count | None | Number of queries being executed | + +#### Metric Set: Jobs + +| Metric Name | Metric Unit | Metric help description | +|--------------|-------------|-------------------------------------------| +| queue_jobs | None | Number of pending background tasks | +| running_jobs | None | Number of background tasks being executed | + +#### Metric Set: Cluster node info + +| Metric Name | Metric Unit | Metric help description | +|----------------------|-------------|---------------------------------| +| total_storage_node | None | Number of storage nodes | +| offline_storage_node | None | Number of offline storage nodes | +| total_meta_node | None | Number of meta nodes | +| offline_meta_node | None | Number of offline meta nodes | +| total_graph_node | None | Number of graph nodes | +| offline_graph_node | None | Number of offline graph nodes | + +#### Metric Set: Storage Nodes + +| Metric Name | Metric Unit | Metric help description | +|-----------------------|-------------|-------------------------------------------------------| +| host | None | Node address | +| port | None | Port | +| status | None | Status (ONLINE/OFFLINE) | +| leaderCount | None | Number of leader partitions on the current node | +| leaderDistribution | None | Distribution of leader partitions on the current node | +| partitionDistribution | None | Distribution of partitions on the current node | +| version | None | Version | + +#### Metric Set: Meta Nodes + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-------------------------| +| host | None | Node address | +| port | None | Port | +| status | None | Status (ONLINE/OFFLINE) | +| version | None | Version | + +#### Metric Set: Graph Nodes + +| Metric Name | Metric Unit | Metric help description | +|-------------|-------------|-------------------------| +| host | None | Node address | +| port | None | Port | +| status | None | Status (ONLINE/OFFLINE) | +| version | None | Version | + +> If you need to customize monitoring templates to collect data from NebulaGraph clusters, please refer to: [NGQL Custom Monitoring](../advanced/extend-ngql.md) diff --git a/home/versioned_docs/version-1.9.0/help/nginx.md b/home/versioned_docs/version-1.9.0/help/nginx.md new file mode 100644 index 0000000000..378ad1e267 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/nginx.md @@ -0,0 +1,156 @@ +--- +id: nginx +title: Monitoring Nginx +sidebar_label: Nginx Monitor +keywords: [open source monitoring tool, open source java monitoring tool, monitoring nginx metrics] +--- + +> Collect and monitor the general performance Metrics of Nginx. + +**Protocol Use:Nginx** + +## Need Enable `ngx_http_stub_status_module` And `ngx_http_reqstat_module` Module + +If you want to monitor information in 'Nginx' with this monitoring type, you need to modify your nginx configure file for enable the module monitor. + +### Enable `ngx_http_stub_status_module` + +1. Check if `ngx_http_stub_status_module` has been added + + ```shell + nginx -V + ``` + + View whether it contains `--with-http_stub_status_module`, if not, you need to recompile and install Nginx. + +2. Compile and install Nginx, add `ngx_http_stub_status_module` module + + Download Nginx and unzip it, execute the following command in the directory + + ```shell + + ./configure --prefix=/usr/local/nginx --with-http_stub_status_module + + make && make install + ``` + +3. Modify Nginx configure file + + Modify the `nginx.conf` file and add the monitoring module exposed endpoint, as follows: + + ```shell + # modify nginx.conf + server { + listen 80; # port + server_name localhost; + location /nginx-status { + stub_status on; + access_log on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } + } + ``` + +4. Reload Nginx + + ```shell + + nginx -s reload + ``` + +5. Access `http://localhost/nginx-status` in the browser to view the Nginx monitoring status information. + +### Enable `ngx_http_reqstat_module` + +1. Install `ngx_http_reqstat_module` + + ```shell + # install `ngx_http_reqstat_module` + wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip + + unzip ngx_req_status.zip + + patch -p1 < ../ngx_req_status-master/write_filter.patch + + ./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master + + make -j2 + + make install + ``` + +2. Modify Nginx configure file + + update `nginx.conf` file, add status module exposed endpoint, as follows: + + ```shell + # modify nginx.conf + http { + req_status_zone server_name $server_name 256k; + req_status_zone server_addr $server_addr 256k; + + req_status server_name server_addr; + + server { + location /req-status { + req_status_show on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } + } + } + ``` + +3. Reload Nginx + + ```shell + + nginx -s reload + ``` + +4. Access `http://localhost/req-status` in the browser to view the Nginx monitoring status information. + +**Refer Doc: [https://github.com/zls0424/ngx_req_status](https://github.com/zls0424/ngx_req_status)** + +**⚠️Attention: The endpoint path of the monitoring module is `/nginx-status` `/req-status`** + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by Nginx | +| Timeout | Allow collection response time | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:nginx_status + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-----------------------------------------| +| accepts | | Accepted connections | +| handled | | Successfully processed connections | +| active | | Currently active connections | +| dropped | | Discarded connections | +| requests | | Client requests | +| reading | | Connections performing read operations | +| writing | | Connections performing write operations | +| waiting | | Waiting connections | + +#### Metrics Set:req_status + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------------| +| zone_name | | Group category | +| key | | Group name | +| max_active | | Maximum concurrent connections | +| max_bw | kb | Maximum bandwidth | +| traffic | kb | Total traffic | +| requests | | Total requests | +| active | | Current concurrent connections | +| bandwidth | kb | Current bandwidth | diff --git a/home/versioned_docs/version-1.9.0/help/ntp.md b/home/versioned_docs/version-1.9.0/help/ntp.md new file mode 100644 index 0000000000..3c3abeee5a --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/ntp.md @@ -0,0 +1,37 @@ +--- +id: ntp +title: Monitoring NTP +sidebar_label: NTP Monitor +keywords: [ open source monitoring tool, open source NTP monitoring tool, monitoring NTP metrics ] +--- + +> Collect and monitor the general performance Metrics of NTP. + +**Protocol Use:NTP** + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:summary + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|------------------------------------------------------------------------------------------| +| responseTime | ms | The time it takes for the NTP server to respond to a request). | +| time | ms | The current time reported by the NTP server). | +| date | | The date corresponding to the current time reported by the NTP server). | +| offset | ms | The time difference between the NTP server's clock and the client's clock). | +| delay | ms | The time it takes for a request to reach the NTP server and for the response to return). | +| version | | The version number of the NTP protocol used by the server). | +| mode | | The operating mode of the NTP server, such as client, server, or broadcast). | +| stratum | | The stratumevel of the NTP server, indicating its distance from a reference clock). | +| referenceId | | An identifier that indicates the reference clock or time source used by the NTP server). | +| precision | | The precision of the NTP server's clock, indicating its accuracy). | diff --git a/home/versioned_docs/version-1.9.0/help/nvidia.md b/home/versioned_docs/version-1.9.0/help/nvidia.md new file mode 100644 index 0000000000..51f3b3112f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/nvidia.md @@ -0,0 +1,37 @@ +--- +id: nvidia +title: NVIDIA Monitoring +sidebar_label: NVIDIA Monitoring +keywords: [Open Source Monitoring System, NVIDIA Monitoring] +--- + +> Collect and monitor general performance metrics of NVIDIA operating systems. +> NVIDIA monitoring requires the nvidia-smi command, which is installed together with the NVIDIA GPU driver. So when monitoring NVIDIA, we need to install the NVIDIA GPU driver. + +## Configuration Parameters + +| Parameter Name | Description | +|------------------|-------------------------------------------------------------| +| Monitoring Host | The IP address (IPv4/IPv6) or domain name of the monitored endpoint. Note ⚠️ do not include protocol headers (e.g., https://, http://). | +| Task Name | The name identifying this monitoring task, which needs to be unique. | +| Port | The port exposed for Linux SSH, default is 22. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collection Interval | Interval for periodically collecting monitoring data, in seconds. The minimum interval is 30 seconds. | +| Probe Before Monitoring | Whether to probe the monitoring endpoint to check its availability before adding it. Monitoring is added or modified only if the probe succeeds. | +| Description/Remarks | Additional notes and descriptions for this monitoring task. Users can add relevant information here. | + +### Collected Metrics + +#### Metric Set: basic + +| Metric Name | Unit | Description | +|------------------------|--------|------------------| +| index | None | GPU index | +| name | None | GPU name | +| utilization.gpu[%] | None | GPU utilization | +| utilization.memory[%] | None | Memory utilization | +| memory.total[MiB] | MiB | Total memory | +| memory.used[MiB] | MiB | Used memory | +| memory.free[MiB] | MiB | Free memory | +| temperature.gpu | None | GPU temperature | diff --git a/home/versioned_docs/version-1.9.0/help/oceanbase.md b/home/versioned_docs/version-1.9.0/help/oceanbase.md new file mode 100644 index 0000000000..1459b1f560 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/oceanbase.md @@ -0,0 +1,69 @@ +--- +id: oceanbase +title: Monitoring:OceanBase database monitoring +sidebar_label: OceanBase database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring oceanbase database metrics] +--- + +> Collect and monitor the general performance Metrics of OceanBase database. Support OceanBase 4.0+. + +## Driver selection + +OceanBase now follows the same automatic routing as the MySQL-compatible query path: + +- If `mysql-connector-j` is present in `ext-lib`, the JVM collector or built-in server collector automatically prefers JDBC. +- If `mysql-connector-j` is absent, HertzBeat automatically uses the built-in MySQL-compatible query engine. No extra JAR is required. +- Restart HertzBeat or the standalone JVM collector after adding or removing a JAR in `ext-lib`. + +:::important Collector package selection +OceanBase monitoring now supports both JVM and native deployment. + +- Built-in server collector or JVM collector package: automatically prefers JDBC when `mysql-connector-j` exists in `ext-lib` +- Native collector package: supported when you do not rely on `ext-lib` and want the built-in MySQL-compatible query engine +- If you explicitly need runtime `ext-lib` JDBC loading, choose the JVM collector package +::: + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 2881 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 6000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|------------------------------------| +| version | none | Database version | +| port | none | Database exposure service port | +| datadir | none | Database storage data disk address | +| max_connections | none | Database maximum connections | + +#### Metric set:status + +| Metric name | Metric unit | Metric help description | +|-------------------|-------------|----------------------------------| +| threads_created | none | OceanBase created total connections | +| threads_connected | none | OceanBase connected connections | +| threads_cached | none | OceanBase current cached connections | +| threads_running | none | OceanBase current active connections | + +#### Metric set:innodb + +| Metric name | Metric unit | Metric help description | +|---------------------|-------------|------------------------------------------------------| +| innodb_data_reads | none | innodb average number of reads from files per second | +| innodb_data_writes | none | innodb average number of writes from file per second | +| innodb_data_read | KB | innodb average amount of data read per second | +| innodb_data_written | KB | innodb average amount of data written per second | diff --git a/home/versioned_docs/version-1.9.0/help/ollama.md b/home/versioned_docs/version-1.9.0/help/ollama.md new file mode 100644 index 0000000000..16abc2a2a5 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/ollama.md @@ -0,0 +1,69 @@ +--- +id: ollama +title: Monitoring Ollama Local LLM Service +sidebar_label: Ollama +keywords: [ Open Source Monitoring System, Open Source LLM Monitoring, Ollama Monitoring ] +--- + +> HertzBeat monitors Ollama local LLM service including version info, installed models and running models. + +## Preparation + +Ensure that Ollama is running and the API is accessible. By default, Ollama listens on port `11434`. + +If Ollama is running on a remote server, you may need to set the `OLLAMA_HOST` environment variable to `0.0.0.0` to +allow external access. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|--------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | The target IPV4, IPV6 or domain name of the Ollama service. Note: without protocol header (eg: https://, http://). | +| Task Name | The name that identifies this monitoring task, which must be unique. | +| Port | The port Ollama service is listening on, default is 11434. | +| SSL | Whether to use HTTPS to connect to the Ollama service. | +| API Key | To directly access the API key of ollama.com. | +| Collector | Configure which collector is used to schedule data collection for this monitoring. | +| Monitoring Interval | The interval for periodically collecting data, in seconds. The minimum interval that can be set is 30 seconds. | +| Bound Tags | Tags for categorizing and managing monitoring resources. | +| Description/Remarks | Additional remarks to identify and describe this monitoring. Users can add notes here. | + +### Credential upgrade behavior + +The API key is encrypted before it is stored and is returned by the monitor API +as `******`. Submitting that mask while editing an existing monitor keeps the +stored key unchanged. If the host, port, or SSL setting changes, the key must +be re-entered so that a stored credential cannot be replayed to a new endpoint. + +On the first startup after upgrading, HertzBeat encrypts API keys created by +older versions before scheduling collection jobs. The migration is idempotent +and does not change an already encrypted value. + +### Collection Metrics + +#### Metric Set: Version Info + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|------------------------------------| +| Version | None | The version of the Ollama service. | + +#### Metric Set: Installed Models + +| Metric Name | Metric Unit | Metric Description | +|--------------------|-------------|---------------------------------------------------------| +| Model Name | None | The name of the installed model. | +| Model Size | MB | The size of the model file. | +| Parameter Size | None | The parameter scale of the model (e.g., 7B, 13B). | +| Quantization Level | None | The quantization level of the model (e.g., Q4_0, Q8_0). | +| Model Family | None | The model family (e.g., llama, qwen). | +| Format | None | The model format (e.g., gguf). | +| Modified At | None | The last modified time of the model. | + +#### Metric Set: Running Models + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|-------------------------------------------------------| +| Model Name | None | The name of the running model. | +| Model Size | MB | The size of the model in memory. | +| VRAM Size | MB | The VRAM occupied by the model. | +| Expires At | None | The time when the model will be unloaded from memory. | diff --git a/home/versioned_docs/version-1.9.0/help/openai.md b/home/versioned_docs/version-1.9.0/help/openai.md new file mode 100644 index 0000000000..221e129e67 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/openai.md @@ -0,0 +1,83 @@ +--- +id: openai +title: Monitoring OpenAI Account Status +sidebar_label: OpenAI Account Status +keywords: [open source monitoring system, open source network monitoring, OpenAI account monitoring] +--- + +## Preparation + +### Obtain Session Key +> +> 1. Open Chrome browser's network request interface +> `Mac: cmd + option + i` +> `Windows: ctrl + shift + i` +> 2. Visit [https://platform.openai.com/usage](https://platform.openai.com/usage) +> 3. Find the request to [https://api.openai.com/dashboard/billing/usage](https://api.openai.com/dashboard/billing/usage) +> 4. Find the Authorization field in the request headers, and copy the content after `Bearer`. For example: `sess-123456` + +### Notes + +> 1. Please ensure that HertzBeat has external network access capability. If unsure, you can try detecting by creating HTTP API monitoring for openai.com in HertzBeat. +> 2. The monitoring period should be at least greater than 120 seconds to avoid sending requests too frequently, resulting in return status code 429 (Too Many Requests). + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|:------------------|------------------------------------------------------------------------------------------------| +| Monitoring Host | Fill in api.openai.com here. | +| Task Name | Identify the name of this monitoring, ensuring uniqueness. | +| Session Key | The session key obtained in the preparation step. | +| Collector | Configure which collector to use for scheduling collection for this monitoring. | +| Monitoring Period | Interval time for periodic data collection, in seconds, with a minimum interval of 30 seconds. | +| Bound Tags | Tags for managing classification of monitoring resources. | +| Description | Additional identification and description for this monitoring, users can leave remarks here. | + +### Collection Metrics + +#### Metric Set: Credit Grants + +| Metric Name | Metric Unit | Metric Description | +|----------------------|-------------|--------------------------------------| +| Total Granted | USD ($) | Total granted credit limit | +| Total Used | USD ($) | Total used credit limit | +| Total Available | USD ($) | Total available credit limit | +| Total Paid Available | USD ($) | Total payable available credit limit | + +#### Metric Set: Model Cost + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|------------------------| +| Model Name | None | Name of the model | +| Cost | USD ($) | Expenses for the model | + +#### Metric Set: Billing Subscription + +| Metric Name | Metric Unit | Metric Description | +|--------------------------|-------------|-----------------------------------------| +| Has Payment Method | None | Whether payment method is available | +| Canceled | None | Whether subscription is cancelled | +| Canceled At | None | Time of subscription cancellation | +| Delinquent | None | Whether subscription is overdue | +| Soft Limit | Times | Maximum usage limit in a certain period | +| Hard Limit | Times | Maximum usage limit | +| System Hard Limit | Times | System hard limit usage | +| Soft Limit USD | USD ($) | Soft limit charge | +| Hard Limit USD | USD ($) | Hard limit charge | +| System Hard Limit USD | USD ($) | System hard limit charge | +| Plan | None | Subscription plan | +| Primary | None | Whether it's a primary subscription | +| Billing Mechanism | None | Settlement mechanism | +| Is Arrears Eligible | None | Whether eligible for overdue | +| Max Balance | USD ($) | Maximum balance | +| Auto Recharge Eligible | None | Whether eligible for auto recharge | +| Auto Recharge Enabled | None | Whether auto recharge is enabled | +| Auto Recharge Threshold | USD ($) | Auto recharge threshold | +| Auto Recharge To Balance | USD ($) | Auto recharge amount | +| Trust Tier | None | Credit level | +| Account Name | None | Account name | +| Po Number | None | Purchase order | +| Billing Email | None | Billing email | +| Tax IDs | None | Tax IDs | +| Billing Address | None | Billing address | +| Business Address | None | Business address | diff --git a/home/versioned_docs/version-1.9.0/help/opengauss.md b/home/versioned_docs/version-1.9.0/help/opengauss.md new file mode 100644 index 0000000000..5fcf3b41d4 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/opengauss.md @@ -0,0 +1,55 @@ +--- +id: opengauss +title: OpenGauss Database Monitor +sidebar_label: OpenGauss Database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring opengauss database metrics] +--- + +> Collect and monitor the general performance Metrics of OpenGauss database. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 5432 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|-------------------------------------------| +| server_version | none | Version number of the database server | +| port | none | Database server exposure service port | +| server_encoding | none | Character set encoding of database server | +| data_directory | none | Database storage data disk address | +| max_connections | connections | Database maximum connections | + +#### Metric set:state + +| Metric name | Metric unit | Metric help description | +|----------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| name | none | Database name, or share-object is a shared object | +| conflicts | times | The number of queries canceled in the database due to a conflict with recovery | +| deadlocks | number | Number of deadlocks detected in the database | +| blks_read | times | The number of disk blocks read in the database | +| blks_hit | times | Times the disk block has been found to be in the buffer, so there is no need to read it once (This only includes hits in the PostgreSQL buffer, not in the operating system file system buffer) | +| blk_read_time | ms | Time spent by the backend reading data file blocks in the database | +| blk_write_time | ms | Time spent by the backend writing data file blocks in the database | +| stats_reset | none | The last time these statistics were reset | + +#### Metric set:activity + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------------------| +| running | connections | Number of current client connections | diff --git a/home/versioned_docs/version-1.9.0/help/opensuse.md b/home/versioned_docs/version-1.9.0/help/opensuse.md new file mode 100644 index 0000000000..dfecccd39f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/opensuse.md @@ -0,0 +1,114 @@ +--- +id: opensuse +title: Monitoring OpenSUSE Operating System +sidebar_label: OpenSUSE OS +keywords: [open source monitoring system, open source operating system monitoring, OpenSUSE OS monitoring] +--- + +> Collect and monitor general performance metrics of the OpenSUSE operating system. + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/oracle.md b/home/versioned_docs/version-1.9.0/help/oracle.md new file mode 100644 index 0000000000..13d0f14325 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/oracle.md @@ -0,0 +1,179 @@ +--- +id: oracle +title: Monitoring:ORACLE database monitoring +sidebar_label: ORACLE database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring oracle database metrics] +--- + +> Collect and monitor the general performance Metrics of ORACLE database. + +## Attention, Need Add ORACLE jdbc driver jar + +- Download the ORACLE jdbc driver jar package, such as [ojdbc8.jar](https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar) [oracle-i18n](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar) +- Copy the jar package to the `hertzbeat/ext-lib` directory. +- Restart the HertzBeat service. + +:::important Collector package selection +Oracle monitoring requires external JDBC driver loading from `ext-lib`. + +- Use HertzBeat server built-in collector or the JVM collector package for Oracle monitoring +- Do not use the native collector package for Oracle monitoring +::: + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 1521 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optionalIf you need to use a dba user, you can fill in like "sys as sysdba". | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|------------------|-------------|-------------------------| +| database_version | none | Database version | +| hostname | none | Host name | +| instance_name | none | Database instance name | +| startup_time | none | Database start time | +| status | none | Database status | + +#### Metric set:tablespace + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|-------------------------| +| file_id | none | File ID | +| file_name | none | File name | +| tablespace_name | none | Table space name | +| status | none | Status | +| bytes | MB | Size | +| blocks | none | Number of blocks | + +#### Metric set:total_sessions + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|---------------------------| +| counts | number | Current connection counts | + +#### Metric set:active_sessions + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| counts | number | Active sessions counts | + +#### Metric set:background_sessions + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|----------------------------| +| counts | number | Background sessions counts | + +#### Metric set:connection + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| username | none | User name | +| counts | number | User sessions counts | + +#### Metric set:performance + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-----------------------------| +| qps | QPS | I/O Requests per second | +| tps | TPS | User transaction per second | +| mbps | MBPS | I/O Megabytes per second | + +#### Metric set:percentage + +| Metric name | Metric unit | Metric help description | +|-----------------|---------------|-------------------------| +| tablespace_name | none | Tablespace name | +| total | none | Total | +| used | none | Used | +| free | none | Free | +| used_percentage | percentage(%) | Used Percentage | +| free_percentage | percentage(%) | Free Percentage | + +#### Metric set:process + +| Metric name | Metric unit | Metric help description | +|---------------|-------------|-------------------------| +| process_count | none | Process count | + +#### Metric set:transaction + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| commits | t/s | User Commits Per Sec | +| rollbacks | t/s | User Rollbacks Per Sec | + +#### Metric set:wait + +| Metric name | Metric unit | Metric help description | +|----------------------|-------------|-------------------------| +| concurrent_wait_time | ms | Concurrent Wait Time | +| commit_wait_time | ms | Commit Wait Time | +| app_wait_time | ms | Application Wait Time | +| network_wait_time | ms | Network Wait Time | +| system_io_wait_time | ms | System I/O Wait Time | +| user_io_wait_time | ms | User I/O Wait Time | +| configure_wait_time | ms | Configure Wait Time | +| scheduler_wait_time | ms | Scheduler Wait Time | + +#### Metric set:cpu_stats + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| type | none | Type | +| num | none | Num | + +#### Metric set:mem_stats + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| type | none | Type | +| num | none | Num | + +#### Metric set:cache_hit_ratio + +| Metric name | Metric unit | Metric help description | +|------------------------|-------------|-------------------------| +| lib_cache_hit_ratio | none | Library Cache Hit Ratio | +| buffer_cache_hit_ratio | none | Buffer Cache Hit Ratio | + +#### Metric set:slow_query + +| Metric name | Metric unit | Metric help description | +|----------------|-------------|-------------------------| +| sql_id | none | SQL ID | +| child_number | none | Child Number | +| executions | none | EXECUTIONS | +| per_secs | seconds | Per Secs | +| cpu_secs | seconds | CPU Secs | +| buffer_gets | none | Buffer Gets | +| disk_reads | none | Disk Reads | +| fetches | none | Fetches | +| parse_calls | none | Parse Calls | +| optimizer_cost | none | Optimizer Cost | +| sql_text | none | SQL Text | + +#### Metric set:users + +| Metric name | Metric unit | Metric help description | +|---------------------|-------------|---------------------------------------------------------------------------------------------------| +| username | none | User Name | +| account_status | none | Account Status | +| lock_date | none | If the account status is LOCKED, the date and time when the account was locked will be displayed. | +| expiry_date | none | Password Expiry Date | +| expiry_seconds | seconds | Password Validity Period Remaining | +| created | none | Creation Date | +| authentication_type | none | Authentication Type | diff --git a/home/versioned_docs/version-1.9.0/help/ping.md b/home/versioned_docs/version-1.9.0/help/ping.md new file mode 100644 index 0000000000..2233a1a877 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/ping.md @@ -0,0 +1,36 @@ +--- +id: ping +title: Monitoring:PING connectivity +sidebar_label: PING connectivity +keywords: [open source monitoring tool, open source network monitoring tool, monitoring ping metrics] +--- + +> Ping the opposite end HOST address and judge its connectivity. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Ping timeout | Set the timeout when Ping does not respond to data, unit:ms, default: 3000ms | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:summary + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|-------------------------| +| responseTime | ms | Website response time | + +### Common Problem + +1. Ping connectivity monitoring exception when installing hertzbeat for package deployment. + The hertzbeat installed and deployed by the installation package is not available for ping connectivity monitoring, but local direct ping is available 。 + +> The deployment of the installation package requires configuring the root permission of the Java virtual machine to start hertzbeat to use ICMP. If the root permission is not enabled, judge whether port 7 of telnet opposite end is opened. +> When you install HertzBeat via DockerDocker root is enabled by default. No such problem. +> See [https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address](https://stackoverflow.com/questions/11506321/how-to-ping-an-ip-address) diff --git a/home/versioned_docs/version-1.9.0/help/plugin.md b/home/versioned_docs/version-1.9.0/help/plugin.md new file mode 100644 index 0000000000..7e6662144b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/plugin.md @@ -0,0 +1,111 @@ +--- +id: plugin +title: Custom plugin(Beta) +sidebar_label: Custom plugin(Beta) +--- + +## Introduction + +In the current usage of `HertzBeat`, interaction with external systems only occurs after an alert through the notification feature. The plugin functionality allows users to add custom operations at various stages of the `HertzBeat` lifecycle, such as executing `SQL` or `shell` scripts after an alert, or sending collected monitoring data to other systems. Users can develop plugins following the custom plugin development process, package them, and then upload and enable them using the `Plugin Management` - `Upload Plugin` feature, thereby adding custom functionality without restarting `HertzBeat`. + +:::warning +In the current version, custom plugins are a test feature and may have some limitations and instability. The plugin functionality might be restructured in future versions. +::: + +### Supported Plugin Types + +1. `Post-Alert` Plugin + - Purpose: Execute custom operations after an alert + - Implementing Interface: `org.apache.hertzbeat.plugin.PostAlertPlugin` +2. `Post-Collect` Plugin + - Purpose: Execute custom operations after data collection + - Implementing Interface: `org.apache.hertzbeat.plugin.PostCollectPlugin` + +:::tip +To ensure that plugin functionality is clear and easy to manage, we recommend and only support one implementation of one plugin type interface in a plugin. +::: + +If you want to set trigger methods during collection, program startup, etc., please submit a `Task` at `https://github.com/apache/hertzbeat/issues/new/choose`. + +### Development Steps (Example: Implementing a Post-Alert Plugin) + +1. Clone the main branch code `git clone https://github.com/apache/hertzbeat.git`, and locate the `Plugin` interface in the `plugin` module. + ![plugin-1.png](/img/docs/help/plugin-1.png) +2. In the `org.apache.hertzbeat.plugin.impl` directory (create it if it does not exist), create an implementation class of `org.apache.hertzbeat.plugin.PostAlertPlugin`, such as `org.apache.hertzbeat.plugin.impl.DemoPlugin`. In the implementation class, receive the `Alert` class as a parameter, implement the `execute` method, and define custom logic. Here, we simply print the object. + + ```java + package org.apache.hertzbeat.plugin.impl; + + import org.apache.hertzbeat.common.entity.alerter.Alert; + import org.apache.hertzbeat.common.entity.plugin.PluginContext; + import org.apache.hertzbeat.plugin.PostAlertPlugin; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + + public class DemoPlugin implements PostAlertPlugin { + + private static final Logger log = LoggerFactory.getLogger(DemoPlugin.class); + + @Override + public void execute(Alert alert, PluginContext pluginContext) { + log.info("DemoPlugin alert: {}", alert); + log.info("DemoPlugin pluginContext: {}", pluginContext); + } + } + ``` + +3. Add the fully qualified name of the implementation class to the `META-INF/services/org.apache.hertzbeat.plugin.PostAlertPlugin` file (create it if it does not exist). Each fully qualified name should be on a separate line. + + ```shell + org.apache.hertzbeat.plugin.impl.DemoPluginImpl + ``` + +4. Package the `hertzbeat-plugin` module. + + ```shell + cd plugin + mvn package + ``` + +5. Use the `Plugin Management` - `Upload Plugin` feature to upload the plugin package ending with `-jar-with-lib.jar`, and enable the plugin to execute custom operations after an alert. + +### Defining Plugin Parameters + +The plugin feature supports custom parameters, and you can fill in the required parameters for the plugin during runtime using the `Plugin Management` - `Edit Parameters` feature. +Below is an example of defining a plugin with two parameters, detailing the process of defining plugin parameters: + +1. Add a parameter definition file in the `define` directory. Note that the parameter definition file must be a YAML file starting with `define`, such as `define-demo.yml`. +2. Define parameters in `define-demo.yml` as shown below: + + ```yaml + params: + - field: host + # name-param field display i18n name + name: + zh-CN: 目标 Host + en-US: Target Host + # type-param field type(most mapping the html input type) + type: text + # required-true or false + required: true + # field-param field key + - field: port + # name-param field display i18n name + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + type: number + # when type is number, range is required + range: '[0,65535]' + ``` + +3. Use the parameters in the plugin logic + + ```java + @Override + public void execute(Alert alert, PluginContext pluginContext) { + log.info("param host:{}",pluginContext.getString("host")); + log.info("param port:{}",pluginContext.getInteger("port")); + } + ``` diff --git a/home/versioned_docs/version-1.9.0/help/pop3.md b/home/versioned_docs/version-1.9.0/help/pop3.md new file mode 100644 index 0000000000..883b9a647e --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/pop3.md @@ -0,0 +1,47 @@ +--- +id: pop3 +title: Monitoring POP3 +sidebar_label: POP3 Monitor +keywords: [open source monitoring tool, open source java monitoring tool, monitoring POP3 metrics] +--- + +> Collect and monitor the general performance Metrics of POP3. + +**Protocol Use:POP3** + +## Enable POP3 Service + +If you want to monitor information in 'POP3' with this monitoring type, you just need to open `POP3` service in your mail server. + +**1、Open `POP3` Service:** + +```text +Using QQ Mail as an example [similar for other email services]: + 1. Click the "Settings" option + 2. Select "Account" + 3. Find the option to enable SMTP/POP3/IMAP, and turn it on + 4. Obtain the POP3 server domain name, port number, and authorization code [provided by QQ Mail after enabling SMTP/POP3/IMAP services] + 5. Connect to the POP3 server using the POP3 server domain name, port number, QQ email account, and authorization code to collect monitoring metrics +``` + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by POP3 | +| SSL | POP3 If enabled SSL | +| Timeout | Allow collection response time | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:email_status + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|-----------------------------------------| +| email_count | | Number of emails | +| mailbox_size | kb | The total size of emails in the mailbox | diff --git a/home/versioned_docs/version-1.9.0/help/port.md b/home/versioned_docs/version-1.9.0/help/port.md new file mode 100644 index 0000000000..cf6da48397 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/port.md @@ -0,0 +1,28 @@ +--- +id: port +title: Monitoring:TCP port availability +sidebar_label: TCP Port availability +keywords: [open source monitoring tool, open source port monitoring tool, monitoring TCP port metrics] +--- + +> Judge whether the exposed port of the opposite end service is available, then judge whether the opposite end service is available, and collect Metrics such as response time for monitoring. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Ports provided by website, http generally defaults to 80 and https generally defaults to 443 | +| Connection timeout | Waiting timeout for port connection, unit:ms, default: 3000ms | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:summary + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|-------------------------| +| responseTime | ms | Website response time | diff --git a/home/versioned_docs/version-1.9.0/help/postgresql.md b/home/versioned_docs/version-1.9.0/help/postgresql.md new file mode 100644 index 0000000000..02f7615c88 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/postgresql.md @@ -0,0 +1,67 @@ +--- +id: postgresql +title: Monitoring:PostgreSQL database monitoring +sidebar_label: PostgreSQL database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring postgresql database metrics] +--- + +> Collect and monitor the general performance Metrics of PostgreSQL database. Support PostgreSQL 10+. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 5432 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|-------------------------------------------| +| server_version | none | Version number of the database server | +| port | none | Database server exposure service port | +| server_encoding | none | Character set encoding of database server | +| data_directory | none | Database storage data disk address | +| max_connections | connections | Database maximum connections | + +#### Metric set:state + +| Metric name | Metric unit | Metric help description | +|----------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| name | none | Database name, or share-object is a shared object | +| conflicts | times | The number of queries canceled in the database due to a conflict with recovery | +| deadlocks | number | Number of deadlocks detected in the database | +| blks_read | times | The number of disk blocks read in the database | +| blks_hit | times | Times the disk block has been found to be in the buffer, so there is no need to read it once (This only includes hits in the PostgreSQL buffer, not in the operating system file system buffer) | +| blk_read_time | ms | Time spent by the backend reading data file blocks in the database | +| blk_write_time | ms | Time spent by the backend writing data file blocks in the database | +| stats_reset | none | The last time these statistics were reset | + +#### Metric set:activity + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------------------| +| running | connections | Number of current client connections | + +#### Metric set:users + +| Metric name | Metric unit | Metric help description | +|-------------------|-------------|------------------------------------------------------------| +| usename | none | Database user name | +| usesysid | none | User system ID | +| usecreatedb | none | Whether user can create databases (Y/N) | +| usesuper | none | Whether user is a superuser (Y/N) | +| valuntil | none | Password expiration time (timestamp) | +| days_left | days | Days remaining until password expires | +| account_status | none | Account status (OPEN/EXPIRED) | diff --git a/home/versioned_docs/version-1.9.0/help/prestodb.md b/home/versioned_docs/version-1.9.0/help/prestodb.md new file mode 100644 index 0000000000..58081d1ded --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/prestodb.md @@ -0,0 +1,78 @@ +--- +id: presto +title: Monitoring PrestoDB Database +sidebar_label: PrestoDB Database +keywords: [ open source monitoring system, open source database monitoring, presto database monitoring] +--- + +> Collect and monitor general performance metrics of PrestoDB Atlas databases. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| Target Host | The IP address, IPv4, IPv6, or domain name of the target to be monitored. Note: ⚠️ Do not include protocol headers (e.g., https://, http://). | +| port | Port | +| HTTPS | Whether to enable HTTPS for the PrestoDB API endpoint. | +| Auth Type | Optional HTTP authentication mode. Supported values are `Basic Auth` and `Digest Auth`. | +| Username | Username used when `Basic Auth` or `Digest Auth` is enabled. | +| Password | Password used when `Basic Auth` or `Digest Auth` is enabled. | +| Task Name | The name identifying this monitor, which must be unique. | +| Connection Timeout | Timeout for PrestoDB connection when no response is received, in milliseconds (ms). Default is 6000 ms. | +| Collection Interval | Interval for periodic data collection, in seconds. The minimum interval is 30 seconds. | +| Binding Tags | Used for categorizing and managing monitoring resources. | +| Description/Remarks | Additional labels and description for this monitor; users can add notes here. | + +### Collection Metrics + +#### Metric Set: Cluster Status + +| Metric Name | Unit | Metric Description | +|----------------|------|--------------------| +| activeWorkers | None | Active Workers | +| runningQueries | None | Running Queries | +| queuedQueries | None | Queued Queries | +| blockedQueries | None | Blocked Queries | +| runningDrivers | None | Running Drivers | +| runningTasks | None | Running Tasks | + +### Metrics Collection: Node Information + +| Metric Name | Unit | Metric Description | +|----------------------|------|----------------------------------------------------| +| `uri` | None | Node link | +| `recentRequests` | None | Number of requests in the recent period | +| `recentFailures` | None | Number of failed requests in the recent period | +| `recentSuccesses` | None | Number of successful requests in the recent period | +| `lastRequestTime` | None | Time of the most recent request | +| `lastResponseTime` | None | Time of the most recent response | +| `age` | None | Duration of operation | +| `recentFailureRatio` | None | Failure rate in the recent period | + +#### Metric Set: Node Status + +| Metric Name | Unit | Metric Description | +|-----------------|------|-----------------------| +| nodeId | None | Node ID | +| nodeVersion | None | Node Version | +| environment | None | Environment | +| coordinator | None | Is Coordinator | +| uptime | None | Uptime | +| externalAddress | None | External Address | +| internalAddress | None | Internal Address | +| processors | None | Processors | +| processCpuLoad | None | Process CPU Load | +| systemCpuLoad | None | System CPU Load | +| heapUsed | MB | Heap Memory Used | +| heapAvailable | MB | Heap Memory Available | +| nonHeapUsed | MB | Non-Heap Memory Used | + +#### Metric Set: Task Query + +| Metric Name | Unit | Metric Description | +|---------------|------|--------------------| +| taskId | None | Task ID | +| version | None | Version | +| state | None | State | +| self | None | Self | +| lastHeartbeat | None | Last Heartbeat | diff --git a/home/versioned_docs/version-1.9.0/help/process.md b/home/versioned_docs/version-1.9.0/help/process.md new file mode 100644 index 0000000000..8d7e0793fe --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/process.md @@ -0,0 +1,87 @@ +--- +id: process +title: Monitoring Linux Process +sidebar_label: Process +keywords: [Open Source Monitoring System, Operating System Process Monitoring, Process Monitoring] +--- + +> Collect and monitor basic information of processes on Linux systems, including CPU usage, memory usage, physical memory, IO, etc. + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------| +| Target Host | The IPv4, IPv6, or domain name of the monitored endpoint. Note ⚠️: Do not include the protocol header (e.g., https://, http://). | +| Task Name | Identifies the name of this monitoring, ensuring uniqueness. | +| Port | SSH port of the Linux system, default: 22 | +| Timeout | Sets the timeout for the connection in milliseconds, default is 6000 milliseconds. | +| Reuse Connection | Sets whether SSH connection is reused, default is false. When false, a new connection is created for each information retrieval. | +| Username | Username for the server. | +| Password | Password for the server. | +| Process Name | Name or part of the name of the process to be monitored. | +| Collector | Specifies which collector to use for scheduling this monitoring. | +| Monitoring Interval | Interval for periodic data collection, in seconds. Minimum interval that can be set is 30 seconds. | +| Tags | Used for categorizing and managing monitoring resources. | +| Description | Additional notes and descriptions for identifying this monitoring. Users can add remarks here. | +| Private Key | Private key required for connecting to the server. | + +### Metrics Collected + +#### Metric Set: Process Basic Information + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------| +| PID | NONE | Process ID | +| User | NONE | User | +| CPU | NONE | CPU Usage | +| MEM | NONE | Memory Usage | +| rss | NONE | Physical Memory | +| cmd | NONE | Command | + +#### Metric Set: Memory Usage Information + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------| +| PID | NONE | Process ID | +| detail | NONE | Detailed metrics | + +Includes metrics for: + +- Peak Virtual Memory +- Current Virtual Memory Usage +- Locked Memory +- Fixed Memory +- Peak Physical Memory +- Current Physical Memory Usage +- Data Segment Size +- Stack Size +- Code Size +- Shared Library Size +- Page Table Entry Size + +#### Metric Set: Other Monitoring Information + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|-----------------------------------| +| PID | NONE | Process ID | +| path | NONE | Execution Path | +| date | NONE | Start Time | +| fd_count | NONE | Number of File Descriptors Opened | + +#### Metric Set: IO + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------| +| PID | NONE | Process ID | +| metric | NONE | Metric Name | +| value | NONE | Metric Value | + +Includes metrics for: + +- rchar (Total bytes read by the process from disk or other files) +- wchar (Total bytes written by the process to disk or other files) +- syscr (Number of read operations initiated by the process) +- syscw (Number of write operations initiated by the process) +- read_bytes (Actual number of bytes read by the process from disk) +- write_bytes (Actual number of bytes written by the process to disk) +- cancelled_write_bytes (Actual number of bytes cancelled by the process while writing to disk) diff --git a/home/versioned_docs/version-1.9.0/help/prometheus.md b/home/versioned_docs/version-1.9.0/help/prometheus.md new file mode 100755 index 0000000000..9f24ddba9e --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/prometheus.md @@ -0,0 +1,41 @@ +--- +id: prometheus +title: Monitoring Prometheus Task +sidebar_label: Prometheus Task Monitor +keywords: [ open source monitoring tool, Prometheus protocol monitoring ] +--- + +> Collect metric data of applications that support the Prometheus protocol. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Task Name | Identify the name of this monitoring. The name needs to be unique. | +| Port | Monitor HTTP port. | +| Endpoint Path | Monitor the path of HTTP interfaces, Note ⚠️ It needs to start with /. | +| Query Timeout | Set the data collection timeout, unit: ms, default: 6000ms. | +| HTTPS | HTTPS enable,optional,default:false. | +| Headers | HTTP request headers,optional. | +| Params | Request params,optional. | +| Content-Type | ContentType,optional. | +| BODY | Request body,optional. | +| Auth Type | Authentication methods, optional values include: `Basic Auth`, `Digest Auth`,optional. | +| Username | Username,optional. | +| Password | Password,optional. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Bind Tags | Used to classify and manage monitoring resources. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Example of usage + +The exposed monitoring address of the application is: `http://127.0.0.1:8080/actuator/prometheus` + +You can use the following configuration: + +- Target Host: `127.0.0.1` +- Port: `8080` +- Endpoint Path: `/actuator/prometheus` + +Keep the rest of the settings default. diff --git a/home/versioned_docs/version-1.9.0/help/pulsar.md b/home/versioned_docs/version-1.9.0/help/pulsar.md new file mode 100644 index 0000000000..4e5faf888f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/pulsar.md @@ -0,0 +1,72 @@ +--- +id: pulsar +title: Monitoring Pulsar +sidebar_label: Apache Pulsar +keywords: [open-source monitoring system, open-source database monitoring, Apache Pulsar monitoring] +--- + +> Collecting and monitoring general performance metrics of Pulsar + +**Protocol Used: HTTP** + +## Configuration Parameters + +| Parameter Name | Description | +|---------------------|----------------------------------------------------------------------------------------------------------------------------| +| Target Host | The monitored endpoint's IPV4, IPV6, or domain name. Note⚠️: Do not include the protocol header (e.g., https://, http://). | +| Port | The webServicePort value of Pulsar, default is 8080. | +| Task Name | The name identifying this monitoring task, must be unique. | +| Query Timeout | Set the connection timeout in milliseconds, default is 3000 milliseconds. | +| Monitoring Interval | Interval time for periodic data collection, in seconds, minimum interval is 30 seconds. | +| Binding Tags | Used for categorizing monitoring resources. | +| Description/Remarks | Additional notes and descriptions for this monitoring task. Users can add more information here. | + +### Collected Metrics + +#### Metric Set: Version Information + +| Metric Name | Unit | Description | +|--------------|------|---------------------| +| Version Info | NONE | Version Information | + +#### Metric Set: process_start_time_seconds + +| Metric Name | Unit | Description | +|--------------------|------|--------------------| +| Process Start Time | NONE | Process Start Time | + +#### Metric Set: process_open_fds + +| Metric Name | Unit | Description | +|-----------------------|------|---------------------------------| +| Open File Descriptors | NONE | Number of Open File Descriptors | + +#### Metric Set: process_max_fds + +| Metric Name | Unit | Description | +|----------------------|------|------------------------------------| +| Max File Descriptors | NONE | Maximum Number of File Descriptors | + +#### Metric Set: jvm_memory_pool_allocated_bytes_total + +Number of bytes of memory allocated in a specific memory pool in the Java Virtual Machine (JVM). In Pulsar, this typically refers to the amount of memory allocated for various purposes in the JVM (such as heap memory, non-heap memory, etc.). + +#### Metric Set: jvm_memory_pool_used_bytes + +Unlike allocated_bytes, this metric shows the actual used memory, not just the allocated memory. + +#### Metric Set: jvm_memory_pool_committed_bytes + +Number of bytes of memory committed in a specific memory pool in the JVM. In the JVM, committed memory is the amount of memory guaranteed to be available for the application to use. This portion of memory is typically locked by the operating system to reduce swapping or garbage collection. + +#### Metric Set: jvm_memory_pool_max_bytes + +Maximum number of bytes of memory that can be allocated in a specific memory pool in the JVM. This is the upper limit on memory usage for that memory pool and helps in setting the memory usage cap. + +#### Metric Set: pulsar_broker_publish_latency + +Message publishing latency on the broker side. + +#### Metric Set: pulsar_metadata_store_ops_latency_ms_bucket + +Latency of metadata store operations on the broker side. diff --git a/home/versioned_docs/version-1.9.0/help/push.md b/home/versioned_docs/version-1.9.0/help/push.md new file mode 100644 index 0000000000..3355d7b6e6 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/push.md @@ -0,0 +1,130 @@ +--- +id: push +title: Monitoring:Push Style Monitor +sidebar_label: Push Style Monitor +keywords: [open source monitoring tool, open source push monitoring tool, monitoring push metrics] +--- + +> HertzBeat actively collects metrics from targets on a schedule. Push Style Monitor reverses that model — your application pushes Prometheus-format metrics to HertzBeat, which is useful for short-lived jobs, batch processes, or services behind firewalls. + +## How It Works + +1. HertzBeat exposes a Prometheus-compatible push endpoint. +2. Your application POSTs metrics in **Prometheus text exposition format** to that endpoint using a `job` name and an `instance` name. +3. On the first push for a new `job`/`instance` pair, HertzBeat automatically creates a monitor for it. +4. Subsequent pushes update the metrics stored under that monitor. + +## Push Endpoint + +```http +POST http://{hertzbeat-host}:{port}/api/push/prometheus/job/{job}/instance/{instance} +Content-Type: text/plain +``` + +| Path segment | Description | Example | +|---|---|---| +| `{hertzbeat-host}` | Address of the HertzBeat server | `127.0.0.1` | +| `{port}` | HertzBeat HTTP port (default `1157`) | `1157` | +| `{job}` | Logical name for the application (alphanumeric and `_` only) | `my_app` | +| `{instance}` | Instance identifier within that job (alphanumeric and `_` only) | `server_1` | + +## Metrics Format + +The request body must follow the **Prometheus text exposition format**. Each non-comment, non-empty line defines one sample: + +```promtail +# HELP http_requests_total Total HTTP requests handled +# TYPE http_requests_total counter +http_requests_total{method="GET",status="200"} 1234 +http_requests_total{method="POST",status="200"} 56 + +# HELP cpu_usage_percent Current CPU utilization +# TYPE cpu_usage_percent gauge +cpu_usage_percent 72.5 + +# HELP memory_used_bytes Memory currently in use +# TYPE memory_used_bytes gauge +memory_used_bytes 536870912 +``` + +## Configuration Parameters + +| Parameter | Description | +|---|---| +| Push Module Host | Address of the HertzBeat server your application will push to. Default: `127.0.0.1` | +| Port | HertzBeat HTTP port. Default: `1157` | +| Metrics Fields | Define the metric field names and their types (Number / String) that HertzBeat should expect | + +## Example: Shell (curl) + +```bash +curl -X POST \ + http://localhost:1157/api/push/prometheus/job/my_app/instance/server_1 \ + -H 'Content-Type: text/plain' \ + --data-binary @- << 'EOF' +# HELP cpu_usage_percent Current CPU utilization +# TYPE cpu_usage_percent gauge +cpu_usage_percent{core="0"} 45.2 +cpu_usage_percent{core="1"} 38.7 + +# HELP memory_used_bytes Memory currently in use +# TYPE memory_used_bytes gauge +memory_used_bytes 1073741824 +EOF +``` + +## Example: Python + +```python +import requests + +def push_metrics(host: str, port: int, job: str, instance: str, body: str) -> None: + url = f"http://{host}:{port}/api/push/prometheus/job/{job}/instance/{instance}" + response = requests.post(url, data=body, headers={"Content-Type": "text/plain"}) + response.raise_for_status() + +metrics_body = """\ +# HELP request_duration_seconds Request latency +# TYPE request_duration_seconds gauge +request_duration_seconds{endpoint="/api/v1/users"} 0.023 +""" + +push_metrics("localhost", 1157, "my_app", "server_1", metrics_body) +``` + +## Example: Java + +```java +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; + +String body = """ + # HELP jvm_memory_used_bytes JVM heap memory currently in use + # TYPE jvm_memory_used_bytes gauge + jvm_memory_used_bytes 134217728 + """; + +HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create("http://localhost:1157/api/push/prometheus/job/my_app/instance/server_1")) + .header("Content-Type", "text/plain") + .POST(HttpRequest.BodyPublishers.ofString(body)) + .build(); + +HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); +``` + +## Common Problems + +1. **`Request not matched` response** + The `{job}` and `{instance}` path segments only accept alphanumeric characters and underscores (`[a-zA-Z0-9_]`). Hyphens, dots, and slashes are not accepted. + +2. **Metrics not appearing in the dashboard** + Metric field names in the HertzBeat monitor configuration must match the metric names (or label names) in the body you are pushing exactly, including case. + +3. **Push rejected with no monitor created** + HertzBeat caps the number of push monitors it will auto-create (default: 10,000). If the cap is reached, pushes from unknown `job`/`instance` pairs are rejected. Existing monitors continue to receive data normally. + +4. **Body too large** + Single push requests are limited to 5 MB and 10,000 samples by default. Split large payloads across multiple requests. diff --git a/home/versioned_docs/version-1.9.0/help/rabbitmq.md b/home/versioned_docs/version-1.9.0/help/rabbitmq.md new file mode 100644 index 0000000000..fc89624c62 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/rabbitmq.md @@ -0,0 +1,125 @@ +--- +id: rabbitmq +title: Monitoring RabbitMQ +sidebar_label: RabbitMQ Monitor +keywords: [open source monitoring tool, open source rabbitmq monitoring tool, monitoring rabbitmq metrics] +--- + +> Monitoring the running status of RabbitMQ message middleware, nodes, topics and other related metrics. + +## Pre-monitoring Operations +> +> HertzBeat uses RabbitMQ Management's Rest Api to collect RabbitMQ metric data. +> Therefore, you need to enable the Management plug-in in your RabbitMQ environment + +1. Open the Management plugin, or use the self-opening version + + ```shell + rabbitmq-plugins enable rabbitmq_management + ``` + +2. Access [http://ip:15672/](http://ip:15672/) with a browser, and the default account password is `guest/guest`. Successful login means that it is successfully opened. + +3. Just add the corresponding RabbitMQ monitoring in HertzBeat, the parameters use the IP port of Management, and the default account password. + +### Configuration parameters + +| Parameter name | Parameter help description | +|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | The peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | The name that identifies this monitoring, and the name needs to be unique. | +| Port | The HTTP port provided by RabbitMQ Management, the default is 15672. | +| Username | Username used for interface Basic authentication | +| Password | The password used for interface Basic authentication | +| Timeout | HTTP request query timeout | +| Acquisition Interval | Interval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful | +| Description Remarks | More remark information to identify and describe this monitoring, users can remark information here | + +### Collect Metrics + +#### metrics: overview + +| Metric Name | Metric Unit | Metric Description | +|--------------------|-------------|------------------------------------| +| product_version | None | Product Version | +| product_name | None | Product name | +| rabbitmq_version | none | rabbitmq version | +| management_version | None | rabbitmq management plugin version | +| erlang_version | None | erlang version | +| cluster_name | None | Cluster name | +| rates_mode | None | rates mode | + +#### metrics: object_totals + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|-----------------------------| +| channels | none | total number of channels | +| connections | none | total number of connections | +| consumers | none | total number of consumers | +| exchanges | none | total number of exchanges | +| queues | none | total number of queues | + +#### metrics: nodes + +| Metric Name | Metric Unit | Metric Description | +|--------------------|-------------|-----------------------------------------------------------| +| name | None | The node name | +| type | None | The node type | +| running | None | Running state | +| os_pid | None | Pid in OS | +| mem_limit | MB | Memory usage high watermark | +| mem_used | MB | Total amount of memory used | +| fd_total | None | File descriptors available | +| fd_used | None | File descriptors used | +| sockets_total | None | Sockets available | +| sockets_used | None | Sockets used | +| proc_total | None | Erlang process limit | +| proc_used | None | Erlang processes used | +| disk_free_limit | GB | Free disk space low watermark | +| disk_free | GB | Free disk space | +| gc_num | None | GC runs | +| gc_bytes_reclaimed | MB | Bytes reclaimed by GC | +| context_switches | None | Context_switches num | +| io_read_count | None | Total number of read operations | +| io_read_bytes | KB | Total data size read into disk | +| io_read_avg_time | ms | Average read operation time in milliseconds | +| io_write_count | None | Total disk write operations | +| io_write_bytes | KB | Total amount of data written to disk | +| io_write_avg_time | ms | Average time of each disk write operation in milliseconds | +| io_seek_count | None | total seek operation | +| io_seek_avg_time | ms | average seek operation time, in milliseconds | +| io_sync_count | None | total amount of fsync operations | +| io_sync_avg_time | ms | Average time of fsync operation in milliseconds | +| connection_created | None | connection created num | +| connection_closed | None | connection closed num | +| channel_created | None | channel created num | +| channel_closed | None | channel closed num | +| queue_declared | None | queue declared num | +| queue_created | None | queue created num | +| queue_deleted | None | queue deleted num | +| connection_closed | None | connection closed num | + +#### metrics: queues + +| Metric Name | Metric Unit | Metric Description | +|------------------------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------| +| name | None | The name of the queue with non-ASCII characters escaped as in C. | +| node | None | The queue on the node name | +| state | None | The state of the queue. Normally "running", but may be `{syncing, message_count}` if the queue is synchronising. | +| type | None | Queue type, one of: quorum, stream, classic. | +| vhost | None | vhost path | +| auto_delete | None | Whether the queue will be deleted automatically when no longer used | +| policy | None | Effective policy name for the queue. | +| consumers | None | Number of consumers. | +| memory | B | Bytes of memory allocated by the runtime for the queue, including stack, heap and internal structures. | +| messages_ready | None | Number of messages ready to be delivered to clients | +| messages_unacknowledged | None | Number of messages delivered to clients but not yet acknowledged | +| messages | None | Sum of ready and unacknowledged messages (queue depth) | +| messages_ready_ram | None | Number of messages from messages_ready which are resident in ram | +| messages_persistent | None | Total number of persistent messages in the queue (will always be 0 for transient queues) | +| message_bytes | B | Sum of the size of all message bodies in the queue. This does not include the message properties (including headers) or any overhead | +| message_bytes_ready | B | Like message_bytes but counting only those messages ready to be delivered to clients | +| message_bytes_unacknowledged | B | Like message_bytes but counting only those messages delivered to clients but not yet acknowledged | +| message_bytes_ram | B | Like message_bytes but counting only those messages which are currently held in RAM | +| message_bytes_persistent | B | Like message_bytes but counting only those messages which are persistent | diff --git a/home/versioned_docs/version-1.9.0/help/redhat.md b/home/versioned_docs/version-1.9.0/help/redhat.md new file mode 100644 index 0000000000..662a4e02de --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/redhat.md @@ -0,0 +1,114 @@ +--- +id: redhat +title: Monitoring RedHat Operating System +sidebar_label: RedHat OS Operating System +keywords: [ Open Source Monitoring System, Open Source OS Monitoring, RedHat OS Monitoring ] +--- + +> Collect and monitor general performance metrics for RedHat operating systems (system information, CPU, memory, disk, network interface, file system, top resource processes, etc.). + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/redis.md b/home/versioned_docs/version-1.9.0/help/redis.md new file mode 100644 index 0000000000..9acf95ac72 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/redis.md @@ -0,0 +1,234 @@ +--- +id: redis +title: Monitoring REDIS database +sidebar_label: REDIS +keywords: [ open source monitoring tool, open source Redis monitoring tool, monitoring Redis metrics ] +--- + +> Collect and monitor the general performance Metrics of Redis database. Support REDIS1.0+. + +## Configuration parameter + +| Parameter name | Parameter help description | +|--------|------------------------------------------------------| +| Target Host | The IP, IPV6, or domain name of the monitored endpoint. Note ⚠️: Do not include protocol headers (eg: https://, http://). | +| Port | The HTTP port provided by Redis, default value is 6379, sentinel node`s default value is 26379 | +| Timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | + +### Collection Metric + +#### Metric set:server + +| Metric name | Metric unit | Metric help description | +|--------------------------|------|-----------------------------------------------| +| redis_version | none | Version of the Redis server | +| redis_git_sha1 | none | Git SHA1 | +| redis_git_dirty | none | Git dirty flag | +| redis_build_id | none | The build id | +| redis_mode | none | The server's mode ("standalone", "sentinel" or "cluster") | +| os | none | Operating system hosting the Redis server | +| arch_bits | none | Architecture (32 or 64 bits) | +| multiplexing_api | none | Event loop mechanism used by Redis | +| atomicvar_api | none | Atomicvar API used by Redis | +| gcc_version | none | Version of the GCC compiler used to compile the Redis server | +| process_id | none | PID of the server process | +| process_supervised | none | Supervised system ("upstart", "systemd", "unknown" or "no") | +| run_id | none | Random value identifying the Redis server (to be used by Sentinel and Cluster) | +| tcp_port | none | TCP/IP listen port | +| server_time_usec | none | Epoch-based system time with microsecond precision | +| uptime_in_seconds | none | Number of seconds since Redis server start | +| uptime_in_days | none | Same value expressed in days | +| hz | none | The server's current frequency setting | +| configured_hz | none | The server's configured frequency setting | +| lru_clock | none | Clock incrementing every minute, for LRU management | +| executable | none | The path to the server's executable | +| config_file | none | The path to the config file | +| io_threads_active | none | Flag indicating if I/O threads are active | +| shutdown_in_milliseconds | none | The maximum time remaining for replicas to catch up the replication before completing the shutdown sequence. This field is only present during shutdown. | + +#### Metric set:clients + +| Metric name | Metric unit | Metric help description | +|---------------------------------|------|--------------------------------------------------------------------------------| +| connected_clients | none | Number of client connections (excluding connections from replicas) | +| cluster_connections | none | An approximation of the number of sockets used by the cluster's bus | +| maxclients | none | The value of the maxclients configuration directive. This is the upper limit for the sum of connected_clients, connected_slaves and cluster_connections. | +| client_recent_max_input_buffer | byte | Biggest input buffer among current client connections | +| client_recent_max_output_buffer | byte | Biggest output buffer among current client connections | +| blocked_clients | none | Number of clients pending on a blocking call (BLPOP, BRPOP, BRPOPLPUSH, BLMOVE, BZPOPMIN, BZPOPMAX) | +| tracking_clients | none | Number of clients being tracked (CLIENT TRACKING) | +| clients_in_timeout_table | none | Number of clients in the clients timeout table | + +#### Metric set:memory + +| Metric name | Metric unit | Metric help description | +|---------------------------|----------|-----------------------------------------------------------------------------------------------| +| used_memory | byte | Total number of bytes allocated by Redis using its allocator (either standard libc, jemalloc, or an alternative allocator such as tcmalloc) | +| used_memory_human | GB/MB/KB | Human readable representation of previous value | +| used_memory_rss | byte | Number of bytes that Redis allocated as seen by the operating system (a.k.a resident set size). This is the number reported by tools such as top(1) and ps(1) | +| used_memory_rss_human | GB/MB/KB | Human readable representation of previous value | +| used_memory_peak | byte | Peak memory consumed by Redis (in bytes) | +| used_memory_peak_human | GB/MB/KB | Human readable representation of previous value | +| used_memory_peak_perc | none | The percentage of used_memory_peak out of used_memory | +| used_memory_overhead | byte | The sum in bytes of all overheads that the server allocated for managing its internal data structures | +| used_memory_startup | byte | Initial amount of memory consumed by Redis at startup in bytes | +| used_memory_dataset | byte | The size in bytes of the dataset (used_memory_overhead subtracted from used_memory) | +| used_memory_dataset_perc | none | The percentage of used_memory_dataset out of the net memory usage (used_memory minus used_memory_startup) | +| allocator_allocated | byte | Total bytes allocated form the allocator, including internal-fragmentation. Normally the same as used_memory. | +| allocator_active | byte | Total bytes in the allocator active pages, this includes external-fragmentation. | +| allocator_resident | byte | Total bytes resident (RSS) in the allocator, this includes pages that can be released to the OS (by MEMORY PURGE, or just waiting). | +| total_system_memory | byte | The total amount of memory that the Redis host has | +| total_system_memory_human | GB/MB/KB | Human readable representation of previous value | +| used_memory_lua | byte | Number of bytes used by the Lua engine for EVAL scripts. Deprecated in Redis 7.0, renamed to used_memory_vm_eval | +| used_memory_lua_human | KB | Human readable representation of previous value. Deprecated in Redis 7.0 | +| used_memory_scripts | byte | used_memory_scripts_eval + used_memory_functions (part of used_memory). Added in Redis 7.0 | +| used_memory_scripts_human | GB/MB/KB | Human readable representation of previous value | +| number_of_cached_scripts | none | The number of EVAL scripts cached by the server. Added in Redis 7.0 | +| maxmemory | byte | The value of the maxmemory configuration directive | +| maxmemory_human | GB/MB/KB | Human readable representation of previous value | +| maxmemory_policy | none | The value of the maxmemory-policy configuration directive | +| allocator_frag_ratio | none | Ratio between allocator_active and allocator_allocated. This is the true (external) fragmentation metric (not mem_fragmentation_ratio). | +| allocator_frag_bytes | byte | Delta between allocator_active and allocator_allocated. See note about mem_fragmentation_bytes. | +| allocator_rss_ratio | | Ratio between allocator_resident and allocator_active. | +| allocator_rss_bytes | byte | Delta between allocator_resident and allocator_active | +| rss_overhead_ratio | none | Ratio between used_memory_rss (the process RSS) and allocator_resident. This includes RSS overheads that are not allocator or heap related. | +| rss_overhead_bytes | byte | Delta between used_memory_rss (the process RSS) and allocator_resident | +| mem_fragmentation_ratio | none | Ratio between used_memory_rss and used_memory. Note that this doesn't only includes fragmentation, but also other process overheads (see the allocator_* metrics), and also overheads like code, shared libraries, stack, etc. | +| mem_fragmentation_bytes | byte | Delta between used_memory_rss and used_memory. Note that when the total fragmentation bytes is low (few megabytes), a high ratio (e.g. 1.5 and above) is not an indication of an issue. | +| mem_not_counted_for_evict | byte | Used memory that's not counted for key eviction. This is basically transient replica and AOF buffers. | +| mem_replication_backlog | byte | Memory used by replication backlog | +| mem_clients_slaves | none | Memory used by replica clients - Starting Redis 7.0, replica buffers share memory with the replication backlog, so this field can show 0 when replicas don't trigger an increase of memory usage. | +| mem_clients_normal | none | Memory used by normal clients | +| mem_aof_buffer | none | Transient memory used for AOF and AOF rewrite buffers | +| mem_allocator | none | Memory allocator, chosen at compile time. | +| active_defrag_running | none | When activedefrag is enabled, this indicates whether defragmentation is currently active, and the CPU percentage it intends to utilize. | +| lazyfree_pending_objects | none | The number of objects waiting to be freed (as a result of calling UNLINK, or FLUSHDB and FLUSHALL with the ASYNC option) | +| lazyfreed_objects | none | The number of objects that have been lazy freed. | + +#### Metric set:persistence + +| Metric name | Metric unit | Metric help description | +|------------------------------|--------|-----------------------------------------------------------------------------------------------------| +| loading | none | Flag indicating if the load of a dump file is on-going | +| current_cow_size | byte | The size in bytes of copy-on-write memory while a child fork is running | +| current_cow_size_age | second | The age, in seconds, of the current_cow_size value. | +| current_fork_perc | none | The percentage of progress of the current fork process. For AOF and RDB forks it is the percentage of current_save_keys_processed out of | +| current_save_keys_processed | none | Number of keys processed by the current save operation | +| current_save_keys_total | none | Number of keys at the beginning of the current save operation | +| rdb_changes_since_last_save | none | Number of changes since the last dump | +| rdb_bgsave_in_progress | none | Flag indicating a RDB save is on-going | +| rdb_last_save_time | second | Epoch-based timestamp of last successful RDB save | +| rdb_last_bgsave_status | none | Status of the last RDB save operation | +| rdb_last_bgsave_time_sec | second | Duration of the last RDB save operation in seconds | +| rdb_current_bgsave_time_sec | none | Duration of the on-going RDB save operation if any | +| rdb_last_cow_size | none | The size in bytes of copy-on-write memory during the last RDB save operation | +| aof_enabled | none | Flag indicating AOF logging is activated | +| aof_rewrite_in_progress | none | Flag indicating a AOF rewrite operation is on-going | +| aof_rewrite_scheduled | none | Flag indicating an AOF rewrite operation will be scheduled once the on-going RDB save is complete. | +| aof_last_rewrite_time_sec | none | Duration of the last AOF rewrite operation in seconds | +| aof_current_rewrite_time_sec | second | Duration of the on-going AOF rewrite operation if any | +| aof_last_bgrewrite_status | none | Status of the last AOF rewrite operation | +| aof_last_write_status | none | Status of the last write operation to the AOF | +| aof_last_cow_size | none | The size in bytes of copy-on-write memory during the last AOF rewrite operation | +| module_fork_in_progress | none | Flag indicating a module fork is on-going | +| module_fork_last_cow_size | none | The size in bytes of copy-on-write memory during the last module fork operation | + +#### Metric set:stats + +| Metric name | Metric unit | Metric help description | +|--------------------------------|------|----------------------------------------------------| +| total_connections_received | none | Total number of connections accepted by the server | +| total_commands_processed | none | Total number of commands processed by the server | +| instantaneous_ops_per_sec | none | Number of commands processed per second | +| total_net_input_bytes | byte | The total number of bytes read from the network | +| total_net_output_bytes | byte | The total number of bytes written to the network | +| instantaneous_input_kbps | KB/S | The network's read rate per second in KB/sec | +| instantaneous_output_kbps | KB/S | The network's write rate per second in KB/sec | +| rejected_connections | none | Number of connections rejected because of maxclients limit | +| sync_full | none | The number of full resyncs with replicas | +| sync_partial_ok | none | The number of accepted partial resync requests | +| sync_partial_err | none | The number of denied partial resync requests | +| expired_keys | none | Total number of key expiration events | +| expired_stale_perc | none | The percentage of keys probably expired | +| expired_time_cap_reached_count | none | The count of times that active expiry cycles have stopped early | +| expire_cycle_cpu_milliseconds | none | The cumulative amount of time spent on active expiry cycles | +| evicted_keys | none | Number of evicted keys due to maxmemory limit | +| keyspace_hits | none | Number of successful lookup of keys in the main dictionary | +| keyspace_misses | none | Number of failed lookup of keys in the main dictionary | +| pubsub_channels | none | Global number of pub/sub channels with client subscriptions | +| pubsub_patterns | none | Global number of pub/sub pattern with client subscriptions | +| latest_fork_usec | none | Duration of the latest fork operation in microseconds | +| total_forks | none | Total number of fork operations since the server start | +| migrate_cached_sockets | none | The number of sockets open for MIGRATE purposes | +| slave_expires_tracked_keys | none | The number of keys tracked for expiry purposes (applicable only to writable replicas) | +| active_defrag_hits | none | Number of value reallocations performed by active the defragmentation process | +| active_defrag_misses | none | Number of aborted value reallocations started by the active defragmentation process | +| active_defrag_key_hits | none | Number of keys that were actively defragmented | +| active_defrag_key_misses | none | Number of keys that were skipped by the active defragmentation process | +| tracking_total_keys | none | Number of keys being tracked by the server | +| tracking_total_items | none | Number of items, that is the sum of clients number for each key, that are being tracked | +| tracking_total_prefixes | none | Number of tracked prefixes in server's prefix table (only applicable for broadcast mode) | +| unexpected_error_replies | none | Number of unexpected error replies, that are types of errors from an AOF load or replication | +| total_error_replies | none | Total number of issued error replies, that is the sum of rejected commands (errors prior command execution) and failed commands (errors within the command execution) | +| dump_payload_sanitizations | none | Total number of dump payload deep integrity validations (see sanitize-dump-payload config). | +| total_reads_processed | none | Total number of read events processed | +| total_writes_processed | none | Total number of write events processed | +| io_threaded_reads_processed | none | Number of read events processed by the main and I/O threads | +| io_threaded_writes_processed | none | Number of write events processed by the main and I/O threads | + +#### Metric set:replication + +| Metric name | Metric unit | Metric help description | +|--------------------------------|------|-------------------------------------------------------------------------------------| +| role | none | Value is "master" if the instance is replica of no one, or "slave" if the instance is a replica of some master instance. Note that a replica can be master of another replica (chained replication). | +| connected_slaves | none | Number of connected replicas | +| master_failover_state | none | The state of an ongoing failover, if any. | +| master_replid | none | The replication ID of the Redis server. | +| master_replid2 | none | The secondary replication ID, used for PSYNC after a failover. | +| master_repl_offset | none | The server's current replication offset | +| second_repl_offset | none | The offset up to which replication IDs are accepted | +| repl_backlog_active | none | Flag indicating replication backlog is active | +| repl_backlog_size | byte | Total size in bytes of the replication backlog buffer | +| repl_backlog_first_byte_offset | none | The master offset of the replication backlog buffer | +| repl_backlog_histlen | none | Size in bytes of the data in the replication backlog buffer | + +#### Metric set:cpu + +| Metric name | Metric unit | Metric help description | +|---------------------------|------|------------------------| +| used_cpu_sys | none | System CPU consumed by the Redis server, which is the sum of system CPU consumed by all threads of the server process (main thread and background threads) | +| used_cpu_user | none | User CPU consumed by the Redis server, which is the sum of user CPU consumed by all threads of the server process (main thread and background threads) | +| used_cpu_sys_children | none | System CPU consumed by the background processes | +| used_cpu_user_children | none | User CPU consumed by the background processes | +| used_cpu_sys_main_thread | none | System CPU consumed by the Redis server main thread | +| used_cpu_user_main_thread | none | User CPU consumed by the Redis server main thread | + +#### Metric set:errorstats + +| Metric name | Metric unit | Metric help description | +|-------------------|------|-----------| +| errorstat_ERR | none | ERR count | +| errorstat_MISCONF | none | MISCONF count | + +#### Metric set:cluster + +| Metric name | Metric unit | Metric help description | +|-----------------|------|--------------------| +| cluster_enabled | none | Indicate Redis cluster is enabled | + +#### Metric set:commandstats + +| Metric name | Metric unit | Metric help description | +|---------------|------|---------------------------------------------------------------------------------------------------------------------------| +| cmdstat_set | none | set command stat | +| cmdstat_get | none | get command stat | +| cmdstat_setnx | none | setnx command stat | +| cmdstat_hset | none | hset command stat | +| cmdstat_hget | none | hget command stat | +| cmdstat_lpush | none | lpush command stat | +| cmdstat_rpush | none | rpush command stat | +| cmdstat_lpop | none | lpop command stat | +| cmdstat_rpop | none | rpop command stat | +| cmdstat_llen | none | llen command stat | diff --git a/home/versioned_docs/version-1.9.0/help/redis_cluster.md b/home/versioned_docs/version-1.9.0/help/redis_cluster.md new file mode 100644 index 0000000000..e548d0eb91 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/redis_cluster.md @@ -0,0 +1,166 @@ +--- +id: redis_cluster +title: Monitoring Redis Cluster +sidebar_label: Redis Cluster Monitor +keywords: [ open source monitoring tool, open source Redis Cluster monitoring tool, monitoring Redis Cluster metrics ] +--- + +## Pre-monitoring operations + +1. create a empty folder and add two files. + + *redis.config* + + ```shell + port 6379 + cluster-enabled yes + cluster-config-file nodes.conf + cluster-node-timeout 5000 + appendonly yes + bind 0.0.0.0 + protected-mode no + + ``` + + *docker-compose.yml* + + ```yml + services: + redis-master-1: + image: redis:latest + container_name: redis-master-1 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "1000:6379" + + redis-master-2: + image: redis:latest + container_name: redis-master-2 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "2000:6379" + + redis-master-3: + image: redis:latest + container_name: redis-master-3 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "3000:6379" + + redis-slave-1: + image: redis:latest + container_name: redis-slave-1 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "1001:6379" + + redis-slave-2: + image: redis:latest + container_name: redis-slave-2 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "2001:6379" + + redis-slave-3: + image: redis:latest + container_name: redis-slave-3 + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - "3001:6379" + + networks: + default: + external: + name: hertzbeat-redis-cluster + ``` + +2. View the IP addresses of all containers from the network, which is required when building a cluster. + + ```bash + docker-compose up -d + docker network inspect hertzbeat-redis-cluste + ``` + + ```json + "Containers": { + "187b879f73c473b3cbb82ff95f668e65af46115ddaa27f3ff1a712332b981531": { + ... + "Name": "redis-slave-2", + "IPv4Address": "192.168.117.6/24", + ... + }, + "45e22b64c82e51857fc104436cdd6cc0c5776ad10a2e4b9d8e52e36cfb87217e": { + ... + "Name": "redis-master-3", + "IPv4Address": "192.168.117.3/24 + ... + }, + "57838ae37956f8af181f9a131eb011efec332b9ed3d49480f59d8962ececf288": { + ... + "Name": "redis-master-2", + "IPv4Address": "192.168.117.7/24", + ... + }, + "94478d14bd950bcde533134870beb89b392515843027a0595af56dd1e3305a76": { + ... + "Name": "redis-master-1", + "IPv4Address": "192.168.117.4/24", + ... + }, + "ad055720747e7fc430ba794d5321723740eeb345c280073e4292ed4302ff657c": { + ... + "Name": "redis-slave-3", + "IPv4Address": "192.168.117.2/24", + ... + }, + "eddded1ac4c7528640ba0c6befbdaa48faa7cb13905b934ca1f5c69ab364c725": { + ... + "Name": "redis-slave-1", + "IPv4Address": "192.168.117.5/24", + ... + } + }, + ``` + +3. Go inside the container to build a Redis cluster. + + ```bash + docker exec -it redis-master-1 /bin/bash + ``` + + ```bash + redis-cli --cluster create \ + 192.168.117.4:6379 \ + 192.168.117.7:6379 \ + 192.168.117.3:6379 \ + 192.168.117.5:6379 \ + 192.168.117.6:6379 \ + 192.168.117.2:6379 \ + --cluster-replicas 1 + ``` + +4. Specific operations. + + Add a redis monitor center, fill require parameters. + + ![HertzBeat](/img/docs/help/redis-cluster-add.png) + + final effect. + + ![HertzBeat](/img/docs/help/redis-cluster-view.png) + +### Configuration Parameters + + Please see [REDIS](https://hertzbeat.apache.org/docs/help/redis) doc. diff --git a/home/versioned_docs/version-1.9.0/help/registry.md b/home/versioned_docs/version-1.9.0/help/registry.md new file mode 100644 index 0000000000..d34fdc6830 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/registry.md @@ -0,0 +1,51 @@ +--- +id: registry +title: Monitoring Registry +sidebar_label: Registry Monitor +keywords: [open source monitoring tool, open source java monitoring tool, monitoring registry metrics] +--- + +> Collect and monitor the general performance Metrics of Registry. + +**Protocol Use:registry** + +## Steps to monitor micro services + +1. Make sure your **Register center** is available + + > We currently support for `Consul` and `Nacos`. + +2. Add http_sd monitor and enter necessary info about **Register center** on HertzBeat, such as host, port and so on. +3. Click **OK** + +## Configuration parameter + +| Parameter name | Parameter help description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Task name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by Register center | +| Discovery Client Type | Select one Register center that you want to monitor | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +## Collection Metrics + +## Metrics Set:server + +| Metric name | Metric unit | Metric help description | +|---------------|-------------|-------------------------| +| Address | | | +| Port | | | +| Response Time | ms | | + +## Metrics Set:service + +| Metric name | Metric unit | Metric help description | +|---------------|-------------|----------------------------------| +| Service Id | | | +| Service Name | | | +| Address | | | +| Port | | | +| Health Status | | Current health status of service | diff --git a/home/versioned_docs/version-1.9.0/help/risc-v.md b/home/versioned_docs/version-1.9.0/help/risc-v.md new file mode 100644 index 0000000000..a7d2ee5d46 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/risc-v.md @@ -0,0 +1,96 @@ +--- +id: risc-v +title: HertzBeat Running in RISC-V Architecture Environment +sidebar_label: RISC-V +keywords: [ Open Source Monitoring System, RISC-V Architecture, RISC-V Running HertzBeat ] +--- + +> How to Set Up a RISC-V Environment and Run HertzBeat on RISC-V Architecture. + +## RISC-V Environment Setup + +Ensure your RISC-V development environment is properly configured, including compatible hardware or emulators. This guide uses the QEMU emulator on Ubuntu to simulate RISC-V architecture. + +**1. Install QEMU and Required Packages** + +```shell +sudo apt update +sudo apt install opensbi qemu-system-misc u-boot-qemu +``` + +**2. Download Ubuntu Image for RISC-V Architecture** + +Download link: [https://ubuntu.com/download/risc-v](https://ubuntu.com/download/risc-v) +Select the `QEMU Emulator` version and download your preferred release. + +**3. Install Ubuntu on QEMU** + +> Use QEMU to boot Ubuntu and emulate RISC-V architecture. Parameters (e.g., boot settings, disk size) can be customized. + +```shell +# Decompress the image +xz -dk ubuntu-24.04.2-preinstalled-server-riscv64.img.xz + +# Optional: Expand the disk size +qemu-img resize -f raw ubuntu-24.04-preinstalled-server-riscv64.img +5G + +# Start the VM using u-boot-qemu +qemu-system-riscv64 \ + -machine virt -nographic -m 2048 -smp 4 \ + -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \ + -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \ + -device virtio-rng-pci \ + -drive file=ubuntu-24.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio +``` + +After the console output completes, log in with username ubuntu and default password ubuntu. You will be prompted to set a new password. +Reference: [Ubuntu Official Documentation](https://canonical-ubuntu-boards.readthedocs-hosted.com/en/latest/how-to/qemu-riscv/) + +## Install and Configure RISC-V-Compatible JDK + +> Configure a JDK that supports RISC-V architecture. Here we use Temurin JDK 25. + +**1. Download Temurin JDK** +Download link: [https://adoptium.net/temurin/releases](https://adoptium.net/temurin/releases) + +**2. Configure JDK Environment** + +> Adjust commands based on your downloaded JDK version. + +```shell +# Install tools +sudo apt update +sudo apt install -y tar wget + +# Create installation directory +sudo mkdir -p /usr/lib/jvm + +# Extract to system directory +sudo tar -xzf OpenJDK25U-jdk_riscv64_linux_hotspot_.tar.gz -C /usr/lib/jvm + +# Edit environment variables +sudo nano /etc/profile.d/java.sh +export JAVA_HOME=$(find /usr/lib/jvm -maxdepth 1 -type d -name 'jdk-25*' | head -n 1) +export PATH=$JAVA_HOME/bin:$PATH + +# Apply configuration +source /etc/profile.d/java.sh + +# Verify installation +java -version +``` + +## Run HertzBeat + +> Download the installer from [HertzBeat Official Site](https://hertzbeat.apache.org/zh-cn/docs/download/) and follow the deployment guide. Example for v1.7.2 . + +```shell +cd apache-hertzbeat-1.7.2-incubating-bin/bin/ +./startup.sh +``` + +> Notes: +> +> 1. Replace `OpenJDK25U-jdk_riscv64_linux_hotspot_.tar.gz` with your actual JDK filename. +> 2. Ensure the emulator has internet access to download HertzBeat. +> 3. If issues arise, verify disk permissions and Java environment paths. diff --git a/home/versioned_docs/version-1.9.0/help/rocketmq.md b/home/versioned_docs/version-1.9.0/help/rocketmq.md new file mode 100644 index 0000000000..65b4fecd2a --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/rocketmq.md @@ -0,0 +1,48 @@ +--- +id: rocketmq +title: Monitoring Apache RocketMQ +sidebar_label: Apache RocketMQ +keywords: [ open source monitoring tool, monitoring Apache RocketMQ metrics ] +--- + +> Monitor the broker, consumer and other related metrics of RocketMQ. + +## Configuration parameters + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Namesrv Host | IPV4,IPV6 of RocketMQ name server(eg: https://, http://)。 | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique. | +| Port | Port of RocketMQ name server. | +| accessKey | accessKey. | +| secretKey | secretKey. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Bind Tags | Used to classify and manage monitoring resources. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Collection Metric + +#### Metric set:cluster + +| Metric name | Metric unit | Metric help description | +|-------------------------|-------------|---------------------------------------| +| BrokerId | none | Broker id | +| Address | none | Broker address | +| Version | none | Version | +| Producer_Message_TPS | none | Produce message TPS | +| Consumer_Message_TPS | none | Consume message TPS | +| Yesterday_Produce_Count | none | Number of messages produced yesterday | +| Yesterday_Consume_Count | none | Number of messages consumed yesterday | +| Today_Produce_Count | none | Number of messages produced today | +| Today_Consume_Count | none | Number of messages consumed today | + +#### Metric set:Consumer + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|-------------------------| +| Consumer_group | none | Consumer group | +| Client_quantity | none | Number of clients | +| Message_model | none | Message model | +| Consume_type | none | Consume type | +| Consume_tps | none | Consume tps | +| Delay | none | Delay | diff --git a/home/versioned_docs/version-1.9.0/help/rockylinux.md b/home/versioned_docs/version-1.9.0/help/rockylinux.md new file mode 100644 index 0000000000..3a6b443547 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/rockylinux.md @@ -0,0 +1,114 @@ +--- +id: rockylinux +title: Monitoring Rocky Linux Operating System +sidebar_label: Rocky Linux Operating System +keywords: [ Open Source Monitoring System, Open Source OS Monitoring, Rocky Linux Monitoring ] +--- + +> Collect and monitor general performance metrics for Rocky Linux operating systems (system information, CPU, memory, disk, network interface, file system, top resource processes, etc.). + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | diff --git a/home/versioned_docs/version-1.9.0/help/seatunnel.md b/home/versioned_docs/version-1.9.0/help/seatunnel.md new file mode 100644 index 0000000000..3346ea0334 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/seatunnel.md @@ -0,0 +1,99 @@ +--- +id: seatunnel +title: Monitoring: SeaTunnel +sidebar_label: SeaTunnel +keywords: [ Open Source Monitoring System, Monitor SeaTunnel ] +--- + +> Collect monitoring metrics for SeaTunnel. + +## Configuration Parameters + +| Parameter Name | Parameter Help Description | +|-------------------|-----------------------------------------------------------------------------------------------------------------| +| Target Host | The monitored endpoint's IPV4, IPV6, or domain name. Note ⚠️ no protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring task, which needs to be unique. | +| Port | The monitoring port opened by SeaTunnel, default value: 5801. | +| SSL | Whether SSL is enabled for connecting to SeaTunnel. | +| Query Timeout | Set the timeout for unresponsive queries, in milliseconds (ms), default 6000 ms. | +| Collection Interval| The interval time for periodic data collection, in seconds; the minimum interval that can be set is 30 seconds. | +| Binding Tags | Used for categorizing and managing monitoring resources. | +| Description Notes | Additional identification and description notes for this monitoring; users can add notes here. | + +### Collected Metrics + +#### Metric Set: Cluster Overview + +| Metric Name | Metric Unit | Metric Help Description | +|-----------------------|-------------|----------------------------| +| projectVersion | None | Project version | +| gitCommitAbbrev | None | Git commit hash | +| totalSlot | None | Total number of slots | +| unassignedSlot | None | Number of unassigned slots | +| runningJobs | None | Number of running tasks | +| finishedJobs | None | Number of completed tasks | +| failedJobs | None | Number of failed tasks | +| cancelledJobs | None | Number of cancelled tasks | +| workers | None | Number of workers | + +#### Metric Set: Thread Information + +| Metric Name | Metric Unit | Metric Help Description | +|------------------|-------------|-------------------------| +| threadName | None | Thread name | +| threadId | None | Thread ID | +| threadState | None | Thread state | +| stackTrace | None | Stack trace information | + +#### Metric Set: Node Monitoring + +| Metric Name | Metric Unit | Metric Help Description | +|---------------------------------|-------------|------------------------------| +| isMaster | None | Whether it is a master node | +| host | None | IP address | +| port | None | Port | +| processors | None | Number of processors | +| physical.memory.total | None | Total physical memory | +| physical.memory.free | None | Available physical memory | +| swap.space.total | None | Total swap space | +| swap.space.free | None | Available swap space | +| heap.memory.used | None | Used heap memory | +| heap.memory.free | None | Available heap memory | +| heap.memory.total | None | Total heap memory | +| heap.memory.max | None | Maximum heap memory | +| heap.memory.used/total | None | Heap memory usage rate | +| heap.memory.used/max | None | Maximum heap memory usage rate| +| minor.gc.count | None | Minor garbage collection count| +| minor.gc.time | None | Minor garbage collection time | +| major.gc.count | None | Major garbage collection count| +| major.gc.time | None | Major garbage collection time | +| load.process | None | Process load | +| load.system | None | System load | +| load.systemAverage | None | Average system load | +| thread.count | None | Number of threads | +| thread.peakCount | None | Peak thread count | +| cluster.timeDiff | None | Cluster time difference | +| event.q.size | None | Event queue size | +| executor.q.async.size | None | Asynchronous execution queue size | +| executor.q.client.size | None | Client execution queue size | +| executor.q.client.query.size | None | Client query queue size | +| executor.q.client.blocking.size | None | Client blocking queue size | +| executor.q.query.size | None | Query queue size | +| executor.q.scheduled.size | None | Scheduled execution queue size | +| executor.q.io.size | None | IO queue size | +| executor.q.system.size | None | System execution queue size | +| executor.q.operations.size | None | Operations queue size | +| executor.q.priorityOperation.size| None | Priority operations queue size | +| operations.completed.count | None | Completed operations count | +| executor.q.mapLoad.size | None | Map load queue size | +| executor.q.mapLoadAllKeys.size | None | Map load all keys size | +| executor.q.cluster.size | None | Cluster execution queue size | +| executor.q.response.size | None | Response queue size | +| operations.running.count | None | Number of running operations | +| operations.pending.invocations.percentage | None | Percentage of pending invocations | +| operations.pending.invocations.count | None | Number of pending invocations | +| proxy.count | None | Number of proxies | +| clientEndpoint.count | None | Number of client endpoints | +| connection.active.count | None | Number of active connections | +| client.connection.count | None | Number of client connections | +| connection.count | None | Total number of connections | diff --git a/home/versioned_docs/version-1.9.0/help/security_model.md b/home/versioned_docs/version-1.9.0/help/security_model.md new file mode 100644 index 0000000000..65a9882476 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/security_model.md @@ -0,0 +1,51 @@ +--- +id: security_model +title: Security Model +sidebar_label: Security Model +--- + +:::tip +Apache HertzBeat™ is a highly extensible system that provides users with a lot of custom capabilities. Users can enhance the platform by customizing monitoring templates, custom monitoring, custom plugins, etc. In this case, security is very important. +This document will introduce the security model of Apache HertzBeat. +The security model here mainly involves the security boundaries that users need to pay attention to in the extension process, and how to ensure that user customization will not cause security risks to the system. +::: + +> The users mentioned below refer to authenticated users of the system, regardless of their roles. + +## User Permission Security + +Apache HertzBeat™ uses [Sureness](https://github.com/dromara/sureness) to support system user security. + +Use the `sureness.yml` provided by Sureness to configure user accounts, roles, API resources, etc. It is strongly recommended that the initial user modify the account password. For details, refer to [Account Permission Management](../start/account-modify) + +Please note that the role permission function is being improved, please do not use roles to control user permissions, all users have management permissions. + +## Monitoring Template Security + +Apache HertzBeat™ provides a monitoring template feature that allows users to define monitoring rules by configuring custom monitoring templates and custom scripts. + +A monitoring template may include scripts and other content such as SQL, SHELL, JMX, URL, and API. When creating custom monitoring templates, users are responsible for ensuring the security of the template content and avoiding malicious code or other unsafe elements. + +## Custom Plugin Security + +Apache HertzBeat™ supports users to upload custom code plugins to run in the life cycle of multiple systems, and users need to ensure the security of the custom plugin code themselves. + +## Custom Collector Security + +Apache HertzBeat™ supports users to customize collectors to personalize the collection of monitoring indicators, and users need to ensure the security of the custom collectors themselves. + +## Custom URL and Other Parameter Security + +Apache HertzBeat™ provides the ability to configure custom parameters. All users authorized to configure URLs and other parameters are considered highly trusted and are expected to trigger certain behaviors. + +## Security Constraints in Other Customizations + +Apache HertzBeat™ provides a variety of system extension methods and custom capabilities. Users need to pay attention to the security of customizations during use. Of course, all extension capabilities need to be within the scope of authenticated users. + +---- + +## Reporting a Vulnerability + +Please do not file GitHub issues for security vulnerabilities as they are public! + +To report a new vulnerability you have discovered please follow the [ASF vulnerability reporting process](https://apache.org/security/#reporting-a-vulnerability). diff --git a/home/versioned_docs/version-1.9.0/help/shenyu.md b/home/versioned_docs/version-1.9.0/help/shenyu.md new file mode 100644 index 0000000000..f63da053b8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/shenyu.md @@ -0,0 +1,129 @@ +--- +id: shenyu +title: Monitoring:Apache ShenYu API Gateway +sidebar_label: Apache ShenYu +keywords: [open source monitoring tool, open source apache shenyu monitoring tool, monitoring apache shenyu metrics] +--- + +> monitor ShenYu running status (JVM-related), include request response and other related metrics. + +## Pre-monitoring operations + +Enable `metrics` plugin in ShenYu, expose it's prometheus metrics endpoint。 + +Refer [ShenYu Document](https://shenyu.apache.org/docs/plugin-center/observability/metrics-plugin) + +Two Steps Mainly: + +1. add metrics plugin dependency in gateway's pom.xml. + + ```xml + + org.apache.shenyu + shenyu-spring-boot-starter-plugin-metrics + ${project.version} + + ``` + +2. modify this config in shenyu gateway yaml. + + ```yaml + shenyu: + metrics: + enabled: false #false is close, true is open + name : prometheus + host: 127.0.0.1 + port: 8090 + jmxConfig: + props: + jvm_enabled: true #enable jvm monitoring + ``` + +Finally, restart the access gateway metrics endpoint `http://ip:8090` to respond to prometheus format data. + +### Configuration parameters + +| Parameter name | Parameter help description | +|--------|----------------------------------------- --------------| +| Monitoring Host | The peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | The name that identifies this monitoring, and the name needs to be unique. | +| Port | The port provided by the gateway Metric interface, the default is 8090. | +| Timeout | HTTP request response timeout | +| Acquisition Interval | Interval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful | +| Description Remarks | More remark information to identify and describe this monitoring, users can remark information here | + +### Collect metrics + +#### Index collection: shenyu_request_total + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|------------------------------------------| +| value | None | Collect all requests from ShenYu gateway | + +#### Metric collection: shenyu_request_throw_created + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------------------------------| +| value | None | Collect the number of abnormal requests from ShenYu Gateway | + +#### Metric collection: process_cpu_seconds_total + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------------| +| value | none | total user and system CPU elapsed seconds | + +#### Metric collection: process_open_fds + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|---------------------------------| +| value | none | number of open file descriptors | + +#### Metric collection: process_max_fds + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-----------------------------------------| +| value | none | maximum number of open file descriptors | + +#### Metric collection: jvm_info + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| runtime | none | JVM version information | +| vendor | none | JVM version information | +| version | None | JVM version information | + +#### Metric collection: jvm_memory_bytes_used + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|------------------------------------------| +| area | None | JVM memory area | +| value | MB | used size of the given JVM memory region | + +#### Metric collection: jvm_memory_pool_bytes_used + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|----------------------------------------| +| pool | None | JVM memory pool | +| value | MB | used size of the given JVM memory pool | + +#### Metric collection: jvm_memory_pool_bytes_committed + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------------------| +| pool | None | JVM memory pool | +| value | MB | The committed size of the given JVM memory pool | + +#### Metric collection: jvm_memory_pool_bytes_max + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------------------------| +| pool | None | JVM memory pool | +| value | MB | The maximum size of the memory pool for the given JVM | + +#### Metric collection: jvm_threads_state + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|---------------------------------------------------------| +| state | none | thread state | +| value | None | The number of threads corresponding to the thread state | diff --git a/home/versioned_docs/version-1.9.0/help/smtp.md b/home/versioned_docs/version-1.9.0/help/smtp.md new file mode 100644 index 0000000000..6753070d42 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/smtp.md @@ -0,0 +1,40 @@ +--- +id: smtp +title: Monitoring SMTP +sidebar_label: SMTP Monitor +keywords: [ open source monitoring tool, open source SMTP monitoring tool, monitoring SMTP metrics ] +--- + +> Collect and monitor the general performance Metrics of SMTP. + +```text +Determine whether the server is available through the hello command in SMTP +``` + +> see [https://datatracker.ietf.org/doc/html/rfc821#page-13](https://datatracker.ietf.org/doc/html/rfc821#page-13) + +**Protocol Use:SMTP** + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by SMTP | +| Email | Your email name, parameters for the hello command | +| Timeout | Allow collection response time | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:summary + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|----------------------------------------------------------------| +| responseTime | ms | The time it takes for the SMTP server to respond to a request. | +| response | | Response Status. | +| smtpBanner | | Banner of SMTP server. | +| heloInfo | | Response information returned by helo. | diff --git a/home/versioned_docs/version-1.9.0/help/spark.md b/home/versioned_docs/version-1.9.0/help/spark.md new file mode 100644 index 0000000000..9d8609871c --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/spark.md @@ -0,0 +1,114 @@ +--- +id: spark +title: Monitoring Spark +sidebar_label: Spark Monitor +keywords: [open source monitoring tool, open source java spark monitoring tool, monitoring spark metrics] +--- + +> Collect and monitor the general performance Metrics of Spark. + +**Protocol Use:JMX** + +## Spark App Enable JMX Protocol + +1. Add Spark `VM options` When Start Server ⚠️ customIP + +Refer: [https://spark.apache.org/docs/latest/spark-standalone.html](https://spark.apache.org/docs/latest/spark-standalone.html) + +**Monitoring configuration spark can be monitored by Master, Worker, driver, and executor. The Master and Worker can be monitored when the spark cluster is running, while the Driver and Executor need to be monitored for an app.** +**If you want to monitor them, perform the following steps to configure them** + +## First step + +**Modify $SPARK_HOME/conf/spark-env.sh to add the following statement:** + +```shell +# JMX Port to use +SPARK_DAEMON_JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" + +# export SPARK_DAEMON_JAVA_OPTS="$SPARK_DAEMON_JAVA_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT " +export SPARK_DAEMON_JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8712 " +``` + +The statement contains $JMX_PORT, the value of which can be customized, or a random number can be obtained as the port number. +If the port is customized to a specific value, and the spark Master and one of the workers are on the same machine, a port conflict will occur. + +## The second step + +**vim $SPARK_HOME/conf/metrics.properties to add the following statement:** + +```shell +*.sink.jmx.class=org.apache.spark.metrics.sink.JmxSink +master.source.jvm.class=org.apache.spark.metrics.source.JvmSource +worker.source.jvm.class=org.apache.spark.metrics.source.JvmSource +driver.source.jvm.class=org.apache.spark.metrics.source.JvmSource +executor.source.jvm.class=org.apache.spark.metrics.source.JvmSource +``` + +## The third step + +**vim $SPARK_HOME/conf/spark-defaults.conf, add the following items to set the monitoring port for the driver and executor. This port will be opened when programs are running.** + +```shell +spark.metrics.conf /opt/bigdata/spark/conf/metrics.properties +spark.driver.extraJavaOptions -XX:+PrintGCDetails -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.mana +gement.jmxremote.port=8712 + +spark.executor.extraJavaOptions -XX:+PrintGCDetails -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.mana +gement.jmxremote.port=8711 +``` + +With spark's Master and Worker running properly and spark-Submit submitting a program, the port number can be queried from linux. + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by JMX | +| Username | JMX connection user name, optional | +| Password | JMX connection password, optional | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:memory_pool + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| name | | metrics name | +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:code_cache (Only Support JDK8) + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:class_loading + +| Metric name | Metric unit | Metric help description | +|-----------------------|-------------|--------------------------| +| LoadedClassCount | | Loaded Class Count | +| TotalLoadedClassCount | | Total Loaded Class Count | +| UnloadedClassCount | | Unloaded Class Count | + +#### Metrics Set:thread + +| Metric name | Metric unit | Metric help description | +|-------------------------|-------------|----------------------------| +| TotalStartedThreadCount | | Total Started Thread Count | +| ThreadCount | | Thread Count | +| PeakThreadCount | | Peak Thread Count | +| DaemonThreadCount | | Daemon Thread Count | +| CurrentThreadUserTime | ms | Current Thread User Time | +| CurrentThreadCpuTime | ms | Current Thread Cpu Time | diff --git a/home/versioned_docs/version-1.9.0/help/spring_gateway.md b/home/versioned_docs/version-1.9.0/help/spring_gateway.md new file mode 100644 index 0000000000..87d05802aa --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/spring_gateway.md @@ -0,0 +1,90 @@ +--- +id: spring_gateway +title: Monitoring Spring Cloud Gateway +sidebar_label: Spring Cloud Gateway +keywords: [open source monitoring tool, open source Spring Cloud Gateway monitoring tool, monitoring Spring Cloud Gateway metrics] +--- + +> Collect and monitor the general performance metrics exposed by the SpringBoot actuator. + +## Pre-monitoring operations + +If you want to monitor information in `Spring Cloud Gateway` with this monitoring type, you need to integrate your `Spring Cloud Gateway` application and enable the SpringBoot Actuator. + +**1、Add POM .XML dependencies:** + +```xml + + org.springframework.boot + spring-boot-starter-actuator + +``` + +**2. Modify the YML configuration exposure metric interface:** + +```yaml +management: + endpoint: + gateway: + enabled: true + env: + show-values: ALWAYS + endpoints: + web: + exposure: + include: "*" +``` + +### Configure parameters + +| Parameter name | Parameter Help describes the | +|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | THE MONITORED PEER IPV4, IPV6 OR DOMAIN NAME. Note ⚠️ that there are no protocol headers (eg: https://, http://). | +| Monitoring Name | A name that identifies this monitoring that needs to be unique. | +| Port | The default port provided by the database is 8080. | +| Enable HTTPS | Whether to access the website through HTTPS, please note that ⚠️ when HTTPS is enabled, the default port needs to be changed to 443 | +| The acquisition interval is | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds | +| Whether to probe the | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation will continue only if the probe is successful | +| Description Comment | For more information identifying and describing the remarks for this monitoring, users can remark the information here | + +### Collect metrics + +#### metric Collection: Health + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|--------------------------| +| status | None | Service health: UP, Down | + +#### metric Collection: environment + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|-----------------------------------------------| +| profile | None | The application runs profile: prod, dev, test | +| port | None | Apply the exposed port | +| os | None | Run the operating system | +| os_arch | None | Run the operating system architecture | +| jdk_vendor | None | jdk vendor | +| jvm_version | None | jvm version | + +#### metric Collection: threads + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|----------------------------------| +| state | None | Thread status | +| number | None | This thread state corresponds to number of threads | + +#### metric Collection: memory_used + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|--------------------------------------| +| space | None | Memory space name | +| mem_used | MB | This space occupies a memory size of | + +#### metric Collection: route_info + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|---------------------------------------| +| route_id | None | Route id | +| predicate | None | This is a routing matching rule | +| uri | None | This is a service resource identifier | +| order | None | The priority of this route | diff --git a/home/versioned_docs/version-1.9.0/help/springboot2.md b/home/versioned_docs/version-1.9.0/help/springboot2.md new file mode 100644 index 0000000000..34dd59c215 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/springboot2.md @@ -0,0 +1,95 @@ +--- +id: springboot2 +title: Monitoring SpringBoot 2.0 +sidebar_label: SpringBoot 2.0 +keywords: [open source monitoring tool, open source springboot2 monitoring tool, monitoring springboot2 metrics] +--- + +> Collect and monitor the general performance metrics exposed by the SpringBoot 2.0 actuator. + +## Pre-monitoring operations + +If you want to monitor information in 'SpringBoot' with this monitoring type, you need to integrate your SpringBoot application and enable the SpringBoot Actuator. + +**1、Add POM .XML dependencies:** + +```xml + + org.springframework.boot + spring-boot-starter-actuator + +``` + +**2. Modify the YML configuration exposure metric interface:** + +```yaml +management: + endpoints: + web: + exposure: + include: '*' + enabled-by-default: true +``` + +*Note: If your project also introduces authentication related dependencies, such as springboot security, the interfaces exposed by SpringBoot Actor may be intercepted. In this case, you need to manually release these interfaces. Taking springboot security as an example, you should add the following code to the Security Configuration class:* + +```java +public class SecurityConfig extends WebSecurityConfigurerAdapter{ + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception{ + httpSecurity + // Configure the interfaces to be released ----------------------------------- + .antMatchers("/actuator/**").permitAll() + .antMatchers("/metrics/**").permitAll() + .antMatchers("/trace").permitAll() + .antMatchers("/heapdump").permitAll() + // 。。。 + // For other interfaces, please refer to: https://blog.csdn.net/JHIII/article/details/126601858 ----------------------------------- + } +} +``` + +### Configure parameters + +| Parameter name | Parameter Help describes the | +|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitor Host | THE MONITORED PEER IPV4, IPV6 OR DOMAIN NAME. Note ⚠️ that there are no protocol headers (eg: https://, http://). | +| Monitoring Name | A name that identifies this monitoring that needs to be unique. | +| Port | The default port provided by the database is 8080. | +| Enable HTTPS | Whether to access the website through HTTPS, please note that ⚠️ when HTTPS is enabled, the default port needs to be changed to 443 | +| Collection interval | Monitor the periodic data acquisition interval, in seconds, and the minimum interval that can be set is 30 seconds | +| Whether to probe | Whether to check the availability of the monitoring before adding a monitoring is successful, and the new modification operation | +| Description remarks | For more information identifying and describing the remarks for this monitoring, users can remark the information here | + +### Collect metrics + +#### metric Collection: Health + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|--------------------------| +| status | None | Service health: UP, Down | + +#### metric Collection: environment + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|-----------------------------------------------| +| profile | None | The application runs profile: prod, dev, test | +| port | None | Apply the exposed port | +| os | None | Run the operating system | +| os_arch | None | Run the operating system architecture | +| jdk_vendor | None | jdk vendor | +| jvm_version | None | jvm version | + +#### metric Collection: threads + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|----------------------------------| +| state | None | Thread status | +| number | None | This thread state corresponds to number of threads | + +#### metric Collection: memory_used + +| Metric Name | metric unit | Metrics help describe | +|-------------|-------------|------------------------------------------| +| space | None | Memory space name | +| mem_used | MB | This space occupies a memory size of | diff --git a/home/versioned_docs/version-1.9.0/help/springboot3.md b/home/versioned_docs/version-1.9.0/help/springboot3.md new file mode 100644 index 0000000000..061ca16430 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/springboot3.md @@ -0,0 +1,91 @@ +--- +id: springboot3 +title: Monitoring SpringBoot 3.0 +sidebar_label: SpringBoot 3.0 +keywords: [open source monitoring tool, open source springboot3 monitoring tool, monitoring springboot3 metrics] +--- + +> Collect and monitor the general performance metrics exposed by the SpringBoot 3.0 actuator. + +## Pre-monitoring operations + +If you want to monitor information in 'SpringBoot' with this monitoring type, you need to integrate your SpringBoot application and enable the SpringBoot Actuator. + +**1、Add POM .XML dependencies:** + +```xml + + org.springframework.boot + spring-boot-starter-actuator + +``` + +**2. Modify the YML configuration exposure metric interface:** + +```yaml +management: + endpoints: + web: + exposure: + include: '*' + enabled-by-default: true +``` + +*Note: If your project also introduces authentication related dependencies, such as springboot security, the interfaces exposed by SpringBoot Actor may be intercepted. In this case, you need to manually release these interfaces. Taking springboot security as an example, you should add the following code to the Security Configuration class:* + +```java +public class SecurityConfig extends WebSecurityConfigurerAdapter{ + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception{ + httpSecurity + // Configure the interfaces to be released ----------------------------------- + .antMatchers("/actuator/**").permitAll() + .antMatchers("/metrics/**").permitAll() + .antMatchers("/trace").permitAll() + .antMatchers("/heapdump").permitAll() + // ... + // For other interfaces, please refer to: https://blog.csdn.net/JHIII/article/details/126601858 ----------------------------------- + } +} +``` + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|-------------------|----------------------------------------------------------------------------------------------------------------------| +| Monitor Host | The monitored peer's IPV4, IPV6, or domain name. Note⚠️: Do not include protocol headers (eg: https://, http://). | +| Task Name | Identifies the name of this monitor, ensuring uniqueness is necessary. | +| Port | The port provided by the application service, default is 8080. | +| Enable SSL | Whether to access the website via HTTPS. Note⚠️: Enabling HTTPS generally requires changing the default port to 443. | +| Collector | Specifies which collector to use for scheduling data collection for this monitor. | +| Monitoring Period | Interval for periodically collecting data, in seconds, with a minimum interval of 30 seconds. | +| Bind Tags | Tags for categorizing and managing monitored resources. | +| Description | Additional identification and description for this monitor, where users can add remarks. | + +### Collection Metrics + +#### Metric Set: Availability + +| Metric Name | Unit | Metric Description | +|--------------|------|--------------------| +| responseTime | ms | Response time | + +#### Metric Set: Threads + +| Metric Name | Unit | Metric Description | +|-------------|------|----------------------------------| +| state | None | Thread state | +| size | None | Number of threads for this state | + +#### Metric Set: Memory Usage + +| Metric Name | Unit | Metric Description | +|-------------|------|-----------------------------| +| space | None | Memory space name | +| mem_used | MB | Memory usage for this space | + +#### Metric Set: Health Status + +| Metric Name | Unit | Metric Description | +|-------------|------|---------------------------------| +| status | None | Service health status: UP, Down | diff --git a/home/versioned_docs/version-1.9.0/help/sqlserver.md b/home/versioned_docs/version-1.9.0/help/sqlserver.md new file mode 100644 index 0000000000..916fa1f0b0 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/sqlserver.md @@ -0,0 +1,76 @@ +--- +id: sqlserver +title: Monitoring:SqlServer database monitoring +sidebar_label: SqlServer database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring sqlserver database metrics] +--- + +> Collect and monitor the general performance Metrics of SqlServer database. Support SqlServer 2017+. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 1433 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|-----------------------------------------------------------------------------| +| machine_name | none | Windows computer name running the server instance | +| server_name | none | Server and instance information SQL Server associated with Windows instance | +| version | none | Version of the instance,SQL Server,format is "major.minor.build.revision" | +| edition | none | The product SQL server version of the installed instance | +| start_time | none | Database start time | + +#### Metric set:performance_counters + +| Metric name | Metric unit | Metric help description | +|------------------------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| database_pages | none | Database pages, Number of pages obtained (buffer pool) | +| target_pages | none | Target pages, The desired number of pages that the buffer pool must have | +| page_life_expectancy | s | Page life expectancy. The time that data pages stay in the buffer pool. This time is generally greater than 300 | +| buffer_cache_hit_ratio | % | Buffer cache hit ratio, Database buffer pool cache hit rate. The probability that the requested data is found in the buffer pool is generally greater than 80%, otherwise the buffer pool capacity may be too small | +| checkpoint_pages_sec | none | Checkpoint pages/sec, The number of dirty pages written to the disk by the checkpoint per second. If the data is too high, it indicates that there is a lack of memory capacity | +| page_reads_sec | none | Page reads/sec, Number of pages read per second in the cache pool | +| page_writes_sec | none | Page writes/sec, Number of pages written per second in the cache pool | + +#### Metric set:connection + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|------------------------------| +| user_connection | none | Number of connected sessions | + +### Common Problem + +1. SSL connection problem fixed + +jdk version: jdk11 +Description of the problem: SQL Server 2019 uses the SA user connection to report an error +Error message: + +```text +The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:xxxxxxxxxxxxxxxxxxxx +``` + +Screenshot of the problem: +![issue](https://user-images.githubusercontent.com/38679717/206621658-c0741d48-673d-45ff-9a3b-47d113064c12.png) + +solution: +Use advanced settings when adding `SqlServer` monitoring, customize JDBC URL, add parameter configuration after the spliced jdbc url, ```;encrypt=true;trustServerCertificate=true;```This parameter true means unconditionally trust the server returned any root certificate. + +Example: ```jdbc:sqlserver://127.0.0.1:1433;DatabaseName=demo;encrypt=true;trustServerCertificate=true;``` + +Reference document: [microsoft pkix-path-building-failed-unable-to-find-valid-certification](https://techcommunity.microsoft.com/t5/azure-database-support-blog/pkix-path-building-failed-unable-to-find-valid-certification/ba-p/2591304) diff --git a/home/versioned_docs/version-1.9.0/help/ssl_cert.md b/home/versioned_docs/version-1.9.0/help/ssl_cert.md new file mode 100644 index 0000000000..f09c7c61b1 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/ssl_cert.md @@ -0,0 +1,33 @@ +--- +id: ssl_cert +title: Monitoring SSL Certificate +sidebar_label: SSL Monitor +keywords: [open source monitoring tool, open source ssl cert monitoring tool, monitoring website ssl metrics] +--- + +> Monitor the website's SSL certificate expiration time, response time and other Metrics + +## Configuration parameters + +| Parameter name | Parameter help description | +|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | The peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | The name that identifies this monitoring, and the name needs to be unique. | +| Port | The port provided by the website, https generally defaults to 443. | +| Relative path | The suffix path of the website address except the IP port, for example, `www.tancloud.io/console` The relative path of the website is `/console`. | +| Acquisition Interval | Interval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful | +| Description Remarks | More remark information to identify and describe this monitoring, users can remark information here | + +### Collect metrics + +#### Metric collection: certificate + +| Metric Name | Metric Unit | Metric Help Description | +|-----------------|-----------------|--------------------------| +| subject | none | certificate name | +| expired | no | expired or not | +| start_time | None | Validity start time | +| start_timestamp | ms millisecond | Validity start timestamp | +| end_time | None | Expiration time | +| end_timestamp | ms milliseconds | expiration timestamp | diff --git a/home/versioned_docs/version-1.9.0/help/starrocks_be.md b/home/versioned_docs/version-1.9.0/help/starrocks_be.md new file mode 100644 index 0000000000..fb41da07c1 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/starrocks_be.md @@ -0,0 +1,112 @@ +--- +id: starrocks_be +title: Monitoring StarRocks Database BE +sidebar_label: StarRocks Database BE +keywords: [Open Source Monitoring System, Open Source Database Monitoring, StarRocks Database BE Monitoring] +--- + +> Collect and monitor general performance metrics for StarRocks database BE. Supports StarRocks 2.4.0 and later versions. + +**Protocol: HTTP** + +## Pre-monitoring Operations + +Check the `be/conf/be.conf` file to obtain the value of the `http_port` configuration item, which is used for monitoring. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------|----------------------| +| Monitor Host | The monitored target's IPV4, IPV6, or domain name. Note: Without the protocol header (e.g., https://, http://) | +| Task Name | A unique name identifying this monitoring task | +| Port | The port provided by the database to the outside, default is 8040, get the value of the `http_port` configuration item | +| Query Timeout | The timeout for the connection to not respond, in milliseconds, default is 6000 milliseconds | +| Description | Additional notes and descriptions for this monitoring task | + +### Collection Metrics + +> For more metrics, please refer to the StarRocks official documentation: [General Monitoring Metrics](https://docs.mirrorship.cn/docs/administration/management/monitoring/metrics/). + +#### Metric Set: starrocks_be_cpu + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | CPU usage information returned by /proc/stat | + +#### Metric Set: starrocks_be_disks_state + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | State of each disk. 1 indicates that the disk is in use, and 0 indicates that the disk is not in use | + +#### Metric Set: starrocks_be_tablet_base_max_compaction_score + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Highest base compaction score of tablets in this BE | + +#### Metric Set: starrocks_be_tablet_cumulative_max_compaction_score + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Highest cumulative compaction score of tablets in this BE | + +#### Metric Set: starrocks_be_engine_requests_total + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Total count of all types of requests, including CREATE TABLE, Publish Version and Tablet Clone | + +#### Metric Set: starrocks_be_max_disk_io_util_percent + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | % | Maximum disk I/O utilization percentage | + +#### Metric Set: starrocks_be_disks_avail_capacity + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | MB | Available capacity of a specific disk | + +#### Metric Set: starrocks_be_disks_data_used_capacity + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | MB | Used capacity of each disk (represented by a storage path) | + +#### Metric Set: starrocks_be_load_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | Bytes | Total loaded bytes | + +#### Metric Set: starrocks_be_load_rows + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Total loaded rows | + +#### Metric Set: starrocks_be_process_mem_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | MB | Memory used by this process | + +#### Metric Set: starrocks_be_jemalloc_allocated_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | MB | Total number of bytes allocated by jemalloc | + +#### Metric Set: starrocks_be_network_receive_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | Bytes | Total bytes received via network | + +#### Metric Set: starrocks_be_network_send_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | Bytes | Number of bytes sent over the network | diff --git a/home/versioned_docs/version-1.9.0/help/starrocks_fe.md b/home/versioned_docs/version-1.9.0/help/starrocks_fe.md new file mode 100644 index 0000000000..4a8e0f4109 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/starrocks_fe.md @@ -0,0 +1,136 @@ +--- +id: starrocks_fe +title: Monitoring StarRocks Database FE +sidebar_label: StarRocks Database FE +keywords: [Open Source Monitoring System, Open Source Database Monitoring, StarRocks Database FE Monitoring] +--- + +> Collect and monitor general performance metrics for StarRocks database FE. Supports StarRocks 2.4.0 and later versions. + +**Protocol: HTTP** + +## Pre-monitoring Operations + +Check the `fe/conf/fe.conf` file to obtain the value of the `http_port` configuration item, which is used for monitoring. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|---------------|----------------------| +| Monitor Host | The monitored target's IPV4, IPV6, or domain name. Note: Without the protocol header (e.g., https://, http://) | +| Task Name | A unique name identifying this monitoring task | +| Port | The port provided by the database to the outside, default is 8030, get the value of the `http_port` configuration item | +| Query Timeout | The timeout for the connection to not respond, in milliseconds, default is 6000 milliseconds | +| Description | Additional notes and descriptions for this monitoring task | + +### Collection Metrics + +> For more metrics, please refer to the StarRocks official documentation: [General Monitoring Metrics](https://docs.mirrorship.cn/docs/administration/management/monitoring/metrics/). + +#### Metric Set: jvm_heap_size_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | Byte | JVM heap memory size | + +#### Metric Set: jvm_non_heap_size_bytes + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | Byte | JVM non-heap memory size | + +#### Metric Set: jvm_thread + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Number of JVM threads | + +#### Metric Set: starrocks_fe_query_err + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Number of failed queries | + +#### Metric Set: starrocks_fe_query_latency_ms + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | ms | Query response time | + +#### Metric Set: starrocks_fe_edit_log_write + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | Byte/s | Write speed of FE edit log | + +#### Metric Set: starrocks_fe_load_add + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Number of new load jobs | + +#### Metric Set: starrocks_fe_load_finished + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Number of finished load jobs | + +#### Metric Set: starrocks_fe_job + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | FE job status | + +#### Metric Set: starrocks_fe_tablet_max_compaction_score + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Indicates the highest Compaction Score on each BE node | + +#### Metric Set: starrocks_fe_meta_log_count + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | The number of Edit Logs without a checkpoint. A value within 100000 is reasonable | + +#### Metric Set: starrocks_fe_query_total + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Total number of queries | + +#### Metric Set: starrocks_fe_request_total + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Total number of requests | + +#### Metric Set: starrocks_fe_txn_reject + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Number of rejected transactions | + +#### Metric Set: starrocks_fe_txn_begin + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Number of beginning transactions | + +#### Metric Set: starrocks_fe_txn_success + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Number of successful transactions | + +#### Metric Set: starrocks_fe_txn_failed + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Number of failed transactions | + +#### Metric Set: starrocks_fe_connection_total + +| Metric Name | Metric Unit | Metric Help Description | +|------------|-------------|------------------------| +| value | None | Total number of FE connections | diff --git a/home/versioned_docs/version-1.9.0/help/status.md b/home/versioned_docs/version-1.9.0/help/status.md new file mode 100644 index 0000000000..daf362a0f5 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/status.md @@ -0,0 +1,73 @@ +--- +id: status +title: Status Page +sidebar_label: Status Page +keywords: [Open Source Monitoring System, Open Source Website Monitoring, Status Page] +--- + +Quickly build a powerful status page with HertzBeat to easily communicate the real-time status of your product services to users. For example, see GitHub's service status page [https://www.githubstatus.com](https://www.githubstatus.com). + +It supports the linkage synchronization between component status and monitoring status, provides a fault event maintenance management mechanism, and more. This enhances your transparency and professionalism, builds user trust, and reduces communication costs. + +## 1. Set Organization Information + +The fields that need to be filled in are as follows: + +| Field Name | Field Description | Example | +|--------------------------|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Organization Name | Name of the organization | HertzBeat | +| Organization Description | Detailed description of the organization | Apache HertzBeat™ is an easy-to-use and user-friendly open-source real-time monitoring and alerting system, no agent required, high-performance cluster, compatible with Prometheus, providing powerful custom monitoring and status page building capabilities. | +| Website Link | URL of the organization's website for more information | [https://hertzbeat.apache.org/](https://hertzbeat.apache.org/) | +| Logo Image | Path or URL of the organization's official logo image, preferably in .svg format | [https://hertzbeat.apache.org/zh-cn/img/hertzbeat-logo.svg](https://hertzbeat.apache.org/zh-cn/img/hertzbeat-logo.svg) | +| Feedback Address | Address to receive feedback | [https://github.com/apache/hertzbeat/issues](https://github.com/apache/hertzbeat/issues) | +| Theme Color | Main color tone of the status page | Click to select on the page | + +After filling in the organization information, click `Confirm`. + +![HertzBeat](/img/docs/help/status-3.png) + +## 2. Add Component + +After adding a component, the status page will display the status information of the component. + +Click `Add Component` to add the component to be monitored and fill in the following fields: + +| Field Name | Field Description | Example | +|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------| +| Service Component | Name of the component service | Development Environment ElasticSearch | +| Component Description | Detailed description of the component service | Development environment, ElasticSearch (ip:192.168.1.1) | +| Service Status Calculation Method | Method of calculating the service status of the component.
Automatic Calculation: Automatically calculate the status based on the monitored status of the component.
Manual Setting: Manually configure the component status. | Automatic Calculation / Manual Setting (Choose one) | +| Matching Tag | Status calculation associated tag, use the availability status data of all monitors associated with the tag to calculate the service status of the component. | Select the component tag on the page | + +### Set Status Calculation Time + +> Note: The service status is calculated every 300 seconds by default. + +Modify `application.yml`: + +```yaml +status: + calculate: + interval: 60 +``` + +![HertzBeat](/img/docs/help/status-4.png) + +## 3. Maintain Events + +When an event occurs, you can publish a notification on the status page. + +Click `Publish Event` + +![HertzBeat](/img/docs/help/status-1.png) + +| Field Name | Field Description | Example | +|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Event Name | Title of the event, should clearly reflect the core content of the event | "Server Downtime Event - April 5, 2023" | +| Affected Component | Select the components affected by this event | Select on the page | +| Process Status | Set the current status of the event for tracking the progress. Optional values: Investigating / Confirmed / Monitoring / Resolved | Confirmed | +| Publish Message | Official notification to convey to relevant parties, including event details, impact assessment, and countermeasures | Dear All, there is an issue with the development environment, the developers are urgently handling it, it is expected to be fixed within two hours. Please be patient, if you have urgent matters, please contact Tom: 130xxxx0000! | + +> Note: You can publish messages multiple times to keep the team updated on the current status. + +![HertzBeat](/img/docs/help/status-2.png) diff --git a/home/versioned_docs/version-1.9.0/help/synology_nas.md b/home/versioned_docs/version-1.9.0/help/synology_nas.md new file mode 100644 index 0000000000..9f5d5beb4c --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/synology_nas.md @@ -0,0 +1,128 @@ +--- +id: synology_nas +title: Monitoring:Synology NAS +sidebar_label: Synology NAS +keywords: [ open source monitoring tool, server monitoring, Synology Nas ] +--- + +> Collect and monitor the general performance Metrics of Synology NAS device. + +**Protocol Use: SNMP** + +## Pre-monitoring operations + +Please refer to [SNMP](https://kb.synology.com/en-global/DSM/help/DSM/AdminCenter/system_snmp) to enable SNMP service. Currently, SNMPv1, SNMPv2c and SNMPv3 protocols are supported. + +### Configuration parameter + +| Parameter name | Parameter help description | +|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Task Name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port of SNMP. The default is 161 | +| SNMP Version | SNMP version to use | +| SNMP Community | Used in SNMP v1 and SNMP v2c, used to complete authentication in SNMP Agent, in string form. Group name includes "read" and "write", when performing SNMP query operation, "read" group name is used for authentication; when performing SNMP setting operation, "write" group name is used for authentication. When performing SNMP query operation, "read" group name is used for authentication; when performing SNMP setting operation, "write" group name is used for authentication. | +| SNMP username | For SNMP v3, MSG username | +| SNMP contextName | For SNMP v3, used to determine the MIB view of the Context EngineID to the managed device | +| SNMP authPassword | For SNMP v3, SNMP authentication passwords | +| authPassword Encryption | For SNMP v3, SNMP authentication algorithm | +| SNMP privPassphrase | For SNMP v3, SNMP encrypted passwords | +| privPassword Encryption | For SNMP v3, SNMP encrypted algorithm | +| Timeout | Set the timeout time when querying unresponsive data, in milliseconds, the default is 6000 milliseconds | +| Intervals | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Description | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +Since there are too many metrics that can be queried, detailed metrics can be queried +on [SNMP MIB Guide](https://kb.synology.com/en-global/DG/Synology_DiskStation_MIB_Guide/3). + +This document only introduces the monitoring indicators queried in the monitor template. + +### Metric Set: system + +| Metric Name | Metric Unit | Metric Help Description | +|------------------|-------------|-------------------------| +| modelName | None | Model name of this NAS | +| serialNumber | None | Model serial number | +| version | None | The version of DSM | +| controllerNumber | None | The controller number | + +### Metric Set: status + +| Metric Name | Metric Unit | Metric Help Description | +|-----------------|---------------|---------------------------------------------------------| +| powerStatus | None | Power status,returns error if power supplies fail | +| systemFanStatus | None | System fan status, returns error if system fan fails | +| cpuFanStatus | None | CPU fan status, returns error if CPU fan fails | +| systemStatus | None | System partition status | +| thermalStatus | None | returns error if thermal status is abnormal | +| temperature | None | Temperature of this NAS | +| cpuUtilization | Percentage(%) | Utilization (%) is the sum of user and system CPU usage | +| memUtilization | Percentage(%) | Utilization (%) is the sum of memory usage | + +### Metric Set: disk + +| Metric Name | Metric Unit | Metric Help Description | +|------------------|-------------|-------------------------------------------------------------------| +| diskID | None | Disk name in DSM | +| diskModel | None | Disk model | +| diskType | None | Disk type, e.g. SATA, SSD | +| diskStatus | None | Current disk status | +| diskTemperature | None | Disk temperature | +| diskRole | None | The role of the disk in system | +| diskRetry | None | The count of each disk connection retries | +| diskBadSector | None | The count of each disk I/O bad sector | +| diskIdentifyFail | None | The count of each disk identify fails | +| diskRemainLife | None | The estimate remain life of each disk | +| diskName | None | Disk name which will keep the same value in different DSM version | +| diskHealthStatus | None | Current disk health status | + +### Metric Set: RAID + +| Metric Name | Metric Unit | Metric Help Description | +|-----------------|-------------|------------------------------------------------------------------------------------------| +| raidName | None | The name of each RAID in DSM | +| raidStatus | None | It shows the RAID status right now | +| raidFreeSize | None | The free size of volume / disk group | +| raidTotalSize | None | The total size of volume / disk group | +| raidHotspareCnt | None | Total hotspare disks count which can protect RAID (smaller than 0 means something wrong) | + +### Metric Set: S.M.A.R.T + +| Metric Name | Metric Unit | Metric Help Description | +|------------------------|-------------|--------------------------------------------------------| +| diskSMARTInfoDevName | None | Describes the disk to which this SMART info belongs to | +| diskSMARTAttrName | None | The name of the SMART info attribute | +| diskSMARTAttrId | None | SMART attribute ID number | +| diskSMARTAttrCurrent | None | SMART attribute current value | +| diskSMARTAttrWorst | None | SMART attribute worst value | +| diskSMARTAttrThreshold | None | SMART attribute threshold value | +| diskSMARTAttrRaw | None | SMART attribute raw value | +| diskSMARTAttrStatus | None | Status of this SMART info | + +### Metric Set: space io + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|---------------|---------------------------------------------------------| +| spaceIODevice | None | The name of the device this volume mounted on | +| spaceIOReads | None | The number of read accesses from this volume since boot | +| spaceIOWrites | None | The number of write accesses to this volume since boot | +| spaceIOLA | Percentage(%) | The load of disk in the volume | +| spaceIOLA1 | Percentage(%) | The 1 minute average load of disk in the volume | +| spaceIOLA5 | Percentage(%) | The 5 minute average load of disk in the volume | +| spaceIOLA15 | Percentage(%) | The 15 minute average load of disk in the volume | +| spaceUUID | None | The UUID of this volume | + +### Metric Set: storage io + +| Metric Name | Metric Unit | Metric Help Description | +|-----------------------|---------------|---------------------------------------------------------| +| storageIODevice | None | The name of the device we are counting/checking | +| storageIOReads | None | The number of read accesses from this device since boot | +| storageIOWrites | None | The number of write accesses to this device since boot | +| storageIOLA | Percentage(%) | The load of disk | +| storageIOLA1 | Percentage(%) | The 1-minute average load of disk | +| storageIOLA5 | Percentage(%) | The 5-minute average load of disk | +| storageIOLA15 | Percentage(%) | The 15-minute average load of disk | +| storageIODeviceSerial | None | The serial number of this device | diff --git a/home/versioned_docs/version-1.9.0/help/tdengine_promql.md b/home/versioned_docs/version-1.9.0/help/tdengine_promql.md new file mode 100644 index 0000000000..55a2a3a4e1 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/tdengine_promql.md @@ -0,0 +1,94 @@ +--- +id: tdengine_promql +title: Monitoring TDengine-PromQL +sidebar_label: TDengine-PromQL +keywords: [ Open Source Monitoring System, Open Source Middleware Monitoring, TDengine Monitoring, TDengine-PromQL Monitoring ] +--- + +> Use Prometheus PromQL to query general metric data from the Prometheus server to monitor TDengine. This solution is +> suitable for situations where Prometheus is already monitoring TDengine and you need to retrieve TDengine monitoring +> data from the Prometheus server. + +## Prerequisites + +1. Deploy TDengine; +2. Deploy taosKeeper; note that installing the official TDengine installation package will automatically install + taosKeeper. For details, please refer to: [taosKeeper](https://docs.tdengine.com/reference/components/taoskeeper/); +3. Collect monitoring metrics exposed by TDengine taosKeeper through prometheus; + +### Configuration parameters + +| Parameter Name | Parameter Description | +|---------------------|----------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | IP, IPv6, or domain name of the target being monitored. Note ⚠️: Do not include protocol header (e.g., https://, http://). | +| Monitoring name | Name to identify this monitoring, ensuring uniqueness of names. | +| Port | Prometheus API port, default: 9090. | +| Relative path | Relative path of Prometheus to query PromQL, default: /api/v1/query | +| Request mode | Set the request method for API calls: GET, POST, PUT, DELETE, default: GET | +| Enable HTTPS | Whether to access the website via HTTPS, note ⚠️: enabling HTTPS generally requires changing the corresponding port to 443 | +| Username | Username for Basic or Digest authentication when accessing the API. | +| Password | Password for Basic or Digest authentication when accessing the API. | +| Content-Type | Resource type when carrying BODY request data. | +| Request BODY | Set the BODY request data, effective for PUT and POST request methods. | +| Collection interval | Interval for periodic data collection in seconds, the minimum interval that can be set is 30 seconds | +| Description remarks | Additional remarks and descriptions for this monitoring. Users can add notes here. | + +### Collection indicators + +#### Indicator set: Basic information indicators + +| Indicator name | indicator unit | Indicators help describe | +|---------------------------------|----------------|--------------------------| +| taos_cluster_info_first_ep | none | first endpoint | +| taos_cluster_info_version | none | Version Information | +| taos_cluster_info_master_uptime | day | Master node runtime | + +#### Indicator set: Number of nodes indicator + +| Indicator name | indicator unit | Indicators help describe | +|---------------------------------|----------------|------------------------------------| +| taos_cluster_info_dnodes_total | none | Total number of dnodes | +| taos_cluster_info_dnodes_alive | none | Number of surviving dnodes | +| taos_cluster_info_mnodes_total | none | Total number of mnodes | +| taos_cluster_info_mnodes_alive | none | Number of surviving mnodes | +| taos_cluster_info_vgroups_total | none | Total number of virtual groups | +| taos_cluster_info_vgroups_alive | none | Number of surviving virtual groups | +| taos_cluster_info_vnodes_total | none | Total number of virtual nodes | +| taos_cluster_info_vnodes_alive | none | Number of surviving virtual nodes | + +### Indicator set: Database and table statistics + +| Indicator name | indicator unit | Indicators help describe | +|-------------------------------------|----------------|-----------------------------| +| taos_cluster_info_dbs_total | none | Total number of databases | +| taos_cluster_info_tbs_total | none | Total number of tables | +| taos_cluster_info_connections_total | day | total number of connections | + +### Indicator set: Dnode information + +| Indicator name | indicator unit | Indicators help describe | +| --- | --- | --- | +| taos_d_info_status | Ready indicates normal, offline indicates offline, and unknown indicates unknown. | dnode status | +| taos_dnodes_info_uptime | s | The startup time of this dnode | +| taos_dnodes_info_cpu_engine | none | The percentage of CPU used by the process of this dnode. | +| taos_dnodes_info_cpu_system | none | The percentage of CPU used by the system of the node where the dnode is located. | +| taos_dnodes_info_mem_engine | KB | Memory used by the process of this dnode | +| taos_dnodes_info_mem_system | KB | The memory used by the system of the node where the dnode is located. | +| taos_dnodes_info_disk_total | Byte | The total disk capacity of the node where the dnode is located. | +| taos_dnodes_info_disk_used | Byte | The amount of disk space used on the node where the dnode is located. | +| taos_dnodes_info_io_write_disk | Bytes per second | The disk IO write rate of the node where the dnode is located. | +| taos_dnodes_info_io_read_disk | Bytes per second | The disk IO read rate of the node where the dnode is located. | + +### Indicator set: taosadapter related + +| Indicator name | indicator unit | Indicators help describe | +|--------------------------------------|----------------|-------------------------------| +| total_requests_for_adapter_transfers | none | Total number of requests | +| taos_adapter_requests_success | none | Number of successful requests | +| taos_adapter_requests_fail | none | Number of failed requests | +| taos_adapter_requests_query | none | Number of query requests | + +### Other TDengine monitoring methods supported by HertzBeat + +1. Through the monitoring metrics exposed by taosKeeper, you can refer to [Prometheus Task](prometheus) to configure + Prometheus collection tasks for monitoring TDengine. diff --git a/home/versioned_docs/version-1.9.0/help/tidb.md b/home/versioned_docs/version-1.9.0/help/tidb.md new file mode 100644 index 0000000000..1a9582539d --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/tidb.md @@ -0,0 +1,70 @@ +--- +id: tidb +title: Monitoring:TiDB database monitoring +sidebar_label: TiDB database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring tidb database metrics] +--- + +> HertzBeat monitors general performance metrics of TiDB through HTTP and JDBC protocol. + +[Metrics Schema](https://docs.pingcap.com/tidb/stable/metrics-schema) + +[METRICS_SUMMARY](https://docs.pingcap.com/tidb/stable/information-schema-metrics-summary) + +[METRICS_TABLES](https://docs.pingcap.com/tidb/stable/information-schema-metrics-tables) + +**Protocol Use: HTTP and JDBC** + +## Driver selection + +TiDB monitoring keeps the HTTP part unchanged, and the SQL query part now follows the same automatic routing as MySQL: + +- If `mysql-connector-j` is present in `ext-lib`, the JVM collector or built-in server collector automatically prefers JDBC for the SQL query metric set. +- If `mysql-connector-j` is absent, HertzBeat automatically uses the built-in MySQL-compatible query engine for the SQL query metric set. No extra JAR is required. +- Restart HertzBeat or the standalone JVM collector after adding or removing a JAR in `ext-lib`. + +:::important Collector package selection +The TiDB template mixes HTTP metrics and MySQL-compatible SQL queries. + +- HTTP metric sets are unaffected by JDBC driver selection +- The built-in SQL query engine can collect the default TiDB `basic` metric set without `mysql-connector-j` +- If you explicitly place `mysql-connector-j` in `ext-lib`, the JVM collector or built-in server collector will still prefer JDBC for the SQL query path +::: + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Target Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Task name | Identify the name of this monitoring. The name needs to be unique | +| Service Port | The port that the TiDB database provides externally for status reporting is 10080 by default | +| PD Port | The PD port for the TiDB database, which defaults to 2379 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 6000ms | +| JDBC Port | The TiDB database externally provides the port used for client requests, which defaults to 4000 | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| JDBC URL | Database using [JDBC](https://docs.pingcap.com/tidb/stable/dev-guide-connect-to-tidb#jdbc) connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +The monitoring template will retrieve the monitoring metrics from the TiDB System Variables table, and the user can retrieve the [TiDB System Variables Table](https://docs.pingcap.com/tidb/stable/system-variables) by himself to query the required information or other system variables. + +Besides, TiDB also provides default monitoring metrics table, see [Metrics Schema](https://docs.pingcap.com/tidb/stable/metrics-schema) and [METRICS_SUMMARY](https://docs.pingcap.com/tidb/stable/information-schema-metrics-summary), and users can add their own sql codes according to their needs. + +Due to the large number of metrics that can be monitored, only the metrics queried in the monitoring template are described below. + +#### Metric set: global variables + +| Metric Name | Metric Unit | Metric Help Description | +|-------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| version | none | The MySQL version, followed by the TiDB version. For example '8.0.11-TiDB-v7.5.1'. | +| version_comment | none | The TiDB version. For example, 'TiDB Server (Apache License 2.0) Community Edition, MySQL 8.0 compatible'. | +| version_compile_machine | none | The name of the CPU architecture on which TiDB is running. | +| version_compile_os | none | The name of the OS on which TiDB is running. | +| max_connections | none | The maximum number of concurrent connections permitted for a single TiDB instance. This variable can be used for resources control. The default value 0 means no limit. When the value of this variable is larger than 0, and the number of connections reaches the value, the TiDB server rejects new connections from clients. | +| datadir | none | The location where data is stored. This location can be a local path /tmp/tidb, or point to a PD server if the data is stored on TiKV. A value in the format of `${pd-ip}:${pd-port}` indicates the PD server that TiDB connects to on startup. | +| port | none | The port that the tidb-server is listening on when speaking the MySQL protocol. | diff --git a/home/versioned_docs/version-1.9.0/help/time_expression.md b/home/versioned_docs/version-1.9.0/help/time_expression.md new file mode 100644 index 0000000000..afb87e28a9 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/time_expression.md @@ -0,0 +1,67 @@ +--- +id: time_expression +title: Time Expression +sidebar_label: Time Expression +keywords: [ dynamic time, time expressions ] +--- + +## Introduction + +HertzBeat supports using expressions to calculate relative time during monitoring collection, allowing for more flexible time definitions in monitoring templates. + +### Syntax + +```shell +${FORMATTER [{ + | - }`` ``]} +``` + +- `FORMATTER`: Determines the format of the expression's result +- `DURATION`: Size of the time period, a positive integer +- `TIME_UNIT`: Unit of the time period + +### Supported Formatting Types + +> Example outputs are based on the current time being `2022-04-24 02:40:00.123` + +| Name | Description | Example | +|--------------|----------------------------------|---------------------| +| @now | Formats as `yyyy-MM-dd HH:mm:ss` | 2022-04-24 02:40:00 | +| @date | Formats as `yyyy-MM-dd` | 2022-04-24 | +| @timestamp10 | Returns 10-digit timestamp | 1650768000 | +| @timestamp | Returns 13-digit timestamp | 1650768000000 | +| @time | Formats as `HH:mm:ss` | 02:40:00 | +| @year | Formats as `yyyy` | 2022 | +| @month | Formats as `MM` | 04 | +| @day | Formats as `dd` | 24 | +| @hour | Formats as `HH` | 02 | +| @minute | Formats as `mm` | 40 | +| @millisecond | Formats as `SSS` | 123 | +| @second | Formats as `ss` | 00 | + +### Supported Time Units + +| Name | Description | +|------|-------------| +| y | Year | +| M | Month | +| d | Day | +| H | Hour | +| m | Minute | +| s | Second | +| w | Week | + +#### Where to Use + +- Request path (URL) for HTTP protocol monitoring types +- Request parameters for HTTP protocol monitoring types +- Request headers for HTTP protocol monitoring types +- Request Body for HTTP protocol monitoring types + +#### Usage Examples + +1. Simple expression + - `${@now}` gets the current time and formats it as `yyyy-MM-dd HH:mm:ss` + - `${@time+1H}` calculates the time one hour from now and formats it as `HH:mm:ss` + - `${@time+1H+15m+30s}` calculates the time one hour, 15 minutes, and 30 seconds from now and formats it as `HH:mm:ss` +2. Complex expression template (if the built-in formatter does not meet your needs, you can combine multiple expressions) + - `${@year}年${@month}月${@day}日` returns the current date formatted as yyyy年MM月dd日 diff --git a/home/versioned_docs/version-1.9.0/help/tomcat.md b/home/versioned_docs/version-1.9.0/help/tomcat.md new file mode 100644 index 0000000000..3efaf400cf --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/tomcat.md @@ -0,0 +1,73 @@ +--- +id: tomcat +title: Monitor:Apache Tomcat +sidebar_label: Apache Tomcat +keywords: [open source monitoring tool, open source tomcat monitoring tool, monitoring tomcat metrics] +--- + +> Collect and monitor the general performance Metrics of Apache Tomcat. + +**Protocol Use:JMX** + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by JMX | +| Username | JMX connection user name, optional | +| Password | JMX connection password, optional | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metrics + +#### Metrics Set:memory_pool + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| name | | metrics name | +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:code_cache + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|-------------------------| +| committed | kb | total size | +| init | kb | init size | +| max | kb | max size | +| used | kb | used size | + +#### Metrics Set:class_loading + +| Metric name | Metric unit | Metric help description | +|-----------------------|-------------|--------------------------| +| LoadedClassCount | | Loaded Class Count | +| TotalLoadedClassCount | | Total Loaded Class Count | +| UnloadedClassCount | | Unloaded Class Count | + +#### Metrics Set:thread + +| Metric name | Metric unit | Metric help description | +|-------------------------|-------------|----------------------------| +| TotalStartedThreadCount | | Total Started Thread Count | +| ThreadCount | | Thread Count | +| PeakThreadCount | | Peak Thread Count | +| DaemonThreadCount | | Daemon Thread Count | +| CurrentThreadUserTime | ms | Current Thread User Time | +| CurrentThreadCpuTime | ms | Current Thread Cpu Time | + +### Tomcat Enable JMX Protocol + +1. After building tomcat, enter the bin directory under tomcat and modify the catalina.sh file + +2. vim catalina.sh Attention⚠️ Replace Hostname And Port + +```aidl +CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=10.1.1.52 -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" +``` diff --git a/home/versioned_docs/version-1.9.0/help/ubuntu.md b/home/versioned_docs/version-1.9.0/help/ubuntu.md new file mode 100644 index 0000000000..3ce3a4b061 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/ubuntu.md @@ -0,0 +1,165 @@ +--- +id: ubuntu +title: Monitoring:Ubuntu operating system monitoring +sidebar_label: Ubuntu operating system +keywords: [open source monitoring tool, open source linux ubuntu monitoring tool, monitoring ubuntu metrics] +--- + +> Collect and monitor the general performance Metrics of Ubuntu operating system. + +## Configuration parameter + +| Parameter Name | Parameter Help Description | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitored Host | The IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ No protocol header (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring, which must be unique. | +| Port | The port provided by Linux SSH, default is 22. | +| Timeout | Sets the connection timeout in milliseconds, default is 6000 ms. | +| Connection Reuse | Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. | +| Use Proxy Connection | Sets Whether connect via proxy, default is false. | +| Username | SSH connection username, optional. | +| Password | SSH connection password, optional. | +| Collector | Configures which collector is used to schedule data collection for this monitoring. | +| Monitoring Period | The interval time for periodic data collection in seconds, with a minimum interval of 30 seconds. | +| Binding Tags | Used for categorized management of monitoring resources. | +| Description | Additional notes and descriptions for this monitoring, where users can make notes. | +| PrivateKey | The private key required to connect to the server. | +| PrivateKey PassPhrase | The password phrase used to encrypt the SSH private key. If the private key was generated with a passphrase, this field must be filled to decrypt and use the key for authentication. | +| Proxy Host | The address of the proxy server, supporting IPV4, IPV6, or domain name format. Required when using SSH jump host to access the target host. | +| Proxy Port | The port number of the proxy service, default is 22. | +| Proxy Username | The authentication username required to connect to the proxy server. | +| Proxy Username | The authentication password required to connect to the proxy server. | +| Proxy PrivateKey | The private key required to authenticate with the proxy server. | + +### Collected Metrics + +### Data Collection Metrics + +#### Metric Set: Basic System Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| hostname | None | Host name | +| version | None | System version | +| uptime | None | System Uptime | + +#### Metric Set: CPU Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-----------------------------------| +| info | None | CPU model | +| cores | None | Number of CPU cores | +| interrupt | None | Number of CPU interrupts | +| load | None | Average CPU load (1/5/15 minutes) | +| context_switch | None | Number of context switches | +| usage | % | CPU usage | + +#### Metric Set: Memory Information + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------------------| +| total | Mb | Total memory capacity | +| used | Mb | Memory used by user programs | +| free | Mb | Free memory capacity | +| buff_cache | Mb | Memory used for cache | +| available | Mb | Remaining available memory capacity | +| usage | % | Memory usage rate | + +#### Metric Set: Disk Information + +| Metric Name | Metric Unit | Metric Help Description | +|---------------|-------------|----------------------------------------| +| disk_num | None | Total number of disks | +| partition_num | None | Total number of partitions | +| block_write | None | Total number of blocks written to disk | +| block_read | None | Total number of blocks read from disk | +| write_rate | iops | Disk block write rate per second | + +#### Metric Set: Network Card Information + +| Metric Name | Metric Unit | Metric Help Description | +|----------------|-------------|-------------------------------| +| interface_name | None | Network card name | +| receive_bytes | Byte | Inbound data traffic (bytes) | +| transmit_bytes | Byte | Outbound data traffic (bytes) | + +#### Metric Set: File System + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| filesystem | None | Name of the file system | +| used | Mb | Used disk size | +| available | Mb | Available disk size | +| usage | % | Usage rate | +| mounted | None | Mount point directory | + +#### Metric Set: Top 10 CPU Processes + +Statistics for the top 10 processes using the CPU. Statistics include: process ID, CPU usage, memory usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| cpu_usage | % | CPU usage | +| mem_usage | % | Memory usage | +| command | None | Executed command | + +#### Metric Set: Top 10 Memory Processes + +Statistics for the top 10 processes using memory. Statistics include: process ID, memory usage, CPU usage, and executed command. + +| Metric Name | Metric Unit | Metric Help Description | +|-------------|-------------|-------------------------| +| pid | None | Process ID | +| mem_usage | % | Memory usage | +| cpu_usage | % | CPU usage | +| command | None | Executed command | + +#### Other Metric Set: Average CPU Temperature Across All Cores + +| Metric Name | Metric Unit | Metric help description | +|--------------|-------------|-------------------------| +| avg_cpu_temp | C | Average Temp All Cores | + +* Note: This indicator information relies on the hardware sensor monitoring tool (lm-sensors). Please confirm that the Ubuntu operating system can obtain monitoring information normally. You can add the following indicator collection configuration as needed. + +```yaml +metrics: + - name: avg_cpu_temp + i18n: + zh-CN: 所有核心的平均CPU温度 + en-US: Average CPU Temperature Across All Cores + priority: 4 + fields: + - field: avg_cpu_temp + type: 1 + label: true + unit: 'C' + i18n: + zh-CN: 所有核心的平均温度 + en-US: Average Temp All Cores + protocol: ssh + ssh: + host: ^_^host^_^ + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + privateKey: ^_^privateKey^_^ + privateKeyPassphrase: ^_^privateKeyPassphrase^_^ + timeout: ^_^timeout^_^ + reuseConnection: ^_^reuseConnection^_^ + script: sensors | grep "^Core\s[0-9\d+\:]" | awk '{print $3}' | sed "s/°C/\ /g" | awk '{ total += $1; count++ } END { print total/count }' + parseType: oneRow + # whether to use proxy server for ssh connection + useProxy: ^_^useProxy^_^ + # ssh proxy host: ipv4 domain + proxyHost: ^_^proxyHost^_^ + # ssh proxy port + proxyPort: ^_^proxyPort^_^ + # ssh proxy username + proxyUsername: ^_^proxyUsername^_^ + # ssh proxy password + proxyPassword: ^_^proxyPassword^_^ + # ssh proxy private key + proxyPrivateKey: ^_^proxyPrivateKey^_^ +``` diff --git a/home/versioned_docs/version-1.9.0/help/udp_port.md b/home/versioned_docs/version-1.9.0/help/udp_port.md new file mode 100644 index 0000000000..e07deac1c3 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/udp_port.md @@ -0,0 +1,31 @@ +--- +id: udp_port +title: Monitoring UDP port availability +sidebar_label: UDP Port availability +keywords: [open source monitoring tool, open source port monitoring tool, monitoring UDP port metrics] +--- + +> UDP is a connectionless transport layer protocol. We determine the availability status of its ports by sending request packets at the application layer and receiving responses. The configuration information requires filling in the hexadecimal content of the application layer packets that prompt responses from the peer. We recommend using Wireshark for packet capture to obtain the transmitted packet content. +> You can click on `Create UDP Port Availability` to configure or select `More Actions` to import existing configurations. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️ Without protocol header (eg: https://, http://). | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique. | +| Port | Ports provided by website. | +| Connection timeout | The waiting timeout for port connections, in milliseconds. Default is 6000 milliseconds. | +| Sent Packet Content | The hexadecimal content of the application layer packet that prompts a response from the peer. | +| Collector | Specifies which collector to use for scheduling collection for this monitoring. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Bind Tags | Classification management tags for monitoring resources. | +| Description | For more information about identifying and describing this monitoring, users can note information here. | + +### Collection Metric + +#### Metric set:summary + +| Metric name | Metric unit | Metric help description | +|---------------|-------------------|-------------------------| +| Response Time | Milliseconds (ms) | Website response time | diff --git a/home/versioned_docs/version-1.9.0/help/uniview.md b/home/versioned_docs/version-1.9.0/help/uniview.md new file mode 100644 index 0000000000..70a094db98 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/uniview.md @@ -0,0 +1,47 @@ +--- +id: uniview +title: Monitor Uniview Devices +sidebar_label: Uniview +keywords: [ monitor, uniview ] +--- + +> Monitor Uniview devices through HTTP interface. + +## Configuration + +| Parameter | Description | +| ----------- | ----------- | +| Host | Device IP/Domain | +| Name | Unique identifier | +| Port | Default 80 | +| Timeout | Milliseconds | +| Username | Auth username | +| Password | Auth password | +| SSL | HTTPS Enable | +| Interval | ≥30 seconds | + +## Metrics + +### System Info + +- Device Name +- Serial Number +- Firmware Version +- Device Model + +### NTP Info + +- NTP Server IP +- NTP Port +- Sync Interval +- NTP Status + +## Implementation + +Access device APIs: + +1. System: `/LAPI/V1.0/System/DeviceInfo` + +2. NTP: `/LAPI/V1.0/System/Time/NTP` + +Using Digest Authentication and parsing JSON responses. diff --git a/home/versioned_docs/version-1.9.0/help/valkey.md b/home/versioned_docs/version-1.9.0/help/valkey.md new file mode 100644 index 0000000000..6a82a0fcda --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/valkey.md @@ -0,0 +1,234 @@ +--- +id: valkey +title: Monitoring Valkey database +sidebar_label: Valkey +keywords: [ open source monitoring tool, open source valkey monitoring tool, monitoring valkey metrics ] +--- + +> Collect and monitor the general performance Metrics of Valkey database. Support Valkey 7.0+. + +## Configuration parameter + +| Parameter name | Parameter help description | +|--------|------------------------------------------------------| +| Target Host | The IP, IPV6, or domain name of the monitored endpoint. Note ⚠️: Do not include protocol headers (eg: https://, http://). | +| Port | The HTTP port provided by Valkey, default value is 6379, sentinel node`s default value is 26379 | +| Timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | + +### Collection Metric + +#### Metric set:server + +| Metric name | Metric unit | Metric help description | +|--------------------------|------|-----------------------------------------------| +| valkey_version | none | Version of the Valkey server | +| valkey_git_sha1 | none | Git SHA1 | +| valkey_git_dirty | none | Git dirty flag | +| valkey_build_id | none | The build id | +| valkey_mode | none | The server's mode ("standalone", "sentinel" or "cluster") | +| os | none | Operating system hosting the Valkey server | +| arch_bits | none | Architecture (32 or 64 bits) | +| multiplexing_api | none | Event loop mechanism used by Valkey | +| atomicvar_api | none | Atomicvar API used by Valkey | +| gcc_version | none | Version of the GCC compiler used to compile the Valkey server | +| process_id | none | PID of the server process | +| process_supervised | none | Supervised system ("upstart", "systemd", "unknown" or "no") | +| run_id | none | Random value identifying the Valkey server (to be used by Sentinel and Cluster) | +| tcp_port | none | TCP/IP listen port | +| server_time_usec | none | Epoch-based system time with microsecond precision | +| uptime_in_seconds | none | Number of seconds since Valkey server start | +| uptime_in_days | none | Same value expressed in days | +| hz | none | The server's current frequency setting | +| configured_hz | none | The server's configured frequency setting | +| lru_clock | none | Clock incrementing every minute, for LRU management | +| executable | none | The path to the server's executable | +| config_file | none | The path to the config file | +| io_threads_active | none | Flag indicating if I/O threads are active | +| shutdown_in_milliseconds | none | The maximum time remaining for replicas to catch up the replication before completing the shutdown sequence. This field is only present during shutdown. | + +#### Metric set:clients + +| Metric name | Metric unit | Metric help description | +|---------------------------------|------|--------------------------------------------------------------------------------| +| connected_clients | none | Number of client connections (excluding connections from replicas) | +| cluster_connections | none | An approximation of the number of sockets used by the cluster's bus | +| maxclients | none | The value of the maxclients configuration directive. This is the upper limit for the sum of connected_clients, connected_slaves and cluster_connections. | +| client_recent_max_input_buffer | byte | Biggest input buffer among current client connections | +| client_recent_max_output_buffer | byte | Biggest output buffer among current client connections | +| blocked_clients | none | Number of clients pending on a blocking call (BLPOP, BRPOP, BRPOPLPUSH, BLMOVE, BZPOPMIN, BZPOPMAX) | +| tracking_clients | none | Number of clients being tracked (CLIENT TRACKING) | +| clients_in_timeout_table | none | Number of clients in the clients timeout table | + +#### Metric set:memory + +| Metric name | Metric unit | Metric help description | +|---------------------------|----------|-----------------------------------------------------------------------------------------------| +| used_memory | byte | Total number of bytes allocated by Valkey using its allocator (either standard libc, jemalloc, or an alternative allocator such as tcmalloc) | +| used_memory_human | GB/MB/KB | Human readable representation of previous value | +| used_memory_rss | byte | Number of bytes that Valkey allocated as seen by the operating system (a.k.a resident set size). This is the number reported by tools such as top(1) and ps(1) | +| used_memory_rss_human | GB/MB/KB | Human readable representation of previous value值 | +| used_memory_peak | byte | Peak memory consumed by Valkey (in bytes) | +| used_memory_peak_human | GB/MB/KB | Human readable representation of previous value | +| used_memory_peak_perc | none | The percentage of used_memory_peak out of used_memory | +| used_memory_overhead | byte | The sum in bytes of all overheads that the server allocated for managing its internal data structures | +| used_memory_startup | byte | Initial amount of memory consumed by Valkey at startup in bytes | +| used_memory_dataset | byte | The size in bytes of the dataset (used_memory_overhead subtracted from used_memory) | +| used_memory_dataset_perc | none | The percentage of used_memory_dataset out of the net memory usage (used_memory minus used_memory_startup) | +| allocator_allocated | byte | Total bytes allocated form the allocator, including internal-fragmentation. Normally the same as used_memory. | +| allocator_active | byte | Total bytes in the allocator active pages, this includes external-fragmentation. | +| allocator_resident | byte | Total bytes resident (RSS) in the allocator, this includes pages that can be released to the OS (by MEMORY PURGE, or just waiting). | +| total_system_memory | byte | The total amount of memory that the Valkey host has | +| total_system_memory_human | GB/MB/KB | Human readable representation of previous value | +| used_memory_lua | byte | Number of bytes used by the Lua engine for EVAL scripts. Deprecated in Valkey 7.0, renamed to used_memory_vm_eval | +| used_memory_lua_human | KB | Human readable representation of previous value. Deprecated in Valkey 7.0 | +| used_memory_scripts | byte | used_memory_scripts_eval + used_memory_functions (part of used_memory). Added in Valkey 7.0 | +| used_memory_scripts_human | GB/MB/KB | Human readable representation of previous value | +| number_of_cached_scripts | none | The number of EVAL scripts cached by the server. Added in Valkey 7.0 | +| maxmemory | byte | The value of the maxmemory configuration directive | +| maxmemory_human | GB/MB/KB | Human readable representation of previous value | +| maxmemory_policy | none | The value of the maxmemory-policy configuration directive | +| allocator_frag_ratio | none | Ratio between allocator_active and allocator_allocated. This is the true (external) fragmentation metric (not mem_fragmentation_ratio). | +| allocator_frag_bytes | byte | Delta between allocator_active and allocator_allocated. See note about mem_fragmentation_bytes. | +| allocator_rss_ratio | | Ratio between allocator_resident and allocator_active. | +| allocator_rss_bytes | byte | Delta between allocator_resident and allocator_active | +| rss_overhead_ratio | none | Ratio between used_memory_rss (the process RSS) and allocator_resident. This includes RSS overheads that are not allocator or heap related. | +| rss_overhead_bytes | byte | Delta between used_memory_rss (the process RSS) and allocator_resident | +| mem_fragmentation_ratio | none | Ratio between used_memory_rss and used_memory. Note that this doesn't only includes fragmentation, but also other process overheads (see the allocator_* metrics), and also overheads like code, shared libraries, stack, etc. | +| mem_fragmentation_bytes | byte | Delta between used_memory_rss and used_memory. Note that when the total fragmentation bytes is low (few megabytes), a high ratio (e.g. 1.5 and above) is not an indication of an issue. | +| mem_not_counted_for_evict | byte | Used memory that's not counted for key eviction. This is basically transient replica and AOF buffers. | +| mem_replication_backlog | byte | Memory used by replication backlog | +| mem_clients_slaves | none | Memory used by replica clients - Starting Valkey 7.0, replica buffers share memory with the replication backlog, so this field can show 0 when replicas don't trigger an increase of memory usage. | +| mem_clients_normal | none | Memory used by normal clients | +| mem_aof_buffer | none | Transient memory used for AOF and AOF rewrite buffers | +| mem_allocator | none | Memory allocator, chosen at compile time. | +| active_defrag_running | none | When activedefrag is enabled, this indicates whether defragmentation is currently active, and the CPU percentage it intends to utilize. | +| lazyfree_pending_objects | none | The number of objects waiting to be freed (as a result of calling UNLINK, or FLUSHDB and FLUSHALL with the ASYNC option) | +| lazyfreed_objects | none | The number of objects that have been lazy freed. | + +#### Metric set:persistence + +| Metric name | Metric unit | Metric help description | +|------------------------------|--------|-----------------------------------------------------------------------------------------------------| +| loading | none | Flag indicating if the load of a dump file is on-going | +| current_cow_size | byte | The size in bytes of copy-on-write memory while a child fork is running | +| current_cow_size_age | second | The age, in seconds, of the current_cow_size value. | +| current_fork_perc | none | The percentage of progress of the current fork process. For AOF and RDB forks it is the percentage of current_save_keys_processed out of | +| current_save_keys_processed | none | Number of keys processed by the current save operation | +| current_save_keys_total | none | Number of keys at the beginning of the current save operation | +| rdb_changes_since_last_save | none | Number of changes since the last dump | +| rdb_bgsave_in_progress | none | Flag indicating a RDB save is on-going | +| rdb_last_save_time | second | Epoch-based timestamp of last successful RDB save | +| rdb_last_bgsave_status | none | Status of the last RDB save operation | +| rdb_last_bgsave_time_sec | second | Duration of the last RDB save operation in seconds | +| rdb_current_bgsave_time_sec | none | Duration of the on-going RDB save operation if any | +| rdb_last_cow_size | none | The size in bytes of copy-on-write memory during the last RDB save operation | +| aof_enabled | none | Flag indicating AOF logging is activated | +| aof_rewrite_in_progress | none | Flag indicating a AOF rewrite operation is on-going | +| aof_rewrite_scheduled | none | Flag indicating an AOF rewrite operation will be scheduled once the on-going RDB save is complete. | +| aof_last_rewrite_time_sec | none | Duration of the last AOF rewrite operation in seconds | +| aof_current_rewrite_time_sec | second | Duration of the on-going AOF rewrite operation if any | +| aof_last_bgrewrite_status | none | Status of the last AOF rewrite operation | +| aof_last_write_status | none | Status of the last write operation to the AOF | +| aof_last_cow_size | none | The size in bytes of copy-on-write memory during the last AOF rewrite operation | +| module_fork_in_progress | none | Flag indicating a module fork is on-going | +| module_fork_last_cow_size | none | The size in bytes of copy-on-write memory during the last module fork operation | + +#### Metric set:stats + +| Metric name | Metric unit | Metric help description | +|--------------------------------|------|----------------------------------------------------| +| total_connections_received | none | Total number of connections accepted by the server | +| total_commands_processed | none | Total number of commands processed by the server | +| instantaneous_ops_per_sec | none | Number of commands processed per second | +| total_net_input_bytes | byte | The total number of bytes read from the network | +| total_net_output_bytes | byte | The total number of bytes written to the network | +| instantaneous_input_kbps | KB/S | The network's read rate per second in KB/sec | +| instantaneous_output_kbps | KB/S | The network's write rate per second in KB/sec | +| rejected_connections | none | Number of connections rejected because of maxclients limit | +| sync_full | none | The number of full resyncs with replicas | +| sync_partial_ok | none | The number of accepted partial resync requests | +| sync_partial_err | none | The number of denied partial resync requests | +| expired_keys | none | Total number of key expiration events | +| expired_stale_perc | none | The percentage of keys probably expired | +| expired_time_cap_reached_count | none | The count of times that active expiry cycles have stopped early | +| expire_cycle_cpu_milliseconds | none | The cumulative amount of time spent on active expiry cycles | +| evicted_keys | none | Number of evicted keys due to maxmemory limit | +| keyspace_hits | none | Number of successful lookup of keys in the main dictionary | +| keyspace_misses | none | Number of failed lookup of keys in the main dictionary | +| pubsub_channels | none | Global number of pub/sub channels with client subscriptions | +| pubsub_patterns | none | Global number of pub/sub pattern with client subscriptions | +| latest_fork_usec | none | Duration of the latest fork operation in microseconds | +| total_forks | none | Total number of fork operations since the server start | +| migrate_cached_sockets | none | The number of sockets open for MIGRATE purposes | +| slave_expires_tracked_keys | none | The number of keys tracked for expiry purposes (applicable only to writable replicas) | +| active_defrag_hits | none | Number of value reallocations performed by active the defragmentation process | +| active_defrag_misses | none | Number of aborted value reallocations started by the active defragmentation process | +| active_defrag_key_hits | none | Number of keys that were actively defragmented | +| active_defrag_key_misses | none | Number of keys that were skipped by the active defragmentation process | +| tracking_total_keys | none | Number of keys being tracked by the server | +| tracking_total_items | none | Number of items, that is the sum of clients number for each key, that are being tracked | +| tracking_total_prefixes | none | Number of tracked prefixes in server's prefix table (only applicable for broadcast mode) | +| unexpected_error_replies | none | Number of unexpected error replies, that are types of errors from an AOF load or replication | +| total_error_replies | none | Total number of issued error replies, that is the sum of rejected commands (errors prior command execution) and failed commands (errors within the command execution) | +| dump_payload_sanitizations | none | Total number of dump payload deep integrity validations (see sanitize-dump-payload config). | +| total_reads_processed | none | Total number of read events processed | +| total_writes_processed | none | Total number of write events processed | +| io_threaded_reads_processed | none | Number of read events processed by the main and I/O threads | +| io_threaded_writes_processed | none | Number of write events processed by the main and I/O threads | + +#### Metric set:replication + +| Metric name | Metric unit | Metric help description | +|--------------------------------|------|-------------------------------------------------------------------------------------| +| role | none | Value is "master" if the instance is replica of no one, or "slave" if the instance is a replica of some master instance. Note that a replica can be master of another replica (chained replication). | +| connected_slaves | none | Number of connected replicas | +| master_failover_state | none | The state of an ongoing failover, if any. | +| master_replid | none | The replication ID of the Valkey server. | +| master_replid2 | none | The secondary replication ID, used for PSYNC after a failover. | +| master_repl_offset | none | The server's current replication offset | +| second_repl_offset | none | The offset up to which replication IDs are accepted | +| repl_backlog_active | none | Flag indicating replication backlog is active | +| repl_backlog_size | byte | Total size in bytes of the replication backlog buffer | +| repl_backlog_first_byte_offset | none | The master offset of the replication backlog buffer | +| repl_backlog_histlen | none | Size in bytes of the data in the replication backlog buffer | + +#### Metric set:cpu + +| Metric name | Metric unit | Metric help description | +|---------------------------|------|------------------------| +| used_cpu_sys | none | System CPU consumed by the Valkey server, which is the sum of system CPU consumed by all threads of the server process (main thread and background threads) | +| used_cpu_user | none | User CPU consumed by the Valkey server, which is the sum of user CPU consumed by all threads of the server process (main thread and background threads) | +| used_cpu_sys_children | none | System CPU consumed by the background processes | +| used_cpu_user_children | none | User CPU consumed by the background processes | +| used_cpu_sys_main_thread | none | System CPU consumed by the Valkey server main thread | +| used_cpu_user_main_thread | none | User CPU consumed by the Valkey server main thread | + +#### Metric set:errorstats + +| Metric name | Metric unit | Metric help description | +|-------------------|------|-----------| +| errorstat_ERR | none | ERR count | +| errorstat_MISCONF | none | MISCONF count | + +#### Metric set:cluster + +| Metric name | Metric unit | Metric help description | +|-----------------|------|--------------------| +| cluster_enabled | none | Indicate Valkey cluster is enabled | + +#### Metric set:commandstats + +| Metric name | Metric unit | Metric help description | +|---------------|------|---------------------------------------------------------------------------------------------------------------------------| +| cmdstat_set | none | set command stat | +| cmdstat_get | none | get command stat | +| cmdstat_setnx | none | setnx command stat | +| cmdstat_hset | none | hset command stat | +| cmdstat_hget | none | hget command stat | +| cmdstat_lpush | none | lpush command stat | +| cmdstat_rpush | none | rpush command stat | +| cmdstat_lpop | none | lpop command stat | +| cmdstat_rpop | none | rpop command stat | +| cmdstat_llen | none | llen command stat | diff --git a/home/versioned_docs/version-1.9.0/help/vastbase.md b/home/versioned_docs/version-1.9.0/help/vastbase.md new file mode 100644 index 0000000000..44a8d0278b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/vastbase.md @@ -0,0 +1,55 @@ +--- +id: vastbase +title: Monitoring:Vastbase database monitoring +sidebar_label: Vastbase database +keywords: [open source monitoring tool, open source database monitoring tool, monitoring vastbase database metrics] +--- + +> Collect and monitor the general performance Metrics of PostgreSQL database. Support PostgreSQL 10+. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored Host address. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by the database. The default is 5432 | +| Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | +| Database name | Database instance name, optional | +| Username | Database connection user name, optional | +| Password | Database connection password, optional | +| URL | Database connection URL,optional,If configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:basic + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|-------------------------------------------| +| server_version | none | Version number of the database server | +| port | none | Database server exposure service port | +| server_encoding | none | Character set encoding of database server | +| data_directory | none | Database storage data disk address | +| max_connections | connections | Database maximum connections | + +#### Metric set:state + +| Metric name | Metric unit | Metric help description | +|----------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| name | none | Database name, or share-object is a shared object | +| conflicts | times | The number of queries canceled in the database due to a conflict with recovery | +| deadlocks | number | Number of deadlocks detected in the database | +| blks_read | times | The number of disk blocks read in the database | +| blks_hit | times | Times the disk block has been found to be in the buffer, so there is no need to read it once (This only includes hits in the Vastbase buffer, not in the operating system file system buffer) | +| blk_read_time | ms | Time spent by the backend reading data file blocks in the database | +| blk_write_time | ms | Time spent by the backend writing data file blocks in the database | +| stats_reset | none | The last time these statistics were reset | + +#### Metric set:activity + +| Metric name | Metric unit | Metric help description | +|-------------|-------------|--------------------------------------| +| running | connections | Number of current client connections | diff --git a/home/versioned_docs/version-1.9.0/help/website.md b/home/versioned_docs/version-1.9.0/help/website.md new file mode 100644 index 0000000000..a2bf43a5d8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/website.md @@ -0,0 +1,29 @@ +--- +id: website +title: Monitoring Website +sidebar_label: Website Monitor +keywords: [open source monitoring tool, open source website monitoring tool, monitoring website metrics] +--- + +> Monitor whether the website is available, response time and other Metrics. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Ports provided by website, http generally defaults to 80 and https generally defaults to 443 | +| Relative path | Suffix path of website address except IP port. For example, the relative path of `www.tancloud.io/console` website is `/console` | +| Enable HTTPS | Whether to access the website through HTTPS. Note⚠️When HTTPS is enabled, the default corresponding port needs to be changed to 443 | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:summary + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|-------------------------| +| responseTime | ms | Website response time | diff --git a/home/versioned_docs/version-1.9.0/help/websocket.md b/home/versioned_docs/version-1.9.0/help/websocket.md new file mode 100644 index 0000000000..eb79a45e43 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/websocket.md @@ -0,0 +1,33 @@ +--- +id: websocket +title: Monitoring Websocket +sidebar_label: Websocket Monitor +keywords: [ open source monitoring tool, Websocket监控 ] +--- + +> Monitor metrics such as the response of the WebSocket service's first handshake. + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------------|--------------------------------------------------------------------------------------------------------------------------| +| Host of WebSocket service | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://). | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique. | +| Port | Port of websocket service. | +| Path of WebSocket service | WebSocket endpoint path. | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Bind Tags | Used to classify and manage monitoring resources. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Collection Metric + +#### Metric set:Summary + +| Metric name | Metric unit | Metric help description | +|---------------|-------------|-------------------------| +| responseTime | ms | Response time | +| httpVersion | none | HTTP version | +| responseCode | none | Response status code | +| statusMessage | none | Status messages | +| connection | none | Connect type | +| upgrade | none | Upgraded protocols | diff --git a/home/versioned_docs/version-1.9.0/help/windows.md b/home/versioned_docs/version-1.9.0/help/windows.md new file mode 100644 index 0000000000..e5d6f5e7d4 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/windows.md @@ -0,0 +1,114 @@ +--- +id: windows +title: Monitoring:Windows operating system monitoring +sidebar_label: Windows operating system +keywords: [open source monitoring tool, open source windows monitoring tool, monitoring windows metrics] +--- + +> Collect and monitor the general performance Metrics of Windows operating system through SNMP protocol. +> Note⚠️ You need to start SNMP service for Windows server. + +References: +[What is SNMP protocol 1](https://www.cnblogs.com/xdp-gacl/p/3978825.html) +[What is SNMP protocol 2](https://www.auvik.com/franklyit/blog/network-basics-what-is-snmp/) +[Win configure SNMP in English](https://docs.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-snmp-service) +[Win configure SNMP in Chinese](https://docs.microsoft.com/zh-cn/troubleshoot/windows-server/networking/configure-snmp-service) + +## Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by Windows SNMP service. The default is 161 | +| SNMP version | SNMP protocol version V1 V2c V3 | +| SNMP community Word | SNMP agreement community name(Community Name). It is used to realize the authentication of SNMP network administrator when accessing SNMP management agent. Similar to password, the default value is public | +| Timeout | Protocol connection timeout | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:system + +| Metric name | Metric unit | Metric help description | +|--------------|-------------|------------------------------| +| name | none | Host name | +| descr | none | Operating system description | +| uptime | none | System running time | +| numUsers | number | Current number of users | +| services | number | Current number of services | +| processes | number | Current number of processes | +| responseTime | ms | Collection response time | +| location | none | Location | +| memory | GB | System memory | + +#### Metric set: process + +| Field name | Metric unit | Metric help description | +|-------------------|-------------|-------------------------| +| hrSWRunIndex | none | Index | +| hrSWRunName | none | Process name | +| hrSWRunID | none | Process ID | +| hrSWRunPath | none | Process path | +| hrSWRunParameters | none | Process parameters | +| hrSWRunType | none | Process type | +| hrSWRunStatus | none | Process status | +| hrSWRunPerfCPU | s | Process CPU usage | +| hrSWRunPerfMem | KB | Process memory usage | + +#### Metric set: service + +| Field name | Metric unit | Metric help description | +|-----------------------|-------------|-------------------------| +| svSvcName | none | Service name | +| svSvcInstalledState | none | Service installed state | +| svSvcOperatingState | none | Service operating state | +| svSvcCanBeUninstalled | none | Can be uninstalled | +| svSvcCanBePaused | none | Can be paused | + +#### Metric set: installation + +| Field name | Metric unit | Metric help description | +|--------------------|-------------|-------------------------| +| hrSWInstalledIndex | none | Index | +| hrSWInstalledName | none | Installed name | +| hrSWInstalledID | none | Installed ID | +| hrSWInstalledType | none | Installed type | + +#### Metric set: storage + +| Field name | Metric unit | Metric help description | +|------------|-------------|-------------------------| +| index | none | Index | +| descr | none | Storage description | +| size | Mb | Storage size | +| free | Mb | Free space | +| used | Mb | Used space | +| usage | % | Usage percentage | + +#### Metric set: interface details + +| Field name | Metric unit | Metric help description | +|--------------|-------------|----------------------------| +| index | none | Index | +| descr | none | Interface name | +| speed | Mbps | Interface speed | +| in_octets | Kbps | Inbound traffic | +| out_octets | Kbps | Outbound traffic | +| admin_status | none | Administrative status | +| oper_status | none | Operational status | +| mtu | B | MTU | +| in_discards | number | Inbound discarded packets | +| in_errors | number | Inbound error packets | +| out_discards | number | Outbound discarded packets | +| out_errors | number | Outbound error packets | + +#### Metric set: device + +| Field name | Metric unit | Metric help description | +|------------|-------------|-------------------------| +| index | none | Index | +| descr | none | Description | +| status | none | Status | diff --git a/home/versioned_docs/version-1.9.0/help/windows_script.md b/home/versioned_docs/version-1.9.0/help/windows_script.md new file mode 100644 index 0000000000..ff638ff130 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/windows_script.md @@ -0,0 +1,86 @@ +--- +id: windows_script +title: Monitoring:Using Scripts to Monitor Windows Operating System +sidebar_label: Using Scripts to Monitor Windows OS +keywords: [open source monitoring system, open source network monitoring, using scripts to monitor Windows OS] +--- + +## Preparation +> +> To monitor the local machine, simply deploy HertzBeat. To monitor other hosts, you need to deploy a collector on the target host. Refer to [this link](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package) for step 5 of the installation process. +> If the collector is installed using Docker, it will cause the collector to be unable to monitor the process information on the host machine, because Docker containers run in an isolated environment, with each container having its own process space. +> When creating a monitoring task and selecting a collector, choose the corresponding collector deployed on the target host. + +### Configuration Parameters + +| Parameter Name | Parameter Description | +|:---------------|-----------------------------------------------------| +| Monitor Host | The IPv4, IPv6, or domain of the monitored endpoint. Note ⚠️ Do not include protocol headers (e.g., https://, http://). | +| Task Name | The name identifying this monitoring task, which needs to be unique. | +| Collector | Specifies which collector will be used for data collection in this monitoring task. | +| Monitoring Interval | The time interval for periodic data collection, in seconds. | +| Binding Tag | Classification management tags for monitoring resources. | +| Description Notes | Additional notes to describe this monitoring task. Users can add remarks here. | + +### Metrics Collection + +#### Metric Set: basic + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|--------------------------| +| hostname | None | Name of the host | +| version | None | Operating system version | + +#### Metric Set: cpu + +| Metric Name | Metric Unit | Metric Description | +|----------------|-------------|------------------------------------| +| info | None | CPU model | +| cores | Number | Number of CPU cores | +| interrupt | Count | Number of CPU interrupts | +| load | None | Average recent CPU load | +| context_switch | Count | Current number of context switches | +| usage | % | CPU usage percentage | + +#### Metric Set: memory + +| Metric Name | Metric Unit | Metric Description | +|---------------|-------------|--------------------------------| +| totalPhysical | Mb | Total physical memory capacity | +| freePhysical | Mb | Free physical memory capacity | +| totalVirtual | Mb | Total virtual memory capacity | +| freeVirtual | Mb | Free virtual memory capacity | + +#### Metric Set: disk + +| Metric Name | Metric Unit | Metric Description | +|----------------|-------------|----------------------------| +| Model | None | Disk model | +| Size | Mb | Disk size | +| BytesPerSector | Bytes | Number of bytes per sector | + +#### Metric Set: disk_free + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|----------------------| +| Caption | None | Disk label | +| FreeSpace | Mb | Available disk space | +| Size | Mb | Total disk space | + +#### Metric Set: Top 10 Programs by CPU Usage + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|---------------------| +| name | None | Process name | +| id | None | Process ID | +| cpu | Seconds | CPU usage time | +| ws | Mb | Memory usage | + +#### Metric Set: Top 10 Programs by Memory Usage + +| Metric Name | Metric Unit | Metric Description | +|-------------|-------------|---------------------| +| name | None | Process name | +| id | None | Process ID | +| cpu | Seconds | CPU usage time | +| ws | Mb | Memory usage | diff --git a/home/versioned_docs/version-1.9.0/help/xugu.md b/home/versioned_docs/version-1.9.0/help/xugu.md new file mode 100644 index 0000000000..6c80d78264 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/xugu.md @@ -0,0 +1,62 @@ +--- +id: xugu +title: xuguDB Database Monitoring +sidebar_label: xugu Database +keywords: [ Open Source Monitoring System, Open Source Database Monitoring, xugu Database Monitoring ] +--- + +> Collect and monitor common performance metrics of the xugu database. Supports xuguDB.v12. + +## Configuration Parameters + +| Parameter Name | Description | +|----------------|------------------------------------------------------------------------------| +| Monitoring Host | The IPv4, IPv6, or domain name of the monitored target. ⚠️ Do not include protocol headers (e.g., https://, http://). | +| Task Name | The name that identifies this monitoring task. The name must be unique. | +| Port | The port exposed by the database, default is 5138. | +| Query Timeout | The timeout for SQL queries when no response is received, in milliseconds. Default is 3000 ms. | +| Database Name | The database instance name, optional. | +| Username | Database connection username. | +| Password | Database connection password. | +| URL | Database connection URL, optional. If configured, the database name, username, password and other parameters in the URL will override the above settings. | +| Collection Interval | The interval for periodically collecting monitoring data, in seconds. The minimum configurable interval is 30 seconds. | +| Enable Detection | Whether to probe and check availability before adding monitoring. The add/modify operation proceeds only if the probe succeeds. | +| Description | Additional notes and descriptions for this monitoring, where users can add remarks. | + +### Collected Metrics + +#### Metric Set: Session Information + +| Metric Name | Unit | Description | +|--------------------------------|------|-----------------------------| +| Idle_Connection | N/A | Idle connections | +| Active_Connections | N/A | Active connections | +| Connection_being_created | N/A | Connections being created | +| Null_Read_Connection | N/A | Empty read connections | +| Complete_data_input_connection | N/A | Connections with completed data input | +| Other | N/A | Others | + +#### Metric Set: Memory Information + +| Metric Name | Unit | Description | +|------------|------|-------------------------------------| +| G_MEM | MB | Global memory consumption | +| CATA_MEM | MB | CATALOG memory consumption | +| TRAN_MEM | MB | Transaction memory consumption | +| NET_MEM | MB | User connection memory consumption | +| TASK_MEM | MB | Task thread memory consumption | +| MSG_MEM | MB | Internal communication message memory consumption | +| LOCK_MEM | MB | Local lock memory consumption | +| GLOCK_MEM | MB | Global lock memory consumption | +| DLCHK_MEM | MB | Deadlock detection memory consumption| +| MODI_MEM | MB | Change log memory consumption | +| PROC_MEM | MB | Procedure execution engine memory consumption | + +#### Metric Set: Disk Information + +| Metric Name | Unit | Description | +|-------------------|-------|-------------------------------------| +| DISK_READ_NUM | Times | Number of disk block read operations | +| DISK_WRITE_NUM | Times | Number of disk block write operations | +| DISK_READ_BYTES | MB | Number of bytes read from disk | +| DISK_WRITE_BYTES | MB | Number of bytes written to disk | diff --git a/home/versioned_docs/version-1.9.0/help/yarn.md b/home/versioned_docs/version-1.9.0/help/yarn.md new file mode 100644 index 0000000000..53e3f69fd9 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/yarn.md @@ -0,0 +1,83 @@ +--- +id: yarn +title: Monitoring Apache Yarn +sidebar_label: Apache Yarn +keywords: [Big Data Monitoring System, Apache Yarn Monitoring, ResourceManager Monitoring] +--- + +> HertzBeat monitors Apache Yarn node monitoring metrics. + +**Protocol Used: HTTP** + +## Pre-monitoring Actions + +Retrieve the HTTP monitoring port of Apache Yarn. Value: `yarn.resourcemanager.webapp.address` + +## Configuration Parameters + +| Parameter Name | Parameter Description | +|------------------|-------------------------------------------------------------------------------------------| +| Target Host | IP address, IPV6, or domain name of the monitored endpoint. Without protocol header. | +| Port | Monitoring port number of Apache Yarn, default is 8088. | +| Query Timeout | Timeout for querying Apache Yarn, in milliseconds, default is 6000 milliseconds. | +| Metrics Interval | Time interval for monitoring data collection, in seconds, minimum interval is 30 seconds. | + +### Collected Metrics + +#### Metric Set: ClusterMetrics + +| Metric Name | Unit | Metric Description | +|-----------------------|------|-------------------------------------------------| +| NumActiveNMs | | Number of currently active NodeManagers | +| NumDecommissionedNMs | | Number of currently decommissioned NodeManagers | +| NumDecommissioningNMs | | Number of nodes currently decommissioning | +| NumLostNMs | | Number of lost nodes in the cluster | +| NumUnhealthyNMs | | Number of unhealthy nodes in the cluster | + +#### Metric Set: JvmMetrics + +| Metric Name | Unit | Metric Description | +|----------------------|------|--------------------------------------------------| +| MemNonHeapCommittedM | MB | Current committed size of non-heap memory in JVM | +| MemNonHeapMaxM | MB | Maximum available non-heap memory in JVM | +| MemNonHeapUsedM | MB | Current used size of non-heap memory in JVM | +| MemHeapCommittedM | MB | Current committed size of heap memory in JVM | +| MemHeapMaxM | MB | Maximum available heap memory in JVM | +| MemHeapUsedM | MB | Current used size of heap memory in JVM | +| GcTimeMillis | | JVM GC time | +| GcCount | | Number of JVM GC occurrences | + +#### Metric Set: QueueMetrics + +| Metric Name | Unit | Metric Description | +|------------------------------|------|-----------------------------------------------------| +| queue | | Queue name | +| AllocatedVCores | | Allocated virtual cores (allocated) | +| ReservedVCores | | Reserved cores | +| AvailableVCores | | Available cores (unallocated) | +| PendingVCores | | Blocked scheduling cores | +| AllocatedMB | MB | Allocated (used) memory size | +| AvailableMB | MB | Available memory (unallocated) | +| PendingMB | MB | Blocked scheduling memory | +| ReservedMB | MB | Reserved memory | +| AllocatedContainers | | Number of allocated (used) containers | +| PendingContainers | | Number of blocked scheduling containers | +| ReservedContainers | | Number of reserved containers | +| AggregateContainersAllocated | | Total aggregated containers allocated | +| AggregateContainersReleased | | Total aggregated containers released | +| AppsCompleted | | Number of completed applications | +| AppsKilled | | Number of killed applications | +| AppsFailed | | Number of failed applications | +| AppsPending | | Number of pending applications | +| AppsRunning | | Number of currently running applications | +| AppsSubmitted | | Number of submitted applications | +| running_0 | | Number of jobs running for less than 60 minutes | +| running_60 | | Number of jobs running between 60 and 300 minutes | +| running_300 | | Number of jobs running between 300 and 1440 minutes | +| running_1440 | | Number of jobs running for more than 1440 minutes | + +#### Metric Set: runtime + +| Metric Name | Unit | Metric Description | +|-------------|------|--------------------| +| StartTime | | Startup timestamp | diff --git a/home/versioned_docs/version-1.9.0/help/zookeeper.md b/home/versioned_docs/version-1.9.0/help/zookeeper.md new file mode 100644 index 0000000000..4e17bc0ec0 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/zookeeper.md @@ -0,0 +1,122 @@ +--- +id: zookeeper +title: Monitoring Zookeeper +sidebar_label: Zookeeper Monitor +keywords: [open source monitoring tool, open source zookeeper monitoring tool, monitoring zookeeper metrics] +--- + +> Collect and monitor the general performance Metrics of Zookeeper. + +## PreRequisites + +### Zookeeper four word command +> +> The current implementation scheme uses the four word command provided by zookeeper to collect Metrics. +> Users need to add the four word command of zookeeper to the white list by themselves. + +Steps + +> 1.Find our zookeeper configuration file, which is usually zoo.cfg. +> +> 2.Add the following commands to the configuration file + +```shell +# Add the required command to the white list +4lw.commands.whitelist=stat, ruok, conf, isro + +# Add all commands to the white list +4lw.commands.whitelist=* +``` + +> 3.Restart service + +```shell +zkServer.sh restart +``` + +#### netcat protocol + +The current implementation scheme requires us to deploy the Linux server of zookeeper +Command environment for installing netcat + +> netcat installation steps +> +> ```shell +> yum install -y nc +> ``` + +If the terminal displays the following information, the installation is successful + +```shell +Complete! +``` + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Monitoring Host | Monitored IPV4, IPV6 or domain name. Note⚠️Without protocol header (eg: https://, http://) | +| Monitoring name | Identify the name of this monitoring. The name needs to be unique | +| Port | Port provided by Zookeeper. The default is 2181 | +| Query timeout | Set the timeout of Zookeeper connection, unit: ms, default: 3000ms | +| Username | User name of the Linux connection where Zookeeper is located | +| Password | Password of the Linux connection where Zookeeper is located | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | +| Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here | + +### Collection Metric + +#### Metric set:conf + +| Metric name | Metric unit | Metric help description | +|-------------------|-------------|--------------------------------------------------------------------------------------------------------------------| +| clientPort | none | Port | +| dataDir | none | Data snapshot file directory. By default, 100000 operations generate a snapshot | +| dataDirSize | kb | Data snapshot file size | +| dataLogDir | none | Transaction log file directory, production environment on a separate disk | +| dataLogSize | kb | Transaction log file size | +| tickTime | ms | Time interval between servers or between clients and servers to maintain heartbeat | +| minSessionTimeout | ms | Minimum session timeout. Heartbeat timex2. The specified time is less than this time, which is used by default | +| maxSessionTimeout | ms | Maximum session timeout. Heartbeat timex20. The specified time is greater than this time, which is used by default | +| serverId | none | Server id | + +#### Metric set:stats + +| Metric name | Metric unit | Metric help description | +|-------------------------------|-------------|------------------------------------| +| zk_version | none | Server version | +| zk_server_state | none | Server role | +| zk_num_alive_connections | number | Number of connections | +| zk_avg_latency | ms | Average latency | +| zk_outstanding_requests | number | Number of outstanding requests | +| zk_znode_count | number | Number of znode | +| zk_packets_sent | number | Number of packets sent | +| zk_packets_received | number | Number of packets received | +| zk_watch_count | number | Number of watch | +| zk_max_file_descriptor_count | number | Maximum number of file descriptors | +| zk_approximate_data_size | kb | data size | +| zk_open_file_descriptor_count | number | Number of open file descriptors | +| zk_max_latency | ms | Max latency | +| zk_ephemerals_count | number | Number of ephemeral nodes | +| zk_min_latency | ms | Min latency | + +#### Metric set:envi + +| Metric Name | Metric Unit | Metric help description | +|-------------------|-------------|-------------------------------| +| zk_version | none | ZooKeeper version | +| hostname | none | Hostname | +| java_version | none | Java version | +| java_vendor | none | Java vendor | +| java_home | none | Java home directory | +| java_class_path | none | Java class path | +| java_library_path | none | Java library path | +| java_io_tmpdir | none | Java temporary directory | +| java_compiler | none | Java compiler | +| os_name | none | Operating system name | +| os_arch | none | Operating system architecture | +| os_version | none | Operating system version | +| user_name | none | Username | +| user_home | none | User home directory | +| user_dir | none | User current directory | diff --git a/home/versioned_docs/version-1.9.0/help/zookeeper_sd.md b/home/versioned_docs/version-1.9.0/help/zookeeper_sd.md new file mode 100644 index 0000000000..b8c72eaf2d --- /dev/null +++ b/home/versioned_docs/version-1.9.0/help/zookeeper_sd.md @@ -0,0 +1,122 @@ +--- +id: zookeeper_sd +title: Monitoring Zookeeper Service Discovery +sidebar_label: Zookeeper Service Discovery +keywords: [open source monitoring tool, open source service discovery monitoring tool, monitoring Zookeeper service discovery] +--- + +> HertzBeat integrates with Zookeeper to automatically discover service instances stored in Zookeeper nodes and create monitoring tasks for them. + +## Overview + +Zookeeper Service Discovery allows HertzBeat to connect to your Zookeeper server and automatically discover service instance information stored in specific path nodes. This is commonly used in Dubbo and other RPC frameworks that use Zookeeper as a registry center. When service instances change, HertzBeat will automatically create or delete corresponding monitoring tasks. + +### PreRequisites + +#### Deploy Zookeeper Server + +1. Deploy Zookeeper server according to [Zookeeper official documentation](https://zookeeper.apache.org/doc/current/zookeeperStarted.html). +2. Ensure Zookeeper server is accessible from HertzBeat. +3. Verify Zookeeper is running properly using Zookeeper client tools + +### Configuration parameter + +| Parameter name | Parameter help description | +|---------------------|--------------------------------------------------------------------------------------------------------------------------| +| Target Name | Identify the name of this monitoring. The name needs to be unique. | +| Service Discovery Url | Zookeeper server connection address. Example: `192.168.1.100:2181` or `zk1:2181,zk2:2181,zk3:2181` (cluster mode) | +| Service Discovery Path Prefix | The path prefix in Zookeeper for service discovery. Example: `/dubbo` or `/services` | +| Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds. | +| Description remarks | For more information about identifying and describing this monitoring, users can note information here. | + +### Usage Steps + +1. **Create Service Discovery Monitoring** + - In HertzBeat web UI, navigate to **Monitoring** → **New Monitoring** + - Select monitoring type: **Zookeeper Service Discovery** + - Fill in the basic configuration parameters + +2. **Configure Monitoring Template** + - After creating the service discovery monitoring, you need to specify a monitoring template + - The template defines what type of monitoring to create for discovered service instances + - For example: If discovered instances are Dubbo services, you can select Port monitoring template + - Common template types: Port, HTTP, Ping, etc. + +3. **Automatic Discovery** + - HertzBeat will periodically query Zookeeper based on the collection interval + - Automatically create monitoring tasks for newly discovered service instances + - Automatically delete monitoring tasks for disappeared service instances + +4. **View Discovered Instances** + - In the monitoring list, you can see all automatically created sub-monitoring tasks + - Each sub-monitoring task corresponds to a discovered service instance + +### Example of usage + +#### Example 1: Dubbo Service Discovery + +Suppose you have a Dubbo service registry running in Zookeeper at `192.168.1.100:2181`, and service information is stored under the `/dubbo` path. + +Configuration example: + +- **Target Name**: `Zookeeper-Dubbo-Discovery` +- **Service Discovery Url**: `192.168.1.100:2181` +- **Service Discovery Path Prefix**: `/dubbo` +- **Collection interval**: `60` seconds +- **Monitoring Template**: Select `Port` monitoring + +After configuration: + +1. HertzBeat connects to Zookeeper +2. Retrieves all child nodes under the `/dubbo` path +3. Parses node information to extract service instance host and port +4. Automatically creates Port monitoring for each service instance + +#### Example 2: Custom Service Discovery + +If you have a custom service registration mechanism using Zookeeper, and service information is stored under the `/services` path: + +- **Service Discovery Url**: `zk1:2181,zk2:2181,zk3:2181` (Zookeeper cluster) +- **Service Discovery Path Prefix**: `/services` + +HertzBeat will discover all service instances under this path. + +### Notes + +- **Node Format**: Zookeeper service discovery expects child nodes to contain host:port information + - Example node name format: `192.168.1.101:8080` or similar formats +- **Network Connectivity**: Ensure HertzBeat can access the Zookeeper server address and port (default: 2181) +- **Monitoring Templates**: Service discovery only discovers service instance addresses, you need to configure appropriate monitoring templates to actually monitor the instances +- **Collection Interval**: Recommended minimum interval is 60 seconds to avoid excessive requests to Zookeeper +- **Path Prefix**: Ensure the path prefix is correct and HertzBeat has permission to read nodes under this path +- **Cluster Mode**: Supports Zookeeper cluster mode, multiple addresses can be separated by commas +- **Instance Naming**: Automatically created monitoring tasks are named based on node information + +### Collection Metric + +#### Metric set: Monitor Target + +| Metric name | Metric unit | Metric help description | +|-----------------|-------------|--------------------------------------------| +| target | none | Discovered service instance target | +| host | none | Service instance host address | +| port | none | Service instance port number | + +### Use Cases + +- **Dubbo Services**: Automatically monitor Dubbo service providers and consumers registered in Zookeeper +- **RPC Frameworks**: Monitor RPC services using Zookeeper as a registry +- **Custom Registration**: Monitor services using custom Zookeeper-based service registration +- **Distributed Systems**: Manage monitoring of distributed system components using Zookeeper for coordination +- **Service Governance**: Centrally manage monitoring of services in the Zookeeper service ecosystem + +### Common Dubbo Path Structure + +For Dubbo services, typical Zookeeper path structures include: + +- `/dubbo/{serviceName}/providers` - Service provider addresses +- `/dubbo/{serviceName}/consumers` - Service consumer addresses +- `/dubbo/{serviceName}/routers` - Routing rules +- `/dubbo/{serviceName}/configurators` - Configuration overrides + +When using Zookeeper service discovery with Dubbo, it's recommended to set the path prefix to `/dubbo` to discover all Dubbo services. diff --git a/home/versioned_docs/version-1.9.0/introduce.md b/home/versioned_docs/version-1.9.0/introduce.md new file mode 100644 index 0000000000..6b648da98e --- /dev/null +++ b/home/versioned_docs/version-1.9.0/introduce.md @@ -0,0 +1,416 @@ +--- +id: introduce +title: Apache HertzBeat™ - Open Source Real-Time Monitoring System +sidebar_label: Introduce +slug: / +description: Apache HertzBeat is an AI-powered, agentless open source monitoring system for metrics, logs, alerts, and observability with custom monitoring templates. +--- + +**Home: [hertzbeat.apache.org](https://hertzbeat.apache.org)** + +## What is Apache HertzBeat? + +Apache HertzBeat™ is an AI-powered, agentless open source real-time monitoring system. It unifies metrics collection, log aggregation, alerting, and notification in a single platform without requiring agent installation. + +**Observability System Definition:** An observability system collects, analyzes, and visualizes operational data (metrics, logs, traces) to monitor infrastructure and application health. + +## Core Capabilities + +HertzBeat provides four integrated capabilities: + +1. **Metrics Collection** - Monitor 200+ services including databases, operating systems, middleware, and cloud infrastructure +2. **Log Aggregation** - Centralize logs via OTLP protocol for unified analysis +3. **Alert Management** - Process internal and external alerts with flexible threshold rules +4. **Notification Distribution** - Send alerts via Email, Slack, Discord, Telegram, DingTalk, WeChat, and more + +**Key Differentiator:** No agent installation required. HertzBeat uses native protocols (HTTP, SNMP, JMX, SSH, JDBC) to collect data directly. + +## HertzBeat vs Traditional Monitoring + +| Feature | HertzBeat | Traditional Agent-Based | +|---------|-----------|------------------------| +| **Agent Installation** | Not required | Required on each host | +| **Setup Time** | Minutes via Docker | Hours with agent deployment | +| **Monitoring Types** | 200+ built-in templates | Limited predefined types | +| **Customization** | YML templates via UI | Code changes required | +| **Architecture** | Unified platform | Multiple separate tools | +| **Deployment** | Single Docker command | Complex multi-component setup | + +## Platform Architecture + +HertzBeat unifies four monitoring functions: + +1. **Collection** - Agentless data gathering using native protocols (HTTP, SNMP, JMX, SSH, JDBC, Prometheus) +2. **Analysis** - AI-powered pattern detection and anomaly identification +3. **Alerting** - Flexible threshold rules with grouping, convergence, silence, and suppression +4. **Notification** - Multi-channel distribution (Email, Discord, Slack, Telegram, DingTalk, WeChat, SMS, Webhook) + +**Prometheus Compatibility:** HertzBeat supports Prometheus protocol for seamless integration with existing Prometheus exporters and metrics. + +## Key Features + +**Template-Based Monitoring:** Create custom monitoring types by writing YML configuration files. No coding required to monitor new services like Kubernetes or Docker. + +**High Performance Clustering:** Horizontal scaling with multi-collector clusters. Automatic task scheduling and failover ensure reliability at scale. + +**Cloud-Edge Collaboration:** Monitor isolated network environments with edge collectors reporting to centralized management. + +**Status Page Builder:** Create public status pages (similar to GitHub Status) to communicate service availability to users. + +--- + +### Powerful Monitoring Template + +> Before we discuss the customizable monitoring capabilities of HertzBeat, which we mentioned at the beginning, let's introduce the different monitoring templates of HertzBeat. And it is because of this monitoring template design that the advanced features come later. + +HertzBeat itself did not create a data collection protocol for the monitoring client to adapt to. Instead, HertzBeat makes full use of the existing ecosystem, `SNMP protocol` to collect information from network switches and routers, `JMX specification` to collect information from Java applications, `JDBC specification` to collect information from datasets, `SSH` to directly connect to scripts to get the display information, `HTTP+ (JsonPath | prometheus, etc.)` to parse the information from API interfaces, `IPMI protocol` to collect server information, and so on. +HertzBeat uses these existing standard protocols or specifications, makes them abstractly configurable, and finally makes them all available in the form of YML format monitoring templates that can be written to create templates that use these protocols to collect any desired metrics data. +![HertzBeat](/img/blog/multi-protocol.png) + +Do you believe that users can just write a monitoring template on the UI page, click save and immediately adapt a new monitoring type like `K8s` or `Docker`? + +![HertzBeat](/img/home/9.png) + +### Built-in Monitoring Types + +**There are a lot of built-in monitoring templates for users to add directly on the page, one monitoring type corresponds to one YML monitoring template**. + +- [Website](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-website.yml), [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-port.yml), + [Http Api](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api.yml), [Ping Connect](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ping.yml), + [Jvm](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jvm.yml), [SiteMap](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-fullsite.yml), + [Ssl Certificate](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ssl_cert.yml), [SpringBoot2](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot2.yml), + [FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ftp.yml), [SpringBoot3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot3.yml), + [Udp Port](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-udp_port.yml), [Dns](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dns.yml), + [Pop3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-pop3.yml), [Ntp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ntp.yml), + [Api Code](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api_code.yml), [Smtp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-smtp.yml), + [Nginx](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nginx.yml) +- [Mysql](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mysql.yml), [PostgreSQL](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-postgresql.yml), + [MariaDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mariadb.yml), [Redis](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis.yml), + [ElasticSearch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-elasticsearch.yml), [SqlServer](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-sqlserver.yml), + [Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml), + [DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml), + [ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml), + [Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml), + [Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml), + [Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml) +- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml), + [CentOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-centos.yml), [Windows](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-windows.yml), + [EulerOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-euleros.yml), [Fedora CoreOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-coreos.yml), + [OpenSUSE](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opensuse.yml), [Rocky Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rockylinux.yml), + [Red Hat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redhat.yml), [FreeBSD](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-freebsd.yml), + [AlmaLinux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-almalinux.yml), [Debian Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-debian.yml) +- [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tomcat.yml), [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nacos.yml), + [Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-zookeeper.yml), [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rabbitmq.yml), + [Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-flink.yml), [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kafka.yml), + [ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-shenyu.yml), [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dynamic_tp.yml), + [Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jetty.yml), [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-activemq.yml), + [Spring Gateway](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spring_gateway.yml), [EMQX MQTT](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-emqx.yml), + [AirFlow](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-airflow.yml), [Hive](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hive.yml), + [Spark](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spark.yml), [Hadoop](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hadoop.yml) +- [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml), [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-docker.yml) +- [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-cisco_switch.yml), [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hpe_switch.yml), + [HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-huawei_switch.yml), [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tplink_switch.yml), + [H3cSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-h3c_switch.yml) +- And More Your Custom Template. +- Notified Support `Discord` `Slack` `Telegram` `Email` `Dingtalk` `WeChat` `FeiShu` `Webhook` `SMS` `ServerChan`. + +### Customization + +> From the previous introduction of **Monitoring Templates**, it is clear that `HertzBeat` has powerful customization features. +> Each monitor type is considered as a monitor template, no matter it is built-in or user-defined. You can easily add, modify and delete indicators by modifying the monitoring template. +> The templates contain a series of functions such as protocol configuration, environment variables, metrics conversion, metrics calculation, units conversion, metrics collection, etc., which help users to collect the metrics they want. + +![HertzBeat](/img/docs/custom-arch.png) + +### No Agent Required + +> For users who have used various systems, the most troublesome thing is the installation, deployment, debugging and upgrading of various `agents`. +> You need to install one `agent` per host, and several corresponding `agents` to monitor different application middleware, and the number of monitoring can easily reach thousands, so writing a batch script may ease the burden. +> The problem of whether the version of `agent` is compatible with the main application, debugging the communication between `agent` and the main application, upgrading the `agent` synchronization and so on and so forth, are all big headaches. + +The principle of `HertzBeat` is to use different protocols to connect directly to the end system, and use the `PULL` form to pull the collected data, without the need for the user to deploy and install `Agent` | `Exporter` on the host of the end, etc. For example, monitoring the `linux operating system`. + +- For example, if you want to monitor `linux OS`, you can just input the IP port account password or key on `HertzBeat` side. +- For example, to monitor `linux OS`, just enter your ip/port account password or key in `HertzBeat`. + +**Password and other sensitive information is encrypted on all links**. + +### High Performance Clustering + +> When the number of monitors rises exponentially, the collection performance drops or the environment is unstable and prone to single point of failure of the collectors, then our collector clusters come into play. + +- HertzBeat supports the deployment of collector clusters and the horizontal expansion of multiple collector clusters to exponentially increase the number of monitorable tasks and collection performance. +- Monitoring tasks are self-scheduled in the collector cluster, single collector hangs without sensing the failure to migrate the collection tasks, and the newly added collector nodes are automatically scheduled to share the collection pressure. +- It is very easy to switch between stand-alone mode and cluster mode without additional component deployment. + +![HertzBeat](/img/docs/cluster-arch.png) + +### Cloud Edge Collaboration + +> Two locations, three centers, multi-cloud environments, multi-isolated networks, you may have heard of these scenarios. When there is a need for a unified monitoring system to monitor the IT resources of different isolated networks, this is where our Cloud Edge Collaboration comes in. + +In an isolated network where multiple networks are not connected, we need to deploy a monitoring system in each network in the previous solution, which leads to data non-interoperability and inconvenient management, deployment and maintenance. +`HertzBeat` provides the ability of cloud edge collaboration, can be deployed in multiple isolated networks edge collector, collector in the isolated network within the monitoring task collection, collection of data reported by the main service unified scheduling management display. + +![HertzBeat](/img/docs/cluster-arch.png) + +### Easy to Use + +- Set **Monitoring+Alarm+Notification** - All in one, no need to deploy multiple component services separately. +- Full UI interface operation, no matter adding new monitor, modifying monitor template, or alarm threshold notification, all can be done in WEB interface, no need to modify files or scripts or reboot. +- No Agent is needed, we only need to fill in the required IP, port, account, password and other parameters in the WEB interface. +- Customization friendly, only need a monitoring template YML, automatically generate monitoring management page, data chart page, threshold configuration for corresponding monitoring types. +- Threshold alarm notification friendly, based on the expression threshold configuration, a variety of alarm notification channels, support alarm silence, time label alarm level filtering and so on. + +### Completely Open Source + +- An open source collaboration product using the `Apache2` protocol, maintained by a free and open source community. +- No monitoring number `License`, monitoring type and other pseudo-open source restrictions . +- Built on `Java+SpringBoot+TypeScript+Angular` mainstream technology stack , convenient secondary development . +- Dev based on HertzBeat need retain copyright. + +**HertzBeat has been included in the [CNCF Observability And Analysis - Observability Landscape](https://landscape.cncf.io/?view-mode=card&classify=category&sort-by=name&sort-direction=asc#observability-and-analysis--observability)** + +![cncf](/img/home/cncf-landscape-left-logo.svg) + +--- + +**HertzBeat's powerful customization, multi-type support, high performance, easy expansion, and low coupling, aims to help users quickly build their own monitoring system.** + +--- + +## 🥐 Experience Now + +Just run a single command in a Docker environment: `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` +Browser access `http://localhost:1157` default account password `admin/hertzbeat` + +### Landing Page + +- HertzBeat's user management is unified by the configuration file `sureness.yml`, which allows users to add, delete, and modify user information, user role permissions, and so on. Default password admin/hertzbeat + +![HertzBeat](/img/home/0.png) + +### Overview Page + +- The global overview page shows the distribution of current monitoring categories, users can visualize the current monitoring types and quantities and click to jump to the corresponding monitoring types for maintenance and management. +- Show the status of currently registered collector clusters, including collector on-line status, monitoring tasks, startup time, IP address, name and so on. +- Show the list of recent alarm messages, alarm level distribution etc. + +![HertzBeat](/img/home/1.png) + +### Monitoring Center + +- The monitoring portal supports the management of monitoring of application services, database, operating system, middleware, network, customization, etc. It displays the currently added monitors in the form of a list. +- It displays the currently added monitors in the form of a list and supports adding, modifying, deleting, canceling, importing, exporting and batch management of monitors. +- Support tag grouping, query filtering, view monitoring details portal. + +Built-in support for monitoring types include: + +- [Website](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-website.yml), [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-port.yml), + [Http Api](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api.yml), [Ping Connect](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ping.yml), + [Jvm](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jvm.yml), [SiteMap](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-fullsite.yml), + [Ssl Certificate](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ssl_cert.yml), [SpringBoot2](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot2.yml), + [FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ftp.yml), [SpringBoot3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot3.yml), + [Udp Port](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-udp_port.yml), [Dns](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dns.yml), + [Pop3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-pop3.yml), [Ntp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ntp.yml), + [Api Code](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api_code.yml), [Smtp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-smtp.yml), + [Nginx](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nginx.yml) +- [Mysql](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mysql.yml), [PostgreSQL](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-postgresql.yml), + [MariaDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mariadb.yml), [Redis](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis.yml), + [ElasticSearch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-elasticsearch.yml), [SqlServer](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-sqlserver.yml), + [Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml), + [DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml), + [ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml), + [Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml), + [Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml), + [Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml) +- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml), + [CentOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-centos.yml), [Windows](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-windows.yml), + [EulerOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-euleros.yml), [Fedora CoreOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-coreos.yml), + [OpenSUSE](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opensuse.yml), [Rocky Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rockylinux.yml), + [Red Hat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redhat.yml), [FreeBSD](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-freebsd.yml), + [AlmaLinux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-almalinux.yml), [Debian Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-debian.yml) +- [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tomcat.yml), [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nacos.yml), + [Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-zookeeper.yml), [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rabbitmq.yml), + [Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-flink.yml), [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kafka.yml), + [ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-shenyu.yml), [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dynamic_tp.yml), + [Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jetty.yml), [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-activemq.yml), + [Spring Gateway](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spring_gateway.yml), [EMQX MQTT](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-emqx.yml), + [AirFlow](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-airflow.yml), [Hive](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hive.yml), + [Spark](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spark.yml), [Hadoop](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hadoop.yml) +- [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml), [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-docker.yml) +- [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-cisco_switch.yml), [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hpe_switch.yml), + [HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-huawei_switch.yml), [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tplink_switch.yml), + [H3cSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-h3c_switch.yml) + +![HertzBeat](/img/home/2.png) + +### New Monitor + +- You can add or modify monitoring instances of a specific monitoring type, configure the IP, port and other parameters of the monitoring on the other end, set the collection period, collection task scheduling method, support detecting availability in advance, etc. The monitoring instances on the page are defined by the corresponding monitoring templates. +- The monitoring parameters configured on the page are defined by the monitoring template of the corresponding monitoring type, and users can modify the configuration parameters on the page by modifying the monitoring template. +- Support associated tags to manage monitoring grouping, alarm matching, and so on. + +![HertzBeat](/img/home/10.png) + +### Monitor Details + +- The monitoring data detail page shows the basic parameter information of the current monitoring, and the monitoring indicator data information. +- Monitor Real-time Data Report displays the real-time values of all the currently monitored indicators in the form of a list of small cards, and users can configure alarm threshold rules based on the real-time values for reference. +- Monitor Historical Data Report displays the historical values of the currently monitored metrics in the form of trend charts, supports querying hourly, daily and monthly historical data, and supports configuring the page refresh time. +- ⚠️ Note that the monitoring history charts need to be configured with an external timing database in order to get the full functionality. + +![HertzBeat](/img/home/3.png) + +![HertzBeat](/img/home/4.png) + +### Alarm Center + +- The management display page of triggered alarm messages enables users to visualize the current alarm situation. +- Support alarm processing, alarm marking unprocessed, alarm deletion, clearing and other batch operations. + +![HertzBeat](/img/home/7.png) + +### Alarm Threshold + +- Alarm Threshold are the core function of `HertzBeat`, users can configure the trigger conditions of the alarm through the threshold rules. +- Support real-time threshold and scheduled threshold, real-time threshold can directly trigger the alarm when monitoring data is collected, scheduled threshold supports PromQL and other expressions to calculate the trigger alarm within a specified time period. +- Support visual page configuration or more flexible expression rule configuration, support configuring trigger times, alarm levels, notification templates, associated specified monitoring and so on. + +![HertzBeat](/img/home/6.png) + +![HertzBeat](/img/docs/start/ssl_5.png) + +### Alarm Integration + +- Integration with third-party monitoring systems such as `Prometheus`, `WebHook`, `Skywalking`, `AlertManager`, etc. to receive alarm messages from these systems and perform alarm processing. + +![HertzBeat](/img/home/11.png) + +### Alarm Grouping + +- Group convergence supports merging alarms for specified group labels by grouping. It deduplicates and converges the same repeated alarms in a time period. +- When the threshold rule triggers an alarm or an external alarm is reported, it will enter the grouping convergence for alarm grouping and alarm deduplication to avoid alarm storms caused by a large number of alarm messages. + +![HertzBeat](/img/home/12.png) + +### Alarm Inhibition + +- Alarm suppression is used to configure the suppression relationship between alarms. For example, high-level alarms suppress low-level alarms under the same instance. +- When an alarm occurs, it can suppress the occurrence of other alarms. For example, when a server crashes, it can suppress all alarms on that server. + +![HertzBeat](/img/home/13.png) + +### Alarm Silence + +- When the alarm is triggered by the threshold rule, it will enter into the alarm silence, the alarm silence will be based on the rules of a specific one-time time period or periodic time period of the alarm message blocking silence, this time period does not send alarm messages. +- This application scenario, such as users in the system maintenance, do not need to send known alarms. Users will only receive alarm messages on weekdays, and users need to avoid disturbances at night. +- Alarm silence rules support one-time time period or periodic time period, support label matching and alarm level matching. + +![HertzBeat](/img/home/15.png) + +### Message Notification + +- Message notification is a function to notify alarm messages to specified recipients through different media channels, so that the alarm messages can reach them in time. +- It includes recipient information management and notification policy management. Recipient management maintains the information of recipients and their notification methods, while notification policy management maintains the policy rules of which recipients will be notified of the alert messages. +- Notification methods support `Email` `Discord` `Slack` `Telegram` `Pinning` `WeChat` `Flybook` `SMS` `Webhook` and so on. +- The notification policy supports tag matching and alert level matching, which makes it convenient to assign alerts with different tags and alert levels to different receivers and handlers. +- Support notification templates, users can customize the content format of the templates to meet their own personalized notification display needs. + +![HertzBeat](/img/home/16.png) + +![HertzBeat](/img/home/17.png) + +![HertzBeat](/img/home/8.png) + +![HertzBeat](/img/home/14.png) + +### Monitoring Template + +- HertzBeat makes `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` and other protocols configurable so that you can customize the metrics you want to collect using these protocols by simply configuring the monitoring template `YML` in your browser. Would you believe that you can instantly adapt a new monitoring type such as `K8s` or `Docker` just by configuring it? +- All our built-in monitoring types (mysql, website, jvm, k8s) are also mapped to corresponding monitoring templates, so you can add and modify monitoring templates to customize your monitoring functions. + +![HertzBeat](/img/home/9.png) + +### Collector Cluster + +- Users can configure collector clusters to achieve distributed collection of large-scale monitoring tasks. +- The collector cluster supports multi-node deployment, automatic load balancing, automatic failover, etc. +- Supports unified management of multiple isolated networks, cloud-edge collaboration. + +![HertzBeat](/img/home/18.png) + +### Status Page + +- Based on HertzBeat, quickly build an external status page for your own product and easily convey the real-time status of your product service to users. For example, the service status page provided by Github [https://www.githubstatus.com](https://www.githubstatus.com). +- Support synchronization between the status of the status page component and the monitoring status, as well as the fault event maintenance management mechanism, etc. Improve your transparency, professionalism, and user trust, and reduce communication costs. + +![HertzBeat](/img/home/19.png) + +![HertzBeat](/img/home/status.png) + +--- + +## Frequently Asked Questions + +### What is HertzBeat used for? + +HertzBeat monitors IT infrastructure including servers, databases, applications, networks, and cloud services. It collects metrics, aggregates logs, triggers alerts, and sends notifications for operational visibility. + +### Does HertzBeat require agent installation? + +No. HertzBeat uses agentless monitoring via native protocols (HTTP, SNMP, JMX, SSH, JDBC). You only need to provide IP, port, and credentials through the web interface. + +### How do I install HertzBeat? + +Run this single Docker command: `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` + +Access `http://localhost:1157` with default credentials admin/hertzbeat. + +### What systems can HertzBeat monitor? + +HertzBeat monitors 200+ services including: + +- Databases: MySQL, PostgreSQL, MongoDB, Redis, Oracle, SQL Server +- Operating Systems: Linux, Windows, Unix variants +- Middleware: Tomcat, Kafka, Zookeeper, RabbitMQ, Nginx +- Cloud: Kubernetes, Docker +- Networks: Cisco, Huawei, HPE switches + +### Can I create custom monitoring templates? + +Yes. Create YML templates via the web UI to monitor any service. Templates define metrics, collection protocols, and thresholds without coding. + +### Is HertzBeat compatible with Prometheus? + +Yes. HertzBeat supports Prometheus protocol and can collect metrics from Prometheus exporters. + +### How does HertzBeat compare to Prometheus + Grafana? + +HertzBeat provides a unified platform including collection, alerting, and notifications. Prometheus + Grafana requires separate components for alerts (Alertmanager) and lacks built-in multi-channel notifications. + +### What notification channels does HertzBeat support? + +Email, Discord, Slack, Telegram, DingTalk, WeChat, FeiShu, SMS, and Webhook. + +### Can HertzBeat scale for large deployments? + +Yes. Deploy collector clusters for horizontal scaling. Collectors auto-balance tasks and provide failover for high availability. + +### What license does HertzBeat use? + +Apache License 2.0. HertzBeat is completely open source with no monitoring limits or license restrictions. + +## Quick Start Summary + +1. **Install:** `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` +2. **Access:** `http://localhost:1157` (admin/hertzbeat) +3. **Monitor:** Add services via web UI by providing IP, port, credentials +4. **Alert:** Configure threshold rules and notification channels +5. **Scale:** Deploy collector clusters as needed + +--- + +**Github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +**Home: [https://hertzbeat.apache.org/](https://hertzbeat.apache.org/)** diff --git a/home/versioned_docs/version-1.9.0/others/design.md b/home/versioned_docs/version-1.9.0/others/design.md new file mode 100644 index 0000000000..f4a9c82b22 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/others/design.md @@ -0,0 +1,9 @@ +--- +id: design +title: 设计文档 +sidebar_label: 设计文档 +--- + +## HertzBeat Arch + +![architecture](/img/docs/hertzbeat-arch.svg) diff --git a/home/versioned_docs/version-1.9.0/others/resource.md b/home/versioned_docs/version-1.9.0/others/resource.md new file mode 100644 index 0000000000..83188bd1c8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/others/resource.md @@ -0,0 +1,19 @@ +--- +id: resource +title: Related resources +sidebar_label: Related resources +--- + +## Icon Resources + +### HertzBeat Logo + +![logo](/img/hertzbeat-logo.svg) + +Download: [SVG](/img/hertzbeat-logo.svg) [PNG](/img/hertzbeat-logo.png) + +### HertzBeat Brand Logo + +![logo](/img/hertzbeat-brand.svg) + +Download: [SVG](/img/hertzbeat-brand.svg) [PNG](/img/hertzbeat-brand.png) diff --git a/home/versioned_docs/version-1.9.0/start/account-modify.md b/home/versioned_docs/version-1.9.0/start/account-modify.md new file mode 100644 index 0000000000..8fdba1e21d --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/account-modify.md @@ -0,0 +1,187 @@ +--- +id: account-modify +title: Modify Account Username Password And Secret +sidebar_label: Update Account Secret +--- + +## Update Account + +Apache 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. +Modify the following **part parameters** in sureness.yml:**[Note⚠️Other default sureness configuration parameters should be retained]** + +```yaml + +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] + # The OpenAPI document is a map of every route, parameter and model, so it is + # scoped like any other administrative resource instead of being anonymous + - /v3/api-docs/**===get===[admin] + - /v3/api-docs.yaml===get===[admin] + - /v3/api-docs.yaml/**===get===[admin] + - /v2/api-docs/**===get===[admin] + - /swagger-resources/**===get===[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/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 + # 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: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] +``` + +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 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: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] +``` + +## OpenAPI Document And Swagger UI + +The generated OpenAPI document lists every route, http method, parameter name and type, and every request and response model. It is a ready made map of the attack surface, so HertzBeat does not serve it by default: `springdoc.api-docs.enabled` and `springdoc.swagger-ui.enabled` are both `false` in the shipped `application.yml`, which makes `/v3/api-docs` and `/swagger-ui/index.html` return 404. + +If you need the document, opt in by updating the `application.yml` file in the `config` directory: + +```yaml +springdoc: + api-docs: + enabled: true + swagger-ui: + enabled: true +``` + +Once enabled, the document endpoints are still scoped to the `admin` role by the `resourceRole` rules above. Sign in to the HertzBeat web application as an administrator before opening `/swagger-ui/index.html`; the Swagger UI attaches the stored HertzBeat token to its same-origin document and try-it-out requests, and the page loads without asking for anything. + +Without that session the document is not exposed, but the page does not fail silently either. `/swagger-ui/index.html` is a static file and still loads; its request for `/v3/api-docs/swagger-config` is answered with `401` and a `WWW-Authenticate: Digest` challenge, so the browser asks for a username and password. Administrator credentials entered there let the document through, and an account without the `admin` role is answered with `403`. + +The document can also be fetched directly with an administrator token: + +```shell +curl -H "Authorization: Bearer $YOUR_ADMIN_TOKEN" http://localhost:1157/v3/api-docs +``` + +> ⚠️ Do not move the OpenAPI paths into `excludedResource`; doing so makes the complete document anonymous again. + +## Update Security Secret + +> This secret is the key for account security encryption management and needs to be updated to your custom key string of the same length. + +Update the `application.yml` file in the `config` directory, modify the `sureness.jwt.secret` parameter to your custom key string of the same length. + +```yaml +sureness: + jwt: + secret: 'CyaFv0bwq2Eik0jdrKUtsA6bx4sDJeFV643R + LnfKefTjsIfJLBa2YkhEqEGtcHDTNe4CU6+9 + 8tVt4bisXQ13rbN0oxhUZR73M6EByXIO+SV5 + dKhaX0csgOCTlCxq20yhmUea6H6JIpSE2Rwp' +``` + +**Restart HertzBeat, access [http://ip:1157/](http://ip:1157/) to explore** diff --git a/home/versioned_docs/version-1.9.0/start/baota-deploy.md b/home/versioned_docs/version-1.9.0/start/baota-deploy.md new file mode 100644 index 0000000000..9d7257d80f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/baota-deploy.md @@ -0,0 +1,43 @@ +--- +id: baota-deploy +title: Use aaPanel Deploy HertzBeat +sidebar_label: Install via aaPanel +--- + +Apache HertzBeat™ supports one-click deployment in the `Docker` application store of the aaPanel. + +## Prerequisites + +Install aaPanel, go to the [aaPanel](https://www.aapanel.com/new/download.html#install), switch the script and install. + +## Install + +1. Log in, click `Docker` menu and install the `Docker` `Docker Compose` according the prompts. + + > Install the Docker service, skip if it already exists. + + ![HertzBeat](/img/docs/start/install-to-aapanel-1.png) + +2. Find `HertzBeat` in `One-Click Install` and click `Install` + + ![HertzBeat](/img/docs/start/install-to-aapanel-2.png) + +3. Config the domain, name and others, click `OK` + + ![HertzBeat](/img/docs/start/install-to-aapanel-3.png) + - Name: App name, default the `HertzBeat-random` + - Version:Default `latest` + - Domain:Config if you need domain access, please configure the domain name here and resolve the domain name to the server + - Allow External Access:If you need to access directly through `IP+Port`, please check it. If you have already set the domain name, please do not check here + - Port:Default `1157` + +4. After submission, the panel will automatically initialize the application, which takes about `1-3` minutes. It can be accessed after the initialization is completed. + +## Access HertzBeat + +- If you have set a domain name, please enter the domain name directly in the browser address bar to access, such as `http://demo.hertzbeat.apache.org`, you can access the `HertzBeat` console. +- If you choose to access via `IP+Port`, please enter the domain name in the browser address bar to access `http://\:1157`, you can access the `HertzBeat` console. + +![HertzBeat](/img/home/0.png) + +> Default account username: `admin` password: `hertzbeat` diff --git a/home/versioned_docs/version-1.9.0/start/custom-config.md b/home/versioned_docs/version-1.9.0/start/custom-config.md new file mode 100644 index 0000000000..4d6953a097 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/custom-config.md @@ -0,0 +1,48 @@ +--- +id: custom-config +title: Advanced Params Config +sidebar_label: Advanced Params Config +--- + +Here it describes how to configure custom parameters for alerts, etc. + +**Configuration file `application.yml` of `hertzbeat`** + +Configuring the HertzBeat configuration file: + +- Modify the configuration file located at `hertzbeat/config/application.yml` +- **Docker Deployment:** ⚠️ When using a Docker container, the `application.yml` file must be mounted to the host machine +- **Installation Package Deployment:** Extract the package and modify the configuration file located at `hertzbeat/config/application.yml` + +## 0. Virtual Thread Configuration + +Virtual-thread related defaults, tuning guidance, rollback switches, and Docker/package config locations are documented on a dedicated page: + +- [Virtual Thread Configuration](./virtual-thread) + +## 1. Configuring Custom Alert Parameters + +```yaml +alerter: + # Custom console URL + console-url: https://console.tancloud.io +``` + +## 2. Using an External Redis Instead of In-Memory Storage for Real-Time Metric Data + +> By default, real-time metric data is stored in memory. You can configure Redis as a replacement using the settings below. + +⚠️ Note: Set `memory.enabled: false, redis.enabled: true` + +```yaml +warehouse: + store: + memory: + enabled: false + init-size: 1024 + redis: + enabled: true + host: 127.0.0.1 + port: 6379 + password: 123456 +``` diff --git a/home/versioned_docs/version-1.9.0/start/docker-compose-deploy.md b/home/versioned_docs/version-1.9.0/start/docker-compose-deploy.md new file mode 100644 index 0000000000..e21b01c78b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/docker-compose-deploy.md @@ -0,0 +1,84 @@ +--- +id: docker-compose-deploy +title: Install HertzBeat via Docker Compose +sidebar_label: Install via Docker Compose +--- + +:::tip +Suggest to use Docker Compose to deploy HertzBeat and its dependent services. +::: + +:::note +This document assumes that you already have Docker and Docker Compose installed in your environment. If not, please refer to the [Docker official documentation](https://docs.docker.com/compose/install/). +Run the `docker compose version` command to check if you have a Docker Compose environment. +::: + +1. Download the startup script package + + Download the installation script package `apache-hertzbeat-xxx-docker-compose.tar.gz` from the [download](/docs/download) + +2. Choose to use the HertzBeat + PostgreSQL + VictoriaMetrics solution + + :::tip + + - `apache-hertzbeat-${version}-docker-compose.tar.gz` contains multiple deployment solutions after decompression. Here we recommend choosing the `hertzbeat-postgresql-victoria-metrics` solution. + - Other deployment methods, please read the README.md file of each deployment solution in detail. The MySQL solution requires you to prepare the MySQL driver package yourself. + + ::: + + - Unzip the script package + + ```shell + tar zxvf apache-hertzbeat-${version}-docker-compose.tar.gz + ``` + + - Enter the decompression directory and select `HertzBeat + PostgreSQL + VictoriaMetrics` for one-click deployment + + ```shell + cd apache-hertzbeat-${version}-docker-compose + cd hertzbeat-postgresql-victoria-metrics + ``` + + - Create the `.env` file and set the database password + + > `POSTGRES_PASSWORD` is required. `docker compose up` refuses to start without it. + + ```shell + cp .env.example .env + # Edit .env and set POSTGRES_PASSWORD to a strong password of your own + ``` + + - One-click start + + > Run script in `hertzbeat-postgresql-victoria-metrics` directory + + ```shell + docker-compose up -d + ``` + + - View service status + + > View the running status of each container, up is the normal running status + + ```shell + docker-compose ps + ``` + +3. Start exploring HertzBeat + Access [http://localhost:1157/](http://localhost:1157/) in the browser to start exploring and using it. The default account password is admin/hertzbeat. + + :::note + + The quick-start stack publishes every host port on `127.0.0.1` by default, so the web UI is reachable only from the machine running Docker. To open it to other hosts, set `HERTZBEAT_BIND_ADDRESS` in `.env` to an address those hosts can reach (a TLS reverse proxy is preferred over a wildcard address such as `0.0.0.0`), then run `docker compose config` to inspect the final port bindings and restart with `docker compose up -d`. + + This setting also opens `1158` for remote Collectors; `14317` (OTLP/gRPC) is controlled separately by `HERTZBEAT_OTLP_BIND_ADDRESS`. See the `README.md` of the deployment solution for details. + + ::: + +**HAVE FUN** + +---- + +## FAQ + +**The most common problem is network problems, please check in advance** diff --git a/home/versioned_docs/version-1.9.0/start/docker-deploy.md b/home/versioned_docs/version-1.9.0/start/docker-deploy.md new file mode 100644 index 0000000000..bdeebc70e0 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/docker-deploy.md @@ -0,0 +1,163 @@ +--- +id: docker-deploy +title: Install HertzBeat via Docker +sidebar_label: Install via Docker +--- + +:::tip +Using Docker to start HertzBeat with the minimum available environment, no external service dependencies, easy to experience quickly. +But it is not recommended to use in production environment, it is recommended to use Docker Compose deployment, installation package deployment, Kubernetes deployment in production environment. +::: + +:::note +It is necessary to have Docker environment in your environment. If not installed, please refer to [Docker official document](https://docs.docker.com/get-docker/) +::: + +## Deploy HertzBeat Server + +1. Execute the following command + + ```shell + $ docker run -d -p 1157:1157 -p 1158:1158 \ + -e HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=auto \ + -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 \ + --restart=always \ + --name hertzbeat apache/hertzbeat + ``` + + > Command parameter explanation + + - `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. + - `-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 to creating or deleting container. + - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional) Mount the log file to the local host to facilitate viewing. + - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional) Mount the configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional) Mount the account configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) + - `-v $(pwd)/ext-lib:/opt/hertzbeat/ext-lib` : (optional) Mount external third-party JAR packages when you need runtime JDBC extension. `mysql-jdbc` is only needed if you explicitly want the JDBC path for MySQL-compatible monitoring; [oracle-jdbc](https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar) and [oracle-i18n](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar) are still required for Oracle monitoring. + - `-e HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=auto` : (optional) Override the MySQL-compatible monitoring query path used by the built-in collector. Supported values: `auto`, `jdbc`, `r2dbc`. + - `--name hertzbeat` : (optional) Naming container name hertzbeat + - `--restart=always` : (optional) Configure the container to restart automatically. + - `apache/hertzbeat` : Use the [official application mirror](https://hub.docker.com/r/apache/hertzbeat) to start the container, if the network times out, use `quay.io/tancloud/hertzbeat` instead. + - `--network host` : (optional) Use the host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + + :::tip + + - Marked as optional parameters, non-mandatory items, if not needed, delete them. + - This maps the 1157,1158 ports of the container to the 1157,1158 ports of the host. If the port on the host is already occupied, you need to modify the host mapping port. + - When mounting files, the first parameter is your custom local file address, and the second parameter is the container file address. Make sure you have this file locally when mounting. + - You can execute `docker update --restart=always hertzbeat` to configure the container to restart automatically. + - If you want to use the host network mode to start Docker, you can use `docker run -d --network host .....` + + ::: + +2. Start to explore HertzBeat + Access [http://ip:1157/](http://ip:1157/) using browser. You can explore HertzBeat with default account `admin/hertzbeat` now! + +### Deploy HertzBeat Collector Cluster(Optional) + +:::note +HertzBeat Collector is a lightweight data collector used to collect and send data to HertzBeat Server. +By deploying multiple HertzBeat Collectors, high availability, load balancing, and cloud-edge collaboration of data can be achieved. +::: + +![HertzBeat](/img/docs/cluster-arch.png) + +1. Execute the following command + + ```shell + $ docker run -d \ + -e IDENTITY=custom-collector-name \ + -e MODE=public \ + -e MANAGER_HOST=127.0.0.1 \ + -e MANAGER_PORT=1158 \ + -e HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=auto \ + --name hertzbeat-collector apache/hertzbeat-collector + ``` + + > Command parameter explanation + + - `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 + - `-e MANAGER_HOST=127.0.0.1` : Important, Set the main hertzbeat server ip host, must use the server host instead of 127.0.0.1. + - `-e MANAGER_PORT=1158` : (optional) Set the main hertzbeat server port, default 1158. + - `-e HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=auto` : (optional) Override the MySQL-compatible monitoring query path. Supported values: `auto`, `jdbc`, `r2dbc`. + - `-v $(pwd)/ext-lib:/opt/hertzbeat-collector/ext-lib` : (optional) Mount external JDBC driver jars to the collector. + - `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (optional) Mount the log file to the local host to facilitate viewing. + - `--name hertzbeat-collector` : Naming container name hertzbeat-collector + - `apache/hertzbeat-collector` : Use the [official application mirror](https://hub.docker.com/r/apache/hertzbeat-collector) to start the container, if the network times out, use `quay.io/tancloud/hertzbeat-collector` instead. + - `--network host` : (optional) Use the host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + + :::tip + + - Marked as optional parameters, non-mandatory items, if not needed, delete them. + - The `127.0.0.1` in `MANAGER_HOST` needs to be replaced with the external IP address of the HertzBeat Server. + - When mounting files, the first parameter is your custom local file address, and the second parameter is the container file address. Make sure you have this file locally when mounting. + - The collector keeps `/opt/hertzbeat-collector` as the stable container root path across upgrades. + - You can execute `docker update --restart=always hertzbeat-collector` to configure the container to restart automatically. + - If you want to use the host network mode to start Docker, you can use `docker run -d --network host .....` + + ::: + +2. Access `http://localhost:1157` and you will see the registered new collector in dashboard. + +**HAVE FUN** + +---- + +### FAQ + +**The most common problem is network problems, please check in advance** + +1. MYSQL, TDENGINE, IoTDB and HertzBeat are deployed on the same host by Docker,HertzBeat use localhost or 127.0.0.1 connect to the database but fail + The problems lies in Docker container failed to visit and connect localhost port. Because the docker default network mode is Bridge mode which can't access local machine through localhost. + + > Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. + > Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + +2. According to the process deploy,visit [http://ip:1157/](http://ip:1157/) no interface + Please refer to the following points to troubleshoot issues: + + > 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. + > 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + > 3:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. + +3. Historical monitoring charts have been missing data for a long time + + > 1:Check whether you configure victoria-metrics or Tdengine or IoTDB. No configuration means no historical chart data. + > 2: Check whether IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + +4. If the history chart on the monitoring page is not displayed,popup [please configure time series database] + + > As shown in the popup window,the premise of history chart display is that you need install and configure hertzbeat's dependency service database. + > Installation and initialization this database, please refer to [Using victoria-metrics to store metrics data](victoria-metrics-init) + +5. The time series database is installed and configured, but the page still displays a pop-up [Unable to provide historical chart data, please configure dependent time series database] + + > Please check if the configuration parameters are correct + > Is time-series database enable set to true + > Note⚠️If both hertzbeat and time-series database are started under the same host for docker containers, 127.0.0.1 cannot be used for communication between containers by default, and the host IP is changed + > You can check the startup logs according to the logs directory + +6. What is the purpose of application.yml + + > This file is the configuration file of HertzBeat, used to configure various parameters of HertzBeat, such as database connection information, time series database configuration, etc. + > Download `application.yml` file to the host directory, for example: $(pwd)/application.yml + > Download source [github/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + > You can modify the configuration yml file according to your needs. + > + > - If you need to use email to send alarms, you need to replace the email server parameters `spring.mail` in `application.yml` + > - **Recommended** If you need to use an external Mysql database to replace the built-in H2 database, you need to replace the `spring.datasource` parameter in `application.yml` For specific steps, see [Using Mysql to replace H2 database](mysql-change) + > - **Recommended** If you need to use the time series database victoria-metrics to store metric data, you need to replace the `warehouse.store.victoria-metrics` parameter in `application.yml` for specific steps, see [Using victoria-metrics to store metrics data](victoria-metrics-init) + +7. What is the purpose of sureness.yml + + > This file is the user configuration file of HertzBeat, used to configure user information of HertzBeat, such as account password, etc. + > HertzBeat default built-in three user accounts, respectively `admin/hertzbeat tom/hertzbeat guest/hertzbeat` + > If you need update account or password, configure `sureness.yml`. Ignore this step without this demand. + > Download and config `sureness.yml` in the host directory,eg:`$(pwd)/sureness.yml` + > Download from [github/script/sureness.yml](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) + > For detail steps, please refer to [Configure Account Password](account-modify) diff --git a/home/versioned_docs/version-1.9.0/start/doris-init.md b/home/versioned_docs/version-1.9.0/start/doris-init.md new file mode 100644 index 0000000000..30438e9191 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/doris-init.md @@ -0,0 +1,224 @@ +--- +id: doris-init +title: Use Apache Doris to Store Metrics and Logs Data (Optional) +sidebar_label: Metrics/Logs Store Doris +--- + +Apache HertzBeat's historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment) + +> It is recommended to use Greptime as metrics storage. + +Apache Doris is an MPP-based real-time analytics database. In HertzBeat, Doris can be used to store: + +- Metrics history data (`hzb_history`) +- Log data (`hzb_log`) + +**⚠️ If you do not configure a time-series database, only the last hour of historical data is retained.** + +> If you already have a Doris cluster, skip directly to the YML configuration section. + +## Install Doris (Optional) + +You can deploy Doris by package or Docker. For production, follow the official deployment guide: + +- Doris docs: [Quick Start](https://doris.apache.org/docs/4.x/gettingStarted/quick-start/) + +For HertzBeat integration, ensure at least: + +- FE MySQL service port is reachable (default `9030`) +- FE HTTP service port is reachable (default `8030`) + +### Note: Install MySQL JDBC Driver Jar + +- Download MySQL JDBC driver jar, for example mysql-connector-java-8.1.0.jar. [https://mvnrepository.com/artifact/com.mysql/mysql-connector-j/8.1.0](https://mvnrepository.com/artifact/com.mysql/mysql-connector-j/8.1.0) +- Copy this jar to the `ext-lib` directory in HertzBeat installation directory. +- Restart HertzBeat service. + +### Prerequisites + +1. Doris FE and BE are running normally. +2. HertzBeat can access: + - FE MySQL port (default `9030`) for metadata/query + - FE HTTP port (default `8030`) for Stream Load +3. The configured Doris user has permission to create database/table and insert/query data. + +### Configure Doris in HertzBeat `application.yml` + +1. Edit `hertzbeat/config/application.yml`. + + For Docker deployment, mount the config file from host. + For package deployment, modify `hertzbeat/config/application.yml` directly. + +2. Configure `warehouse.store.doris` (Production Environment Recommended using Stream Load Mode): + +```yaml +warehouse: + store: + doris: + enabled: true + # FE MySQL endpoint + url: jdbc:mysql://127.0.0.1:9030 + username: root + password: + + table-config: + # Enable dynamic partition for automatic expiration + enable-partition: true + # HOUR / DAY / MONTH + partition-time-unit: DAY + # Number of history partitions to keep + partition-retention-days: 30 + # Number of future partitions to pre-create + partition-future-days: 3 + buckets: 8 + replication-num: 3 + + pool-config: + minimum-idle: 5 + maximum-pool-size: 20 + connection-timeout: 30000 + + write-config: + # Strongly recommend stream mode in production for high throughput + write-mode: stream + batch-size: 1000 + flush-interval: 5 + stream-load-config: + # FE HTTP port + http-port: ":8030" + timeout: 60 + max-bytes-per-batch: 10485760 + # For complex networks (K8s/cross-domain): direct / public / private + redirect-policy: "" +``` + +### Switching to Stream Load Mode + +#### Production Environment Configuration + +For production deployments, **strongly recommend using Stream Load mode** to ensure high-performance large-scale writes. Stream Load writes directly to Doris storage layer, providing better throughput improvement compared to JDBC mode. + +#### Pre-Switch Checklist + +1. **Network Reachability** + - Ensure HertzBeat can access Doris FE HTTP port (default `8030`) + - If direct connection is not possible, configure BE endpoint labels in Doris + +2. **Special Configuration for Complex Network Scenarios** + + In K8s, cross-domain, or load-balanced environments, Stream Load's redirect mechanism requires special attention: + - FE redirects requests to an available BE, which must be reachable from HertzBeat + - Control returned BE address type via `redirect-policy`: + - `direct`: Direct BE IP connection + - `public`: Use public IP (cloud environments) + - `private`: Use private IP (private networks) + - Leave empty to use Doris default policy + + Reference: [Doris Stream Load in Complex Networks](https://doris.apache.org/zh-CN/docs/4.x/data-operate/import/load-internals/stream-load-in-complex-network) + +#### Switching Steps + +1. **Modify Configuration File** + + Edit `hertzbeat/config/application.yml` and change `write-mode` to `stream`: + + ```yaml + warehouse: + store: + doris: + write-config: + write-mode: stream # Change here: from jdbc to stream + stream-load-config: + http-port: ":8030" + timeout: 60 + max-bytes-per-batch: 10485760 + redirect-policy: "" # Configure if complex network + ``` + +2. **Restart HertzBeat Service** + +3. **Verify Successful Switch** + +Check HertzBeat logs for Stream Load messages + +#### Common Switching Questions + +**Q: Do I need to rebuild tables after switching?** + +A: No. Stream Load and JDBC modes use the same table structure, fully compatible. + +**Q: Will data be lost when switching from JDBC to Stream Load?** + +A: No. Both write modes are independent, historical data remains unchanged. + +**Q: How do I rollback if Stream Load fails?** + +A: If the stream processing fails, it will automatically try to use the jdbc mode for fallback writing + +**Q: Still getting timeouts in cross-network setup with redirect-policy configured?** + +A: Possible causes: + +- Returned BE address under current `redirect-policy` setting is unreachable +- Try different `redirect-policy` values (`direct` / `public` / `private`) +- Contact Doris admin to verify BE endpoint label configuration + +### Parameter Notes + +| Parameter | Description | +| --- | --- | +| `enabled` | Enable/disable Doris storage | +| `url` | Doris FE MySQL JDBC endpoint | +| `table-config.enable-partition` | Enable dynamic partition and automatic expiration | +| `table-config.partition-time-unit` | Partition granularity: `HOUR` / `DAY` / `MONTH` | +| `table-config.partition-retention-days` | Number of partitions retained | +| `table-config.partition-future-days` | Number of future partitions pre-created | +| `table-config.buckets` | Bucket count for table distribution | +| `table-config.replication-num` | Replica count | +| `write-config.write-mode` | `jdbc` or `stream` | +| `write-config.batch-size` | Write batch size | +| `write-config.flush-interval` | Flush interval in seconds | +| `stream-load-config.http-port` | Doris FE HTTP port for Stream Load | +| `stream-load-config.timeout` | Stream Load timeout in seconds | +| `stream-load-config.max-bytes-per-batch` | Max bytes per stream-load batch | +| `stream-load-config.redirect-policy` | Redirect policy for FE->BE endpoint selection: `direct` / `public` / `private` | + +### Restart HertzBeat + +After configuration changes, restart HertzBeat to apply Doris storage settings. + +### Verify Doris Storage Is Working + +1. Check HertzBeat logs for Stream Load success messages. +2. Verify database and tables: + +```sql +SHOW CREATE TABLE hertzbeat.hzb_history; +SHOW CREATE TABLE hertzbeat.hzb_log; +``` + +1. If partition is enabled, check dynamic partition state: + +```sql +SHOW DYNAMIC PARTITION TABLES FROM hertzbeat; +SHOW PARTITIONS FROM hertzbeat.hzb_history; +SHOW PARTITIONS FROM hertzbeat.hzb_log; +``` + +### FAQ + +1. Do I need to enable partition to use bucket distribution? + + > No. Buckets work with or without dynamic partition. `enable-partition` only controls dynamic partition and automatic expiration. + +2. Can I use Doris for both metrics and logs at the same time? + + > Yes. HertzBeat writes metrics into `hzb_history` and logs into `hzb_log` with the same Doris datasource configuration. + +3. If I change partition/bucket settings in `application.yml`, will existing tables auto-update? + + > No. Existing Doris table DDL is not automatically altered. For schema-level changes, apply DDL manually or recreate tables. + +4. Is stream load compression enabled? + + > Current implementation uses JSON stream load by default. diff --git a/home/versioned_docs/version-1.9.0/start/greptime-init.md b/home/versioned_docs/version-1.9.0/start/greptime-init.md new file mode 100644 index 0000000000..16d7564a1a --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/greptime-init.md @@ -0,0 +1,74 @@ +--- +id: greptime-init +title: Use Time Series Database Greptime to Store Metrics Data (Recommended) +sidebar_label: Metrics Store Greptime (Recommended) +--- + +Apache HertzBeat's historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment) + +> It is recommended to use Greptime as metrics storage. + +[Greptime](https://github.com/GreptimeTeam/greptimedb) is an Open-source, cloud-native, unified observability database for metrics, logs and traces, supporting SQL/PromQL/Streaming. + +It's designed to work on infrastructure of the cloud era, and users benefit from its elasticity and commodity storage. + +**⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** + +## Install GreptimeDvia Docker + +1. Download and install Docker environment +Docker tools download refer to [Docker official document](https://docs.docker.com/get-docker/). +After the installation you can check if the Docker version normally output at the terminal. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install Greptime with Docker + + ```shell + $ docker run -d -p 127.0.0.1:4000-4003:4000-4003 \ + v "$(pwd)/greptimedb:/tmp/greptimedb" \ + --name greptime \ + greptime/greptimedb:latest standalone start \ + --http-addr 0.0.0.0:4000 \ + --rpc-addr 0.0.0.0:4001 \ + --mysql-addr 0.0.0.0:4002 \ + --postgres-addr 0.0.0.0:4003 + ``` + +`-v "$(pwd)/greptimedb:/tmp/greptimedb"` is local persistent mount of greptime data directory. `$(pwd)/greptimedb` should be replaced with the actual local directory, default is the `greptimedb` directory under the current directory. +use```$ docker ps``` to check if the database started successfully + +### Configure the database connection in hertzbeat `application.yml` configuration file + +1. Configure HertzBeat's configuration file + Modify `hertzbeat/config/application.yml` configuration file [/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + Note⚠️The docker container way need to mount application.yml file locally, while you can use installation package way to unzip and modify `hertzbeat/config/application.yml` + Replace `warehouse.store.greptime` data source parameters, URL account and password. + + ```yaml + warehouse: + store: + duckdb: + enabled: false + greptime: + enabled: true + grpc-endpoints: localhost:4001 + http-endpoint: http://localhost:4000 + database: public + username: greptime + password: greptime + ``` + + The default database is `public`, if you specify another database name, you need to create it in `greptimeDB` in advance. + eg: Create a database named `hertzbeat` with a validity period of 90 days SQL: `CREATE DATABASE IF NOT EXISTS hertzbeat WITH(ttl='90d')` + +2. Restart HertzBeat + +### FAQ + +1. Do both the time series databases need to be configured? Can they both be used? + + > You don't need to configure all of them, you can choose one of them. Use the enable parameter to control whether it is used or not. You can also install and configure neither, which only affects the historical chart data. diff --git a/home/versioned_docs/version-1.9.0/start/influxdb-init.md b/home/versioned_docs/version-1.9.0/start/influxdb-init.md new file mode 100644 index 0000000000..279b85d604 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/influxdb-init.md @@ -0,0 +1,74 @@ +--- +id: influxdb-init +title: Use Time Series Database InfluxDB to Store Metrics Data (Optional) +sidebar_label: Metrics Store InfluxDB +--- + +Apache HertzBeat's historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment) + +> It is recommended to use VictoriaMetrics as metrics storage. + +**Note⚠️ Time series database is optional, but production environment configuration is strongly recommended to provide more complete historical chart functions and high performance** +**⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** +Note⚠️ Need InfluxDB 1.x Version. + +## 1. Use HuaweiCloud GaussDB For Influx +> +> Use [HuaweiCloud GaussDB For Influx](https://www.huaweicloud.com/intl/en-us/product/gaussdb.html) +> +> Get the `GaussDB For Influx` service url, username and password config. + +⚠️Note `GaussDB For Influx` enable SSL default, the service url should use `https:` + +### 2. Install TDengine via Docker + +1. Download and install Docker environment +Docker tools download refer to [Docker official document](https://docs.docker.com/get-docker/). +After the installation you can check if the Docker version normally output at the terminal. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install InfluxDB with Docker + + ```shell + $ docker run -p 8086:8086 \ + -v /opt/influxdb:/var/lib/influxdb \ + influxdb:1.8 + ``` + + `-v /opt/influxdb:/var/lib/influxdb` is local persistent mount of InfluxDB data directory. `/opt/influxdb` should be replaced with the actual local directory. + use```$ docker ps``` to check if the database started successfully + +### Configure the database connection in hertzbeat `application.yml` configuration file + +1. Configure HertzBeat's configuration file + Modify `hertzbeat/config/application.yml` configuration file + Note⚠️The docker container way need to mount application.yml file locally, while you can use installation package way to unzip and modify `hertzbeat/config/application.yml` + Replace `warehouse.store.influxdb` data source parameters, URL account and password. + + ```yaml + warehouse: + store: + # disable DuckDB + duckdb: + enabled: false + # enable influxdb + influxdb: + enabled: true + server-url: http://localhost:8086 + username: root + password: root + expire-time: '30d' + replication: 1 + ``` + +2. Restart HertzBeat + +### FAQ + +1. Do both the time series databases InfluxDB, IoTDB and TDengine need to be configured? Can they both be used? + + > You don't need to configure all of them, you can choose one of them. Use the enable parameter to control whether it is used or not. You can also install and configure neither, which only affects the historical chart data. diff --git a/home/versioned_docs/version-1.9.0/start/iotdb-init.md b/home/versioned_docs/version-1.9.0/start/iotdb-init.md new file mode 100644 index 0000000000..0760306fdb --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/iotdb-init.md @@ -0,0 +1,123 @@ +--- +id: iotdb-init +title: Use Time Series Database IoTDB to Store Metrics Data (Optional) +sidebar_label: Metrics Store IoTDB +--- + +Apache HertzBeat's historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment) + +> It is recommended to use VictoriaMetrics as metrics storage. + +Apache IoTDB is a software system that integrates the collection, storage, management and analysis of time series data of the Internet of Things. We use it to store and analyze the historical data of monitoring metrics collected. Support V1.0.+ version. + +**Note⚠️ Time series database is optional, but production environment configuration is strongly recommended to provide more complete historical chart functions and high performance** + +**⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** + +> If you already have an IoTDB environment, you can skip directly to the YML configuration step. + +## Install IoTDB via Docker +> +> Refer to the official website [installation tutorial](https://iotdb.apache.org/UserGuide/V0.13.x/QuickStart/WayToGetIoTDB.html) + +1. Download and install Docker environment + Docker tools download refer to [Docker official document](https://docs.docker.com/get-docker/). + After the installation you can check if the Docker version normally output at the terminal. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install IoTDB via Docker + + ```shell + $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ + -v /opt/iotdb/data:/iotdb/data \ + --name iotdb \ + apache/iotdb:1.2.2-standalone + ``` + + `-v /opt/iotdb/data:/iotdb/data` is local persistent mount of IotDB data directory.`/iotdb/data` should be replaced with the actual local directory. + use```$ docker ps``` to check if the database started successfully + +3. Configure the database connection in hertzbeat `application.yml`configuration file + + Modify `hertzbeat/config/application.yml` configuration file + Note⚠️The docker container way need to mount application.yml file locally, while you can use installation package way to unzip and modify `hertzbeat/config/application.yml` + Config the `warehouse.store.duckdb.enabled` `false`. Replace `warehouse.store.iot-db` data source parameters, HOST account and password. + + ```yml + warehouse: + store: + # disable DuckDB + duckdb: + enabled: false + # enable iot-db + iot-db: + enabled: true + host: 127.0.0.1 + rpc-port: 6667 + username: root + password: root + query-timeout-in-ms: -1 + # default '7776000000'(90days,unit:ms,-1:no-expire) + expire-time: '7776000000' + ``` + + **IoTDB Cluster Configuration** + + If you are using IoTDB for clustering, please refer to the configuration below: + + ```yaml + warehouse: + store: + # Disable default DuckDB + duckdb: + enabled: false + # Enable IoTDB + iot-db: + enabled: true + node-urls: ['127.0.0.1:6667','127.0.0.2:6667','127.0.0.3:6667'] + username: root + password: root + # if iotdb version >= 0.13 use default queryTimeoutInMs = -1; else use default queryTimeoutInMs = 0 + query-timeout-in-ms: -1 + # Data storage time: default '7776000000' (90 days, in milliseconds, -1 means never expire) + expire-time: '7776000000' + ``` + + Configuration parameters: + + | Parameter Name | Description | + |---------------------|-------------------------------------------------------------------------------------------| + | enabled | Whether to enable | + | host | IoTDB database address | + | rpc-port | IoTDB database port | + | node-urls | IoTDB cluster addresses | + | username | IoTDB database account | + | password | IoTDB database password | + | version | deprecated | + | query-timeout-in-ms | Query timeout | + | expire-time | Data storage time, default '7776000000' (90 days, in milliseconds, -1 means never expire) | + + > If both cluster configuration `node-urls` and standalone configuration are set simultaneously, the cluster `node-urls` configuration takes precedence. + +4. Restart HertzBeat + +### FAQ + +1. Do both the time series databases IoTDB and TDengine need to be configured? Can they both be used? + + > You don't need to configure all of them, you can choose one of them. Use the enable parameter to control whether it is used or not. You can also install and configure neither, which only affects the historical chart data. + +2. The historical chart of the monitoring page is not displayed, and pops up [Unable to provide historical chart data, please configure to rely on the time series database] + + > As shown in the pop-up window, the premise of displaying the history chart is to install and configure the dependent services of hertzbeat - IotDB database or TDengine database + +3. The TDengine database is installed and configured, but the page still displays a pop-up [Unable to provide historical chart data, please configure the dependent time series database] + + > Please check if the configuration parameters are correct + > Is td-engine enable set to true + > Note⚠️If both hertzbeat and TDengine are started under the same host for docker containers, 127.0.0.1 cannot be used for communication between containers by default, and the host IP is changed + > You can check the startup logs according to the logs directory diff --git a/home/versioned_docs/version-1.9.0/start/mysql-change.md b/home/versioned_docs/version-1.9.0/start/mysql-change.md new file mode 100644 index 0000000000..1a009132f0 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/mysql-change.md @@ -0,0 +1,115 @@ +--- +id: mysql-change +title: Use MYSQL Replace H2 Database to Store Metadata(Optional) +sidebar_label: Meta Store MYSQL +--- + +MySQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat™ allows you to use MySQL to store structured relational data such as monitoring information, alarm information and configuration information. + +> If you already have a MySQL environment and the MySQL version meets the requirements, you can skip directly to the database creation step. + +## Supported MySQL Versions + +Please ensure you are using a supported MySQL version. HertzBeat only supports MySQL 5.7+ or 8 versions. You can check the MySQL version with the following command: + +```shell +$ mysql --version +mysql Ver 8.0.25 for Linux on x86_64 (MySQL Community Server - GPL) +``` + +### Install MYSQL via Docker + +1. Download and install the Docker environment + For Docker installation, please refer to the [Docker official documentation](https://docs.docker.com/get-docker/). + After the installation, please verify in the terminal that the Docker version can be printed normally. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install MYSQl with Docker + + ```shell + $ docker run -d --name mysql \ + -p 3306:3306 \ + -v /opt/data:/var/lib/mysql \ + -e MYSQL_ROOT_PASSWORD=123456 \ + --restart=always \ + mysql:5.7 + ``` + + `-v /opt/data:/var/lib/mysql` is local persistent mount of mysql data directory. `/opt/data` should be replaced with the actual local directory. + use ```$ docker ps``` to check if the database started successfully + +### Database creation + +1. Enter MYSQL or use the client to connect MYSQL service + `mysql -uroot -p123456` +2. Create database named hertzbeat + `create database hertzbeat default charset utf8mb4 collate utf8mb4_general_ci;` +3. Check if hertzbeat database has been successfully created + `show databases;` + +### Add MYSQL jdbc driver jar + +- Download the MYSQL jdbc driver jar package, such as mysql-connector-java-8.0.25.jar. [https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip) +- Copy the jar package to the `hertzbeat/ext-lib` directory. + +### Modify hertzbeat's configuration file application.yml and switch data source + +- Configure HertzBeat's configuration file + Modify `hertzbeat/config/application.yml` configuration file + Note⚠️The docker container way need to mount application.yml file locally, while you can use installation package way to unzip and modify `hertzbeat/config/application.yml` + Replace `spring.database` data source parameters, URL account and password. + + For example: + +```yaml +spring: + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database: h2 + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + format_sql: true +``` + +Specific replacement parameters are as follows and you need to configure account according to the mysql environment: + +```yaml +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: 123456 + url: jdbc:mysql://mysql:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&useSSL=false + hikari: + max-lifetime: 120000 + jpa: + show-sql: false + database: mysql + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.MySQLDialect + format_sql: true +``` + +- It is recommended to set the host field in the MySQL URL to the public IP address when using HertzBeat in docker. + +> Note: The above applies to the method of downloading and installing the package. For local data source switching, simply complete the [Database creation](./mysql-change#database-creation) and modify the configuration in `hertzbeat-startup/src/main/resources/application.yml`. + +**Start HertzBeat visit [http://ip:1157/](http://ip:1157/) on the browser You can use HertzBeat monitoring alarm, default account and password are admin/hertzbeat** diff --git a/home/versioned_docs/version-1.9.0/start/native-collector.md b/home/versioned_docs/version-1.9.0/start/native-collector.md new file mode 100644 index 0000000000..e5ea2f9182 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/native-collector.md @@ -0,0 +1,119 @@ +--- +id: native-collector +title: Native Collector Guide +sidebar_label: Native Collector +description: When to choose the HertzBeat native collector package, its benefits, limitations, and deployment guidance. +--- + +## When should I choose the native collector? + +Choose the native collector package when your monitoring workload does not depend on loading external JDBC drivers from `ext-lib`. + +Typical native-friendly workloads include: + +- HTTP, HTTPS, website availability, and API checks +- Port, ping, SSL certificate, and other network probes +- MySQL, MariaDB, and OceanBase when you do not rely on runtime `ext-lib` JDBC loading +- TiDB when you do not rely on runtime `ext-lib` JDBC loading for its SQL query metric set +- Redis, Zookeeper, Kafka, and other non-JDBC monitoring types + +## Why use it? + +Compared with the JVM collector package, the native collector package is usually a better fit when you want: + +- Faster startup +- Lower baseline memory usage +- A simpler runtime without a bundled or preinstalled JDK + +## What are the trade-offs? + +The native collector package is not a drop-in replacement for every JVM collector scenario. + +- Native packages are platform-specific. You must choose the package that matches your OS and CPU architecture. +- The native collector does not support loading external JDBC driver JARs from `ext-lib` at runtime. +- If your deployment depends on JVM-style runtime classpath extension, keep using the JVM collector package. + +## Runtime requirements + +The native collector is an ahead-of-time compiled executable, so its runtime requirements are +**much stricter** than the JVM collector's. The JVM detects CPU features at startup and adapts; +a native image has its instruction set baked in at build time, with no fallback. + +| Platform | Requirement | +| --- | --- | +| Linux / Windows (x86-64) | The CPU must support **AVX2**: Intel Haswell (2013) or newer, AMD Zen (2017) or newer | +| Linux (both architectures) | **glibc 2.34 or newer** | +| Linux (arm64) | ARMv8-A baseline, no extra instruction set required | +| Windows | Windows 10 / Server 2016 or newer, with the **Microsoft Visual C++ 2015-2022 Redistributable** installed | + +Common distributions, against the glibc 2.34 line: + +| Works | Does not work | +| --- | --- | +| Ubuntu 22.04 / 24.04, Debian 12, RHEL / Rocky / AlmaLinux 9, Amazon Linux 2023 | Ubuntu 20.04, Debian 11, RHEL / Rocky / AlmaLinux 8, CentOS 7, Amazon Linux 2 | + +Other environments without AVX2 include some Atom-family low-end chips (J4125, N4020, N5105), +Rosetta 2 on Apple Silicon, and Windows on ARM without the newer Prism emulator. + +:::caution The failure modes are misleading + +- **No AVX2**: the process exits **instantly, with no output and no log file** (`Illegal instruction` + on Linux, exit code `-1073741795` on Windows) +- **glibc too old**: `version 'GLIBC_2.34' not found` +- **Missing VC++ runtime on Windows**: `VCRUNTIME140_1.dll` not found + +The first one is easily mistaken for a corrupted package. If double-clicking does nothing, or the +process starts and prints nothing at all, check for AVX2 support first. + +**If any requirement is not met, use the JVM collector package** +`apache-hertzbeat-collector-{version}-bin.tar.gz` instead. It only needs JDK 25 and has none of +these constraints. +::: + +## When should I stay on the JVM collector? + +Use the JVM collector package if your monitoring depends on external JDBC drivers, especially: + +- Oracle, which requires `ojdbc8` and sometimes `orai18n` +- DB2, which requires `jcc` +- Any MySQL, MariaDB, or OceanBase deployment where you explicitly place `mysql-connector-j` in `ext-lib` and want the JDBC path + +## Package naming + +The JVM collector package remains cross-platform: + +- `apache-hertzbeat-collector-{version}-bin.tar.gz` + +The native collector package is platform-specific: + +- Linux or macOS: `apache-hertzbeat-collector-native-{version}-{platform}-bin.tar.gz` +- Windows: `apache-hertzbeat-collector-native-{version}-windows-amd64-bin.zip` + +Examples: + +- `apache-hertzbeat-collector-native-1.9.0-linux-amd64-bin.tar.gz` +- `apache-hertzbeat-collector-native-1.9.0-macos-arm64-bin.tar.gz` +- `apache-hertzbeat-collector-native-1.9.0-windows-amd64-bin.zip` + +## Configuration consistency + +The native collector package uses the same `config/application.yml` layout as the JVM collector package. + +That means: + +- Collector connection settings are edited in the same place +- Virtual-thread related configuration is edited in the same place +- Native-only boot adjustments are applied by code at runtime instead of maintaining a second `application.yml` + +## Recommended decision + +- Choose the native collector package when you want lower memory usage and faster startup for non-JDBC monitoring, for MySQL, MariaDB, and OceanBase without `ext-lib`, or for TiDB when its SQL query metric set can use the built-in MySQL-compatible query engine. +- Choose the JVM collector package when you need `ext-lib`, external JDBC drivers, or JVM-style runtime extensibility. +- For MySQL-compatible monitoring on the JVM collector, `auto` only checks `ext-lib`. If you need to force a path, set `hertzbeat.collector.mysql.query-engine=jdbc`, `r2dbc`, or `auto`. + +## How are the official multi-platform packages built? + +- `mvn clean package -pl hertzbeat-collector-collector -am -Pnative` builds a native collector package for the current host only. +- The official Linux, macOS, and Windows native release packages are produced by manually running the `Collector Native Release` GitHub Actions workflow during release preparation, not on every push or pull request. + +For package deployment steps, refer to [Install HertzBeat via Package](package-deploy). diff --git a/home/versioned_docs/version-1.9.0/start/package-deploy.md b/home/versioned_docs/version-1.9.0/start/package-deploy.md new file mode 100644 index 0000000000..4453269c6b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/package-deploy.md @@ -0,0 +1,169 @@ +--- +id: package-deploy +title: Install HertzBeat via Package +sidebar_label: Install via Package +--- + +:::tip +You can install and run Apache HertzBeat™ on Linux Windows Mac system, and CPU supports X86/ARM64. +The current branch uses `Java 25`, and the standard installation package no longer provides a built-in JDK. Use HertzBeat according to the following situations: + +- When the default environment variable on your server is `Java 25`, you do not need to take any action for this step. +- When the default environment variable on your server is not `Java 25`, such as `Java 8`, `Java 11`, or `Java 21`, and if there are no other applications on your server that require a lower version of Java, download `Java 25` from [https://www.oracle.com/java/technologies/downloads/](https://www.oracle.com/java/technologies/downloads/) according to your system, and set a new environment variable pointing to `Java 25`. +- When the default environment variable on your server is not `Java 25`, such as `Java 8`, `Java 11`, or `Java 21`, and you do not want to change the environment variable because there are other applications on your server that require a lower version of Java, download `Java 25` from [https://www.oracle.com/java/technologies/downloads/](https://www.oracle.com/java/technologies/downloads/) according to your system, rename the extracted folder to `java`, and then copy it to the HertzBeat extraction directory. + +::: + +## Deploy HertzBeat Server + +1. Download installation package + + Download installation package `apache-hertzbeat-xxx-bin.tar.gz` corresponding to your system environment + - [Download Page](/docs/download) + +2. Configure HertzBeat's configuration file(optional) + + Unzip the installation package to the host eg: /opt/hertzbeat + + ```shell + tar zxvf apache-hertzbeat-xxx-bin.tar.gz + ``` + + :::tip + The configuration file is located in `config/application.yml`, you can modify the configuration file according to your needs to configure external dependent services, such as databases, time series databases, etc. + HertzBeat defaults to using internal services when started, but it is recommended to switch to external database services in production environments. + ::: + + It is recommended to use [PostgreSQL](postgresql-change) for metadata storage and [VictoriaMetrics](victoria-metrics-init) for metric data storage. Specific steps are as follows + + - [Switch built-in H2 database to PostgreSQL](postgresql-change) + - [Using VictoriaMetrics to store metric data](victoria-metrics-init) + +3. Configure the account file(optional) + + HertzBeat default built-in three user accounts, respectively `admin/hertzbeat tom/hertzbeat guest/hertzbeat` + If you need modify account or password, configure `config/sureness.yml`. + For detail steps, please refer to [Configure Account Password](account-modify) + +4. Start the service + + Execute the startup script in the installation directory `bin/`, or `startup.bat` in windows. + + ```shell + ./startup.sh + ``` + +5. Begin to explore HertzBeat + + Access [http://ip:1157/](http://ip:1157/) using browser. You can explore HertzBeat with default account `admin/hertzbeat` now! + +### Deploy HertzBeat Collector Cluster(Optional) + +:::note +HertzBeat Collector is a lightweight data collector used to collect and send data to HertzBeat Server. +Deploying multiple HertzBeat Collectors can achieve high availability, load balancing, and cloud-edge collaboration of data. +::: + +:::tip Native Collector Recommendation +If your monitoring workload does not depend on external JDBC drivers from `ext-lib`, prefer the native collector package for faster startup and lower memory usage. MySQL, MariaDB, and OceanBase can also use the native collector package directly when `mysql-connector-j` is not provided. TiDB follows the same rule for its SQL query metric set. + +Before choosing it, review the trade-offs in [Native Collector Guide](native-collector). +::: + +![HertzBeat](/img/docs/cluster-arch.png) + +1. Download installation package + + Download the collector package that matches your deployment mode: + - JVM collector package: `apache-hertzbeat-collector-xxx-bin.tar.gz` + - Native collector package for Linux or macOS: `apache-hertzbeat-collector-native-xxx-{platform}-bin.tar.gz` + - Native collector package for Windows: `apache-hertzbeat-collector-native-xxx-windows-amd64-bin.zip` + - [Download Page](/docs/download) + +2. Configure the collector configuration file + + Unzip the installation package to the host eg: /opt/hertzbeat-collector + + ```shell + tar zxvf apache-hertzbeat-collector-xxx-bin.tar.gz + # or + tar zxvf apache-hertzbeat-collector-native-xxx-linux-amd64-bin.tar.gz + # or + unzip apache-hertzbeat-collector-native-xxx-windows-amd64-bin.zip + ``` + + Configure the collector configuration yml file `config/application.yml`: unique `identity` name, running `mode` (public or private), hertzbeat `manager-host`, hertzbeat `manager-port` + + ```yaml + collector: + dispatch: + entrance: + netty: + enabled: true + identity: ${IDENTITY:} + mode: ${MODE:public} + manager-host: ${MANAGER_HOST:127.0.0.1} + manager-port: ${MANAGER_PORT:1158} + ``` + + > Parameters detailed explanation + + - `identity` : (optional) Set the unique identifier name of the collector. Note that the name of the collector must be unique when there are multiple collectors. + - `mode` : Configure the running mode (public or private), public cluster mode or private cloud-edge mode. + - `manager-host` : Important, configure the address of the connected HertzBeat Server, + - `manager-port` : (optional) Configure the port of the connected HertzBeat Server, default 1158. + +3. Start the service + + Run `$ ./bin/startup.sh` or `bin/startup.bat` for the JVM collector package. Run `$ ./bin/startup.sh` for Linux or macOS native collector packages, and `bin\\startup.bat` for the Windows native collector package. + +4. Begin to explore HertzBeat Collector + + Open the HertzBeat server dashboard at `http://:1157` and confirm the new collector is registered. + +:::important Native Collector Limitations +The native collector package is suitable for monitoring types that do not rely on external JVM classpath extension. + +See [Native Collector Guide](native-collector) for package selection, package naming, and platform-specific trade-offs. + +`ext-lib`-based JDBC driver loading is a JVM collector capability. The native collector package does not support loading external JDBC driver JARs from `ext-lib` at runtime. + +If your monitoring depends on external JDBC drivers, use the JVM collector package instead of the native collector package. This currently includes: + +- Oracle, which requires `ojdbc8` and often `orai18n` +- DB2, which requires `jcc` +- Any MySQL, MariaDB, or OceanBase deployment where you explicitly place `mysql-connector-j` in `ext-lib` and want the JDBC path + +Recommended deployment: + +- Use the native collector package for HTTP, website, port, ping, similar non-JDBC monitoring types, and for MySQL, MariaDB, or OceanBase without `ext-lib` +- Use the JVM collector package when you need `ext-lib` driver extension +::: + +**HAVE FUN** + +---- + +### FAQ + +1. you need to prepare the JAVA environment in advance + + Install JAVA runtime environment-refer to [official website](https://www.oracle.com/java/technologies/downloads/) + requirement:JDK25 ENV + download JAVA installation package: [mirror website](https://mirrors.huaweicloud.com/openjdk/) + After installation use command line to check whether you install it successfully. + + ```shell + $ java -version + openjdk version "25.0.2" 2026-01-20 + OpenJDK Runtime Environment (build 25.0.2+8) + OpenJDK 64-Bit Server VM (build 25.0.2+8, mixed mode, sharing) + + ``` + +2. According to the process deploy,visit [http://ip:1157/](http://ip:1157/) no interface + Please refer to the following points to troubleshoot issues: + + > 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. + > 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. + > 3:Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. diff --git a/home/versioned_docs/version-1.9.0/start/postgresql-change.md b/home/versioned_docs/version-1.9.0/start/postgresql-change.md new file mode 100644 index 0000000000..a062de9566 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/postgresql-change.md @@ -0,0 +1,103 @@ +--- +id: postgresql-change +title: Use PostgreSQL Replace H2 Database to Store Metadata(Recommended) +sidebar_label: Meta Store PostgreSQL (Recommended) +--- + +PostgreSQL is an RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat™ allows you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. + +> If you have a PostgreSQL environment, you can skip directly to the database creation step. + +## Install PostgreSQL via Docker + +1. Download and install the Docker environment + Docker tools download refer to [Docker official document](https://docs.docker.com/get-docker/)。 + After the installation you can check if the Docker version normally output at the terminal. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install PostgreSQL with Docker + + ```shell + docker run -d --name postgresql -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=123456 -e TZ=Asia/Shanghai postgres:15 + ``` + + use```$ docker ps```to check if the database started successfully + +### Database creation + +1. Enter postgreSQL or use the client to connect postgreSQL service + + ```shell + su - postgres + psql + ``` + +2. Create database named hertzbeat + + ```sql + CREATE DATABASE hertzbeat; + ``` + +3. Check if hertzbeat database has been successfully created + + ```sql + SELECT * FROM pg_database where datname='hertzbeat'; + ``` + +### Modify hertzbeat's configuration file application.yml and switch data source + +1. Configure HertzBeat's configuration file + Modify `hertzbeat/config/application.yml` configuration file + Note⚠️The docker container way need to mount application.yml file locally, while you can use installation package way to unzip and modify `hertzbeat/config/application.yml` + Replace `spring.database` data source parameters, URL account and password. + +```yaml +spring: + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database: h2 + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + format_sql: true +``` + +Specific replacement parameters are as follows and you need to configure account, ip, port according to the postgresql environment: + +```yaml +spring: + datasource: + driver-class-name: org.postgresql.Driver + username: root + password: 123456 + url: jdbc:postgresql://postgresql:5432/hertzbeat + hikari: + max-lifetime: 120000 + jpa: + show-sql: false + database: postgresql + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.PostgreSQLDialect + format_sql: true +``` + +> Note: The above applies to the method of downloading and installing the package. For local data source switching, simply complete the [Database creation](./postgresql-change#database-creation) and modify the configuration in `hertzbeat-startup/src/main/resources/application.yml`. + +**Start HertzBeat visit [http://ip:1157/](http://ip:1157/) on the browser You can use HertzBeat monitoring alarm, default account and password are admin/hertzbeat** diff --git a/home/versioned_docs/version-1.9.0/start/questdb-init.md b/home/versioned_docs/version-1.9.0/start/questdb-init.md new file mode 100644 index 0000000000..2fee912fd3 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/questdb-init.md @@ -0,0 +1,137 @@ +--- + +id: questdb-init + +title: Installation and Initialization of Time-Series Database Service QuestDB (Optional) + +sidebar_label: Metrics Store QuestDB + +--- + + + +The historical data storage of Apache HertzBeat™ relies on a time-series database. You can choose to install and initialize **one** of the supported databases, or skip the installation (⚠️ However, it is strongly recommended to configure one in the production environment). + +> We recommend using and providing long-term support for VictoriaMetrics as the storage solution. + +QuestDB is an open-source time-series database that stands out in the field of time-series data processing due to its high performance and low latency. We use it to store and analyze the collected historical monitoring metric data. + +**⚠️ Note: Configuring a time-series database is optional, but it is strongly recommended for production environments to ensure more comprehensive historical chart functions, high performance, and stability.** + +**⚠️ If no time-series database is configured, only the historical data of the last hour will be retained.** + +> If you already have an existing QuestDB environment, you can skip directly to the YML configuration step. + +## Install QuestDB + +1. Download the installation package + +​ Download the latest version for your operating system from the official GitHub repository: + +```shell +# For Linux/macOS (taking v7.3.9 as an example; replace with the latest version number) +wget https://github.com/questdb/questdb/releases/download/7.3.9/questdb-7.3.9-no-jre-bin.tar.gz + +# Extract the package +tar -zxvf questdb-7.3.9-no-jre-bin.tar.gz +mv questdb-7.3.9 /opt/questdb # Move to a common directory +``` + +​ For Windows users: + +​ Download the zip package and extract it to C:\questdb or a custom directory. + +2. Start QuestDB + +```shell +# For Linux/macOS: Navigate to the installation directory and start the service +cd /opt/questdb/bin +./questdb start + +# For Windows (Command Prompt): +cd C:\questdb\bin +questdb.exe start +``` + +3. Set up access password + +​ QuestDB enables authentication through a configuration file, which needs to be modified manually. + +​ Edit the configuration file: + +```shell +# For Linux/macOS +vi /opt/questdb/conf/server.conf + +# For Windows +notepad C:\questdb\conf\server.conf +``` + +​ Enable authentication and configure the password: + +```shell +# Enable authentication (disabled by default) +http.security.enabled=true +pg.security.enabled=true # PostgreSQL protocol authentication + +# Set admin account and password (customize as needed) +http.security.admin.username=admin +http.security.admin.password=YourStrongPassword123! + +# Optional: Restrict Web Console access to specific IPs (e.g., local access only) +http.bind.to=127.0.0.1:9000 +``` + +​ Restart QuestDB for the changes to take effect: + +```shell +# For Linux/macOS +./questdb stop +./questdb start + +# For Windows +questdb.exe stop +questdb.exe start +``` + +4. Configure QuestDB connection in HertzBeat's application.yml file + +​ Modify HertzBeat's configuration file + +​ Locate and edit the configuration file at hertzbeat/config/application.yml + +​ ⚠️ Note: For Docker container deployment, you need to mount the application.yml file to the host machine. For the installation package deployment, simply extract the package and modify the file at hertzbeat/config/application.yml. + +​ **Set the** **warehouse.store.duckdb.enabled** **parameter to** **false****, configure the** **warehouse.store.questdb** **data source parameters (HOST, username, password, etc.), and set** **enabled** **to** **true** **to enable QuestDB.** + +```yaml +warehouse: + store: + # Disable the default DuckDB + duckdb: + enabled: false + # Enable QuestDB + questdb: + enabled: true + url: localhost:9000 + username: admin + password: quest +``` + +Parameter Description: + +| Parameter Name | Description | +| -------------- | ------------------------------ | +| enabled | Whether to enable QuestDB | +| url | QuestDB server URL (host:port) | +| username | QuestDB database account | +| password | QuestDB database password | + +> **Note:** Due to QuestDB's architectural design, if you need to set an expiration time for data, you can configure it in QuestDB's configuration file server.conf: + +```shell +cairo.default.ttl=30d +``` + +5. Restart HertzBeat + diff --git a/home/versioned_docs/version-1.9.0/start/quickstart.md b/home/versioned_docs/version-1.9.0/start/quickstart.md new file mode 100644 index 0000000000..d68cf330de --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/quickstart.md @@ -0,0 +1,166 @@ +--- +id: quickstart +title: HertzBeat Quick Start - Install in 5 Minutes +sidebar_label: Quick Start +description: Install Apache HertzBeat monitoring system in minutes using Docker, package, or source code. Step-by-step guide for X86 and ARM64 systems. +--- + +## How to Install HertzBeat? + +Install Apache HertzBeat™ in under 5 minutes using Docker with a single command. HertzBeat supports Docker, binary packages, and source code installation on X86/ARM64 architectures. + +**Quick Install Command:** `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` + +## Installation Methods + +HertzBeat provides multiple installation options: + +1. **Docker** (Recommended) - Fastest setup, production-ready +2. **Binary Package** - Traditional deployment with manual configuration +3. **Source Code** - For development and customization +4. **Docker Compose** - Full stack with database and time-series storage + +### Installation Method Comparison + +| Method | Setup Time | Difficulty | Use Case | +|--------|-----------|-----------|----------| +| Docker | 2 minutes | Easy | Production, testing | +| Package | 10 minutes | Medium | Custom configurations | +| Source Code | 30 minutes | Advanced | Development | +| Docker Compose | 5 minutes | Easy | Full stack deployment | + +## Installation Instructions + +### 1:Install quickly via docker + +1. Just one command to get started: + + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + +2. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` + +3. Deploy collector clusters(Optional) + + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` + + - `-e IDENTITY=custom-collector-name` : set the collector unique identity name. + - `-e MODE=public` : set the running mode(public or private), public cluster or private cloud-edge. + - `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. + - `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. + +Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.apache.org/docs/start/docker-deploy) + +#### 2:Install via package + +1. Download the release package `apache-hertzbeat-xx-bin.tar.gz` [Download Page](https://hertzbeat.apache.org/docs/download) +2. Configure the HertzBeat configuration yml file `hertzbeat/config/application.yml` (optional) +3. Run command `$ ./bin/startup.sh` or `bin/startup.bat` +4. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` +5. Deploy collector clusters(Optional) + - If you do not need external JDBC drivers from `ext-lib`, prefer the native collector package for faster startup and lower memory usage. MySQL, MariaDB, and OceanBase can use the built-in query engine directly when `mysql-connector-j` is not provided. TiDB follows the same rule for its SQL query metric set. See [Native Collector Guide](native-collector). + - Download the release package `apache-hertzbeat-collector-xx-bin.tar.gz` (JVM collector) or the native collector package for your target platform, such as `apache-hertzbeat-collector-native-xx-linux-amd64-bin.tar.gz` or `apache-hertzbeat-collector-native-xx-windows-amd64-bin.zip`, to the new machine [Download Page](https://hertzbeat.apache.org/docs/download) + - Configure the collector configuration yml file `hertzbeat-collector/config/application.yml`: unique `identity` name, running `mode` (public or private), hertzbeat `manager-host`, hertzbeat `manager-port` + + ```yaml + collector: + dispatch: + entrance: + netty: + enabled: true + identity: ${IDENTITY:} + mode: ${MODE:public} + manager-host: ${MANAGER_HOST:127.0.0.1} + manager-port: ${MANAGER_PORT:1158} + ``` + + - Native collector trade-offs: platform-specific packages, no runtime `ext-lib` JDBC loading, and less suitable for JVM-style runtime classpath extension. See [Native Collector Guide](native-collector). + - If `mysql-connector-j` is present in `ext-lib`, the built-in server collector or JVM collector automatically prefers JDBC for MySQL, MariaDB, and OceanBase after restart. TiDB follows the same rule for its SQL query metric set, while its HTTP metrics stay unchanged. Oracle and DB2 still require the JVM collector package because they depend on external JDBC drivers. + - Run command `$ ./bin/startup.sh` or `bin/startup.bat` for the JVM collector package. Run `$ ./bin/startup.sh` for Linux or macOS native collector packages, and `bin\\startup.bat` for the Windows native collector package. + - Access the HertzBeat server dashboard at `http://localhost:1157` and confirm the new collector is registered. + +Detailed config refer to [Install HertzBeat via Package](package-deploy) + +##### 3:Start via source code + +1. Local source code debugging needs to start the back-end project `manager` and the front-end project `web-app`. +2. Backend:need `maven3+`, `java25`, `lombok`, start the `hertzbeat-startup` service. +3. Web:need `nodejs` and `pnpm` environment, run `pnpm install` then `pnpm start` in `web-app` directory after backend startup. +4. Access `http://localhost:4200` to start, default account: `admin/hertzbeat` + +Detailed steps refer to [CONTRIBUTING](../community/contribution) + +##### 4:Install All(hertzbeat+postgresql+tsdb) via Docker-compose + +Install and deploy the postgresql/mysql database, victoria-metrics/iotdb/tdengine database and hertzbeat at one time through [docker-compose deployment script](https://github.com/apache/hertzbeat/tree/master/script/docker-compose). + +Detailed steps refer to [Install via Docker-Compose](https://github.com/apache/hertzbeat/tree/master/script/docker-compose) + +##### 5. Install All(hertzbeat+collector+postgresql+tsdb) via kubernetes helm charts + +Install HertzBeat cluster in a Kubernetes cluster by Helm chart. + +Detailed steps refer to [Artifact Hub](https://artifacthub.io/packages/helm/hertzbeat/hertzbeat) + +## Installation FAQ + +### What are HertzBeat's system requirements? + +**Minimum Requirements:** + +- 2 CPU cores +- 4GB RAM +- 10GB disk space +- Docker 20.10+ or Java 25+ + +**Operating Systems:** Linux, macOS, Windows (via Docker or WSL) + +### What ports does HertzBeat use? + +- **1157** - Web UI and API +- **1158** - Collector communication (cluster mode only) + +### How do I verify HertzBeat is running? + +1. Check container status: `docker ps | grep hertzbeat` +2. Access web UI: `http://localhost:1157` +3. Login with: admin/hertzbeat + +### Can I change the default password? + +Yes. After first login, navigate to Settings → Account Management to change the password. + +### How do I upgrade HertzBeat? + +**Docker upgrade:** + +```bash +docker stop hertzbeat +docker rm hertzbeat +docker pull apache/hertzbeat:latest +docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat +``` + +### What database does HertzBeat use? + +HertzBeat uses H2 embedded database by default. For production, configure external databases: + +- **Metadata:** MySQL, PostgreSQL +- **Time-series data:** VictoriaMetrics, IoTDB, TDengine, InfluxDB + +### How do I add my first monitor? + +1. Login to web UI +2. Click "Monitors" → "New Monitor" +3. Select monitoring type (e.g., MySQL, Linux, Website) +4. Enter IP, port, credentials +5. Click "Confirm" to start monitoring + +### Where can I get help? + +- **Documentation:** [https://hertzbeat.apache.org/docs/](https://hertzbeat.apache.org/docs/) +- **GitHub Issues:** [https://github.com/apache/hertzbeat/issues](https://github.com/apache/hertzbeat/issues) +- **Community:** [https://hertzbeat.apache.org/docs/community/contact](https://hertzbeat.apache.org/docs/community/contact) + +**HAVE FUN** diff --git a/home/versioned_docs/version-1.9.0/start/rainbond-deploy.md b/home/versioned_docs/version-1.9.0/start/rainbond-deploy.md new file mode 100644 index 0000000000..2183dd6b78 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/rainbond-deploy.md @@ -0,0 +1,50 @@ +--- +id: rainbond-deploy +title: Use Rainbond Deploy HertzBeat +sidebar_label: Install via Rainbond +--- + +If you are unfamiliar with Kubernetes, and want to install Apache HertzBeat™ in Kubernetes, you can use Rainbond to deploy. Rainbond is a cloud-native application management platform built on Kubernetes and simplifies the application deployment to Kubernetes. + +## Rainbond Cloud deployment + +If you want to deploy "HertzBeat" on "Rainbond Cloud" in one click, you can follow the steps below to do so. + +- Open the details of the [HertzBeat application](https://hub.grapps.cn/marketplace/apps/753) + +![HertzBeat app desc](/img/docs/start/hertzbeat-desc.png) + +- Log in to your Rainbond Cloud account. If you don't have an account, register one in advance! + +![Rainbond Cloud](/img/docs/start/rainbond-cloud.png) + +- Select the version for installation + +![hertzbeat versions](/img/docs/start/hertzbeat-versions.png) + +## Open-source Rainbond deployment + +### Prerequisites + +To install Rainbond, please refer to [Rainbond Quick Install](https://www.rainbond.com/docs/quick-start/quick-install)。 + +### Deploy HertzBeat + +After logging in Rainbond, click Market in the left menu, switch to open source app store, and search HertzBeat in the search box, and click the Install button. + +![HertzBeat](/img/docs/start/install-to-rainbond-en.png) + +Fill in the following information, and click Confirm button to install. + +- Team: select a team or create a new team +- Cluster: select a cluster +- Application: select an application or create a new application +- Version: select a version + +After installation, HertzBeat can be accessed via the Access button. + +![HertzBeat](/img/docs/start/hertzbeat-topology-en.png) + +:::tip +HertzBeat installed via Rainbond, External Mysql database and Redis and IoTDB are used by default, The HertzBeat configuration file is also mounted, which can be modified in `Components -> Environment Configuration -> Configuration File Settings`. +::: diff --git a/home/versioned_docs/version-1.9.0/start/tdengine-init.md b/home/versioned_docs/version-1.9.0/start/tdengine-init.md new file mode 100644 index 0000000000..6a008a8751 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/tdengine-init.md @@ -0,0 +1,125 @@ +--- +id: tdengine-init +title: Use Time Series Database TDengine to Store Metrics Data (Optional) +sidebar_label: Metrics Store TDengine +--- + +Apache HertzBeat's historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment) + +> It is recommended to use VictoriaMetrics as metrics storage. + +TDengine is an open-source IoT time-series database, which we use to store the collected historical data of monitoring metrics. Pay attention to support ⚠️ 3.x version. + +**Note⚠️ Time series database is optional, but production environment configuration is strongly recommended to provide more complete historical chart functions and high performance** +**⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** +Note⚠️ Need TDengine 3.x Version. + +> If you have TDengine environment, can directly skip to create a database instance. + +## Install TDengine via Docker + +1. Download and install Docker environment +Docker tools download refer to [Docker official document](https://docs.docker.com/get-docker/). +After the installation you can check if the Docker version normally output at the terminal. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install TDengine with Docker + + ```shell + $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ + -v /opt/taosdata:/var/lib/taos \ + --name tdengine -e TZ=Asia/Shanghai \ + tdengine/tdengine:3.0.4.0 + ``` + + `-v /opt/taosdata:/var/lib/taos` is local persistent mount of TDengine data directory. `/opt/taosdata` should be replaced with the actual local directory. + `-e TZ="Asia/Shanghai"` can set time zone for TDengine.Set up the corresponding time zone you want. + use```$ docker ps``` to check if the database started successfully + +### Create database instance + +1. Enter database Docker container + + ```shell + docker exec -it tdengine /bin/bash + ``` + +2. Create database named hertzbeat + After entering the container,execute `taos` command as follows: + + ```shell + root@tdengine-server:~/TDengine-server# taos + Welcome to the TDengine shell from Linux, Client Version + Copyright (c) 2020 by TAOS Data, Inc. All rights reserved. + taos> + ``` + + execute commands to create database + + ```shell + taos> show databases; + taos> CREATE DATABASE hertzbeat KEEP 90 DURATION 10 BUFFER 16; + ``` + + The above statements will create a database named hertzbeat. The data will be saved for 90 days (more than 90 days data will be automatically deleted). + A data file every 10 days, memory blocks buffer is 16MB. + +3. Check if hertzbeat database has been created success + + ```shell + taos> show databases; + taos> use hertzbeat; + ``` + +**Note⚠️If you install TDengine using package** + +> In addition to start the server,you must execute `systemctl start taosadapter` to start adapter + +### Configure the database connection in hertzbeat `application.yml` configuration file + +1. Configure HertzBeat's configuration file + Modify `hertzbeat/config/application.yml` configuration file + Note⚠️The docker container way need to mount application.yml file locally,while you can use installation package way to unzip and modify `hertzbeat/config/application.yml` + Replace `warehouse.store.td-engine` data source parameters, URL account and password. + + ```yaml + warehouse: + store: + # disable jpa + jpa: + enabled: false + # enable td-engine + td-engine: + enabled: true + driver-class-name: com.taosdata.jdbc.rs.RestfulDriver + url: jdbc:TAOS-RS://localhost:6041/hertzbeat + username: root + password: taosdata + ``` + +2. Restart HertzBeat + +### FAQ + +1. Do both the time series databases IoTDB and TDengine need to be configured? Can they both be used? + + > You don't need to configure all of them, you can choose one of them. Use the enable parameter to control whether it is used or not. You can also install and configure neither, which only affects the historical chart data. + +2. The historical chart of the monitoring page is not displayed, and pops up [Unable to provide historical chart data, please configure to rely on the time series database] + + > As shown in the pop-up window, the premise of displaying the history chart is to install and configure the dependent services of hertzbeat - IotDB database or TDengine database + +3. The historical picture of monitoring details is not displayed or has no data, and TDengine has been deployed + + > Please confirm whether the installed TDengine version is 3.x, version 2.x are not compatible. + +4. The TDengine database is installed and configured, but the page still displays a pop-up [Unable to provide historical chart data, please configure the dependent time series database] + + > Please check if the configuration parameters are correct + > Is td-engine enable set to true + > Note⚠️If both hertzbeat and TDengine are started under the same host for docker containers, 127.0.0.1 cannot be used for communication between containers by default, and the host IP is changed + > You can check the startup logs according to the logs directory diff --git a/home/versioned_docs/version-1.9.0/start/update-1.6.0.md b/home/versioned_docs/version-1.9.0/start/update-1.6.0.md new file mode 100644 index 0000000000..f407fd6f77 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/update-1.6.0.md @@ -0,0 +1,161 @@ +--- +id: 1.6.0-update +title: How to update to 1.6.0 +sidebar_label: Update to 1.6.0 guide +--- + +## HertzBeat 1.6.0 Upgrade Guide + +:::note +This guide is applicable for upgrading from 1.5.0 to version 1.6.0. +If you are using an older version, it is recommended to reinstall using the export function, or upgrade to 1.5.0 and then follow this guide to 1.6.0. +::: + +Follow the [HertzBeat New Version Upgrade](upgrade) + +## Binary Installation Package Upgrade + +### Upgrade Java Environment + +Since version 1.6.0 uses Java 17 and the installation package no longer provides a built-in JDK version, use the new HertzBeat according to the following situations: + +- When the default environment variable on your server is Java 17, you do not need to take any action for this step. +- When the default environment variable on your server is not Java 17, such as Java 8 or Java 11, and if there are no other applications on your server that require a lower version of Java, download the appropriate version from [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) according to your system, and search the engine for how to set a new environment variable pointing to the new Java 17. +- When the default environment variable on your server is not Java 17, such as Java 8 or Java 11, and if there are other applications on your server that require a lower version of Java, download the appropriate version from [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) according to your system, and rename the extracted folder to `java`, then copy it to the HertzBeat extraction directory. + +### Upgrade Database + +Go to [https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration), choose the directory of your database and execute the corresponding `V160__update_column.sql` file for the upgrade SQL. + +### Upgrade Configuration Files + +Due to significant changes in `application.yml` and `sureness.yml`, it is recommended to directly use the new `yml` configuration files and then modify them based on your own needs. + +#### `application.yml` generally needs to modify the following parts + +Default is: + +```yaml + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE +``` + +If you change to a MySQL database, here is an example: + +```yaml + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: mysql + properties: + eclipselink: + logging: + level: SEVERE +``` + +#### `sureness.yml` modification is optional, usually when you need to change account passwords + +```yaml +# 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: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] +``` + +### Add the corresponding database drivers + +Due to the Apache Foundation's requirements for license compliance, HertzBeat's installation package cannot include dependencies with GPL licenses such as MySQL, Oracle, etc. Users need to add them themselves. Users can download the drivers from the following links and copy them to the `ext-lib` directory of the installation: + +- MySQL: [https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip) +- Oracle (If you want to monitor Oracle, these two drivers are required): + - [https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar](https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/23.4.0.24.05/ojdbc8-23.4.0.24.05.jar) + - [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar) + +Next, run the start-up script as before to experience the latest HertzBeat 1.6.0! + +## Docker Upgrade - Mysql Database + +- Stop the HertzBeat container: + + ```shell + docker stop hertzbeat + ``` + +- Upgrade the database script: + - Go to [https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/hertzbeat-startup/src/main/resources/db/migration), choose the directory of your database and execute the corresponding `V160__update_column.sql` file in MySQL. +- Upgrade the configuration files: + - As mentioned, due to significant changes in `application.yml` and `sureness.yml`, it is recommended to directly mount and use the new `yml` configuration files, and then modify them based on your own needs. +- Add the corresponding database drivers: + - Due to the Apache Foundation's license compliance requirements, HertzBeat's installation package cannot include MySQL, Oracle, and other GPL-licensed dependencies. Users need to add them themselves by downloading the driver jars from the above links and placing them in the local `ext-lib` directory, then mounting `ext-lib` to the container's `/opt/hertzbeat/ext-lib` directory when starting. + +Next, run HertzBeat using Docker as before to experience the latest HertzBeat 1.6.0! + +## Docker Installation Upgrade - H2 Built-in Database (Not recommended for production use) + +- Stop the HertzBeat container: + + ```shell + docker stop hertzbeat + ``` + +- Edit the H2 database files: + - Assuming you have mounted the H2 database files in the `data` directory to the local system, or copied the `/opt/hertzbeat/data` directory from the old container manually. + - Download the H2 driver jar from [https://mvnrepository.com/artifact/com.h2database/h2/2.2.220](https://mvnrepository.com/artifact/com.h2database/h2/2.2.220). + - Start the database locally using the H2 driver jar: + + ```shell + java -jar h2-2.2.220.jar -url jdbc:h2:file:./hertzbeat -user sa -password 123456 + ``` + +- Upgrade the configuration files: + - As mentioned, due to significant changes in `application.yml` and `sureness.yml`, it is recommended to directly mount and use the new `yml` configuration files, and then modify them based on your own needs. +- Add the corresponding database drivers: + - As mentioned, due to the Apache Foundation's license compliance requirements, HertzBeat's installation package cannot include MySQL, Oracle, and other GPL-licensed dependencies. Users need to add them themselves by downloading the driver jars from the above links and placing them in the local `ext-lib` directory, then mounting `ext-lib` to the container's `/opt/hertzbeat/ext-lib` directory when starting. + +Next, run the Docker to start HertzBeat as before to experience the latest HertzBeat 1.6.0! + +## Upgrade via Export and Import + +If you do not want to go through the tedious script upgrade method mentioned above, you can directly export and import the monitoring tasks and threshold information from the old environment. + +- Deploy a new environment with the latest version. +- Export the monitoring tasks and threshold information from the old environment on the page diff --git a/home/versioned_docs/version-1.9.0/start/update-1.7.0.md b/home/versioned_docs/version-1.9.0/start/update-1.7.0.md new file mode 100644 index 0000000000..3d1ca2a78f --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/update-1.7.0.md @@ -0,0 +1,41 @@ +--- +id: 1.7.0-update +title: How to update to 1.7.0 +sidebar_label: Update to 1.7.0 guide +--- + +## HertzBeat 1.7.0 Upgrade Guide + +:::note +This guide is applicable for upgrading from 1.6.x to version 1.7.0. +If you are using an older version, it is recommended to reinstall using the export function, or upgrade to 1.6.0 and then follow this guide to 1.7.0. +::: + +Follow the [HertzBeat New Version Upgrade](upgrade) + +## Installation Upgrade + +### Upgrade Database + +In 1.7.0, we use the `label` instead of `tag`, in some environment, we need drop or delete the table `hzb_tag_monitor_bind` in database. + +```sql +DELETE FROM hzb_tag_monitor_bind; +``` + +### Upgrade Alarm Threshold + +In 1.7.0, we redesign the new alarm threshold, include the Real-Time Threshold and Scheduled Threshold. +We need reconfigure the alarm threshold, alarm group by manual. + +:::tip +There are no default built-in threshold rules, such as the previous availability threshold. +So if you find that there is no alarm after the monitoring is down, you need to configure the corresponding availability threshold yourself. +::: + +## Upgrade via Export and Import + +If you do not want to go through the tedious script upgrade method mentioned above, you can directly export and import the monitoring tasks and threshold information from the old environment. + +- Deploy a new environment with the latest version. +- Export the monitoring tasks and threshold information from the old environment on the page diff --git a/home/versioned_docs/version-1.9.0/start/update-1.9.0.md b/home/versioned_docs/version-1.9.0/start/update-1.9.0.md new file mode 100644 index 0000000000..55c6560170 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/update-1.9.0.md @@ -0,0 +1,483 @@ +--- +id: 1.9.0-update +title: How to update to 1.9.0 +sidebar_label: Update to 1.9.0 guide +--- + +## HertzBeat 1.9.0 Upgrade Guide + +:::danger This release contains breaking changes +1.9.0 is **not** a drop-in replacement for the 1.8.x jar or image. The runtime, the configuration file, the authorization rules, the collector credential format, the GreptimeDB table schema and several alerting semantics all changed incompatibly. Read this guide in full before you start. +::: + +:::note +This guide applies to an upgrade from a **released 1.8.x** to a released 1.9.0. +On 1.6.x / 1.7.x, first upgrade step by step to 1.8.x using the [1.7.0 upgrade guide](1.7.0-update) and the guides for the versions in between, verify that it runs, and only then use this guide. +::: + +Follow the [HertzBeat New Version Upgrade](upgrade) + +## Am I Affected? Quick Check + +| Your deployment or usage | Sections to read | +|---|---| +| Installation package | [Runtime](#runtime), [Manager configuration](#manager-configuration-applicationyml), [Authorization rules](#authorization-rules-surenessyml) | +| Docker / Docker Compose | [Manager configuration](#manager-configuration-applicationyml), [Authorization rules](#authorization-rules-surenessyml), [Docker Compose](#docker-compose) | +| Helm | [Helm deployments](#helm-deployments); do not just override the image tag on a chart that has not been adapted | +| GreptimeDB enabled | [GreptimeDB](#greptimedb-only-when-enabled); skipping this stops log ingestion | +| Remote collectors deployed | [Collectors](#collectors); they must reach 1.9.0 before the manager does | +| SFTP, Synology, NVIDIA, Redis Sentinel or push style monitors | [Monitors](#monitors) | +| Scheduled thresholds, silences or group convergence | [Alerting and notification](#alerting-and-notification) | +| Scripts or third-party systems calling the HertzBeat API | [API consumers](#api-consumers) | +| Third-party jars in `ext-lib/`, or the template marketplace deployed | [Dependencies](#dependencies-and-third-party-components), [Removed features](#removed-features) | +| Your own plugins | [Plugin developers](#plugin-developers) | + +## Recommended Order and Maintenance Window + +There is no fixed dependency between the collectors and GreptimeDB, but both must be ready before manager 1.9.0 starts. The recommended order: + +1. Use the quick check above to identify every applicable section and rehearse in a test environment. Download and stage the 1.9.0 package, Java 25 and the new `application.yml` and `sureness.yml`, without overwriting the running 1.8.x files yet. +2. Before changing production data, upgrading a component or replacing a file, back up the configuration and deployment files listed in the next section and record the current version of every component. +3. While 1.8.x is still running, complete the actions that must happen in advance: delete push style monitors and their custom templates, review scheduled alert rules, rename hostless monitors where needed, clean up duplicate bulletin names, export templates from the marketplace, and remove conflicting old dependencies from `ext-lib/`. +4. With remote collectors, upgrade them to 1.9.0 one by one first. A 1.9.0 collector works against a 1.8.x manager, so this step usually needs no manager downtime. +5. Enter the maintenance window: stop the manager, and pause every sender that writes HertzBeat product logs to that GreptimeDB, directly or indirectly. Stop the collectors too if you want to avoid continuous retries. +6. Now that writes have stopped, take consistent backups or snapshots of the metadata database and GreptimeDB. +7. With GreptimeDB enabled, follow the staged upgrade path in this guide and rename the old `hertzbeat_logs` table. +8. Replace the whole manager installation, merge the new configuration and authorization rules, then start manager 1.9.0. With external writes still paused, copy the log history back and verify it after the new table has been created. +9. Resume one sender in a controlled manner, or send one test log, and work through the [post-upgrade checks](#post-upgrade-checks). Resume all external writers and close the window only after they pass. + +:::caution Downtime +The manager is unavailable from step 5 until it starts successfully in step 8. Collectors can be upgraded ahead of the window. Product log writes must stay stopped while GreptimeDB is upgraded, the table is renamed, the manager is switched over and the log history is copied back. The actual duration depends on the staged GreptimeDB upgrade, any volume restore and the history copy. Resume all senders only after a controlled new-log check succeeds. +::: + +## Backups Before Upgrading + +Backups happen in two stages. **Before making any change**, preserve: + +1. HertzBeat and collector files: `define/`, `ext-lib/`, `config/`, plus any externally mounted `application.yml`, `sureness.yml`, certificates and key files. +2. Container deployment files: `.env`, the compose file you actually use and any local edits to it; for Kubernetes, the ConfigMaps, Secrets, values files and mount declarations. +3. A record of the current 1.8.x package or image tag, every collector version and the GreptimeDB version, so the same artifacts can still be obtained if you need to roll back. + +After entering the maintenance window and stopping the related writes, take these **consistent backups**: + +1. The metadata database: the complete `data/` directory for H2, or a consistent dump of MySQL / PostgreSQL. +2. With GreptimeDB enabled: the complete data directory, Docker volume or external storage snapshot. This backup must be restorable together with the GreptimeDB version you were running before the upgrade. + +Do not overwrite or delete these backups until the upgrade is complete. Rehearsing both the upgrade and the rollback is strongly recommended if you use GreptimeDB, scheduled alert rules or a customised `sureness.yml`. + +## Runtime + +### Java 25 + +1.9.0 raises the Java runtime requirement from Java 17 to **Java 25**. As in 1.8.x, the generic installation package does not bundle a JDK. + +- The default Java on the server is already 25: nothing to do. +- The default Java is not 25 (for example 8, 11, 17 or 21) and no other application depends on it: install Java 25 and point the environment variable at it. +- Other applications depend on the older Java: download Java 25, rename the extracted folder to `java` and place it in the HertzBeat installation directory. The startup script prefers it. + +The Docker images are now based on `eclipse-temurin:25-jdk`, so Docker users need no action. + +### Package layout + +The startup scripts now put `lib/*` and `ext-lib/*` on the classpath explicitly instead of relying on the jar manifest. **Replace the whole installation directory**; do not swap only the main jar. + +### Collector image path + +The collector image working directory moved from `/opt/apache-hertzbeat-collector--bin/` to the fixed `/opt/hertzbeat-collector/`. Update every volume or Kubernetes ConfigMap mount that targets `config/`, `logs/` or `ext-lib/`. + +## Manager Configuration: application.yml + +### JPA provider switched from EclipseLink to Hibernate + +This is the easiest change to miss and the most immediate failure. **Keeping the 1.8.x `application.yml` prevents the manager from starting.** Replace the whole `spring.jpa` block according to your database. + +1.8.x form (remove it): + +```yaml +spring: + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE +``` + +1.9.0 form, H2: + +```yaml +spring: + jpa: + show-sql: false + database: h2 + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.H2Dialect + format_sql: true +``` + +MySQL: + +```yaml +spring: + jpa: + show-sql: false + database: mysql + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.MySQLDialect + format_sql: true +``` + +PostgreSQL: + +```yaml +spring: + jpa: + show-sql: false + database: postgresql + hibernate: + ddl-auto: update + properties: + hibernate: + dialect: org.hibernate.dialect.PostgreSQLDialect + format_sql: true +``` + +:::caution +`hibernate.ddl-auto: update` is mandatory. Tables and columns new in 1.9.0 (such as `hzb_auth_token` and the ntfy fields on notice receivers) are created by Hibernate. Without it the manager starts, but those features fail at runtime with SQL errors. +::: + +The Flyway migration new in 1.9.0 runs automatically at startup and needs no manual action. One of its statements has a visible effect: + +- It widens `hzb_alert_define.expr` to a large-text type (`TEXT` on PostgreSQL, `LONGTEXT` on MySQL, `CLOB` on H2), so expressions binding many monitors are no longer truncated. + +:::caution Deployments that mount their own application.yml +Docker Compose overrides the file inside the image with `./conf/application.yml`, and `docker run` setups commonly mount `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml`. **Pulling a new image does not update a mounted file**, so a 1.8.x copy hits the EclipseLink failure above just the same. Regenerate it from the 1.9.0 version and merge your own changes back in. +::: + +### Other configuration keys + +| 1.8.x | 1.9.0 | Notes | +|---|---|---| +| `management.endpoints.enabled-by-default: on` | `management.endpoints.access.default: read_only` | Spring Boot 4 removed the old key. Keeping it does not fail, but the actuator falls back to unrestricted mode. | +| none | `springdoc.api-docs.enabled: false`, `springdoc.swagger-ui.enabled: false` | The OpenAPI document is disabled by default. Enable it when needed; only the admin role can read it. | +| none | `hertzbeat.otlp.grpc.port: 14317` | New OTLP/gRPC listener when GreptimeDB is enabled, see [New Version Upgrade](upgrade#new-otlpgrpc-listener-on-port-14317). | +| none | `hertzbeat.collector.mysql.query-engine: auto` | Query engine selection for MySQL-family monitors, see [Collectors](#collectors). | +| `spring.mail.properties.mail.smtp.ssl.trust` | the "verify SSL certificate" toggle in the mail settings page | The yml property is no longer honoured; disable verification in the UI for self-signed SMTP servers. | + +## Authorization Rules: sureness.yml + +1.9.0 tightens the role requirements of many endpoints. The 1.9.0 installation package, the Docker image, the `conf/sureness.yml` of all five Compose variants and `script/sureness.yml` all ship the new rules. + +- Nothing mounted over `sureness.yml`: no action needed. +- A `sureness.yml` copy downloaded or copied on 1.8.x is mounted: **replace it with the 1.9.0 file**. The authorization rules changed in 1.9.0, and a mounted file overrides the one shipped in the package and the image. +- You customised the file: merge your changes onto the 1.9.0 version. + +What changed: + +- The alert and manager SSE streams (`/api/alert/sse/**`, `/api/manager/sse/**`) require an authenticated user in 1.9.0. The browser-native `EventSource` cannot send an authorization header; the web UI switched to an authenticated fetch stream and third-party dashboards must do the same. +- The following are **admin only** in 1.9.0: plugin upload `/api/plugin/**`, AI and SOP `/api/ai/**`, API token management `/api/account/token*`, configuration writes `/api/config/**`, template writes `/api/apps/**` (PUT/DELETE), `/actuator/**`, `/api/metrics`, `/api/warehouse/query`, single monitor deletion. Automation calling these endpoints has to switch to admin credentials. +- Creating and editing alert definitions (`POST/PUT /api/alert/define`, `/api/alert/defines/import`) and the threshold preview route `GET /api/alert/define/preview/**` are **admin only** in 1.9.0; guest cannot read alert definitions. +- Deleting labels, `DELETE /api/label/**`, is **admin only** in 1.9.0. +- External alert ingestion `POST /api/v2/alerts` accepts admin and user only in 1.9.0; Alertmanager / Zabbix integrations need credentials with one of those roles. +- The system secret configuration can no longer be read through the REST API; such requests return 403 for every role. +- The OpenAPI endpoints `/v3/api-docs/**` are admin only in 1.9.0. +- CORS no longer returns `Access-Control-Allow-Credentials`; cross-origin front ends relying on cookies must switch to an `Authorization: Bearer` header. + +If Prometheus scrapes `/actuator/prometheus`, configure the scrape job with an admin-role API token. + +## GreptimeDB (only when enabled) + +:::caution +1.9.0 initialises the GreptimeDB tables and the log pipeline at startup and **exits the manager when any step fails**, instead of degrading as 1.8.x did. Finish this section before starting the manager. +::: + +### Version requirement + +The `greptime/greptimedb:v0.14.3` shipped with the 1.8.x Docker Compose does not support the 1.9.0 log pipeline, and Compose 1.9.0 now pins `v1.1.3`. **Do not replace v0.14.3 directly with v1.1.3.** The [official GreptimeDB upgrade path](https://docs.greptime.com/user-guide/deployments-administration/upgrade/) requires releases earlier than v0.16 to upgrade to v0.16 first, and then to v1.0. + +Proceed in stages, following the official instructions applicable to each version. Before continuing, verify at every stage that GreptimeDB starts, the old tables can be queried and their row counts are as expected, then create a new restorable snapshot for the next stage: + +1. `v0.14.3` → a compatible `v0.16.x` release; +2. `v0.16.x` → `v1.0.x`; +3. `v1.0.x` → the Compose version, `v1.1.3`. + +If verification fails at any stage, restore the snapshot from before that stage. Do not let a later GreptimeDB version continue writing to that data directory. + +The configured GreptimeDB account needs permission to create and alter tables and to upload pipelines. + +### The body column of hertzbeat_logs + +1.8.x created `body` as a `JSON` column; 1.9.0 writes it as `STRING`. 1.9.0 does not alter the existing table, so **after a plain upgrade GreptimeDB rejects every new log write**. The only visible symptom is that logs stop updating, and log-based alerting stops with them. + +With the manager and every other log writer stopped, and the GreptimeDB snapshot taken, first check the old table and its size: + +```sql +SHOW CREATE TABLE hertzbeat_logs; +SELECT COUNT(*) AS row_count, MIN(time_unix_nano) AS min_time, MAX(time_unix_nano) AS max_time +FROM hertzbeat_logs; +``` + +Once you have confirmed that `body` is `JSON` and the table name is right: + +```sql +ALTER TABLE hertzbeat_logs RENAME hertzbeat_logs_v18; +``` + +Start 1.9.0 so it creates the new table, but keep external log writes paused. Confirm that the new table is empty, then copy the history back: + +```sql +INSERT INTO hertzbeat_logs (time_unix_nano, observed_time_unix_nano, trace_id, span_id, trace_flags, + severity_text, severity_number, body, attributes, resource, instrumentation_scope, dropped_attributes_count) +SELECT time_unix_nano, observed_time_unix_nano, trace_id, span_id, trace_flags, + severity_text, severity_number, json_to_string(body), attributes, resource, instrumentation_scope, dropped_attributes_count +FROM hertzbeat_logs_v18; +``` + +:::caution Copy the log history only once +The new table uses append-only mode, so this `INSERT ... SELECT` is **not idempotent** and running it twice duplicates logs. Record the old table's row count and earliest and latest timestamp before the copy. Those values should match in both tables after it succeeds. Only then resume one sender in a controlled manner and verify that a new log arrives. + +If the client disconnects, times out or cannot tell whether the statement completed, **do not rerun it directly**. Keep all product-log writers paused and compare the two tables' counts and time ranges. If you cannot prove that the target is still empty or that the copy completed, restore the pre-upgrade snapshot and repeat the whole GreptimeDB upgrade. If the target data must be retained, first design and verify a deduplicating migration in an isolated environment. +::: + +Do not assume GreptimeDB DDL rolls back with a transaction the way a relational database would: verify the result of every statement before moving on. + +:::danger +Do not run `ALTER TABLE hertzbeat_logs MODIFY COLUMN body STRING`. The statement succeeds, but the existing JSON binary content is then read back as garbage strings. +::: + +### Self-monitoring tables renamed + +HertzBeat's self-monitoring log and trace tables were renamed from `hzb_logs` / `hzb_traces` to `hzb_internal_logs` / `hzb_internal_traces`. There is no automatic migration; see [New Version Upgrade](upgrade#greptimedb-signal-tables-renamed) for how to approach it. + +The product trace table `hertzbeat_traces` is created fresh: 1.8.x had no trace ingestion route, no trace query API and no traces page, and `hzb_traces` holds nothing but HertzBeat's own spans, so there is no historical business trace data to migrate. + +## Collectors + +:::danger Collectors must be upgraded before the manager +1.9.0 changed the AES cipher format of monitor credentials. The manager never decrypts; it forwards the stored ciphertext to collectors. **A 1.8.x collector cannot decrypt passwords sent by a 1.9.0 manager**, so monitors that need authentication may fail to collect. The manager rewrites some credentials in the new format on its first start, without any user action. + +The handshake carries no version gate, so nothing stops the mismatched pair from connecting. The collector logs an AES decode error and the failure usually surfaces as an authentication error returned by the monitored service, which is easy to mistake for a wrong credential. + +Correct order: upgrade every collector to 1.9.0 first (a 1.9.0 collector decrypts the 1.8.x format and works fine against an old manager), then upgrade the manager. +::: + +### MySQL-family query engine + +1.9.0 ships a built-in R2DBC query engine for MySQL / MariaDB / OceanBase / TiDB. `query-engine` defaults to `auto`: when `mysql-connector-j` is present under `ext-lib/`, JDBC is used and behaviour is unchanged; otherwise the built-in engine is used. If your driver lives outside `ext-lib/`, set `HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=jdbc` explicitly. + +The built-in engine is stricter than JDBC: + +- Connection options in the `url` parameter (`useSSL`, `serverTimezone`, ...) are ignored. +- Custom SQL goes through an **allowlist**: only a single statement starting with `SELECT` or `SHOW` is accepted. +- Any comment (`--`, `#`, `/* */`) is rejected, and so is any statement containing `insert`/`update`/`delete`/`replace`/`merge`/`alter`/`drop`/`truncate`/`create`/`call` as a whole word — which also rules out `WITH ... SELECT`, `DESC` and `SHOW CREATE TABLE`. + +The built-in R2DBC path prefers TLS. If a TLS handshake or a MySQL authentication plugin compatibility error appears after the upgrade, configure a compatible TLS and authentication method for the monitoring account, or place `mysql-connector-j` in `ext-lib/` and set `HERTZBEAT_COLLECTOR_MYSQL_QUERY_ENGINE=jdbc` to return to the JDBC path. + +### JDBC database name validation + +The `database` parameter of JDBC monitors must now match `[A-Za-z0-9_$][A-Za-z0-9_$.-]{0,63}`. For names containing spaces, non-ASCII characters or more than 64 characters, put the full connection string in the `url` parameter instead. + +## Monitors + +### SFTP monitors + +SFTP monitors (FTP template with SSL enabled) reject every server host key after the upgrade. **Each SFTP monitor needs a host-key fingerprint**, or the temporary skip-verification option. See [New Version Upgrade](upgrade#sftp-monitors-require-an-explicit-host-key-policy). + +### Synology template renamed + +The Synology template `app` identifier changed from `synology` to `synology_nas`, and existing monitors are not migrated automatically. With the manager stopped and the metadata database backed up, first confirm which rows are affected: + +```sql +SELECT id, name, app FROM hzb_monitor WHERE app = 'synology'; +``` + +Once the result looks right, run the update and query again to confirm nothing was missed: + +```sql +UPDATE hzb_monitor SET app = 'synology_nas' WHERE app = 'synology'; +SELECT id, name, app FROM hzb_monitor WHERE app = 'synology'; +``` + +Alert definitions, notice rules and dashboard filters referencing `synology` need the same change. + +### Push style monitors removed + +The `push` protocol monitor template (Push Style Monitor) was removed. Before upgrading, find the affected monitors: + +```sql +SELECT id, name, app FROM hzb_monitor WHERE app = 'push'; +``` + +Delete them through the UI or the API **while still running 1.8.x**, so that HertzBeat also cleans up their parameters, alert bindings, parent-child bindings, metric favourites, collector bindings and scheduled jobs. **Do not hand-delete rows from `hzb_param` and `hzb_monitor` only** — that leaves orphaned data behind. If the UI and the API are no longer available, stop the manager first, then write and verify a complete transactional cleanup script for your database rather than copying an incomplete generic one. + +If you edited and saved a custom template containing a `push:` protocol block in the UI, or keep such a template in object storage, **delete it before upgrading**; otherwise template parsing fails and the manager exits at startup. The Prometheus push gateway `/api/push/prometheus/**` is a separate feature and is unaffected. + +### Template field changes + +- NVIDIA template, `basic` metric fields renamed: `utilization.gpu [%]` → `utilization_gpu`, `utilization.memory [%]` → `utilization_memory`, `memory.total [MiB]` → `memory_total`, `memory.used [MiB]` → `memory_used`, `memory.free [MiB]` → `memory_free`, `temperature.gpu` → `temperature_gpu`. Update alert definitions and dashboards that reference the old names. The same template also dropped the `proxyHost`, `proxyPort`, `proxyUsername`, `proxyPassword` and `proxyPrivateKey` parameters, so GPU monitors that reached the host through a jump server need another route to it. +- Redis Sentinel template, `sentinel` metric: `sentinel_masters`, `sentinel_tilt`, `sentinel_running_scripts`, `sentinel_scripts_queue_length` and `sentinel_simulate_failure_flags` changed from string to number. Rewrite string comparisons in alert definitions as numeric ones. +- The history query API now validates every parameter: `app`, the metric group and the field names accept only letters, digits, `_` and `-`, with a length of 1 to 200; `instance` additionally accepts `. : [ ]` but no spaces or non-ASCII characters; the time range must be 1–6 digits followed by `s`, `m`, `h`, `d`, `w` or `y`, case-insensitively (for example `6h`, `1D`). Check custom templates and API consumers against this. + +## Alerting and Notification + +### Scheduled alert rules + +Scheduled rules (PromQL and SQL) are now bounded at execution time: the query must be at most 8192 characters, the time range at most one day (`[2d]`, `[1w]`, `RANGE '2d'` are rejected) and the result at most 1000 rows. SQL rules must additionally be a single read-only statement starting with `SELECT` or `WITH`, without a database prefix, and parseable by a standard SQL parser. + +**Rules violating these limits save without error but are silently skipped at execution**, and alerts they already raised never resolve. Review every scheduled rule before upgrading; the threshold preview API can validate them (that API is admin-only now). + +### Empty values in real-time rules + +In 1.8.x a row was skipped when a metric field was empty or unparseable. In 1.9.0 numeric fields evaluate as `null` and string fields as an empty string. Consequences: + +- Negated expressions such as `field != 0`, `!contains(field, "x")` or `!matches(field, "...")` become true on empty rows and may raise false alerts. +- Alerts whose field went empty earlier are resolved in the first evaluation after the upgrade, producing a burst of resolved notifications. + +Guard such rules with `exists(field) &&`. + +### Cyclic alert silences + +Cyclic silence rules were effectively dead in 1.8.x after their creation day. 1.9.0 fixes them: they now match by time of day, with inclusive bounds, across midnight, and are evaluated in the **server time zone**. Every enabled cyclic silence starts suppressing alerts after the upgrade; review each one. Rules created from a browser in a different time zone shift by that offset. + +### Alert group convergence + +A firing group is re-notified every `repeat_interval` (default 4 hours). A `repeat_interval` of 0 re-sends every `group_interval` (default 5 minutes); set a large value instead. Label-filtered notice rules now fire when any alert in the group matches, and the group passed to the channel is rebuilt for that rule, so its `groupKey` can differ from the stored one. Downstream systems deduplicating on `groupKey` should use the per-alert `fingerprint`. + +### Notification channels + +- Webhook URLs are sent verbatim and no longer re-encoded. Receivers whose URL contains spaces, `|`, `{` or `}` must be corrected. +- Email notifications verify the SMTP certificate by default; disable verification in the mail settings page for self-signed servers. +- Secret fields of notice receivers (webhook tokens, bot tokens, Slack URLs, ...) are returned masked as `******` plus the last four characters. Scripts that read a receiver and create a new one from the response would store the mask as the real value; read then update instead. + +## API Consumers + +- Log query, log management and log SSE endpoints moved from `/api/logs/**` to `/api/observability/**`; the old paths return 404. The old OTLP log ingestion paths `/api/logs/otlp/v1/logs` and `/api/logs/ingest/otlp` are kept as deprecated aliases. The trace and metric query endpoints (`/api/observability/traces/**`, `/api/observability/metrics/**`) are new in 1.9.0 and have no 1.8.x equivalent. The full mapping is in [New Version Upgrade](upgrade#observability-otlp--logs--traces-api-paths-moved). +- The success body of the `/api/logs/ingest/otlp` alias changed from `{"code":0,...}` to `{}`; requests without `Content-Type` are parsed as protobuf; 429 and 503 are new status codes. +- `GET /api/monitor/{id}` returns password parameters masked as `******`; submitting the mask on update keeps the stored value; the mask is rejected on create. +- Monitor Excel export grew from 11 to 14 columns. **A 1.8.x xlsx cannot be imported into 1.9.0**; re-export, or use JSON / YAML. Import is now validated as a batch: one failing row rejects the whole file. +- Alert definition export gained a `datasource` field. Rules exported from 1.8.x import with an empty `datasource` and scheduled rules then never run; fill it in after import. +- The anonymous Prometheus push gateway `/api/push/prometheus/**` is now bounded: at most 5 MB per request body, 10000 samples per request, and 10000 auto-created monitors in total. Exceeding any of them returns 400 with `code` 0 in the body; the real reason is only in the server log. Tune with `HERTZBEAT_PUSH_MAX_BODY_BYTES`, `HERTZBEAT_PUSH_MAX_SAMPLES` and `HERTZBEAT_PUSH_MAX_AUTO_CREATED_MONITORS`. +- Login tokens and API tokens issued by 1.8.x remain valid. Newly issued API tokens can be listed and revoked in the UI. + +## Docker Compose + +- Every Compose variant binds its published ports to `127.0.0.1` by default. For remote access copy `.env.example` to `.env`, keeping the three cases apart: + - `HERTZBEAT_BIND_ADDRESS` covers 1157 (web/API) and 1158 (collector transport); + - `HERTZBEAT_OTLP_BIND_ADDRESS` covers 14317 (OTLP/gRPC) on its own — setting only the first does not open it; + - the database and time-series ports (`127.0.0.1:15432:5432`, `127.0.0.1:14000:4000`, ...) are **hard-coded** in the compose file with no environment variable, so opening them means editing the compose file. + + Run `docker compose config` afterwards and check every final host binding. +- The `hertzbeat-postgresql-victoria-metrics` variant now requires `POSTGRES_PASSWORD`. If the old deployment did not override the Compose default, its existing data volume was initialised with that old default; if it was customised, use the database user's actual password instead. Before upgrading, check the old `.env`, the Compose configuration and the database username, then put the **same password** in the new `.env` or authentication fails. To move to a strong password, change the database user's password in PostgreSQL first, then update `.env` to match. +- The `hertzbeat-postgresql-greptimedb` variant upgrades the GreptimeDB image from `v0.14.3` to `v1.1.3`; see [GreptimeDB](#greptimedb-only-when-enabled). + +## Helm Deployments + +The Helm chart is maintained as a separate project. **Do not simply override the manager image tag to 1.9.0 on a chart whose `appVersion` is still 1.8.x**: such a chart may keep mounting an EclipseLink-era `application.yml` and the old authorization rules, and it does not declare the OTLP/gRPC port 14317. The result is a manager that fails to start, authorization behaviour that does not match 1.9.0, or gRPC ingestion that is unavailable. + +Before upgrading, confirm that the chart you use explicitly supports HertzBeat 1.9.0, and check at least that: + +- `application.yml` uses the Hibernate configuration from this guide; +- `sureness.yml` carries the 1.9.0 rules; +- the Deployment, Service, NetworkPolicy and Ingress/Gateway are configured for 14317 if you use OTLP/gRPC; +- the collector configuration mount path moved from the versioned directory to `/opt/hertzbeat-collector/`; +- values, ConfigMaps, Secrets and persistent volumes are backed up. + +If no chart with explicit 1.9.0 support is available yet, do not replace the image alone. Use the verified installation package or Compose flow instead, or wait for a compatible chart release. + +## AI Conversations and SOP Schedules + +1.9.0 adds ownership checks to AI conversations and SOP schedules: + +- A conversation without a recorded creator is isolated and no longer appears in anyone's conversation list. +- A SOP schedule is owned by the creator of its target conversation. Schedules with no target conversation, no creator, or a creator that does not match the conversation creator are disabled before they execute. +- All of `/api/ai/**` is now admin only. + +Released 1.8.x has no SOP schedules, so an upgrade from 1.8.x produces no historical schedules to restore. + +## Other Behaviour Changes + +None of these need a configuration change, but they change the data or the alerts you see. Watch for them after the upgrade: + +- **Templates without a host** (`*_sd` service discovery, openai, deepseek, ...) now fill `instance` with the monitor name instead of `null:port`. The first edit and save breaks the time series once and changes the alert fingerprint once. The monitor name becomes the `instance` used by history queries, so a name containing spaces, non-ASCII characters or anything outside `[A-Za-z0-9_\-.:\[\]]` makes those queries fail — rename such monitors before upgrading. +- **Single-row metrics from SSH / script collection**: when the command produces no output and no stderr, 1.8.x treated it as a collection failure while 1.9.0 records one successful row with NULL values. Availability alerts that relied on "response data is null" no longer fire; check the individual field for null instead. stderr is now surfaced as the failure message. +- **VictoriaMetrics storage**: custom labels colliding with the reserved `__name__`, `__monitor_id__`, `__metrics__`, `__metric__` and `instance` labels are dropped instead of overwriting the reserved ones. +- **Bulletins**: `hzb_bulletin.name` gained a unique constraint, `POST` no longer upserts by id (a duplicate name is rejected as already existing) and `PUT` requires an id. If duplicate names already exist, Hibernate silently skips creating the constraint, so clean them up before upgrading. +- **Notice receivers**: `PUT` against a non-existent id now fails instead of upserting, and the mask is rejected whenever a target field (host, port, webhook URL, ...) changes — the real secret must be submitted. + +## Removed Features + +- **Push style monitors (`app-push`)**, see [Monitors](#monitors). +- **The monitoring template marketplace hub**: the separately deployed marketplace service is gone entirely. Its `/template`, `/tag`, `/star`, `/share`, `/category`, `/user`, `/version`, `/role`, `/resource` and `/auth` endpoints and its seven tables no longer exist, and **there is no upgrade path**. If you ran it, export the templates it holds before upgrading and manage them through the UI or the `define/` directory instead. + +## Dependencies and Third-party Components + +These only affect specific deployments; most users need to do nothing: + +| Component | 1.8.0 | 1.9.0 | Impact | +|---|---|---|---| +| Nacos client | 2.2.1 | 3.1.1 | **Nacos 1.x servers are no longer supported.** Nacos service-discovery monitors (`nacos_sd`) need Nacos 2.x or newer | +| BouncyCastle | `bcprov-jdk15on` | `bcprov-jdk18on` 1.85 | A `jdk15on` jar sitting in `ext-lib/` now clashes; remove it | +| OkHttp | 4.12.0 | 5.3.2 | Third-party plugins bundling OkHttp must be recompiled | +| mssql-jdbc | 10.2.0.jre8 | 12.10.2.jre11 | Update an older SQL Server driver placed in `ext-lib/` by hand | +| gRPC / OpenTelemetry | 1.56.1 / 2.15.0 | 1.76.3 / 2.25.0 | Normally unnoticeable | + +The outbound HTTP client for notifications and collection also moved from OkHttp to the JDK `HttpClient`: a `Connection: close` request header is silently dropped and an https-to-http redirect is refused. Adjust self-hosted webhook receivers that depend on either behaviour. + +## Plugin Developers + +`hertzbeat-common` was split into `hertzbeat-common-core` and `hertzbeat-common-spring`. The plugin SPI interfaces (`Plugin`, `PostAlertPlugin`, `PostCollectPlugin`, `PluginRunner`) and the fully-qualified names of `GroupAlert`, `SingleAlert`, `CollectRep` and `Job` are unchanged. + +- **Required**: change the dependency from `org.apache.hertzbeat:hertzbeat-common:1.8.0` to `hertzbeat-common-core` or `hertzbeat-common-spring` and recompile against Java 25. +- **No source change**: `JsonUtil` and `XmlUtil` (now in `hertzbeat-common-core`) and `CommonThreadPool` (now in `hertzbeat-common-spring`) only moved module. Their package and class names are identical. +- **Source change needed**: `PluginUpload` and `CollectorSummary` moved to `org.apache.hertzbeat.manager.pojo.dto`, and `PushProtocol` and `PushMetricsDto` were deleted along with push style monitors. +- The core JSON library moved to Jackson 3 (`tools.jackson.*`). Jackson 2 databind is still present as a transitive dependency, but do not rely on it — write new code against Jackson 3. + +## Post-upgrade Checks + +1. The manager log shows no Flyway or Hibernate errors. +2. Every collector is online in the collector page and reports version 1.9.0. +3. Spot-check monitors that need authentication (databases, SSH, API-key based) for successful collection. +4. With GreptimeDB enabled, the logs page receives new data and the manager log has no `[warehouse greptime-log] Write failed` entries. +5. Scheduled alert rules show no execution errors; every alert silence has been reviewed. +6. With a mounted or customised `sureness.yml`, use an admin account, a regular user account and a guest account to exercise a few admin-only, authenticated and anonymous endpoints, and confirm the results match the 1.9.0 rules. + +## Rolling Back to 1.8.x + +:::danger +Data created after the upgrade may not be mergeable back into a pre-upgrade snapshot. Do not point a 1.8.x manager at a metadata database that 1.9.0 has already modified, and do not open a data directory written by GreptimeDB 1.1 with GreptimeDB 0.14. +::: + +If the upgrade fails verification and you decide to roll back: + +1. Stop the manager and every client that writes to this GreptimeDB directly or indirectly through OTLP, HTTP, SQL or another protocol. If the GreptimeDB instance is shared, stop writes from the other applications too. Stop the collectors as well if you need to avoid continuous retries. +2. Restore the pre-upgrade relational metadata database backup. +3. If GreptimeDB was upgraded or modified, restore the **complete pre-upgrade GreptimeDB data directory, Docker volume or external storage snapshot**, and start it with the GreptimeDB version recorded in the backup. Renaming tables is not a substitute for rolling a database back across major versions. +4. Restore the 1.8.x package or image together with its `config/`, `define/`, `ext-lib/`, `.env`, Compose/Helm configuration, certificates and keys. +5. A 1.9.0 collector can talk to a 1.8.x manager for the time being; restore the collectors to 1.8.x one by one if you need the original version everywhere. Never let a 1.9.0 manager issue credentials to a 1.8.x collector. +6. Start the databases and the time-series store first, then the manager and the collectors. Spot-check monitors, alerts, notifications and log ingestion against what you recorded before the upgrade. + +Once 1.9.0 has created the new `hertzbeat_logs`, you cannot simply rename `hertzbeat_logs_v18` back, because the target name is taken. A full data snapshot is the preferred rollback path. If you must keep GreptimeDB 1.1 and roll back only HertzBeat, work out in an isolated environment how to archive the 1.9 table and restore the old name and the JSON `body` structure before touching production — do not improvise the DDL there. + +## Migrating Only Monitors to a Fresh Environment + +If you would rather abandon the existing environment and deploy 1.9.0 from scratch, you can export and import the monitors. This is not a full environment migration: the new environment still needs the Java, configuration, authorization, collector, GreptimeDB and deployment checks described above. + +1. Deploy and verify a fresh 1.9.0 environment. +2. Export the monitors from the old environment as **JSON or YAML** (Excel is not compatible) and import them into the new one. +3. Export and import the alert definitions separately; rules exported from 1.8.x need `datasource` filled in on the new environment. +4. Add host-key fingerprints to imported SFTP monitors. + +Accounts and roles, notice receivers and rules, dashboards, status pages, bulletins, AI conversations, system configuration, historical metrics and logs, and any other metadata are **not** migrated by importing monitors. Rebuild them item by item, or plan a separate data migration for them. + +## Getting Help and Reporting Security Issues + +- For general upgrade problems, ask through [GitHub Issues](https://github.com/apache/hertzbeat/issues), the [community contact channels](../community/contact) or the public developer mailing list `dev@hertzbeat.apache.org`. Remove passwords, tokens, database connection strings and any other sensitive information before posting. +- For a suspected security issue, do **not** open a public issue or discussion and do not write to a public mailing list. Report it privately following the [security model](../help/security_model) and the [ASF vulnerability reporting process](https://www.apache.org/security/#reporting-a-vulnerability). diff --git a/home/versioned_docs/version-1.9.0/start/upgrade.md b/home/versioned_docs/version-1.9.0/start/upgrade.md new file mode 100644 index 0000000000..575a379c10 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/upgrade.md @@ -0,0 +1,166 @@ +--- +id: upgrade +title: HertzBeat New Version Upgrade +sidebar_label: Version Upgrade Guide +--- + +**HertzBeat Release Version List** + +- [Download Page](https://hertzbeat.apache.org/docs/download) +- [Github Release](https://github.com/apache/hertzbeat/releases) +- [DockerHub Release](https://hub.docker.com/r/apache/hertzbeat/tags) + +Apache HertzBeat's metadata information is stored in H2 or Mysql, PostgreSQL relational databases, and the collected metric data is stored in time series databases such as TDengine and IotDB. + +**You need to save and back up the data files of the database and monitoring templates yml files before upgrading** + +## New In 1.9.0: Native Collector Packages + +Starting with 1.9.0 there are pre-compiled native collector packages +(`apache-hertzbeat-collector-native-*`), which start faster and use less memory. + +They are **not a drop-in replacement** for the JVM collector, and they have hard runtime +requirements: AVX2 for the x86 packages, glibc 2.34 or newer for the Linux packages, and the VC++ +redistributable for the Windows package. When a requirement is not met the process **exits +instantly with no log output at all**. If you plan to switch, read the runtime requirements in +[Native collector](native-collector) first. + +The JVM collector package `apache-hertzbeat-collector-{version}-bin.tar.gz` is still provided and +upgrades the same way as before. + +## Breaking Changes In 1.9.0 + +### SFTP monitors require an explicit host-key policy + +From 1.9.0 on, every SFTP monitor must carry an explicit host-key policy: either +one or more trusted `SHA256:...` host-key fingerprints, or the operator explicitly +selecting the dangerous temporary skip-verification option. + +This is a fail-closed breaking change. HertzBeat does not automatically enable +skip verification for 1.8.x monitors, imports, or direct API/SQL-created rows. +Before or immediately after upgrading, edit each SFTP monitor and: + +1. obtain the server key and verify its fingerprint through a trusted channel; +2. add the verified fingerprint to **SFTP Host Key Fingerprints**; and +3. use the skip-verification option only as a short-lived recovery measure. + +Until one of those policies is configured, the affected SFTP monitor reports a +configuration failure and does not connect. Plain FTP monitors are unchanged. +See [FTP Monitor](../help/ftp) for fingerprint acquisition and key rotation. + +### Observability (OTLP / logs / traces) API paths moved + +1.9.0 consolidates the 1.8.x log module into `hertzbeat-observability`. Metrics, logs and traces now share one ingestion prefix (`/api/otlp/v1/{signal}`) and one query prefix (`/api/observability/**`). Logs were the only signal with an API on 1.8.x, so every row below is a **log** route. Any OpenTelemetry Collector, Vector, SDK exporter, script or dashboard that was configured against a 1.8.x path must be updated. + +| 1.8.x path | 1.9.0 path | Status in 1.9.x | +|---|---|---| +| `POST /api/logs/otlp/v1/logs` | `POST /api/otlp/v1/logs` | **Deprecated alias kept**, still works, responds with `Deprecation: true`; removed in 2.0 | +| `POST /api/logs/ingest/otlp` | `POST /api/otlp/v1/logs` | **Deprecated alias kept**, still works, responds with `Deprecation: true`; removed in 2.0 | +| `POST /api/logs/ingest/{other protocol}` | — | Removed (`400`), only `otlp` ever had an adapter | +| `GET /api/logs/list` | `GET /api/observability/logs` | Removed (`404`) | +| `GET /api/logs/stats/overview` | `GET /api/observability/logs/overview` | Removed (`404`) | +| `GET /api/logs/stats/trace-coverage` | `GET /api/observability/logs/trace-coverage` | Removed (`404`) | +| `GET /api/logs/stats/trend` | `GET /api/observability/logs/trend` | Removed (`404`) | +| `GET /api/logs/sse/subscribe` | `GET /api/observability/logs/stream` | Removed (`404`); the new route requires an authenticated `admin/user/guest` | +| `DELETE /api/logs` | `DELETE /api/observability/logs` | Removed (`404`) | + +The `POST /api/otlp/v1/{metrics,traces}` ingestion routes and the `/api/observability/metrics/**` and `/api/observability/traces/**` query routes are **new** in 1.9.0. There is no 1.8.x path for them, so nothing has to be migrated. + +Recommended upgrade steps: + +- Before upgrading, search your collector / exporter configuration for `/api/logs/` and change it to `/api/otlp/v1/logs`. OTLP HTTP exporters treat a `404` as a permanent error and silently drop the batch, so a stale path shows up only as "logs stopped arriving". +- If you cannot change the exporters in the same maintenance window, the two ingestion aliases above keep accepting data on 1.9.x. Watch the HertzBeat log for `Deprecated OTLP log route ... was called` warnings and migrate before 2.0. +- If you use a customised `sureness.yml`, add `/api/otlp/v1/**===post===[admin,user]` and `/api/observability/**===get===[admin,user,guest]` (see the packaged `sureness.yml`); the old `/api/logs/**` rules can be dropped once your exporters are migrated. + +### New OTLP/gRPC listener on port 14317 + +When `warehouse.store.greptime.enabled=true`, 1.9.0 additionally starts an OTLP/gRPC listener on +`0.0.0.0:14317` inside the HertzBeat container so exporters can push metrics, logs and traces over +gRPC. The packaged Dockerfile exposes that container port. The repository's five Docker Compose +quick-start variants publish it as host port `14317`, bound to `127.0.0.1` by default. + +- **It is not the OpenTelemetry standard 4317.** An OTel Collector, Jaeger or Tempo on the same host + normally holds 4317 already, and a clash on a published port makes `docker compose up` fail + outright. HertzBeat serves OTLP/HTTP on its own port as well, so 14317 is consistent with the rest + of the product. +- Existing non-Compose deployments gain one newly bound port. If your firewall or security policy + enumerates listening ports, add 14317. +- Every 1.9.0 Docker Compose quick-start now binds all published ports to `127.0.0.1` by default, + including `1157`, `1158`, `14317`, and the development database/time-series ports. Upgrading an + older Compose checkout therefore preserves local access but intentionally stops remote browser, + Collector, OTLP, and datastore access until explicitly configured. +- For a remote Collector, copy the selected variant's `.env.example` to `.env`, set + `HERTZBEAT_BIND_ADDRESS` to the manager's reachable address, and allow `1158` only from Collector + source networks. This setting also controls `1157`; prefer a TLS reverse proxy for remote web/API + access. Set `HERTZBEAT_OTLP_BIND_ADDRESS` separately only for trusted OTLP senders. Before using a + wildcard address, replace default credentials and apply firewall or security-group restrictions. + Render `docker compose config` and inspect every final host binding before restarting. +- A port that cannot be bound does **not** stop HertzBeat: the failure is logged and the process + starts without gRPC ingestion, while OTLP/HTTP on `/api/otlp/v1` keeps working. +- To move the listener to 4317, or disable it, set these in `application.yml` or through the matching + environment variables, and update the docker-compose port mapping to match: + + ```yaml + hertzbeat: + otlp: + grpc: + enabled: ${HERTZBEAT_OTLP_GRPC_ENABLED:true} + host: ${HERTZBEAT_OTLP_GRPC_HOST:0.0.0.0} + port: ${HERTZBEAT_OTLP_GRPC_PORT:14317} + ``` + +- If you deploy with the Helm chart, note that the chart is maintained in `apache/hertzbeat-helm-chart`; + check that its release exposes 14317 before relying on gRPC ingestion there. + +### GreptimeDB signal tables renamed + +When `warehouse.store.greptime.enabled=true`, HertzBeat writes two different kinds of telemetry to GreptimeDB: the logs **you** send it over OTLP, and its **own** runtime logs and traces shipped via OpenTelemetry. 1.9.0 gives the self-monitoring tables an `hzb_internal_` prefix so they are no longer mistaken for product tables: + +| Data | 1.8.x table | 1.9.0 table | +|---|---|---| +| Product OTLP logs (the logs page, log alerting, SQL editor) | `hertzbeat_logs` | `hertzbeat_logs` (same name, but the `body` column type changed — see below) | +| HertzBeat internal logs (self-monitoring) | `hzb_logs` | `hzb_internal_logs` | +| HertzBeat internal traces (self-monitoring) | `hzb_traces` | `hzb_internal_traces` | +| Product OTLP traces (the traces page, trace queries) | not available on 1.8.x | `hertzbeat_traces` (new) | + +- **1.8.x had no product trace support**: no trace ingestion route, no trace query API and no traces page, so `hzb_traces` holds nothing but HertzBeat's own spans. Tracing is new in 1.9.0 and there is no historical business trace data to migrate. +- No automatic migration is performed. The old `hzb_logs` / `hzb_traces` tables are left untouched but no longer receive new data, and stay queryable until their retention expires. This is self-monitoring history, so the simplest option is to let it age out and `DROP` the old tables afterwards. +- If you do need that history in the new tables, compare the two schemas first and copy with an explicit column list. GreptimeDB adds columns to an OTLP table as new attributes arrive, so the old and the new table are not guaranteed to hold the same columns in the same order, and `INSERT ... SELECT *` fails with `Column count doesn't match insert query`. +- If you have dashboards or ad-hoc SQL against `hzb_logs` / `hzb_traces`, point them at the new table names. + +### The body column of hertzbeat_logs changed type + +The `hertzbeat_logs` table keeps its name, but 1.8.x created `body` as a `JSON` column and 1.9.0 writes it as `STRING`. The 1.9.0 schema is applied with `CREATE TABLE IF NOT EXISTS`, which is a no-op against the table 1.8.x already created, so **after a plain upgrade GreptimeDB rejects every new log write**: the exporter still receives a 200, the server logs a single `[warehouse greptime-log] Write failed` warning, the UI just stops showing new logs, and log-based alerting stops with it. + +Rename the old table before upgrading, let 1.9.0 create the new one, then copy the history back. Do **not** run `ALTER TABLE ... MODIFY COLUMN`. The full procedure is in the [1.9.0 upgrade guide](1.9.0-update). + +## Upgrade For Docker Deploy + +1. If using custom monitoring templates + - Need to back up docker templates directory `docker cp hertzbeat:/opt/hertzbeat/define ./define` in the container `/opt/hertzbeat/define` + - `docker cp hertzbeat:/opt/hertzbeat/define ./define` + - And mount the template define directory when docker start `-v $(pwd)/define:/opt/hertzbeat/define` + - `-v $(pwd)/define:/opt/hertzbeat/define` +2. If using the built-in default H2 database + - Need to mount or back up `-v $(pwd)/data:/opt/hertzbeat/data` database file directory in the container `/opt/hertzbeat/data` + - Stop and delete the container, delete the local HertzBeat docker image, and pull the new version image + - Refer to [Docker installation of HertzBeat](./docker-deploy) to create a new container using a new image. Note that the database file directory needs to be mounted `-v $(pwd)/data:/opt/hertzbeat/data` +3. If using external relational database Mysql, PostgreSQL + - No need to mount the database file directory in the backup container + - Stop and delete the container, delete the local HertzBeat docker image, and pull the new version image + - Refer to [Docker installation HertzBeat](./docker-deploy) to create a new container using the new image, and configure the database connection in `application.yml` + +### Upgrade For Package Deploy + +1. If using the built-in default H2 database + - Back up the database file directory under the installation package `/opt/hertzbeat/data` + - If there is a custom monitoring template, you need to back up the template YML under `/opt/hertzbeat/define` + - `bin/shutdown.sh` stops the HertzBeat process and downloads the new installation package + - Refer to [Installation package to install HertzBeat](./package-deploy) to start using the new installation package +2. If using external relational database Mysql, PostgreSQL + - No need to back up the database file directory under the installation package + - If there is a custom monitoring template, you need to back up the template YML under `/opt/hertzbeat/define` + - `bin/shutdown.sh` stops the HertzBeat process and downloads the new installation package + - Refer to [Installation package to install HertzBeat](./package-deploy) to start with the new installation package and configure the database connection in `application.yml` + +**HAVE FUN** diff --git a/home/versioned_docs/version-1.9.0/start/usecase/linux-os-practice.md b/home/versioned_docs/version-1.9.0/start/usecase/linux-os-practice.md new file mode 100644 index 0000000000..27f06ba6f5 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/usecase/linux-os-practice.md @@ -0,0 +1,94 @@ +--- +id: linux-os-practice +title: Linux Operating System Monitoring Practice +sidebar_label: Linux Operating System Monitoring Practice +--- + +This article describes how to use the HertzBeat monitoring system to collect and monitor general performance metrics for Linux operating systems, and send us alert messages when file system usage is too high. + +## What's HertzBeat + +Apache HertzBeat™ is a real-time monitoring tool with powerful custom monitoring capabilities without Agent. Website monitoring, port availability, database, operating system, threshold alarms, alarm notification (email, WeChat, DingTalk, Feishu). + +github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat) + +## Install + +1. The `docker` environment can be installed with just one command + + ```bash + docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat + ``` + +2. After the installation is successful, the browser can access `http://ip:1157` to start, the default account password is `admin/hertzbeat`. + +:::note +The production environment recommends a complete deployment method, refer [Install HertzBeat via Docker Compose](https://hertzbeat.apache.org/docs/start/docker-compose-deploy) +::: + +## Monitoring Linux Operating System + +### 1. Click Add Linux Operating System Monitor + +> HertzBeat Page -> Monitors -> New Monitor -> OS Monitor -> Add OS Linux + +![HertzBeat](/img/docs/start/linux-os-practice-1.png) + +### 2. Configure the monitoring parameters + +- **Target Host**:The IPV4, IPV6, or domain name of the host being monitored. No protocol header (e.g., https://, http://). +- **Port**:The port provided by Linux SSH, default is 22. +- **Timeout**:Sets the connection timeout in milliseconds, default is 6000 ms. +- **Reuse Connection**: Sets whether SSH connections are reused, default is :false. If false, a new connection is created each time information is retrieved. +- **Username**: SSH connection username +- **Password**: SSH connection password, optional. + +> For more parameters and advanced settings, please refer to the help documentation: [Monitoring:Linux operating system monitoring](https://hertzbeat.apache.org/docs/help/linux) + +Tasks can be managed using label classification, such as adding bind labels like `OS=Linux`. + +![HertzBeat](/img/docs/start/linux-os-practice-2.png) + +### 3. View the detection index data + +In the monitoring list, you can view the monitoring status, and in the monitoring details, you can view the metric data chart, etc. + +![HertzBeat](/img/docs/start/linux-os-practice-3.png) + +![HertzBeat](/img/docs/start/linux-os-practice-4.png) + +### 4. Set the threshold + +Here, we set a threshold rule to trigger an alert when **the usage rate of a certain directory in the file system is too high**. + +> HertzBeat Page -> Alerting -> Threshold -> New Threshold -> RealTime Threshold Rule +> +> Configure the threshold, configure the alarm expression-triggered when the metric`Disk Usage` greater than or equal to `50%`,set the alarm level notification template information, etc. + +![HertzBeat](/img/docs/start/linux-os-practice-5.png) + +> Threshold rule has others function you can try e.g., associating thresholds with monitoring, trigger times so on. + +Finally, you can see the triggered alarm in the alarm center. + +![HertzBeat](/img/docs/start/linux-os-practice-6.png) + +### 5. Alarm notification + +> HertzBeat Page -> Notification -> Notice Receiver -> New Receiver -> Configure the Email Receiver + +![HertzBeat](/img/docs/start/linux-os-practice-7.png) + +> HertzBeat Page -> Notification -> Notice Policy -> New Notice Policy -> Enable Notification for the Recipient Just Configured + +![HertzBeat](/img/docs/start/linux-os-practice-8.png) + +When the threshold is triggered, we can receive the corresponding alarm message. If there is no notification, you can also view the alarm information in the alarm center. + +---- + +## Summary + +The practice of monitoring linux operating system is here. Of course, for HertzBeat, this function is just the tip of the iceberg. If you think HertzBeat is a good open source project, please give us a Star on GitHub, thanks for your support. + +**Github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/versioned_docs/version-1.9.0/start/usecase/springboot-auto-practice.md b/home/versioned_docs/version-1.9.0/start/usecase/springboot-auto-practice.md new file mode 100644 index 0000000000..636aa6d95b --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/usecase/springboot-auto-practice.md @@ -0,0 +1,245 @@ +--- +id: springboot-auto-practice +title: SpringBoot Web Application Monitoring Practice +sidebar_label: SpringBoot Web Application Monitoring Practice +--- + +:::tip + +In the cloud-native era, monitoring and visualization of SpringBoot applications have become core components of O&M (Operations & Maintenance) systems. Real-time monitoring of application performance is crucial for ensuring system stability. + +::: + +This article introduces an integrated solution using the HertzBeat monitoring system, covering metric collection, visualization, and alarm notifications. It demonstrates the complete operational procedure and monitoring practices. + +## What is HertzBeat + +Apache HertzBeat is a real-time monitoring tool with powerful custom monitoring capabilities without Agent. Website monitoring, PING connectivity, port availability, database, operating system, middleware, API monitoring, threshold alarms, alarm notification (email, WeChat, Ding Ding Feishu). + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +## Install HertzBeat + +> For production environments, it is recommended to deploy HertzBeat using **PostgreSQL** + **VictoriaMetrics**. + +1. Deploy HertzBeat + + > Download the installation package + > + > Download the `apache-hertzbeat-xxx-incubating-bin.tar.gz` installation package corresponding to your system environment from the [Download Page](https://hertzbeat.apache.org/docs/download). Extract the package to a host directory, e.g., `/opt/hertzbeat`. + + ```sh + tar zxvf apache-hertzbeat-xxx-incubating-bin.tar.gz + ``` + +2. Quick Install PostgreSQL + VictoriaMetrics Services + + > Install PostgreSQL via Docker + + ```sh + docker run -d --name postgresql -p 5432:5432 -v "$PWD/postgresql:/var/lib/postgresql/data" -e POSTGRES_USER=root -e POSTGRES_PASSWORD=123456 -e TZ=Asia/Shanghai postgres:15 + ``` + + > Install VictoriaMetrics via Docker + + ```sh + docker run -d -p 8428:8428 -v "$PWD/victoria-metrics-data:/victoria-metrics-data" --name victoria-metrics victoriametrics/victoria-metrics:v1.95.1 + ``` + +3. Modify HertzBeat's Configuration File + + > Switch the metadata storage data source + > + > Modify the `hertzbeat/config/application.yml` configuration file to use the PostgreSQL service. + + :::note + For PostgreSQL configuration details, please refer to the documentation: [Meta Store PostgreSQL (Recommended)](https://hertzbeat.apache.org/docs/start/postgresql-change) + ::: + + > Configure the time-series database for metric storage + > + > Modify the `hertzbeat/config/application.yml` configuration file to enable the VictoriaMetrics service for storing metrics. + + :::note + For VictoriaMetrics configuration details, please refer to the documentation: [Metrics Store VictoriaMetrics (Recommended)](https://hertzbeat.apache.org/docs/start/victoria-metrics-init) + ::: + +4. Start HertzBeat + + > Use the `startup.sh` script located in the `bin` directory of the extracted installation folder. For Windows environments, use `startup.bat`. + > + > After successful startup, access `http://localhost:1157` in your browser to begin. The default username and password are `admin/hertzbeat`. + + ```sh + ./startup.sh + ``` + +## SpringBoot Application Configuration + +1. Enable Actuator Configuration + + > Add the following dependencies to project's `pom.xml`: + + ```xml + + org.springframework.boot + spring-boot-starter-actuator + + + io.micrometer + micrometer-registry-prometheus + + ``` + + > Configure `application.yml` to expose endpoints: + + ```yml + management: + endpoints: + web: + exposure: + include: '*' + enabled-by-default: true + metrics: + export: + prometheus: + enabled: true + ``` + + > *Note: If your project also introduces authentication related dependencies, such as springboot security, the interfaces exposed by SpringBoot Actor may be intercepted. In this case, you need to manually release these interfaces. Taking springboot security as an example, you should add the following code to the Security Configuration class:* + + ```java + public class SecurityConfig extends WebSecurityConfigurerAdapter{ + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception{ + httpSecurity + // Configure the interfaces to be opened + .antMatchers("/actuator/**").permitAll() + .antMatchers("/metrics/**").permitAll() + .antMatchers("/trace").permitAll() + .antMatchers("/heapdump").permitAll() + // ... + } + } + ``` + +2. Verify Endpoints + + > After starting SpringBoot application, request the following URL: + > + > * `http://:`/actuator`: Verify the enabled endpoints. + > * `http://:`/actuator/prometheus`: Should return metric data in Prometheus format. + +## Monitor SpringBoot Application + +1. Add AUTO Monitor + + > HertzBeat Page -> Monitors -> New Monitor -> AUTO -> Prometheus Task + + ![HertzBeat](/img/docs/start/springboot-auto-practice-1.png) + +2. Fill in Key Parameters + + > **Target Host**: The server address of the SpringBoot application (without the protocol prefix like `http://` or `https://`). + > + > **Port**: The application service port (e.g., `8080`). + > + > **Endpoint Path**: `/actuator/prometheus` + > + > Tasks can be managed using label classification, such as adding Bind Labels like `env=test`. + + ![HertzBeat](/img/docs/start/springboot-auto-practice-2.png) + +3. View Detected Metric Data + + > Click on the newly created monitor to view detailed metric data, historical charts, etc. + + ![HertzBeat](/img/docs/start/springboot-auto-practice-3.png) + + ![HertzBeat](/img/docs/start/springboot-auto-practice-4.png) + +## Grafana Visualization Integration (Optional) + +1. Grafana Dashboard Configuration + + > Enable Grafana's embedding feature and enable anonymous access. + + :::note + For complete configuration details, please refer to the documentation: [Grafana Historical Charts](https://hertzbeat.apache.org/docs/help/grafana_dashboard) + ::: + +2. Embed Grafana Dashboard in HertzBeat Monitor + + > After configuring and enabling Grafana, restart the HertzBeat service. Then, in the newly added AUTO monitor settings, enable Grafana Templates and upload a Grafana dashboard template. + > + > For example: In Grafana, select `hertzbeat-victoria-metrics` as the data source. Then click on the dashboard:「Share」→「Export」→「Save to file」to download the template and upload this file to the HertzBeat monitor. + + ![HertzBeat](/img/docs/start/springboot-auto-practice-5.png) + +3. View Grafana Dashboard + + > Go to the AUTO monitor page, click the Grafana icon button, and view the integrated Grafana dashboard. + + ![HertzBeat](/img/docs/start/springboot-auto-practice-6.png) + +## Alarm and Notification Interlinkage + +1. HertzBeat Alarm Configuration + + > HertzBeat Page -> Alerting -> Threshold -> New -> New Threshold Rule + + ![HertzBeat](/img/docs/start/springboot-auto-practice-7.png) + + > HertzBeat provides two types of threshold rule settings: **RealTime Calculation** and **Periodically execute**. Here, we use the **Periodically execute** threshold rule as an example. + > + > * **Rule Name**: Name of the threshold rule. + > * **Threshold Rule**: Enter the rule for monitoring the metric (supports `PromQL`). + > * **Execution Period**: The time interval for periodically executing the threshold calculation. + > * **Alarm Severity**: The alarm level that triggers the threshold, from low to high: Warning,Critical,Emergency. + > * **Trigger Times**: Set how many times the threshold is triggered before sending an alarm. + > * **Alarm Content**: Enter the content of the monitoring alarm(supports variables). + +2. Set Threshold Rule + + > For example, to monitor the CPU usage of the SpringBoot application, add a threshold rule like: `system_cpu_usage{job="Jolly_Vulture_43vT"}` > 0.01` + > + >You can create many combinations of threshold rules. Users can set up richer alarm rules based on their specific needs. + + ![HertzBeat](/img/docs/start/springboot-auto-practice-8.png) + + > Finally, you can see the triggered alarm in the alarm center. + + ![HertzBeat](/img/docs/start/springboot-auto-practice-9.png) + +3. Alarm Notification + + > HertzBeat Page -> Notification -> Notice Receiver -> New Receiver + + ![HertzBeat](/img/docs/start/springboot-auto-practice-10.png) + + > HertzBeat Page -> Notification -> Notice Policy -> New Notice Policy -> Select Recipient(s) and Enable Notification + + ![HertzBeat](/img/docs/start/springboot-auto-practice-11.png) + +4. OK! When the threshold is triggered, we will receive the corresponding alarm message. If no notification is configured, you can also view the alarm information in the alarm center. + +## Quick Summary + +This article demonstrates how users can build a complete monitoring system within minutes using simple configurations, highlighting several advantages of HertzBeat: + +* Monitors SpringBoot Actuator endpoints without needing to deploy Exporter or Agent, supporting custom metric collection and alert rules. +* Lightweight: Compared to the traditional Prometheus + AlertManager combination, HertzBeat simplifies the deployment and maintenance process. +* Seamless Integration with Grafana: HertzBeat pushes collected time-series data to Grafana in real-time for building visualization dashboards. +* Integrated Monitoring + Alerting + Notification: Combines full protocol coverage, real-time/periodic threshold detection, and multi-channel notifications (DingTalk/Feishu/Webhook, etc.). + +------ + +## Wrapping Up + +That concludes this practical guide on monitoring SpringBoot applications with HertzBeat. Of course, this functionality is just the tip of the iceberg for HertzBeat. If you think hertzbeat is a good open source project, please give it a **Star** on GitHub and Gitee! Your Star motivate our continuous improvement! Feel free to light up the little star ✨ + +**Making monitoring simpler, looking forward to building the ecosystem together!** 💝 + +**GitHub: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +**Gitee: [https://gitee.com/hertzbeat/hertzbeat](https://gitee.com/hertzbeat/hertzbeat)** diff --git a/home/versioned_docs/version-1.9.0/start/usecase/sslcert-practice.md b/home/versioned_docs/version-1.9.0/start/usecase/sslcert-practice.md new file mode 100644 index 0000000000..1219bb6e61 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/usecase/sslcert-practice.md @@ -0,0 +1,95 @@ +--- +id: ssl-cert-practice +title: SSL Certificate Monitoring Practice +sidebar_label: SSL Certificate Monitoring Practice +--- + +:::tip +Most websites now support HTTPS by default. The certificate we apply for is usually 3 months or 1 year. It is easy to expire the SSL certificate over time, but we did not find it the first time, or did not update the certificate in time before it expired. +::: + +This article introduces how to use the hertzbeat monitoring tool to detect the validity period of our website's SSL certificate, and send us a warning message when the certificate expires or a few days before the certificate expires. + +## What is HertzBeat + +Apache HertzBeat™ is a real-time monitoring tool with powerful custom monitoring capabilities without Agent. Website monitoring, PING connectivity, port availability, database, operating system, middleware, API monitoring, threshold alarms, alarm notification (email, WeChat, Ding Ding Feishu). + +github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat) + +## Install HertzBeat + +1. The `docker` environment can be installed with just one command + + `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` + +2. After the installation is successful, the browser can access `localhost:1157` to start, the default account password is `admin/hertzbeat` + +:::note +The production environment recommends a complete deployment method, refer [https://hertzbeat.apache.org/docs/start/docker-compose-deploy](https://hertzbeat.apache.org/docs/start/docker-compose-deploy) +::: + +## Monitoring SSL Certificates + +1. Click Add SSL Certificate Monitor + + > HertzBeat Page -> Monitors -> New Monitor -> Service Monitor -> Add SSL Certificate + + ![HertzBeat](/img/docs/start/ssl_1.png) + +2. Configure the monitoring website + + > Here we take the example of monitoring Baidu website, configure monitoring host domain name, name, collection interval, etc. + > Click OK Note + + ![HertzBeat](/img/docs/start/ssl_2.png) + +3. View the detection index data + + > In the monitoring list, you can view the monitoring status, and in the monitoring details, you can view the metric data chart, etc. + + ![HertzBeat](/img/docs/start/ssl_3.png) + + ![HertzBeat](/img/docs/start/ssl_4.png) + +4. Set the threshold (triggered when the certificate expires) + + > HertzBeat Page -> Alerting -> Threshold -> New Threshold -> ReadTime Threshold Rule + > Configure the threshold, select the SSL certificate metric object, configure the alarm expression-triggered when the metric `expired` is `true`, that is, `equals(expired,"true")`, set the alarm level notification template information, etc. + + ![HertzBeat](/img/docs/start/ssl_5.png) + + > Threshold rule has others function you can try eg: associating thresholds with monitoring, trigger times so on. + +5. Set the threshold (triggered one week before the certificate expires) + + > In the same way, switch coding threshold, add a new configuration threshold and configure an alarm expression - when the metric expires timestamp `end_timestamp`, the `now()` function is the current timestamp, if the configuration triggers an alarm one week in advance: `end_timestamp <= (now() + 604800000)` , where `604800000` is the 7-day total time difference in milliseconds. + + ![HertzBeat](/img/docs/start/ssl_6.png) + + > Finally, you can see the triggered alarm in the alarm center. + + ![HertzBeat](/img/docs/start/ssl_7.png) + +6. Alarm notification (in time notification via Dingding WeChat Feishu, etc.) + + > HertzBeat Page -> Notification -> Notice Receiver -> New Receiver -> Config the Feishu Receiver + + ![HertzBeat](/img/docs/start/notice_receiver_1.png) + + For token configuration such as Feishu, please refer to the help document + + [https://hertzbeat.apache.org/docs/help/alert_feishu](https://hertzbeat.apache.org/docs/help/alert_feishu) + + > Notification -> Notice Policy -> New Notice Policy -> Enable Notification for the Recipient Just Configured + + ![HertzBeat](/img/docs/start/notice_policy_1.png) + +7. OK When the threshold is triggered, we can receive the corresponding alarm message. If there is no notification, you can also view the alarm information in the alarm center. + +---- + +## The End + +The practice of monitoring SSL certificates is here. Of course, for hertzbeat, this function is just the tip of the iceberg. If you think hertzbeat is a good open source project, please give us a Gitee star on GitHub, thank you very much. Thank you for your support. Refill! + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** diff --git a/home/versioned_docs/version-1.9.0/start/usecase/tdengine-practice.md b/home/versioned_docs/version-1.9.0/start/usecase/tdengine-practice.md new file mode 100644 index 0000000000..1d45542604 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/usecase/tdengine-practice.md @@ -0,0 +1,166 @@ +--- +id: tdengine-practice +title: TDengine Monitoring Practice +sidebar_label: TDengine Monitoring Practice +--- + +:::tip +TDengine TSDB is an open-source, high-performance, cloud-native time series database (TSDB) optimized for IoT, vehicle networking, industrial Internet, finance, IT operations, and other scenarios. It also comes with built-in caching, streaming computing, data subscription, and other system functions that greatly reduce system design complexity and lower R&D and operational costs, making it an extremely simple time series data processing platform. +::: + +This article introduces how to use the HertzBeat monitoring system to collect and monitor TDengine general performance indicators. + +## What is HertzBeat? + +Apache HertzBeat™ is a real-time monitoring tool with powerful customization capabilities that does not require an agent. It monitors websites, PING connectivity, port availability, databases, operating systems, middleware, APIs, threshold alerts, and alert notifications (email, WeChat, DingTalk, Feishu). + +> **github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +## Install HertzBeat + +1. The `docker` environment can be installed with just one command. + + `docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat` + +2. Once installed, you can start by accessing `localhost:1157` in your browser. The default username and password are `admin/hertzbeat`. + +:::note +Recommended deployment method for production environments, reference: [https://hertzbeat.apache.org/docs/start/docker-compose-deploy](https://hertzbeat.apache.org/docs/start/docker-compose-deploy) +::: + +## Enable TDengine monitoring + +:::tip +TDengine TSDB integrates multiple monitoring metric collection mechanisms and aggregates them through taosKeeper. taosKeeper is a monitoring metric export tool for TDengine TSDB version 3.0. With just a few simple configurations, you can obtain the runtime status of TDengine TSDB. For reference: [https://docs.tdengine.com/reference/components/taoskeeper/](https://docs.tdengine.com/reference/components/taoskeeper/) +::: + +## Monitor TDengine(PromQL) + +1. Added TDengine-PromQL monitoring + + > System Page -> Monitoring Center -> Add Monitoring -> Custom Monitoring -> TDengine-PromQL Task + + ![HertzBeat](/img/docs/start/tdengine_1.png) + +2. Fill in key parameters + + > **Target Host**: Prometheus application server address (without protocol header, e.g., https://, http://) + > + > **Port**: Prometheus API port, default value: 9090 + > + > **Endpoint path**: The URL for Prometheus to query PromQL. Default value: `/api/v1/query` + > + > You can use tags to categorize tasks, such as adding business-related tags like `env=test`. + + ![HertzBeat](/img/docs/start/tdengine_2.png) + +3. View inspection indicator data + + > You can view task statuses in the monitoring list and view metric data charts and other information in the monitoring details. + + ![HertzBeat](/img/docs/start/tdengine_3.png) + + ![HertzBeat](/img/docs/start/tdengine_4.png) + +## Monitor TDengine(Prometheus) + +1. New AUTO monitoring + + > System Page -> Monitoring Center -> Add Monitoring -> AUTO -> Prometheus Task + + ![HertzBeat](/img/docs/start/tdengine_1_1.png) + +2. Fill in key parameters + + > **Target Host** taosKeeper service address (without protocol header, e.g., https://, http://) + > + > **Port**: taosKeeper service port (e.g., 6043) + > + > **Endpoint path**: `/metrics` + > + > You can use tags to categorize tasks, such as adding business-related tags like `env=test`. + + ![HertzBeat](/img/docs/start/tdengine_1_2.png) + +3. View inspection indicator data + + > You can view task statuses in the monitoring list and view metric data charts and other information in the monitoring details. + + ![HertzBeat](/img/docs/start/tdengine_1_3.png) + + ![HertzBeat](/img/docs/start/tdengine_1_4.png) + +### Grafana visualization integration (optional) + +1. Grafana chart configuration + + > You need to enable Grafana's embeddable feature and allow anonymous access. + + :::note + For complete configuration, please refer to the documentation: [Grafana Historical Charts](https://hertzbeat.apache.org/zh-cn/docs/help/grafana_dashboard) + ::: + +2. Embedding Grafana dashboards in HertzBeat monitoring + + > After enabling Grafana, restart the HertzBeat service, enable it in the newly added AUTO monitoring, and upload the Grafana template. + > + > For example: Select the Grafana data source `hertzbeat-victoria-metrics`, then click "Share" → "Export" → "Save to file" on the dashboard to download the template and upload it to HertzBeat monitoring. For reference, see: [taoskeeper-prometheus-dashboard](https://grafana.com/grafana/dashboards/15164-taoskeeper-prometheus-dashboard/) + + ![HertzBeat](/img/docs/start/tdengine_1_5.png) + +3. View Grafana charts + + > Go to the new AUTO monitoring page, click the Grafana icon button to view the Grafana chart. + + ![HertzBeat](/img/docs/start/tdengine_1_6.png) + +## Alarm and notification linkage + +1. HertzBeat Alert Configuration + + > System Page -> Alerts -> Threshold Rules -> Add -> Add Threshold + + ![HertzBeat](/img/docs/start/tdengine_5.png) + + > HertzBeat provides two types of threshold rule settings: **real-time calculation** and **scheduled cycle**. Here, we will use the **scheduled cycle** threshold rule as an example. + > + > * **Threshold Name**: Threshold rule name + > * **Threshold rules**: Fill in the rules for monitoring indicators (supports `PromQL`). + > * **Execution cycle**: The time interval for calculating the periodic execution threshold. + > * **Alarm Level**: The alarm level triggered by the threshold, from low to high: Warning, Critical, Emergency. + > * **Trigger count**: Set the threshold number of times the trigger must occur before an alert is sent. + > * **Alarm content**: Fill in the content of the monitoring alarm (supports filling in variables) + +2. Set threshold rules + + > For example, to monitor the CPU percentage used by the Dnode node system, add a threshold rule: `taos_dnodes_info_cpu_system_value > 20` + > + > There are many combinations of threshold rules that can be set, and users can set more detailed alert rules according to their needs. + + ![HertzBeat](/img/docs/start/tdengine_6.png) + + > Finally, you can see the triggered alerts in the Alert Center. + + ![HertzBeat](/img/docs/start/tdengine_7.png) + +3. Alert notification + + > System Page -> Message Notifications -> Notification Media -> Add New Recipient + + ![HertzBeat](/img/docs/start/tdengine_8.png) + + > System Page -> Message Notifications -> Notification Policies -> Add Notification Policy -> Select recipients and enable notifications + + ![HertzBeat](/img/docs/start/tdengine_9.png) + +4. OK! When the threshold rule is triggered, we will receive the corresponding alert message. If no notification is configured, you can also view the alert information in the alert center. + +## Summary + +That concludes our practical guide to monitoring TDengine applications. Of course, this feature is just the tip of the iceberg for HertzBeat. If you like this open-source project, please give it a star on GitHub or Gitee. Your stars are what motivate us to keep improving! Please light up the little stars ✨ + +**Making monitoring simpler, we look forward to building an ecosystem with you!** 💝 + +**github: [https://github.com/apache/hertzbeat](https://github.com/apache/hertzbeat)** + +**gitee: [https://gitee.com/hertzbeat/hertzbeat](https://gitee.com/hertzbeat/hertzbeat)** diff --git a/home/versioned_docs/version-1.9.0/start/victoria-metrics-init.md b/home/versioned_docs/version-1.9.0/start/victoria-metrics-init.md new file mode 100644 index 0000000000..3754686f71 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/victoria-metrics-init.md @@ -0,0 +1,174 @@ +--- +id: victoria-metrics-init +title: Use Time Series Database VictoriaMetrics to Store Metrics Data (Recommended) +sidebar_label: Metrics Store VictoriaMetrics (Recommended) +--- + +Apache HertzBeat's historical data storage relies on the time series database, you can choose one of them to install and initialize, or not to install (note ⚠️ but it is strongly recommended to configure in the production environment) + +> It is recommended to use VictoriaMetrics as metrics storage. + +VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database.Recommend Version(VictoriaMetrics:v1.95.1+, HertzBeat:v1.4.3+) + +**Note⚠️ Time series database is optional, but production environment configuration is strongly recommended to provide more complete historical chart functions and high performance** +**⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** + +> If you already have a VictoriaMetrics environment, you can skip directly to the YML configuration step. + +## Install VictoriaMetrics via Docker + +1. Download and install Docker environment +Docker tools download refer to [Docker official document](https://docs.docker.com/get-docker/). +After the installation you can check if the Docker version normally output at the terminal. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install VictoriaMetrics via Docker + + ```shell + $ docker run -d -p 8428:8428 \ + -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ + --name victoria-metrics \ + victoriametrics/victoria-metrics:v1.95.1 + ``` + + `-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` is local persistent mount of VictoriaMetrics data directory + use```$ docker ps``` to check if the database started successfully + +3. Configure the database connection in hertzbeat `application.yml`configuration file + + Modify `hertzbeat/config/application.yml` configuration file + Note⚠️The docker container way need to mount application.yml file locally, while you can use installation package way to unzip and modify `hertzbeat/config/application.yml` + Config the `warehouse.store.duckdb.enabled` `false`. Replace `warehouse.store.victoria-metrics` data source parameters, HOST account and password. + + ```yaml + warehouse: + store: + # disable DuckDB + duckdb: + enabled: false + # enable victoria-metrics + victoria-metrics: + enabled: true + url: http://localhost:8428 + username: root + password: root + ``` + +4. Restart HertzBeat + +### Use VictoriaMetrics in Cluster Mode + +VictoriaMetrics provides a **cluster mode** with separate components for ingestion (`vminsert`), storage (`vmstorage`), and querying (`vmselect`). The following section explains how to deploy VictoriaMetrics in cluster mode and integrate it with HertzBeat. + +#### 1. Deploy VictoriaMetrics Cluster via Docker Compose + +Create a `docker-compose.yml` file with the following content: + +```yaml +version: "3" + +services: + vmstorage1: + image: victoriametrics/vmstorage + command: + - "-retentionPeriod=1" + - "-storageDataPath=/storage" + volumes: + - vmstorage-data:/storage + ports: + - "8400:8400" # vminsert connects here + - "8401:8401" # vmselect connects here + + vminsert: + image: victoriametrics/vminsert + command: + - "-storageNode=vmstorage1:8400" + - "-httpAuth.username=root" + - "-httpAuth.password=root" + ports: + - "8480:8480" # ingestion endpoint + + vmselect: + image: victoriametrics/vmselect + command: + - "-storageNode=vmstorage1:8401" + - "-httpAuth.username=root" + - "-httpAuth.password=root" + ports: + - "8481:8481" # query endpoint + +volumes: + vmstorage-data: +``` + +Start the cluster with: + +```shell +docker-compose up -d +``` + +Check all components are running via: + +```shell +docker ps +``` + +#### 2. Configure HertzBeat for Cluster Mode + +Edit the `hertzbeat/config/application.yml` configuration file as follows: + +```yaml +warehouse: + store: + duckdb: + enabled: false + victoria-metrics: + cluster: + enabled: true + select: + url: http://127.0.0.1:8481 + username: root + password: root + insert: + url: http://127.0.0.1:8480 + username: root + password: root +``` + +**Note:** + +- Set `enabled: true` under `cluster` to enable cluster mode. +- Ensure the URLs match your Docker Compose network or deployment addresses. + +#### 3. Restart HertzBeat + +Once configured, restart HertzBeat to connect to the VictoriaMetrics cluster. + +### Custom Label Collision Policy + +Monitor custom labels keep their existing Prometheus semantics when HertzBeat +writes to VictoriaMetrics: + +- `job` and ordinary custom labels continue to use their configured values. +- `instance`, `__name__`, `__monitor_id__`, `__metrics__`, and `__metric__` are + managed by HertzBeat. If a monitor supplies one of these custom-label keys, + HertzBeat ignores only the conflicting label, stores the remaining metrics, + and reports the key name through a rate-limited warning and cumulative count. + Label values are not written to the warning. + +Before upgrading, inspect monitor custom labels and rename managed keys. If an +existing monitor uses a custom `instance` value for a separate identity, move +that value to a distinct label such as `target_instance`; new samples use the +HertzBeat monitor instance. Existing VictoriaMetrics series are not rewritten. +No migration is needed for monitors that use `job` or other ordinary custom +labels. + +### FAQ + +1. Do both the time series databases need to be configured? Can they both be used? + + > You don't need to configure all of them, you can choose one of them. Use the enable parameter to control whether it is used or not. You can also install and configure neither, which can affects the historical chart data. diff --git a/home/versioned_docs/version-1.9.0/start/virtual-thread.md b/home/versioned_docs/version-1.9.0/start/virtual-thread.md new file mode 100644 index 0000000000..06ee9518a8 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/start/virtual-thread.md @@ -0,0 +1,122 @@ +--- +id: virtual-thread +title: Virtual Thread Configuration +sidebar_label: Virtual Threads +description: Configure HertzBeat virtual-thread executors, defaults, rollback switches, and tuning guidance. +--- + +HertzBeat runs on JDK 25 and uses virtual threads for the blocking execution paths that benefit from them. All `hertzbeat.vthreads` keys are optional. If you upgrade HertzBeat but do not merge the new YAML block into your existing `application.yml`, HertzBeat still starts with built-in defaults. + +## 1. Where to Configure It + +Choose the config file that matches your deployment mode: + +- Package deployment: `hertzbeat/config/application.yml` +- Docker single-node deployment: mount your local `application.yml` to `/opt/hertzbeat/config/application.yml` +- Docker Compose deployment: edit `script/docker-compose/*/conf/application.yml` +- Standalone collector deployment: edit `hertzbeat-collector/config/application.yml` + +## 2. No Configuration Required + +You can leave out the entire `hertzbeat.vthreads` block. + +```yaml +# No virtual-thread override is required. +``` + +HertzBeat will apply runtime defaults automatically. + +## 3. Full Optional Configuration Template + +Use this only when you want to override the defaults: + +```yaml +hertzbeat: + vthreads: + enabled: true + common: + mode: UNBOUNDED_VT + collector: + mode: LIMIT_AND_REJECT + manager: + mode: LIMIT_AND_REJECT + max-concurrent-jobs: 10 + alerter: + notify: + mode: LIMIT_AND_REJECT + max-concurrent-jobs: 64 + periodic-max-concurrent-jobs: 10 + log-worker: + max-concurrent-jobs: 10 + queue-capacity: 1000 + reduce: + max-concurrent-jobs: 2 + window-evaluator: + max-concurrent-jobs: 2 + notify-max-concurrent-per-channel: 4 + warehouse: + mode: UNBOUNDED_VT + async: + enabled: true + concurrency-limit: 256 + reject-when-limit-reached: true + task-termination-timeout: 5000 +``` + +## 4. Built-In Defaults + +| Key | Default | Notes | +| --- | --- | --- | +| `hertzbeat.vthreads.enabled` | `true` | Global switch for the HertzBeat virtual-thread executors | +| `hertzbeat.vthreads.common.mode` | `UNBOUNDED_VT` | Common short-running tasks | +| `hertzbeat.vthreads.collector.mode` | `LIMIT_AND_REJECT` | Keeps collector fast-fail admission | +| `hertzbeat.vthreads.collector.max-concurrent-jobs` | `512` | Balanced default for mixed HTTP and JDBC collection workloads on a single node | +| `hertzbeat.vthreads.manager.mode` | `LIMIT_AND_REJECT` | Keeps manager admission behavior | +| `hertzbeat.vthreads.manager.max-concurrent-jobs` | `10` | Same as the legacy limit | +| `hertzbeat.vthreads.alerter.notify.mode` | `LIMIT_AND_REJECT` | Notification executor admission | +| `hertzbeat.vthreads.alerter.notify.max-concurrent-jobs` | `64` | Global notify concurrency | +| `hertzbeat.vthreads.alerter.notify-max-concurrent-per-channel` | `4` | Per notification channel/type | +| `hertzbeat.vthreads.alerter.periodic-max-concurrent-jobs` | `10` | Global periodic alert concurrency | +| `hertzbeat.vthreads.alerter.log-worker.max-concurrent-jobs` | `10` | Log alert short-task concurrency | +| `hertzbeat.vthreads.alerter.log-worker.queue-capacity` | `1000` | Bounded queue to preserve backlog semantics | +| `hertzbeat.vthreads.alerter.reduce.max-concurrent-jobs` | `2` | Alarm reduce concurrency | +| `hertzbeat.vthreads.alerter.reduce.queue-capacity` | unbounded | Leave unset to keep the legacy unbounded queue behavior | +| `hertzbeat.vthreads.alerter.window-evaluator.max-concurrent-jobs` | `2` | Window evaluator concurrency | +| `hertzbeat.vthreads.alerter.window-evaluator.queue-capacity` | unbounded | Leave unset to keep the legacy unbounded queue behavior | +| `hertzbeat.vthreads.warehouse.mode` | `UNBOUNDED_VT` | Storage short tasks; downstream pools still limit real resources | +| `hertzbeat.vthreads.async.enabled` | `true` | Dedicated `@Async` executor switch | +| `hertzbeat.vthreads.async.concurrency-limit` | `256` | `@Async` concurrency guard | +| `hertzbeat.vthreads.async.reject-when-limit-reached` | `true` | Reject extra `@Async` tasks at the limit | +| `hertzbeat.vthreads.async.task-termination-timeout` | `5000` | Milliseconds | + +## 5. Tuning Guidance + +- Start with the defaults unless you already know a downstream dependency is weak. +- The collector default is intentionally higher than the legacy CPU-based pool size so a single HertzBeat node can carry more blocking collection work before you need extra collectors. +- `512` is the default because it is a good mixed-workload starting point. In local verification, HTTP-heavy collection continued scaling beyond `512`, while JDBC-style collection peaked around `512` and dropped when concurrency was pushed higher. +- Virtual threads remove platform-thread pressure, but they do not remove database limits, HTTP connection limits, network bandwidth limits, file descriptor limits, or downstream rate limits. Raising concurrency too far just moves the bottleneck. +- If most of your workload is HTTP collection across many different targets, try `768` first and then `1024` if timeouts, error rates, and connection usage remain stable. +- If most of your workload is JDBC or other database-backed collection, keep `collector.max-concurrent-jobs` around `256` to `512`. In this type of workload, raising concurrency above `512` can reduce total throughput instead of improving it. +- If you are not sure about the workload mix, keep `512` as the starting point. It is a safer default than `768+` for mixed environments. +- Lower `collector.max-concurrent-jobs` when the collector talks to a small database, a low-capacity HTTP endpoint, or fragile network devices. +- Raise `alerter.notify.max-concurrent-jobs` or `notify-max-concurrent-per-channel` only if your notification providers and HTTP connection pools can absorb the increase. +- Keep `warehouse.mode` unbounded unless you have a clear bottleneck model. Database and TSDB client pools should remain the main limiters. +- `reduce.queue-capacity` and `window-evaluator.queue-capacity` are intentionally left unset by default so existing queueing semantics remain compatible. +- Change concurrency in steps and observe timeout rate, downstream `429` or `5xx`, database pool wait time, and memory or file descriptor usage before raising it again. + +## 6. Rollback + +Disable HertzBeat virtual-thread executors with: + +```yaml +hertzbeat: + vthreads: + enabled: false +``` + +This rolls the affected executors back to their legacy platform-thread implementations. + +## 7. Notes + +- If your current deployment is stable, you can keep your existing `application.yml` unchanged. +- Add the `hertzbeat.vthreads` block only when you want to tune concurrency limits or explicitly disable the feature. diff --git a/home/versioned_docs/version-1.9.0/template.md b/home/versioned_docs/version-1.9.0/template.md new file mode 100644 index 0000000000..b88ebcd932 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/template.md @@ -0,0 +1,95 @@ +--- +id: template +title: Monitoring Template Here +sidebar_label: Monitoring Template +--- + +> Apache HertzBeat™ is an open source, real-time monitoring tool with custom-monitor and agentless. +> +> We make protocols such as `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` configurable, and you only need to configure `YML` online to collect any metrics you want. +> Do you believe that you can immediately adapt a new monitoring type such as K8s or Docker just by configuring online? + +Here is the architecture. + +![HertzBeat](/img/docs/hertzbeat-arch.png) + +**We define all monitoring collection types (mysql, website, jvm, k8s) as yml templates, and users can import these templates into the hertzbeat system to support corresponding types of monitoring, which is very convenient!** + +![HertzBeat](/img/docs/advanced/extend-point-1.png) + +**Welcome everyone to contribute your customized general monitoring type YML template during use. The available templates are as follows:** + +## Application service monitoring + + 👉 [Website monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-website.yml)
+ 👉 [HTTP API](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api.yml)
+ 👉 [PING Connectivity](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ping.yml)
+ 👉 [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-port.yml)
+ 👉 [Full site monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-fullsite.yml)
+ 👉 [SSL Cert monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ssl_cert.yml)
+ 👉 [JVM monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jvm.yml)
+ 👉 [SpringBoot2.0](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot2.yml)
+ 👉 [SpringBoot3.0](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot3.yml)
+ 👉 [FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ftp.yml)
+ +### Database monitoring + + 👉 [MYSQL database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mysql.yml)
+ 👉 [MariaDB database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mariadb.yml)
+ 👉 [PostgreSQL database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-postgresql.yml)
+ 👉 [SqlServer database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-sqlserver.yml)
+ 👉 [Oracle database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml)
+ 👉 [DM database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml)
+ 👉 [OpenGauss database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml)
+ 👉 [IoTDB database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml)
+ 👉 [ElasticSearch database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-elasticsearch.yml)
+ 👉 [MongoDB database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml)
+ 👉 [ClickHouse database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml)
+ 👉 [Redis database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis.yml)
+ 👉 [Redis Sentinel database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml)
+ 👉 [Redis Cluster database monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml)
+ +### Operating system monitoring + + 👉 [Linux operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml)
+ 👉 [Windows operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-windows.yml)
+ 👉 [Ubuntu operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml)
+ 👉 [Centos operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-centos.yml)
+ 👉 [EulerOS operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-euleros.yml)
+ 👉 [Fedora CoreOS operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-coreos.yml)
+ 👉 [OpenSUSE operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opensuse.yml)
+ 👉 [Rocky Linux operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rockylinux.yml)
+ 👉 [Red Hat operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redhat.yml)
+ 👉 [FreeBSD operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-freebsd.yml)
+ 👉 [AlmaLinux operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-almalinux.yml)
+ 👉 [Debian operating system monitoring](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-debian.yml)
+ +### Middleware monitoring + + 👉 [Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-zookeeper.yml)
+ 👉 [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kafka.yml)
+ 👉 [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tomcat.yml)
+ 👉 [ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-shenyu.yml)
+ 👉 [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dynamic_tp.yml)
+ 👉 [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rabbitmq.yml)
+ 👉 [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-activemq.yml)
+ 👉 [Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jetty.yml)
+ 👉 [Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-flink.yml)
+ 👉 [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nacos.yml)
+ +### CloudNative monitoring + + 👉 [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-docker.yml)
+ 👉 [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml)
+ +### Network monitoring + + 👉 [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-cisco_switch.yml)
+ 👉 [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hpe_switch.yml)
+ 👉 [HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-huawei_switch.yml)
+ 👉 [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tplink_switch.yml)
+ 👉 [H3CSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-h3c_switch.yml)
+ +--- + +**Have Fun!** diff --git a/home/versioned_docs/version-1.9.0/zh-cn/help/redis_sentinel.md b/home/versioned_docs/version-1.9.0/zh-cn/help/redis_sentinel.md new file mode 100644 index 0000000000..87367c9285 --- /dev/null +++ b/home/versioned_docs/version-1.9.0/zh-cn/help/redis_sentinel.md @@ -0,0 +1,106 @@ +--- +id: redis_sentinel +title: 监控 Redis 哨兵 +sidebar_label: Redis 哨兵监控 +keywords: [开源监控系统, 开源数据库监控, Redis哨兵监控] +--- + +> 对 Redis Sentinel(哨兵)实例的关键性能指标进行采集监控。 + +## 监控前置要求 + +> 在添加 Redis 哨兵监控之前,请确保以下条件已满足: + +1. Redis Sentinel 服务已正常运行,且哨兵监听端口(默认为 **26379**)可从 HertzBeat 服务器访问。 +2. 如果哨兵实例配置了身份认证,请提前准备好用户名和密码。 +3. HertzBeat 服务器与目标主机之间不存在阻断哨兵端口的防火墙规则。 + +## 配置参数 + +| 参数名称 | 参数帮助描述 | +| -------- | ------------ | +| 目标Host | 被监控主机的 IPv4、IPv6 地址或域名。注意:不需要填写协议头,例如 `192.168.0.1`。 | +| 端口 | Redis Sentinel 实例的监听端口。默认值:**26379**。 | +| 超时时间 | 连接的超时时长,单位为毫秒。默认值:`3000`。 | +| 用户名 | 连接 Redis Sentinel 实例时使用的用户名。可选。 | +| 密码 | 连接 Redis Sentinel 实例时使用的密码。可选。 | +| 采集间隔 | HertzBeat 轮询此监控的间隔时间,单位为秒。最小值:30s。 | +| 描述备注 | 此监控的附加备注和说明信息。 | + +## 采集指标 + +### 指标集合:sentinel(哨兵概况) + +> 通过 `INFO sentinel` 命令采集哨兵整体概况指标。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +| -------- | -------- | ------------ | +| sentinel_masters | 无 | 当前 Sentinel 实例监控的 Redis 主节点总数量。 | +| sentinel_tilt | 无 | Sentinel 是否处于 TILT 模式(时钟偏斜安全模式)。`1` 表示 TILT 已激活,`0` 表示正常运行。 | +| sentinel_running_scripts | 无 | 当前 Sentinel 正在执行的 Lua 脚本数量。 | +| sentinel_timedout_scripts | 无 | 已超时的脚本数量。 | +| sentinel_scripts_queue_length | 无 | 当前等待执行的脚本队列长度。 | +| sentinel_simulate_failure_flags | 无 | 用于故障模拟测试的位掩码标志(通过 `SENTINEL SIMULATE-FAILURE` 命令设置)。 | + +### 指标集合:master_status(主节点状态) + +> 每个被监控 Redis 主节点的状态信息。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +| -------- | -------- | ------------ | +| master0 | 无 | 第一个被监控主节点的状态字符串,例如:`name=mymaster,status=ok,address=127.0.0.1:6379,slaves=1,sentinels=3`。 | +| master1 | 无 | 第二个被监控主节点的状态字符串(如存在)。 | +| master2 | 无 | 第三个被监控主节点的状态字符串(如存在)。 | + +### 指标集合:server(服务器信息) + +> 通过 `INFO server` 命令采集 Sentinel 进程的服务器级别信息。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +| -------- | -------- | ------------ | +| redis_version | 无 | Redis(Sentinel)二进制文件的版本字符串。 | +| os | 无 | Sentinel 所运行的操作系统信息。 | +| arch_bits | 无 | CPU 架构位数(32位或64位)。 | +| process_id | 无 | Sentinel 服务器进程的 PID。 | +| tcp_port | 无 | Sentinel 监听的 TCP 端口号。 | +| uptime_in_seconds | s | Sentinel 进程启动后的运行时长(秒)。 | +| uptime_in_days | d | Sentinel 进程启动后的运行时长(天)。 | +| hz | 无 | 服务器后台事件循环的频率(每秒调用次数)。 | +| executable | 无 | 服务器可执行文件的绝对路径。 | +| config_file | 无 | Sentinel 配置文件的绝对路径。 | + +### 指标集合:clients(客户端信息) + +> 通过 `INFO clients` 命令采集客户端连接统计信息。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +| -------- | -------- | ------------ | +| connected_clients | 无 | 当前已建立的客户端连接数量(不包括副本节点的连接)。 | +| blocked_clients | 无 | 正在等待阻塞命令(如 BLPOP、WAIT)的客户端数量。 | +| maxclients | 无 | 配置允许的最大客户端连接数量。 | +| client_recent_max_input_buffer | 无 | 所有当前客户端连接中最大的输入缓冲区大小(字节)。 | +| client_recent_max_output_buffer | 无 | 所有当前客户端连接中最大的输出缓冲区大小(字节)。 | + +### 指标集合:stats(全局统计信息) + +> 通过 `INFO stats` 命令采集服务器全局统计数据。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +| -------- | -------- | ------------ | +| total_connections_received | 无 | 服务器启动以来接受的连接总数。 | +| total_commands_processed | 无 | 服务器启动以来处理的命令总数。 | +| instantaneous_ops_per_sec | 无 | 每秒处理的命令数量(实时快照)。 | +| rejected_connections | 无 | 因达到 `maxclients` 限制而被拒绝的连接数量。 | +| total_net_input_bytes | 无 | 服务器启动以来从客户端接收的总字节数。 | +| total_net_output_bytes | 无 | 服务器启动以来发送给客户端的总字节数。 | + +### 指标集合:cpu(CPU 消耗信息) + +> 通过 `INFO cpu` 命令采集 CPU 使用统计数据。 + +| 指标名称 | 指标单位 | 指标帮助描述 | +| -------- | -------- | ------------ | +| used_cpu_sys | 无 | Sentinel 服务器进程消耗的内核态(系统态)CPU 时间。 | +| used_cpu_user | 无 | Sentinel 服务器进程消耗的用户态 CPU 时间。 | +| used_cpu_sys_children | 无 | 后台子进程消耗的内核态(系统态)CPU 时间。 | +| used_cpu_user_children | 无 | 后台子进程消耗的用户态 CPU 时间。 | diff --git a/home/versioned_sidebars/version-1.9.0-sidebars.json b/home/versioned_sidebars/version-1.9.0-sidebars.json new file mode 100644 index 0000000000..f30062aa49 --- /dev/null +++ b/home/versioned_sidebars/version-1.9.0-sidebars.json @@ -0,0 +1,469 @@ +{ + "docs": [ + { + "type": "doc", + "id": "introduce" + }, + { + "type": "category", + "label": "quickstart", + "items": [ + { + "type": "category", + "label": "install", + "items": [ + "start/docker-deploy", + "start/docker-compose-deploy", + "start/package-deploy", + "start/native-collector", + { + "type": "link", + "label": "Install via Helm", + "href": "https://artifacthub.io/packages/helm/hertzbeat/hertzbeat" + }, + { + "type": "category", + "label": "extern-deploy", + "items": [ + "start/baota-deploy", + "start/rainbond-deploy" + ] + } + ] + }, + { + "type": "category", + "label": "upgrade", + "items": [ + "start/1.9.0-update", + "start/1.7.0-update", + "start/1.6.0-update", + "start/upgrade" + ] + }, + { + "type": "category", + "label": "setting", + "items": [ + "start/account-modify", + "start/custom-config" + ] + }, + { + "type": "category", + "label": "change-db", + "items": [ + "start/greptime-init", + "start/victoria-metrics-init", + "start/iotdb-init", + "start/influxdb-init", + "start/questdb-init", + "start/postgresql-change", + "start/mysql-change" + ] + }, + { + "type": "category", + "label": "Use Case", + "key": "quickstart-use-case", + "items": [ + "start/usecase/ssl-cert-practice", + "start/usecase/springboot-auto-practice", + "start/usecase/linux-os-practice" + ] + } + ] + }, + { + "type": "category", + "label": "guides", + "items": [ + "help/guide", + "help/security_model", + "help/ai_agent", + "help/mcp_server", + { + "type": "category", + "label": "Use Case", + "key": "guides-use-case", + "items": [ + "start/usecase/ssl-cert-practice", + "start/usecase/springboot-auto-practice", + "start/usecase/linux-os-practice", + "start/usecase/tdengine-practice" + ] + }, + { + "type": "category", + "label": "Log (Beta)", + "key": "log", + "items": [ + "help/log_integration", + "help/log_stream", + "help/log_manage" + ] + }, + { + "type": "category", + "label": "alert", + "items": [ + "help/alarm_center", + "help/alert_threshold", + "help/alert_threshold_expr", + "help/alarm_group", + "help/alarm_inhibit", + "help/alarm_silence", + "help/alert_integration" + ] + }, + { + "type": "category", + "label": "notice", + "items": [ + "help/alert_email", + "help/alert_sms", + "help/alert_webhook", + "help/alert_discord", + "help/alert_slack", + "help/alert_telegram", + "help/alert_wework", + "help/alert_dingtalk", + "help/alert_feishu", + "help/alert_feishu_app", + "help/alert_console", + "help/alert_enterprise_wechat_app", + "help/alert_smn", + "help/alert_notification_template" + ] + }, + { + "type": "category", + "label": "service-discovery", + "items": [ + "help/eureka_sd", + "help/nacos_sd", + "help/consul_sd", + "help/zookeeper_sd", + "help/http_sd", + "help/dns_sd" + ] + }, + { + "type": "category", + "label": "service", + "items": [ + "help/prometheus", + "help/website", + "help/api", + "help/ping", + "help/port", + "help/udp_port", + "help/fullsite", + "help/ssl_cert", + "help/nginx", + "help/imap", + "help/pop3", + "help/smtp", + "help/ntp", + "help/dns", + "help/ftp", + "help/websocket", + "help/mqtt", + "help/modbus", + "help/jenkins", + "help/push" + ] + }, + { + "type": "category", + "label": "program", + "items": [ + "help/process", + "help/jvm", + "help/springboot2", + "help/springboot3", + "help/dynamic_tp" + ] + }, + { + "type": "category", + "label": "database", + "items": [ + "help/mysql", + "help/mariadb", + "help/postgresql", + "help/greenplum", + "help/vastbase", + "help/kingbase", + "help/sqlserver", + "help/oracle", + "help/dm", + "help/opengauss", + "help/nebulaGraph", + "help/nebulagraph_cluster", + "help/tidb", + "help/mongodb", + "help/mongodb_atlas", + "help/oceanbase", + "help/db2" + ] + }, + { + "type": "category", + "label": "cache", + "items": [ + "help/redis", + "help/memcached", + "help/valkey" + ] + }, + { + "type": "category", + "label": "os", + "items": [ + "help/linux", + "help/windows", + "help/ubuntu", + "help/debian", + "help/centos", + "help/almalinux", + "help/opensuse", + "help/freebsd", + "help/redhat", + "help/rockylinux", + "help/euleros", + "help/fedora", + "help/linux_script", + "help/windows_script", + "help/macos", + "help/darwin", + "help/nvidia" + ] + }, + { + "type": "category", + "label": "server", + "items": [ + "help/ipmi", + "help/hikvision_isapi", + "help/dahua", + "help/uniview", + "help/synology_nas", + "help/idrac" + ] + }, + { + "type": "category", + "label": "mid", + "items": [ + "help/activemq", + "help/kafka", + "help/kafka_client", + "help/pulsar", + "help/nacos", + "help/etcd", + "help/rabbitmq", + "help/rocketmq", + "help/shenyu", + "help/spring_gateway", + "help/zookeeper", + "help/apollo" + ] + }, + { + "type": "category", + "label": "bigdata", + "items": [ + "help/airflow", + "help/hbase_master", + "help/hbase_regionserver", + "help/hdfs_datanode", + "help/hdfs_namenode", + "help/hugegraph", + "help/hadoop", + "help/hive", + "help/iceberg", + "help/clickhouse", + "help/doris_be", + "help/doris_fe", + "help/starrocks_be", + "help/starrocks_fe", + "help/elasticsearch", + "help/flink", + "help/flink_on_yarn", + "help/influxdb", + "help/iotdb", + "help/presto", + "help/seatunnel", + "help/spark", + "help/yarn", + "help/dolphinscheduler" + ] + }, + { + "type": "category", + "label": "webserver", + "items": [ + "help/tomcat", + "help/jetty" + ] + }, + { + "type": "category", + "label": "cloud-native", + "items": [ + "help/docker", + "help/kubernetes" + ] + }, + { + "type": "category", + "label": "llm", + "items": [ + "help/openai", + "help/deepseek", + "help/ollama", + "help/lmstudio" + ] + }, + { + "type": "category", + "label": "network", + "items": [ + "help/huawei_switch" + ] + }, + { + "type": "category", + "label": "Custom", + "key": "help-custom", + "items": [ + "help/kafka_promql", + "help/influxdb_promql", + "help/tdengine_promql" + ] + }, + "help/status", + "help/bulletin", + "help/plugin", + "help/time_expression", + "help/grafana_dashboard", + "help/collector", + "help/risc-v", + "help/issue" + ] + }, + { + "type": "category", + "label": "Custom", + "key": "advanced-custom", + "items": [ + "advanced/extend-point", + "advanced/extend-tutorial", + { + "type": "category", + "label": "http", + "items": [ + "advanced/extend-http", + "advanced/extend-http-default", + "advanced/extend-http-jsonpath", + "advanced/extend-http-xmlpath", + "advanced/extend-http-example-hertzbeat", + "advanced/extend-http-example-token" + ] + }, + { + "type": "category", + "label": "jdbc", + "items": [ + "advanced/extend-jdbc" + ] + }, + { + "type": "category", + "label": "ssh", + "items": [ + "advanced/extend-ssh" + ] + }, + { + "type": "category", + "label": "telnet", + "items": [ + "advanced/extend-telnet" + ] + }, + { + "type": "category", + "label": "jmx", + "items": [ + "advanced/extend-jmx" + ] + }, + { + "type": "category", + "label": "snmp", + "items": [ + "advanced/extend-snmp" + ] + }, + { + "type": "category", + "label": "NGQL", + "items": [ + "advanced/extend-ngql" + ] + } + ] + }, + { + "type": "doc", + "id": "template" + }, + { + "type": "category", + "label": "Community", + "items": [ + "community/maturity", + "community/contact", + "community/development", + { + "type": "category", + "label": "contribution", + "items": [ + "community/contribution", + "community/mailing_lists", + "community/become_committer", + "community/become_pmc_member", + "community/new_committer_process", + "community/new_pmc_ember_process" + ] + }, + { + "type": "category", + "label": "submit", + "items": [ + "community/document", + "community/submit_code", + "community/code_style_and_quality_guide" + ] + }, + { + "type": "category", + "label": "release", + "items": [ + "community/how_to_release", + "community/how_to_verify_release" + ] + } + ] + }, + { + "type": "category", + "label": "Others", + "items": [ + "others/resource" + ] + } + ] +} diff --git a/home/versions.json b/home/versions.json index ad4e8d45ec..383ba944fd 100644 --- a/home/versions.json +++ b/home/versions.json @@ -1,4 +1,5 @@ [ + "1.9.0", "1.8.0", "1.7.x", "1.6.x"