Project: HertzBeat (Observability and Analysis / Observability)
File: shenyu.md

id: shenyu title: MonitoringApache 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. Enable `metrics` plugin in ShenYu, expose it's prometheus metrics endpoint Refer Two Steps Mainly: add metrics plugin dependency in gateway's pom.xml. ```xml <dependency> <groupId>org.apache.shenyu</groupId> <artifactId>shenyu-spring-boot-starter-plugin-metrics</artifactId> <version>${project.version}</version> </dependency> ``` 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. | 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

| | 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 | | Metric Name | Metric Unit | Metric Help Description | | -- ||-| | value | None | Collect all requests from ShenYu gateway | | Metric Name | Metric Unit | Metric Help Description | | -- ||-| | value | None | Collect the number of abnormal requests from ShenYu Gateway | | Metric Name | Metric Unit | Metric Help Description | | -- ||| | value | none | total user and system CPU elapsed seconds | | Metric Name | Metric Unit | Metric Help Description | | -- ||-| | value | none | number of open file descriptors | | Metric Name | Metric Unit | Metric Help Description | | -- ||-| | value | none | maximum number of open file descriptors | | Metric Name | Metric Unit | Metric Help Description | | -- ||--| | runtime | none | JVM version information | | vendor | none | JVM version information | | version | None | JVM version information | | Metric Name | Metric Unit | Metric Help Description | | -- ||| | area | None | JVM memory area | | value | MB | used size of the given JVM memory region | | Metric Name | Metric Unit | Metric Help Description | |--||--| | pool | None | JVM memory pool | | value | MB | used size of the given JVM memory pool | | Metric Name | Metric Unit | Metric Help Description | | -- ||| | pool | None | JVM memory pool | | value | MB | The committed size of the given JVM memory pool | | 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 Name | Metric Unit | Metric Help Description | | -- ||-| | state | none | thread state | | value | None | The number of threads corresponding to the thread state |