-
-
Notifications
You must be signed in to change notification settings - Fork 69
Prometheus Write Input
Lorenzo Mangani edited this page Mar 10, 2023
·
13 revisions
qryn implements experimental support for the Prometheus Remote Write API (Protobuf WriteRequest format)
-
api/v1/prom/remote/write
-
api/prom/remote/write
(alias)
Use the promremote client to test the input.
promremote -t=__name__:foo_bar -t=biz:baz -d=now,1415.92
Store data from Prometheus instances using the remote_write API
# Remote write configuration
remote_write:
- url: "http://qryn:3100/api/v1/write"
Stored Metrics can be accessed using the qryn (unwrap_value) function. (PromQL support is in our roadmap)
rate({label1="val1"}| unwrap int_valued_label [1s]) by (another_label)
-
{label1="val1"}
Fetch all log lines matching label filters. -
<expr> | unwrap int_valued_label
Use the extracted label int_valued_label as sample values instead of log lines for the subsequent range aggregation. -
rate(<expr> [1s])
Calculates the number of entries per second. -
by (another_label)
Groups the resulting series by the selected label(s).
-
rate(unwrapped-range)
: calculates per second rate of all values in the specified interval. -
sum_over_time(unwrapped-range)
: the sum of all values in the specified interval. -
avg_over_time(unwrapped-range)
: the average value of all points in the specified interval. -
max_over_time(unwrapped-range)
: the maximum value of all points in the specified interval. -
min_over_time(unwrapped-range)
: the minimum value of all points in the specified interval -
first_over_time(unwrapped-range)
: the first value of all points in the specified interval -
last_over_time(unwrapped-range)
: the last value of all points in the specified interval - Aggregation operators over unwrapped expressions are supported.
In Grafana queries, use $__interval for unwrap, ie: unwrap data [$__interval]
Examples: LogQL Range Aggregations