Dead Man's Switch Monitoring System (WatchDog Sentinel)
API documentation and usage instructions are provided below.
Pulse-Check-API is a backend monitoring service designed to track remote infrastructure devices operating in unreliable network environments.
Devices register with the system and must periodically send heartbeat signals. If a heartbeat is not received before the configured timeout expires, the system automatically triggers an alert and marks the device as down.
Built using Node.js, MongoDB and Express, this system demonstrates stateful timer management and failure detection logic.
POST /api/monitors
Creates a new monitor and starts its timer.
{
"id": "device-123",
"timeout": 60,
"alert_email": "admin@critmon.com"
}
Response: 201 Created
POST /api/monitors/:id/heartbeat
Resets the countdown timer. If the monitor does not exist, returns 404 Not Found.
Response: 200 OK
POST /api/monitors/:id/pause
Stops the timer and prevents alerts from firing. Sending a heartbeat automatically resumes monitoring.
Response: 200 OK
GET /api/monitors/:id/status
Returns the current state of a monitor.
{
"deviceId": "device-696",
"status": "down",
"timeRemaining": null
}
Response: 200 OK
GET /api/monitors
Returns a json object of all the deploy monitoring devices
{
"devices": [
{
"deviceId": "device-123",
"status": "paused",
"timeRemaining": null
},
{
"deviceId": "device-133",
"status": "down",
"timeRemaining": null
},
{
"deviceId": "device-143",
"status": "down",
"timeRemaining": null
}
]
}
Response: 200 OK
DELETE /api/monitors/:id/delete
Returns confirmation msg that monitor
{
"success": true,
"message": "Monitor deleted successfully",
"data": {
"deviceId": "device-143"
}
}
Response: 200 OK
If no heartbeat is received before timeout expiration, the system logs:
{
"ALERT": "Device device-123 is down!",
"time": "2026-02-14T12:00:00.000Z"
}
The monitor status is updated to down.