Skip to main content

MongoDB

The Mongo check tries to connect to a specified Mongo Database to ensure connectivity.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mongo-check
spec:
interval: 30
mongodb:
- name: mongo password
url: mongodb://$(username):$(password)@mongo.default.svc:27017/?authSource=admin
username:
valueFrom:
secretKeyRef:
name: mongo-credentials
key: USERNAME
password:
valueFrom:
secretKeyRef:
name: mongo-credentials
key: PASSWORD

FieldDescriptionSchemeRequired
connectionPath of existing connection e.g. connection://mongo/instance or connection url
Connection
urlmongodb://:27017/?authSource=admin, See connection-string
username Mutually exclusive with connection EnvVar
password Mutually exclusive with connection EnvVar
nameName of the check, must be unique within the canarystringYes
descriptionDescription for the checkstring
iconIcon for overwriting default icon on the dashboardstring
labelsLabels for checkmap[string]string
testEvaluate whether a check is healthyExpression
displayExpression to change the formatting of the displayExpression
transformTransform data from a check into multiple individual checksExpression
metricsMetrics to export from[]Metrics