API
StackBeat has a REST API that allows you to build your own frontend or monitoring agents.
Endpoints
Frontend
Real-Time Stats
Load the latest real-time stats for all monitors.
GET /api/stats
Monitoring Agents
Report Stats
Report the latest stats to the main service.
POST /api/report
Pass the request body as a JSON string with the following parameters:
Name | Type | Description | Example |
---|---|---|---|
hostname | string | Hostname of the system being monitored. | server.domain.tld |
cpu_percent | double | Total processor utilization in percent. | 23.85 |
cpu_cores | int | The number of CPU cores available. | 1 |
cpu_speed | double | Clock speed of the CPU in GHz. | 1.99 |
ram_percent | double | Percentage of currently used memory. | 65.31 |
ram_total | double | Total installed memory in GB. | 3.0 |
ram_used | double | Total memory actively in use in GB. | 1.28 |
os_name | string | Name of the operating system. | AlmaLinux |
os_version | string | Full version of the operatung system. | AlmaLinux 9.4 (Seafoam Ocelot) |
os_type | string | Platform type. | linux |
ip | string | First detected IP address of the system. | 192.168.1.100 |
datetime | string | Timestamp in GMT, ISO 8601. | 2024-10-25 17:33:56 |