메인 콘텐츠로 건너뛰기
평가 시간 범위 전반에 걸쳐 TimeSeries 테이블의 데이터를 사용해 Prometheus 쿼리를 평가합니다.

구문

prometheusQueryRange('db_name', 'time_series_table', 'promql_query', start_time, end_time, step)
prometheusQueryRange(db_name.time_series_table, 'promql_query', start_time, end_time, step)
prometheusQueryRange('time_series_table', 'promql_query', start_time, end_time, step)

인수

  • db_name - TimeSeries 테이블이 있는 데이터베이스 이름입니다.
  • time_series_table - TimeSeries 테이블 이름입니다.
  • promql_query - PromQL 구문으로 작성한 쿼리입니다.
  • start_time - 평가 범위의 시작 시간입니다.
  • end_time - 평가 범위의 종료 시간입니다.
  • step - start_time부터 end_time까지(양 끝 포함) 평가 시간을 순회할 때 사용하는 간격입니다.

반환 값

이 함수는 매개변수 promql_query에 전달된 쿼리의 결과 유형에 따라 서로 다른 컬럼을 반환할 수 있습니다.
결과 유형결과 컬럼예시
vectortags Array(Tuple(String, String)), timestamp TimestampType, value ValueTypeprometheusQuery(mytable, ‘up’)
matrixtags Array(Tuple(String, String)), time_series Array(Tuple(TimestampType, ValueType))prometheusQuery(mytable, ‘up[1m]‘)
scalarscalar ValueTypeprometheusQuery(mytable, ‘1h30m’)
stringstring StringprometheusQuery(mytable, ‘“abc”‘)

예시

SELECT * FROM prometheusQueryRange(mytable, 'rate(http_requests{job="prometheus"}[10m])[1h:10m]', now() - INTERVAL 10 MINUTES, now(), INTERVAL 1 MINUTE)
마지막 수정일 2026년 6월 10일