New to Kestra?
Use blueprints to kickstart your first workflows.
Audit KeyDB active-replica multi-master replication links, detect peering dropouts, dispatch Slack alerts, and automate REPLICAOF healing.
KeyDB is an open-source, multithreaded alternative to Redis engineered for high-throughput caching and in-memory key-value processing. A cornerstone capability of KeyDB is Active-Replica (multi-master) replication, wherein two or more instances are configured with active-replica yes to accept concurrent write and read operations while synchronizing mutations bidirectionally. In production, transient cross-datacenter network partitions, high CPU thread starvation, or peer process restarts can sever the active peering connection, flipping master_link_status or master_global_link_status to down. When an active-replica link drops, both nodes continue serving independent application writes, resulting in diverging key state and potential reconciliation conflicts. This blueprint provides automated continuous surveillance over INFO replication, detects severed peering links, alerts operations via Slack, and automates safe remediation using REPLICAOF reconnection commands.
every_fifteen_minutes) initiates diagnostic health verification every 15 minutes, with manual runs supported via customizable inputs.probe_replication_info) connects to the local KeyDB instance over the Redis wire protocol (port 6379) via io.kestra.plugin.redis.cli.RedisCLI and executes INFO replication.CRITICAL), if synchronization is in progress (WARNING), if all links are up (HEALTHY), or if the instance connection failed (PROBE_FAILED).route_by_replication_health) switches execution along dedicated paths according to the classified severity.CRITICAL or WARNING states, structured Slack incident cards notify operations channels with local node endpoints, companion peer addresses, and remediation statuses.check_remediation) checks whether auto_reconnect is enabled and dry_run is disabled. If confirmed, execute_reconnect dispatches REPLICAOF <peer_host> <peer_port> via RedisCLI to re-establish active-replica synchronization.PROBE_FAILED, dedicated alerts notify administrators of unreachable ports or authentication failures.log_audit_summary) writes execution metadata and classified status to task logs.REPLICAOF commands without manual administrator intervention.active-replica yes enabled (default port 6379).KEYDB_PASSWORD: Password for authenticating to the KeyDB instance via RedisCLI (optional if protected mode disabled).SLACK_WEBHOOK_URL: Incoming webhook URL for posting incident cards to Slack.KEYDB_PASSWORD (if applicable) and SLACK_WEBHOOK_URL in your Kestra namespace secrets.dry_run: true to verify connectivity against your KeyDB server.INFO replication output parsing.every_fifteen_minutes schedule trigger to activate automated continuous monitoring and remediation.io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for persistent multi-master split-brain outages.INFO memory to identify allocator pressure across worker threads.