Prometheus
The Prometheus Check connects to the Prometheus host, performs the desired query, and displays the results.
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: prometheus-check
spec:
  interval: 30
  prometheus:
    - url: http://prometheus-k8s.monitoring.svc:9090
      query: kubernetes_build_info{job!~"kube-dns|coredns"}
      display:
        template: "{{ (index .results 0).git_version }}"
      test:
        template: "true"
| Field | Description | Scheme | Required | 
|---|---|---|---|
url | Address of the Prometheus server | string | Yes | 
query | PromQL query | string | Yes | 
name | Name of the check, must be unique within the canary | string | Yes | 
description | Description for the check | string | |
icon | Icon for overwriting default icon on the dashboard | string | |
labels | Labels for check | map[string]string | |
test | Evaluate whether a check is healthy | Expression | |
display | Expression to change the formatting of the display | Expression | |
transform | Transform data from a check into multiple individual checks | Expression | |
metrics | Metrics to export from | []Metrics | |
connection | Path of existing connection e.g. connection://prometheus/instanceMutually exclusive with url  | Connection | |
url | Redis hostname and port | ||
username |  Mutually exclusive with connection  | EnvVar | |
password |  Mutually exclusive with connection  | EnvVar | 
Result Variables
| Name | Description | Scheme | 
|---|---|---|
value | float | |
firstValue | Number of rows returned | int | 
results | A list of results | []map[string]interface{ } |