New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Apache Pinot tables to detect unassigned and errored segments, preventing real-time query degradation and missing data partitions.
Apache Pinot powers mission-critical user-facing analytics and real-time dashboard applications. Network partitions, deep storage corruption, or server crashes can leave segments in unassigned, ERROR, or consuming dead-letter states where queries return incomplete query results or fail completely. This sentinel interrogates the Apache Pinot Controller REST API, verifies ideal states against external views across offline and real-time tables, and alerts data infrastructure teams on Slack with exact segment reload API commands.
0 * * * *) using a cron schedule trigger or runs on-demand via manual execution and API webhooks.GET /tables) to discover all registered offline and real-time tables./debug/tables/{tableName}/state) to detect mismatching ideal states, unassigned segments, and consuming errors.io.kestra.plugin.core.flow.If task evaluates whether bad_segments_count exceeds max_tolerated_bad_segments.SlackIncomingWebhook listing table names, segment identifiers, and exact reload commands.flowchart TD
A[hourly_pinot_segment_audit Schedule Trigger] --> B[scan_pinot_segments Python Script]
B --> C[check_bad_segments Flowable If]
C -- Degraded Segments Found --> D[notify_slack_pinot_ops Webhook]
C -- All Segments Healthy --> E[log_pinot_segment_audit Log]
D --> E
E --> F[export_pinot_manifest Return]
| Name | Type | Default | Description |
|---|---|---|---|
pinot_controller_url |
STRING |
http://pinot-controller:9000 |
Base HTTP endpoint for the Apache Pinot cluster controller REST API. |
table_name_filter |
STRING |
all |
Name of the Pinot table to audit, or all to scan all active offline and realtime tables. |
alert_on_bad_segments |
BOOL |
true |
Whether to dispatch alerts when unassigned, offline, or errored segments are discovered. |
max_tolerated_bad_segments |
INT |
0 |
Maximum allowable count of degraded segments before triggering operational alerts. |
{{ outputs.scan_pinot_segments.vars.tables_scanned_count }}: Number of Pinot tables evaluated during the audit.{{ outputs.scan_pinot_segments.vars.total_segments_audited }}: Consolidated count of segments inspected across all target tables.{{ outputs.scan_pinot_segments.vars.bad_segments_count }}: Total number of degraded or unassigned segments flagged.{{ outputs.scan_pinot_segments.vars.bad_segments_details }}: Serialized JSON list of degraded segments with curl reload commands.{{ outputs.export_pinot_manifest.value }}: Structured dictionary containing the cluster segment health report.9000).PINOT_CONTROLLER_TOKEN: Bearer token or API key for authenticating to the Pinot Controller.SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL used for sending operational alerts.PINOT_CONTROLLER_TOKEN and SLACK_WEBHOOK_URL in your Kestra Secret storage.company.data namespace.pinot_controller_url to point to your cluster controller (e.g., http://pinot-ctrl.internal:9000)._OFFLINE and _REALTIME to table names internally; ensure API calls handle both table types./segments/{table}/{segment}/reload to automatically heal unassigned segments.