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
20 lines
719 B
Bash
Executable File
20 lines
719 B
Bash
Executable File
#!/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"
|