Skip to content

Use Cases

This page is a modeling cookbook, not a feature list. Each scenario explains which model to use and why it is clearer than sending plain text notifications for everything.

When disk usage crosses a threshold, one strong alert is enough.

Terminal window
USAGE=$(df / | awk 'NR==2 { gsub("%", "", $5); print $5 }')
if [ "$USAGE" -ge 90 ]; then
curl -X POST https://gateway.pushgo.dev/message \
-H "Content-Type: application/json" \
-d '{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Disk space warning",
"body": "Root partition usage has reached '"$USAGE"'%.",
"severity": "high",
"tags": ["nas", "disk"]
}'
fi

A backup has a start, progress, and result. Event keeps those updates under one lifecycle.

Terminal window
curl -X POST https://gateway.pushgo.dev/event/create \
-H "Content-Type: application/json" \
-d '{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "NAS backup",
"status": "running",
"message": "Backup started",
"severity": "normal",
"event_time": 1713750000000,
"started_at": 1713750000000
}'

Store the returned event_id, then call /event/update and /event/close during upload, verification, completion, or failure.

If you want to see the current state of a server over time, model the host as a Thing.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Home NAS",
"observed_at": 1713750000000,
"tags": ["nas", "home"],
"attrs": {
"online": true,
"cpu": 0.18,
"disk_used": 0.72,
"temperature": 43.2
}
}

Temperature, humidity, and light are persistent state. Model each room or device as a Thing and update attrs.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Living room",
"observed_at": 1713750000000,
"external_ids": {
"home_assistant": "sensor.living_room_temperature"
},
"location_type": "physical",
"location_value": "home/living-room",
"attrs": {
"temperature": 22.5,
"humidity": 0.46
}
}

An open door is a process that ends when the door closes.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Balcony door open",
"status": "open",
"message": "The balcony door has been open for more than 5 minutes.",
"severity": "high",
"event_time": 1713750000000,
"started_at": 1713750000000,
"tags": ["home", "door"]
}

A camera motion detection with one snapshot is a Message.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Motion detected",
"body": "Entry camera detected motion.",
"severity": "high",
"images": ["https://example.com/snapshot.jpg"],
"tags": ["camera", "security"]
}

Deployments have lifecycle state. Create at the start, update at major stages, and close with success or failure.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Production deployment",
"status": "building",
"message": "Building image",
"severity": "normal",
"event_time": 1713750000000,
"started_at": 1713750000000,
"attrs": {
"service": "api",
"revision": "8f3c2a1"
}
}

On failure, raise severity to critical and close the event with status=failed.

Online state, latency, and version are current state.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "API service",
"observed_at": 1713750000000,
"location_type": "cloud",
"location_value": "prod",
"attrs": {
"healthy": true,
"latency_ms": 83,
"version": "1.8.4"
}
}

Even if Event records the deployment lifecycle, you can send a Message at the failure point for stronger mobile visibility.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Production deployment failed",
"body": "The api service deployment failed. Check the pipeline logs.",
"severity": "critical",
"tags": ["deploy", "prod"]
}

A price threshold is usually one alert.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Price dropped",
"body": "The tracked product is now 199.",
"severity": "normal",
"url": "https://example.com/product"
}

Downloads, transcoding, and training jobs are Events because they start, update, and end.

{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Video transcoding",
"status": "running",
"message": "45% complete",
"severity": "normal",
"event_time": 1713750000000,
"attrs": {
"progress": 0.45
}
}
ScenarioModelWhy
Failure, success, price drop, alertMessageOne-off alert.
Deployment, backup, transcoding, incidentEventProcess with updates and an outcome.
Server, sensor, room, serviceThingPersistent object with current state.
Alert on a specific deviceThing + MessageThe entity and alert remain connected.
Incident on a serviceThing + EventService is the entity; incident is the lifecycle.