Cyanty opened a new pull request, #3264: URL: https://github.com/apache/hertzbeat/pull/3264
## What's changed? <!-- Describe Your PR Here --> **PrometheusAuto 监控未设置指标监控时间** 非 PrometheusAuto 监控在验证指标值时`MetricsCollect # validateResponse`设置了指标监控时间,而 PrometheusAuto 监控并未设置该时间,由于 Prometheus 返回的指标类型不一致,故在`PrometheusAutoCollectImpl # parseResponseByPrometheusExporter`方法正确获取到响应指标时设置该指标监控时间。 ----- **PrometheusAuto 监控在 jpa 下的历史数据查询为空的问题解决** 启用 jpa 存储历史数据,在 PrometheusAuto 监控下,`hzb_history`表的 app 字段存放的是 `CommonConstants.PROMETHEUS_APP_PREFIX + monitor.getName()`值,而查询时的过滤条件为: ```sql WHERE app = "prometheus" -- Modify: WHERE app LIKE '_prometheus_%' ``` 在不改动写入数据的情况下,修改查询为符合 PROMETHEUS_APP_PREFIX 前缀的模糊查询,可正常查询到数据,并在历史图表中恢复展现。  ## Checklist - [x] I have read the [Contributing Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide) - [x] I have written the necessary doc or comment. - [ ] I have added the necessary unit tests and all cases have passed. ## Add or update API - [ ] I have added the necessary [e2e tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have passed. -- 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