prometheus
Prometheus-kompatible HTTP-APIs direkt aus DuckDB abfragen
Maintainer: botan
Installation und Laden
INSTALL prometheus FROM community;LOAD prometheus;Beispiel
-- 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;Über prometheus
Führen Sie instant PromQL-Abfragen mit prometheus_query und Bereichsabfragen mit
prometheus_scan aus; ihre _many-Varianten akzeptieren mehrere Ausdrücke. Jedes Sample
enthält labels MAP(VARCHAR, VARCHAR), timestamp TIMESTAMPTZ und value DOUBLE.
Übergeben Sie labels := [...], um ausgewählte Labels als Spalten bereitzustellen.
Discovery-Funktionen listen Labels, Labelwerte, Serien und Metrik-Metadaten. Anfragen sind unauthentifiziert. Signaturen und Einschränkungen finden Sie in der README.
Hinzugefügte Funktionen
| 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 |
Überladene Funktionen
Diese Erweiterung fügt keine Funktionsüberladungen hinzu.
Hinzugefügte Typen
Diese Erweiterung fügt keine Typen hinzu.
Hinzugefügte Einstellungen
Diese Erweiterung fügt keine Einstellungen hinzu.