usePrometheusPoll

Sets up a poll to Prometheus for a single query. It returns a tuple containing the query response, a boolean flag indicating whether the response has completed, and any errors encountered during the request or post-processing of the request.

Parameter Name Description

{PrometheusEndpoint} props.endpoint

one of the PrometheusEndpoint (label, query, range, rules, targets)

{string} [props.query]

(optional) Prometheus query string. If empty or undefined, polling is not started.

{number} [props.delay]

(optional) polling delay interval (ms)

{number} [props.endTime]

(optional) for QUERY_RANGE endpoint, end of the query range

{number} [props.samples]

(optional) for QUERY_RANGE endpoint

{number} [options.timespan]

(optional) for QUERY_RANGE endpoint

{string} [options.namespace]

(optional) a search param to append

{string} [options.timeout]

(optional) a search param to append