Audit Which Databases and Stores Are Missing From Backup Scope
Diff the asset registry against what backup jobs protect, file a GitHub issue for uncovered stores, and alert Slack.
Monitor API rate-limit response headers, store quota measurements, and alert Slack before exhaustion.
id: api-rate-limit-observer
namespace: company.team
description: |
Make an authenticated API request, inspect rate-limit response headers, and
alert before the remaining quota reaches a configurable safety threshold.
triggers:
- id: hourly
type: io.kestra.plugin.core.trigger.Schedule
cron: "0 * * * *"
disabled: true
inputs:
- id: url
type: STRING
description: API endpoint used for the quota observation request.
defaults: https://api.github.com/rate_limit
required: true
- id: warning_remaining
type: INT
description: Alert when the remaining quota is at or below this number.
defaults: 100
required: true
- id: header_name
type: STRING
description: Case-insensitive response header containing remaining quota.
defaults: x-ratelimit-remaining
required: true
tasks:
- id: observe_quota
type: io.kestra.plugin.scripts.python.Script
description: Query the endpoint and parse its remaining-quota response header.
taskRunner:
type: io.kestra.plugin.core.runner.Process
env:
URL: "{{ inputs.url }}"
WARNING: "{{ inputs.warning_remaining }}"
HEADER: "{{ inputs.header_name }}"
script: |
import json, os, urllib.request
url, header, warning = os.environ["URL"], os.environ["HEADER"].lower(), int(os.environ["WARNING"])
request = urllib.request.Request(url, headers={"User-Agent": "kestra-api-rate-limit-observer", "Accept": "application/json"})
with urllib.request.urlopen(request, timeout=20) as response:
headers = {key.lower(): value for key, value in response.headers.items()}
remaining_raw = headers.get(header)
limit_raw = headers.get("x-ratelimit-limit")
if remaining_raw is None:
raise ValueError(f"response did not contain quota header {header}")
remaining = int(remaining_raw)
report = {"url": url, "remaining": remaining, "limit": int(limit_raw) if limit_raw else None, "warning_threshold": warning, "alert": remaining <= warning}
print("::" + json.dumps({"outputs": {"report": report, "failed_count": int(report["alert"])}}) + "::")
- id: write_report
type: io.kestra.plugin.core.storage.Write
description: Store quota observations for trend analysis.
content: "{{ outputs.observe_quota.vars.report | toJson }}"
extension: ".json"
- id: alert_if_low
type: io.kestra.plugin.core.flow.If
description: Alert only when remaining quota is below the safety threshold.
condition: "{{ outputs.observe_quota.vars.failed_count > 0 }}"
then:
- id: alert_slack
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK_URL') }}"
messageText: "API quota warning for {{ inputs.url }}: {{
outputs.observe_quota.vars.report.remaining }} requests remain
(threshold {{ inputs.warning_remaining }}). Evidence: {{
outputs.write_report.uri }}"
outputs:
- id: report
type: URI
value: "{{ outputs.write_report.uri }}"
- id: remaining
type: INT
value: "{{ outputs.observe_quota.vars.report.remaining }}"
Avoid surprise 429 responses by polling an API endpoint and reading its
remaining-quota header. Configure url, header_name, and
warning_remaining. Authentication can be supplied through a custom
header in a small task edit using {{ secret('API_TOKEN') }}.
Prerequisites: outbound HTTPS access and SLACK_WEBHOOK_URL. The endpoint
must expose a numeric remaining-quota header. Run manually before enabling
the hourly schedule; report stores the observed limit and threshold.
Links: Python Script, Slack. Created by yashspidey.
Diff the asset registry against what backup jobs protect, file a GitHub issue for uncovered stores, and alert Slack.
Read recent Bitbucket Pipelines runs every hour and alert Slack when builds start failing or get stuck, with the branch that fails most.
Read the most recent cell under a Bigtable row key prefix and alert Slack when a writer has stalled - FRESH, STALE, or NO_MATCHING_ROW.
Check your announced prefixes against public RIPE RIS data and alert when another ASN originates them, visibility drops, or RPKI stops being valid.
Build a PSBT from a watch-only multisig wallet, collect and verify signatures from each signer, and broadcast once the quorum is reached, with policy limits, fee caps, and coin release on every failure path.
Watch the Docker Hub digest of your base image tag and, when it changes, rebuild your image from Git with the patched base, push it and notify Slack.
Build a SQLite table, query it, and export the results to CSV and Excel for business stakeholders.
Execute the workload selected by the carbon-aware scheduler and preserve its artifact, checksum, planning context, and estimated impact.
Audits Chrony NTP daemon telemetry to detect stratum degradation, root dispersion spikes, and distributed clock drift.
Audits BIRD internet routing daemon telemetry to detect Netlink sync timeouts, kernel route table import stalls, and BGP peer drops.
Keep a repo's Python dependencies up to date with an automatic bump PR.
Reverse, de-duplicate newest-wins, filter tombstones, split into partitions processed by a worker subflow, then reassemble a clean file and a rejects file. No script, only core storage tasks.