Skip to main content

MySQL

This check will try to connect to a specified MySQL database, run a query against it and verify the results.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mysql-check
spec:
interval: 30
spec:
mysql:
- connection: "$(username):$(password)@tcp(mysql.default.svc:3306)/mysqldb"
name: mysql ping check
auth:
username:
valueFrom:
secretKeyRef:
name: mysql-credentials
key: USERNAME
password:
valueFrom:
secretKeyRef:
name: mysql-credentials
key: PASSWORD
query: <insert-query>
results: 1
FieldDescriptionSchemeRequired
authUsername and password value, configMapKeyRef or SecretKeyRef for Postgres serverAuthentication
connectionConnection string to connect to the MySQL serverstringYes
descriptionDescription for the checkstring
displayTemplate to display query results in text (overrides default bar format for UI)Template
iconIcon for overwriting default icon on the dashboardstring
nameName of the checkstring
queryquery that needs to be executed on the serverstringYes
resultsNumber rows to check forintYes
testTemplate to test the result againstTemplate