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
| Field | Description | Scheme | Required | 
|---|---|---|---|
connection | Path of existing connection e.g. connection://mongo/instance or connection url  | Connection | |
url | mongodb://:27017/?authSource=admin, See connection-string | ||
username |  Mutually exclusive with connection  | EnvVar | |
password |  Mutually exclusive with connection  | EnvVar | |
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 |