delei commented on code in PR #3656: URL: https://github.com/apache/hertzbeat/pull/3656#discussion_r2280471291
########## hertzbeat-manager/src/main/resources/define/app-dolphinscheduler.yml: ########## @@ -0,0 +1,356 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# The monitoring type category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring +category: bigdata +# The monitoring type eg: linux windows tomcat mysql aws... +app: dolphinscheduler +# The monitoring i18n name +name: + zh-CN: Apache DolphinScheduler + en-US: Apache DolphinScheduler +# The description and help of this monitoring type +help: + zh-CN: Hertzbeat 对 Apache DolphinScheduler 通用指标进行测量监控。<br>您可以点击 “<i>新建 Apache DolphinScheduler</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。 + en-US: Hertzbeat measures and monitors the general metrics of Apache DolphinScheduler.<br>You can click on “<i>Create New Apache DolphinScheduler</i>” to configure it, or select “<i>More Actions</i>” to import an existing configuration. +helpLink: + zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/dolphinscheduler + en-US: https://hertzbeat.apache.org/docs/help/dolphinscheduler +# 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: 12345 + # field-param field key + - field: timeout + # name-param field display i18n name + name: + zh-CN: 查询超时时间 + en-US: Query Timeout + # type-param field type(most mapping the html input type) + type: number + # required-true or false + required: false + # hide param-true or false + hide: true + # default value + defaultValue: 6000 + # field-param field key + - field: ssl + # name-param field display i18n name + name: + zh-CN: 启用HTTPS + en-US: SSL + # type-param field type(boolean mapping the html h tag) + type: boolean + # required-true or false + required: true + - field: token + # name-param field display i18n name + name: + zh-CN: 令牌 + en-US: Token + type: text + limit: 100 + required: true + +# collect metrics config list +metrics: + - name: master + i18n: + zh-CN: Master + en-US: Master + # 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: host + type: 1 + i18n: + zh-CN: 主机地址 + en-US: Host + - field: port + type: 1 + i18n: + zh-CN: 端口 + en-US: Port + - field: serverStatus + type: 1 + i18n: + zh-CN: 状态 + en-US: Server Status + - field: processId + type: 1 + i18n: + zh-CN: 进程 ID + en-US: Process Id + - field: runningTime + type: 0 + i18n: + zh-CN: 运行时间 + en-US: Running Time + - field: cpuUsage + type: 0 + unit: '%' + i18n: + zh-CN: CPU使用率 + en-US: CPU Usage + - field: memoryUsage + type: 0 + unit: '%' + i18n: + zh-CN: 内存使用率 + en-US: Memory Usage + - field: diskAvailable + type: 0 + unit: 'GB' + i18n: + zh-CN: 磁盘可用容量 + en-US: Disk Available + # (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field + aliasFields: + - $.resInfo + # mapping and conversion expressions, use these and aliasField above to calculate metrics value + # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime + calculates: + - host=json:apply($.resInfo).host + - port=json:apply($.resInfo).port + - serverStatus=json:apply($.resInfo).serverStatus + - processId=json:apply($.resInfo).processId + - runningTime=(now()-json:apply($.resInfo).startupTime)/86400000 + - cpuUsage=json:apply($.resInfo).cpuUsage * 100 + - memoryUsage=json:apply($.resInfo).memoryUsage * 100 + - diskAvailable=json:apply($.resInfo).diskAvailable + # 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: /dolphinscheduler/monitor/masters Review Comment: > This url seems wrong, I got an error <img alt="image" width="1117" height="799" src="https://private-user-images.githubusercontent.com/131688897/478460301-a9bc56e8-aad9-47b5-b024-933f26c7eef0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTUzNTc1NTQsIm5iZiI6MTc1NTM1NzI1NCwicGF0aCI6Ii8xMzE2ODg4OTcvNDc4NDYwMzAxLWE5YmM1NmU4LWFhZDktNDdiNS1iMDI0LTkzM2YyNmM3ZWVmMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgxNlQxNTE0MTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lNmIwOWM3NmFjNzAzNmNkZGYyMzQ4OTRlYWY3NWFmYzk1YzM4NWVmYjhiMGZmYmNkYjBiOWFiZTcyYTIwMjc3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.uuwTG-pxp4JgRtaXnLrAbXnJ1EVljxUJ9fDKqrikKrQ"> When I modify it to `/dolphinscheduler/monitor/MASTER`, it works. <img alt="image" width="1095" height="831" src="https://pri vate-user-images.githubusercontent.com/131688897/478460719-003bf526-19d8-41d9-afe9-5f7c407a475f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTUzNTc1NTQsIm5iZiI6MTc1NTM1NzI1NCwicGF0aCI6Ii8xMzE2ODg4OTcvNDc4NDYwNzE5LTAwM2JmNTI2LTE5ZDgtNDFkOS1hZmU5LTVmN2M0MDdhNDc1Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgxNlQxNTE0MTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02MjkxMmQ3ZjgwODAwMmEwYTA1YWY4MGY2NmZkNjE4NmU1Zjg2Yzk3OTYxMmJlYjAxMWI2NmE3MTc1N2YxMDkxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.mnheJWEqLTG2Rs8iPPMfYYq-YfVydhvmvL3njvPsNb0"> I noticed that the data returned by your interface is different from mine. Which version are you using exactly? BTW, this is the data returned by the interface in my local environment. <img width="1454" height="1253" alt="image" src="https://github.com/user-attachments/assets/432bde7e-c625-4889-89d8-2609eccb50a3" /> <img width="1467" height="806" alt="image" src="https://github.com/user-attachments/assets/15225ad1-63c3-4f47-8cf2-dc034bfe4904" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org