Duansg commented on code in PR #3994:
URL: https://github.com/apache/hertzbeat/pull/3994#discussion_r2716536421
##########
web-app/src/app/routes/monitor/monitor-data-chart/monitor-data-chart.component.ts:
##########
@@ -264,7 +266,7 @@ export class MonitorDataChartComponent implements OnInit,
OnDestroy {
// load historical metrics data
this.loading =
`${this.i18nSvc.fanyi('monitor.detail.chart.data-loading')}`;
let metricData$ = this.monitorSvc
- .getMonitorMetricHistoryData(this.instance, this.app, this.metrics,
this.metric, this.timePeriod, isInterval)
+ .getMonitorMetricHistoryData(this.instance, this.monitorName, this.app,
this.metrics, this.metric, this.timePeriod, isInterval)
Review Comment:
Thanks for your reply.
1. VictoriaMetricsClusterDataStorage And VictoriaMetricsDataStorage
```
// saveData() method
if (metricsData.getApp().startsWith(CommonConstants.PROMETHEUS_APP_PREFIX)) {
isPrometheusAuto = true;
}
```
```
// getHistoryMetricData()
String labelName = metrics + SPILT + metric;
if (CommonConstants.PROMETHEUS.equals(app)) { //
app.startsWith(CommonConstants.PROMETHEUS_APP_PREFIX)
labelName = metrics;
}
String timeSeriesSelector = Stream.of(
LABEL_KEY_NAME + "=\"" + labelName + "\"",
LABEL_KEY_INSTANCE + "=\"" + instance + "\"",
CommonConstants.PROMETHEUS.equals(app) ? null : MONITOR_METRIC_KEY +
"=\"" + metric + "\"" // app.startsWith(CommonConstants.PROMETHEUS_APP_PREFIX)
).filter(Objects::nonNull).collect(Collectors.joining(","));
```
2. GreptimeDbDataStorage: getHistoryMetricData() and
getHistoryIntervalMetricData()
```
if (!CommonConstants.PROMETHEUS.equals(app)) { // default : String
timeSeriesSelector = LABEL_KEY_NAME + "=\"" + name + "\"" + "," +
LABEL_KEY_INSTANCE + "=\"" + instance + "\"";
timeSeriesSelector = timeSeriesSelector + "," + LABEL_KEY_FIELD + "=\""
+ metric + "\"";
}
```
Theoretically, only the VM needs to be modified, right? And since the VM is
saved through its mapping, maintaining consistency shouldn't be an issue. What
do you think?
--
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]