API
Summary
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.
Request
curl -X GET http://MAIN_ADDRESS_HERE:9999/api/stats
Parameters
Name | Type |
---|---|
id | integer |
hostname | string |
Response
{ "data": [ { "cpuUsage": 0.0, "datetime": "2024-09-08 16:50:16", "hostname": "master", "id": 1, "memoryUsage": 24.75, "os_name": "Linux 5.14.0-427.22.1.el9_4.x86_64", "os_type": "linux" } ], "error": false, "message": "Stats retrieved successfully" }
Monitoring Agents
Report Latest Stats
Report the latest stats to the main service.
Request
curl -X GET http://MAIN_ADDRESS_HERE:9999/api/monitoring
Parameters
Name | Type |
---|---|
json | string |
Response
tbd