id: parca-continuous-profiling-engine-and-storage-sentinel
namespace: company.platform
description: |
Continuously audits Parca continuous profiling service availability, verifies FrostDB storage engine readiness, evaluates profile query execution paths, and dispatches actionable Slack incident alerts upon telemetry ingestion failure or engine degradation.
inputs:
- id: parca_url
type: STRING
displayName: Parca Endpoint URL
defaults: "http://localhost:7070"
description: "Base HTTP URL of the Parca continuous profiling server."
- id: canary_query
type: STRING
displayName: Canary Profile Query
defaults: "parca_agent_cpu"
description: "Sample profile metric query executed to verify profile query
engine responsiveness."
- id: slack_channel
type: STRING
displayName: SRE Alert Channel
defaults: "#platform-alerts"
description: "Slack channel for routing profiling engine outage and degradation alerts."
triggers:
- id: scheduled_sentinel_audit
type: io.kestra.plugin.core.trigger.Schedule
cron: "0 */2 * * *"
disabled: true
inputs:
parca_url: "http://localhost:7070"
canary_query: "parca_agent_cpu"
tasks:
- id: probe_parca_readiness
type: io.kestra.plugin.core.http.Request
description: "Queries Parca /readyz to verify FrostDB storage initialization and
query engine readiness."
uri: "{{ inputs.parca_url }}/readyz"
method: GET
- id: probe_parca_metrics
type: io.kestra.plugin.core.http.Request
description: "Scrapes Prometheus metrics from Parca to verify telemetry scraper
and storage compaction health."
uri: "{{ inputs.parca_url }}/metrics"
method: GET
- id: probe_profile_query
type: io.kestra.plugin.core.http.Request
description: "Executes a canary profile query against the Parca API to verify
query engine execution."
uri: "{{ inputs.parca_url }}/api/v1/query"
method: POST
headers:
Content-Type: "application/json"
body: |
{
"mode": "MODE_MERGE",
"reportType": "REPORT_TYPE_FLAMEGRAPH_ARROW",
"query": "{{ inputs.canary_query }}"
}
- id: evaluate_parca_health
type: io.kestra.plugin.core.flow.Switch
description: "Evaluates Parca readiness and profile query responses using Pebble
conditionals."
value: |
{% if outputs.probe_parca_readiness.code != 200 %}
ENGINE_UNHEALTHY
{% elseif outputs.probe_parca_metrics.code != 200 %}
METRICS_SCRAPE_ERROR
{% elseif outputs.probe_profile_query.code != 200 and outputs.probe_profile_query.code != 404 %}
QUERY_EXECUTION_FAILED
{% else %}
COMPLIANT
{% endif %}
cases:
COMPLIANT:
- id: log_compliant_state
type: io.kestra.plugin.core.log.Log
level: INFO
message: "Parca continuous profiling engine at {{ inputs.parca_url }} is
operational, storage is ready, and profile query APIs are responding
nominally."
ENGINE_UNHEALTHY:
- id: alert_engine_offline
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK_URL') }}"
payload: |
{
"attachments": [
{
"color": "#D32F2F",
"title": "Parca Profiling Engine Offline",
"text": "CRITICAL: Parca readiness probe at `{{ inputs.parca_url }}/readyz` returned HTTP status `{{ outputs.probe_parca_readiness.code }}`.\nFrostDB storage or query coordinator may have crashed. Continuous performance profiling is degraded.",
"footer": "Kestra Sentinel | Observability Operations"
}
]
}
- id: log_engine_offline
type: io.kestra.plugin.core.log.Log
level: WARN
message: "CRITICAL: Parca readiness probe failed with status code {{
outputs.probe_parca_readiness.code }}."
METRICS_SCRAPE_ERROR:
- id: alert_metrics_failure
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK_URL') }}"
payload: |
{
"attachments": [
{
"color": "#E65100",
"title": "Parca Metrics Endpoint Failure",
"text": "WARNING: Parca metrics endpoint `{{ inputs.parca_url }}/metrics` failed with HTTP status `{{ outputs.probe_parca_metrics.code }}`.\nInternal telemetry and compaction tracking are offline.",
"footer": "Kestra Sentinel | Observability Operations"
}
]
}
QUERY_EXECUTION_FAILED:
- id: alert_query_error
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK_URL') }}"
payload: |
{
"attachments": [
{
"color": "#F57C00",
"title": "Parca Profile Query Execution Failure",
"text": "WARNING: Canary profile query for `{{ inputs.canary_query }}` on `{{ inputs.parca_url }}` returned HTTP status `{{ outputs.probe_profile_query.code }}`.\nProfile query execution path may be degraded or corrupted.",
"footer": "Kestra Sentinel | Observability Operations"
}
]
}
- id: record_audit_log
type: io.kestra.plugin.core.log.Log
description: "Emits a permanent execution audit log recording Parca profiling
engine status."
level: INFO
message: "Completed Parca sentinel audit on {{ inputs.parca_url }}. Readiness
code={{ outputs.probe_parca_readiness.code }}, Metrics code={{
outputs.probe_parca_metrics.code }}, Query code={{
outputs.probe_profile_query.code }}."