Skip to content

Commit

Permalink
bugfix history range query not work when victoria-metrics store (#1463)
Browse files Browse the repository at this point in the history
Signed-off-by: tomsun28 <tomsun28@outlook.com>
  • Loading branch information
tomsun28 committed Mar 9, 2024
1 parent 722f876 commit 314433a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ public Map<String, List<Value>> getHistoryMetricData(Long monitorId, String app,
HttpEntity<Void> httpEntity = new HttpEntity<>(headers);
URI uri = UriComponentsBuilder.fromHttpUrl(victoriaMetricsProp.getUrl() + EXPORT_PATH)
.queryParam(URLEncoder.encode("match[]", StandardCharsets.UTF_8), URLEncoder.encode("{" + timeSeriesSelector + "}", StandardCharsets.UTF_8))
.queryParam("start", URLEncoder.encode("now-" + history, StandardCharsets.UTF_8))
.queryParam("end", "now")
.build(true).toUri();
ResponseEntity<String> responseEntity = restTemplate.exchange(uri,
HttpMethod.GET, httpEntity, String.class);
Expand Down

0 comments on commit 314433a

Please sign in to comment.