prometheus
Query Prometheus-compatible HTTP APIs directly from DuckDB
Maintainer(s): botan
Installing and Loading
INSTALL prometheus FROM community;LOAD prometheus;Example
-- Replace localhost:9090 with your Prometheus-compatible endpoint.SELECT timestamp, job, instance, valueFROM prometheus_scan( 'up', current_timestamp - INTERVAL '15 minutes', current_timestamp, endpoint := 'http://localhost:9090', step := INTERVAL '1 minute', labels := ['job', 'instance'])ORDER BY timestamp DESC, job, instance;About prometheus
Run instant PromQL queries with prometheus_query and range queries with
prometheus_scan; their _many variants accept multiple expressions. Each sample
contains labels MAP(VARCHAR, VARCHAR), timestamp TIMESTAMPTZ, and value DOUBLE.
Pass labels := [...] to expose selected labels as columns.
Discovery functions list labels, label values, series, and metric metadata. Requests are unauthenticated. See the README for function signatures and limitations.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| prometheus_label_values | table | NULL | NULL | |
| prometheus_labels | table | NULL | NULL | |
| prometheus_metadata | table | NULL | NULL | |
| prometheus_query | table | NULL | NULL | |
| prometheus_query_many | table | NULL | NULL | |
| prometheus_scan | table | NULL | NULL | |
| prometheus_scan_many | table | NULL | NULL | |
| prometheus_series | table | NULL | NULL |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
This extension does not add any settings.