Skip to main content

MongoDB

The MongoDB check connects to MongoDB and pings the primary to verify availability.

mongodb.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mongo
spec:
schedule: "@every 5m"
mongodb:
- url: mongodb://$(username):$(password)@mongo.canaries.svc.cluster.local:27017/?authSource=admin
name: mongo ping check
username:
value: mongoadmin
password:
value: secret
FieldDescriptionScheme
name*

Name of the check, must be unique within the canary

string

connection

Connection reference or URL to use. Inline username and password can supply credentials when the check supports them

Connection

password

EnvVar

url

MongoDB connection string, such as mongodb://:27017/?authSource=admin. Required unless connection supplies the URL.

string

username

EnvVar

dependsOn

Checks that must complete before this check runs

[]string

description

Description for the check

string

icon

Icon for overwriting default icon on the dashboard

Icon

labels

Labels for check

[map[string]string]

markFailOnEmpty

If a transformation or datasource returns empty results, the check should fail

boolean

metrics

Metrics to export from

[]Metrics

namespace

Namespace to insert the check result into when it differs from the canary namespace

string

transformDeleteStrategy

Status to apply to transformed checks when the source check no longer returns them

string