# 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. category: mid app: shenyu name: zh-CN: ShenYu网关 en-US: ShenYu Gateway # The description and help of this monitoring type # 监控类型的帮助描述信息 help: zh-CN: HertzBeat 对 ShenYu 网关的运行状态(JVM相关),请求响应等相关指标(shenyu request total、process cpu seconds total、process open fds、process max fds、jvm memory pool bytes used、jvm memory pool bytes max、jvm threads state等)进行监测。
⚠️注意:您需要在 ShenYu 开启 metrics 插件 ,暴露对应的 prometheus metrics 接口, 点击查看开启步骤。 en-US: "HertzBeat monitors ShenYu through runtime status(related to JVM) and request response and so on.
⚠️Note:You should enable the metrics plug-in component in ShenYu gateway for expose related prometheus metrics interface, Click here to view the specific steps." zh-TW: HertzBeat對ShenYu閘道的運行狀態(JVM相關),請求響應等相關名額(shenyu request total、process cpu seconds total、process open fds、process max fds、jvm memory pool bytes used、jvm memory pool bytes max、jvm threads state等)進行監測。
⚠️ 注意:您需要在ShenYu開啟metrics挿件,暴露對應的prometheus metrics介面,點擊查看開啟步驟。 helpLink: zh-CN: https://hertzbeat.com/zh-cn/docs/help/shenyu en-US: https://hertzbeat.com/docs/help/shenyu 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]' defaultValue: 8090 required: true - field: timeout name: zh-CN: 查询超时时间 en-US: Query Timeout type: number required: false hide: true defaultValue: 6000 metrics: - name: shenyu_request_total priority: 0 fields: - field: value type: 0 # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: shenyu_request_throw_created priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: value type: 0 # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: process_cpu_seconds_total priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: value type: 0 unit: s # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: process_open_fds priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: value type: 0 # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: process_max_fds priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: value type: 0 # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: jvm_info priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: runtime type: 1 - field: vendor type: 1 - field: version type: 1 # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: jvm_memory_bytes_used priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: area type: 1 instance: true - field: value type: 0 unit: MB units: - value=B->MB # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: jvm_memory_pool_bytes_used priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: pool type: 1 instance: true - field: value type: 0 unit: MB units: - value=B->MB # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: jvm_memory_pool_bytes_committed priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: pool type: 1 instance: true - field: value type: 0 unit: MB units: - value=B->MB # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: jvm_memory_pool_bytes_max priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: pool type: 1 instance: true - field: value type: 0 unit: MB units: - value=B->MB # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus - name: jvm_threads_state priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: state type: 1 instance: true - field: count type: 0 aliasFields: - state - value calculates: - count=value # 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: '' timeout: ^_^timeout^_^ method: GET parseType: prometheus