Skip to main content

MSSQL

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

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mssql-check
spec:
interval: 30
spec:
mssql:
- connection: "server=mssql.default.svc;user id=$(username);password=$(password);port=1433;database=master"
auth:
username:
valueFrom:
secretKeyRef:
name: mssql-credentials
key: USERNAME
password:
valueFrom:
secretKeyRef:
name: mssql-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 SQL Server 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