Skip to main content

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:
- host: http://prometheus-k8s.monitoring.svc:9090
query: kubernetes_build_info{job!~"kube-dns|coredns"}
display:
template: "{{ (index .results 0).git_version }}"
test:
template: "true"

FieldDescriptionSchemeRequired
descriptionDescription for the checkstring
displayTemplate to display the result inTemplate
hostAddress of the Prometheus serverstringYes
iconIcon for overwriting default icon on the dashboardstring
nameName of the checkstring
queryPromQL querystringYes
testTemplate to test the result againstTemplate