New to Kestra?
Use blueprints to kickstart your first workflows.
Audit OceanBase CDB_OB_MAJOR_COMPACTION for suspended or errored merges, dispatch Slack incident alerts, and automate ALTER SYSTEM RESUME MERGE.
OceanBase is an enterprise distributed relational database featuring a hybrid LSM-tree storage architecture. Dynamic writes and transaction updates land continuously in active memory tables (MemTables). During scheduled or triggered daily major freezes, OceanBase compacts and merges in-memory data with static baseline SSTables via Major Compaction. If major compaction becomes suspended (IS_SUSPENDED = 'YES') or encounters fatal errors (IS_ERROR = 'YES'), memory occupied by frozen MemTables cannot be recycled. If MemTable memory exhaustion occurs, write operations across all user tenants stall (OB_ALLOCATE_MEMORY_FAILED -4013), disrupting mission-critical transactional services. This blueprint provides automated continuous surveillance over oceanbase.CDB_OB_MAJOR_COMPACTION, detects suspended or degraded compactions, alerts operations via Slack, and automates safe remediation using ALTER SYSTEM RESUME MERGE TENANT = all_user.
every_fifteen_minutes) initiates diagnostic health verification every 15 minutes, with manual runs supported via customizable inputs.probe_major_compaction_health) connects to OceanBase over the MySQL wire protocol (port 2881) via io.kestra.plugin.jdbc.mysql.Query and queries oceanbase.CDB_OB_MAJOR_COMPACTION for any tenants where compaction is suspended, errored, or stalled.CRITICAL), all operating normally (HEALTHY), or if the database connection failed (PROBE_FAILED).route_by_compaction_health) switches execution along dedicated paths according to the classified severity.CRITICAL state, structured Slack incident cards notify operations channels with impacted cluster endpoints, tenant counts, failure diagnostics, and remediation states.check_remediation) checks whether auto_resume is enabled and dry_run is disabled. If confirmed, execute_resume_merge dispatches ALTER SYSTEM RESUME MERGE TENANT = all_user; to unblock suspended merges across user tenants.PROBE_FAILED, dedicated alerts notify administrators of unreachable ports or authentication failures.log_audit_summary) writes execution metadata and evaluated tenant counts to task logs.ALTER SYSTEM RESUME MERGE.oceanbase.CDB_OB_MAJOR_COMPACTION and administrative privileges to run ALTER SYSTEM RESUME MERGE.OCEANBASE_USERNAME: Username for authenticating to the OceanBase MySQL wire interface (e.g. root@sys).OCEANBASE_PASSWORD: Password for the OceanBase database user.SLACK_WEBHOOK_URL: Incoming webhook URL for posting incident cards to Slack.OCEANBASE_USERNAME, OCEANBASE_PASSWORD, and SLACK_WEBHOOK_URL in your Kestra namespace secrets.dry_run: true to verify connectivity against your OceanBase cluster.oceanbase.CDB_OB_MAJOR_COMPACTION.every_fifteen_minutes schedule trigger to activate automated continuous monitoring and remediation.oceanbase.GV$OB_SERVERS to detect hardware disk faults causing compaction stalls.io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for immediate escalation during severe cluster-wide compaction freezes.oceanbase.DBA_OB_TENANTS to detect memory watermark breaches.