docs(ops): hub parity tooling — HTTP contracts, runbooks, Prometheus
Add canonical HTTP_CONTRACTS with curl for hub + ingest endpoints, operator runbooks for ingest debugging and five common hub flows, and Grafana/Prometheus scraping notes. Extend ERROR_MONITORING_PUBLIC_API with stats + curl examples; align purge and resolve-by-pattern docs with the Fastify implementation. Add optional smoke scripts under scripts/examples/. Paperclip-Agent: 5d084b36-f38f-42a5-a92a-520005afda4f Paperclip-Issue: BIT-736 Paperclip-Run: ad2c5129-df54-44aa-afd4-6f9f7486c1a1 Made-with: Cursor
This commit is contained in:
1 parent
f5f62571fd
commit
8767e40bb6
9 files changed
+873
-2
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# Optional smoke checks against the public hub API (read + health).
|
||||
# Usage:
|
||||
# export ER_API_BASE=https://errors.bitreport.pt
|
||||
# export ERROR_RESOLVE_API_KEY=...
|
||||
# ./scripts/examples/hub_public_smoke.sh
|
||||
set -euo pipefail
|
||||
|
||||
: "${ER_API_BASE:?set ER_API_BASE (e.g. https://errors.bitreport.pt)}"
|
||||
: "${ERROR_RESOLVE_API_KEY:?set ERROR_RESOLVE_API_KEY or ERROR_REPORTING_API_KEY}"
|
||||
|
||||
curl -sf --max-time 30 "${ER_API_BASE}/health" >/dev/null
|
||||
|
||||
curl -sf --max-time 30 -G "${ER_API_BASE}/api/error-monitoring/recent-errors" \
|
||||
--data-urlencode "api_key=${ERROR_RESOLVE_API_KEY}" \
|
||||
--data-urlencode "status=open,investigating" \
|
||||
--data-urlencode "limit=1" >/dev/null
|
||||
|
||||
curl -sf --max-time 60 -G "${ER_API_BASE}/api/error-monitoring/stats" \
|
||||
--data-urlencode "api_key=${ERROR_RESOLVE_API_KEY}" >/dev/null
|
||||
|
||||
echo "hub_public_smoke: ok"
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Optional smoke check: POST one minimal event to the ingest API.
|
||||
# Usage:
|
||||
# export INGEST_API_BASE=http://127.0.0.1:3210
|
||||
# export INGEST_API_TOKEN=<plaintext project ingest key>
|
||||
# ./scripts/examples/ingest_smoke.sh
|
||||
set -euo pipefail
|
||||
|
||||
: "${INGEST_API_BASE:?set INGEST_API_BASE}"
|
||||
: "${INGEST_API_TOKEN:?set INGEST_API_TOKEN (project ingest key)}"
|
||||
|
||||
BODY='{"events":[{"schema_version":1,"occurred_at":"2026-04-02T12:00:00.000Z","level":"error","message":"ingest_smoke.sh probe"}]}'
|
||||
|
||||
curl -sf --max-time 30 -X POST "${INGEST_API_BASE}/v1/ingest/events" \
|
||||
-H "Authorization: Bearer ${INGEST_API_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "${BODY}" >/dev/null
|
||||
|
||||
echo "ingest_smoke: ok"
|
||||
Reference in new issue
Block a user