Duansg opened a new issue, #3609:
URL: https://github.com/apache/hertzbeat/issues/3609
### Feature Request
_No response_
### Is your feature request related to a problem? Please describe
When using the Spring Boot 3 monitoring template extension to parse the
`system.cpu.usage` metric data, I found that the data is currently not being
parsed and calculated correctly.
```
- name: system_cpu_usage
i18n:
zh-CN: CPU Usage
en-US: CPU Usage
priority: 5
fields:
- field: usage
i18n:
zh-CN: usage
en-US: usage
type: 0
unit: '%'
calculates:
- usage=usage*100
protocol: http
http:
host: ^_^host^_^
port: ^_^port^_^
url: ^_^base_path^_^/metrics/system.cpu.usage
method: GET
ssl: ^_^ssl^_^
authorization:
type: Basic Auth
basicAuthUsername: ^_^username^_^
basicAuthPassword: ^_^password^_^
parseType: jsonPath
parseScript: '$.measurements[?(@.statistic == "VALUE")].value'
```
<img width="1498" height="846" alt="Image"
src="https://github.com/user-attachments/assets/882959b0-01ff-4ab3-93b7-f5589f9c3014"
/>
### Describe the solution you'd like
Normal data display rendering
### Describe alternatives you've considered
I considered using `aliasFields` for parsing, but the result would cause an
exception when Jexl parses the Jsonpath expression, causing the offset to be
lost. Therefore, based on the simplest processing method currently available, I
believe that parsing of numeric types should be supported.
### Additional context
_No response_
--
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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]