Prometheus_query: Prometheus Instant Query

Prometheus_queryR Documentation

Prometheus Instant Query

Description

Run a instant query against the Prometheus Server

Arguments

query

The PromQL query

time

Evaluation timestamp, can be a rfc3339 or Unix timestamp. Optional, defaults to current Prometheus server time.

timeout

Evaluation timeout (e.g. 1h, 1.5m or 15s). Optional, defaults to timeout value of the Prometheus server.

Examples

## Not run: 
 prom <- Prometheus$new(host = "https://foo.bar", port = 9090)
 metrics <- prom$query(query = "up", time = "2018-10-26T20:10:51.781Z")
 metrics <- prom$query(query = "up", time = "1540677062")

## End(Not run)

glenn-m/promR documentation built on March 22, 2023, 8:49 p.m.