Prometheus
The Prometheus Check connects to the Prometheus host, performs the desired query, and displays the results.
prometheus.yamlapiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: prometheus
spec:
interval: 30
prometheus:
- url: https://prometheus.demo.aws.flanksource.com/
name: prometheus-check
query: kubernetes_build_info{job!~"kube-dns|coredns"}
display:
expr: results[0].git_version
Field | Description | Scheme |
---|---|---|
name* | Name of the check, must be unique within the canary |
|
query* | PromQL query to execute | |
url* | Prometheus instance, defaults to | |
bearer | Bearer token to use for authentication | |
oauth | ||
password | Password for basic auth | |
username | Username for basic auth | |
description | Description for the check |
|
display | Expression to change the formatting of the display | |
icon | Icon for overwriting default icon on the dashboard | |
labels | Labels for check | map[string]string |
metrics | Metrics to export from | |
test | Evaluate whether a check is healthy | |
transform | Transform data from a check into multiple individual checks |
OAuth
Field | Description | Scheme |
---|---|---|
clientID | Client ID | |
clientSecret | Client Secret | |
params | OAuth parameters when requesting a token |
|
scope | Scopes to request |
|
tokenURL | Token URL |
|
Result Variables
Name | Description | Scheme |
---|---|---|
value | float | |
firstValue | Number of rows returned | int |
results | A list of results | []map[string]interface |