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

prom <- Prometheus$new(host = "https://foo.bar", port = 9090) metrics <- prom$query(query = "up", time = "2018-10-26T20:10:51.781Z")
#> Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: foo.bar
metrics <- prom$query(query = "up", time = "1540677062")
#> Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: foo.bar