Guard Apify scrapes with cost caps and an automated quality gate
Run an Apify actor under hard cost and run caps, then branch on the returned item count so a degraded scrape pages the on-call instead of silently shipping bad data.
Audit StarRocks Routine Load ingestion states for paused tasks, route failure alerts to Slack, and safely auto-resume stalled streaming pipelines.
StarRocks is a high-performance distributed real-time analytical database widely used for sub-second OLAP queries over massive datasets. Routine Load is StarRocks native continuous ingestion mechanism for streaming platforms like Apache Kafka and Apache Pulsar. Under production workloads, transient data quality anomalies, unparseable payloads exceeding error thresholds, or network partitions cause StarRocks to transition Routine Load jobs into a PAUSED state. Once paused, consumption halts entirely, consumer lag compounds silently, and analytical dashboards drift out of sync until manual administrative intervention occurs. This blueprint provides an automated sentinel that continuously audits Routine Load health, alerts engineering teams before SLAs breach, and executes safe, guarded auto-resumption when enabled.
every_fifteen_minutes) initiates the diagnostic workflow every 15 minutes, with manual on-demand execution supported via inputs.probe_routine_loads) connects to the StarRocks Frontend (FE) query port via the MySQL protocol (io.kestra.plugin.jdbc.mysql.Query) and inspects information_schema.routine_load_jobs for jobs in PAUSED, UNSTABLE, or CANCELLED states.classify_status) evaluates the query results using Pebble conditionals, grouping the operational state into HEALTHY, WARNING, CRITICAL, or PROBE_FAILED.route_by_status) switches downstream execution based on the classified health tier.CRITICAL state, alert_critical_slack dispatches an incident notification to the configured Slack channel with detailed error reasons and job identifiers.check_remediation) checks whether auto_resume is enabled and dry_run is disabled. If confirmed, resume_stalled_jobs iterates over affected jobs and executes RESUME ROUTINE LOAD FOR db.job via MySQL query tasks.PROBE_FAILED or unexpected errors, dedicated Slack alerting tasks notify administrators of infrastructure connectivity loss.log_audit_summary) outputs a structured execution record detailing the evaluated status, job count, and execution lineage.SELECT privilege on information_schema.routine_load_jobs and INSERT privilege on target tables for RESUME ROUTINE LOAD.STARROCKS_USERNAME: Username for authenticating to the StarRocks FE MySQL query port.STARROCKS_PASSWORD: Password for the StarRocks database user.SLACK_WEBHOOK_URL: HTTPS incoming webhook URL for the target Slack channel.STARROCKS_USERNAME, STARROCKS_PASSWORD, and SLACK_WEBHOOK_URL in your Kestra namespace secrets.dry_run: true to verify connectivity against your StarRocks Frontend.every_fifteen_minutes schedule trigger to establish continuous automated monitoring.io.kestra.plugin.kafka to correlate Routine Load pauses with upstream partition backlogs.io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for high-priority production warehouse outages.