Command line tool
Careful: This package is coming soon and not published yet, so the install command below does not work today. Until it is, use the plain HTTP request from the quickstart.
Alerts from shell scripts, cron jobs and CI, with no code. It ships inside the Node package, so Node 18 or newer is all you need.
Careful: Keep the key in the environment of a server or CI job. Never put it in a page or app a customer can open.
Send
export PINGLOOM_API_KEY=<your key>
export PINGLOOM_BASE_URL=https://api.pingloom.devSet PINGLOOM_BASE_URL to the PingLoom API origin shown in your dashboard. The SDKs have no built-in default, so a key can never be sent to the wrong host by accident.
npx pingloom send "Backup done" --body "42 GB in 3 min" --channel ops --priority highOptions: --body, --channel, --priority low|normal|high, --data '{...}', --action-url, --idempotency-key. --key and --base-url override the environment, but a flag is visible to other users in the process list, so prefer the variables.
# crontab: tell the team when the nightly backup fails
0 2 * * * /opt/backup.sh || npx pingloom send "Nightly backup failed" --channel ops --priority high --idempotency-key "backup-$(date +\%F)"Check the status
npx pingloom status 01J9ZQ8M3K7W4X2B6N5T0R1VCDNeeds a key with the events:read scope. provider_accepted means FCM accepted the event.
Exit codes and JSON
0: ok.1: the API or the network failed. The message and request ID go to stderr, with the key masked aspl_live_****abcd.2: usage error, including a missing key or base URL.
With --json, success prints {"event_id": "..."} and failure prints {"error": {...}} on stderr.