The Diskspace Monitor API is a RESTful API which is build around 3 CORE RESOURCES.
A SystemComponent represents a component of the build system we would like to monitor. A SystemComponent is created (with a name and available storage) any time an agent registered a new component in the monitoring system. An example of a SystemComponent might be a CrashDumpStore with 400G of storage. |
endpoints
|
The System Component Object:
name: unique name for the system component. total_available_storage: the total storage (in Gigabits) available to the component. storage_limit: the upper limit on total storage useage (as a percentage of 100). current_storage_useage: the amount of the components storage (in Gigabits) currently being used. |
{
"name": "CrashDumpStore",
"total_available_storage": 400,
"storage_limit": 90,
"current_storage_useage": 0
} |
A ComponentEvent is a data point related a given SystemComponents storage useage one moment in time. These are automatically generated when new components are registered in the system and when storage limits and useages change. |
endpoints
|
Component Event Object:
id: unique identifier for the object. timestamp: the date and time at which the event was captured. component_snapshot: a nested SystemComponent object including all details about the compnent at the timestamp of the event. |
{
"event_id": "ecaac8db-e9de-4eb8-b445-a4f5bb00bb0e",
"timestamp": "01.23.2022 22:36:27",
"component_snapshot": {
"component_name": "CrashDump",
"total_available_storage": 400,
"storage_limit": 90,
"current_storage_useage": 100
}
} |
A ResourceWarning is a warning registered when a SystemComponent reports a storage useage above, or close to, its upper limit. |
endpoints
|
Resource Warning Object:
id: unique identifier for the object. warning_type: the type of warning issued by the system (out of memory or close to memory limit). component_event: a nested ComponentEvent object holding a SystemComponent object at a given timestamp. |
{
"warning_id": "4dc9a9af-d050-42a5-a1c6-ccf11f9b5e84",
"warning_type": "over memory limit",
"component_event": {
"event_id": "8ac60ebf-eb1d-4277-b293-accccc8b252f",
"timestamp": "01.23.2022 23:41:11",
"component_snapshot": {
"name": "CrashDumpStore",
"total_available_storage": 400,
"storage_limit": 90,
"current_storage_useage": 395
}
}
} |