構文
引数
db_name- TimeSeries テーブルが存在するデータベースの名前。time_series_table- TimeSeries テーブルの名前。promql_query- PromQL 構文で記述されたクエリ。start_time- 評価範囲の開始時刻。end_time- 評価範囲の終了時刻。step- 評価時刻をstart_timeからend_timeまで (両端を含む) 順に進める際のステップ。
戻り値
promql_query に渡されたクエリの結果タイプに応じて、返されるカラムが異なります。
| 結果タイプ | 結果カラム | 例 |
|---|---|---|
| vector | tags Array(Tuple(String, String)), timestamp TimestampType, value ValueType | prometheusQuery(mytable, ‘up’) |
| matrix | tags Array(Tuple(String, String)), time_series Array(Tuple(TimestampType, ValueType)) | prometheusQuery(mytable, ‘up[1m]‘) |
| scalar | scalar ValueType | prometheusQuery(mytable, ‘1h30m’) |
| string | string String | prometheusQuery(mytable, ‘“abc”‘) |