New to Kestra?
Use blueprints to kickstart your first workflows.
Audit FerretDB MongoDB-proxy readiness, track PostgreSQL backend connection saturation, and alert via Slack to prevent unhandled database query failures.
FerretDB is an open-source proxy that translates MongoDB wire protocol queries into PostgreSQL SQL statements, providing a drop-in open-source alternative to MongoDB. In production environments where analytics and application workloads communicate through FerretDB, unhandled MongoDB aggregation queries or PostgreSQL connection pool exhaustion can cause silent proxy degradation, transaction backlogs, and connection drops. This blueprint deploys an automated operational sentinel that queries FerretDB health and Prometheus metrics endpoints, validates PostgreSQL backend connectivity, evaluates connection pool headroom, routes incident notifications to Slack, and provides guarded remediation paths.
periodic_ferretdb_audit (io.kestra.plugin.core.trigger.Schedule) triggers the audit workflow every 15 minutes. Shipped disabled so initial parameters can be validated manually first.probe_readiness_status (io.kestra.plugin.core.http.Request) invokes GET /debug/readyz to verify proxy uptime and backend PostgreSQL database connectivity.probe_runtime_metrics (io.kestra.plugin.core.http.Request) invokes GET /debug/metrics to scrape Prometheus telemetry including connection pool states and command error counters.classify_ferretdb_health (io.kestra.plugin.core.flow.Switch) classifies the operational condition:UNREADY: Triggers when the readiness endpoint returns non-200 or failure status, dispatching a critical Slack alert via io.kestra.plugin.slack.notifications.SlackIncomingWebhook.DEGRADED: Triggers when telemetry indicates connection pool contention or query errors, routing a warning to Slack and evaluating diagnostic logging.HEALTHY: Confirms that both the proxy and backend PostgreSQL operate with nominal headroom.log_sentinel_audit (io.kestra.plugin.core.log.Log) records an immutable audit log entry documenting execution status and endpoint response codes.errors handler catches connection refusals or network timeouts, immediately firing an outage alert to Slack.dry_run: true prevents automated mutations during cluster audits.FerretDB exposes lightweight HTTP health and telemetry endpoints but does not provide built-in alerting, scheduling, or remediation capabilities. Replacing brittle external shell scripts or unmonitored crons with Kestra delivers a declarative YAML blueprint featuring scheduled triggers, masked secret handling, conditional multi-branch routing, and comprehensive execution audit logs.
ghcr.io/ferretdb/all-in-one:latest) bundling PostgreSQL with zero external dependencies.SLACK_WEBHOOK_URL: Slack incoming webhook URL for operational and emergency alerts.docker run -d --name ferretdb-test -p 27017:27017 -p 8088:8088 ghcr.io/ferretdb/all-in-one:latest
SLACK_WEBHOOK_URL in your Kestra namespace secrets.dry_run: true).log_healthy_state records a successful readiness status.docker stop ferretdb-test) and re-running the flow to verify alert_probe_network_failure.periodic_ferretdb_audit to activate automated 15-minute monitoring.io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for high-severity database outages.io.kestra.plugin.docker to self-heal stalled proxy containers when dry_run: false.io.kestra.plugin.prometheus.