- 25 Sep 2024
- 29 Minutes to read
- Print
- DarkLight
Gateways - Status
- Updated on 25 Sep 2024
- 29 Minutes to read
- Print
- DarkLight
Available subsystem status for a specific Edgeflow/Gateway
The status values for each EdgeFlow can be retrieved via the following URL:
Status for all subsystems
A paginated status list for all subsystems can be retrieved for a specific EdgeFlow using the following API.
GET /1/gateways/{gateway_id}/status
Host: https://api.cogniac.io
Parameters for the status request are:
Name | Example | Description |
---|---|---|
start | 1604452806 | epoch time |
end | 1604457806 | epoch time |
limit | 30 | number of status events to retrieve. |
reverse | False | Defaults to False. |
Example of API usage:
curl -X GET https://api.cogniac.io/1/gateways/sk5pmpgv/status \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz" \
-H "Content-Type: application/json" \
| json_pp
import requests
import json
from pprint import pprint
url_prefix = 'https://api.cogniac.io'
api_version = "1"
gateway_id = 'gnnbjp24'
token = '' # add your token here
headers = {'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'}
url = f'{url_prefix}/{api_version}/gateways/{gateway_id}/status'
res = requests.get(url, headers=headers)
if res.status_code == 200:
response_data = json.loads(res.content)
pprint(response_data)
else:
print(f"Error: {res.status_code}, {res.text}")
The returned status_data object is a list of dictionaries for the reported subsystems. Each object within the list contains the following fields:
Key | Description |
---|---|
subsystem | name of the subsystem (see table below for a partial list) |
status | a dictionary of status reports for the subsystem. |
cctimestamp _float | timestamp the event was received at cloudcore from the EdgeFlow |
timestamp | timestamp, the event was generated at the EdgeFlow |
Example subsystems
A partial list of subsystems reported by the Edgeflow.
Subsystem | Description |
---|---|
gpus | GPUs status keyed by the GPU index (0 through N, where N-1 is the number of GPUs installed in the Edgeflow) |
cpu | cpu status with the cpu_freq, cpu_percent, cpu_status, cpu_times_percent as keys. |
memory | memory status with virtual_memory and swap_memory as keys |
disk | disk io counters, disk_usage, |
net | per-network interface counters for received, transmitted, and dropped bytes. |
softwareversions _list | list of dictionaries containing all software versions saved on the Edgeflow, including the current running version. |
softwareupdate _dict | the last version of the software downloaded. |
modeldetections _dict | the number of inference requests for a specific application executing a model. |
All individuals assigned as managers for EdgeFlow will receive email notifications under the following circumstances:
If the network connection to EdgeFlow is lost.
If there is a failure in camera connectivity.
If any camera triggers are missed.
To create custom alerts or dashboards with your own software, EdgeFlow status information can be accessed using the following endpoint:
GET ‘/1/gateways/{gateway_id}/status/{subsystem}
A sample of the results from querying all subsystems.
Example Response
{'current_status': {},
'data': [{'cc_timestamp': 1674862672.185167,
'status': {'uptime': ' 15:37:52 up 27 min, 1 user, load average: '
'1.64, 0.44, 0.20'},
'subsystem': 'status',
'timestamp': 1674862672.083502},
{'cc_timestamp': 1674862673.384915,
'status': {'uptime': ' 15:37:53 up 27 min, 1 user, load average: '
'1.64, 0.44, 0.20'},
'subsystem': 'status',
'timestamp': 1674862673.355804},
{'cc_timestamp': 1674862674.422428,
'status': {'uptime': ' 15:37:54 up 27 min, 1 user, load average: '
'1.64, 0.44, 0.20'},
'subsystem': 'status',
'timestamp': 1674862674.40146},
{'cc_timestamp': 1674862675.866201,
'status': {'uptime': ' 15:37:55 up 27 min, 1 user, load average: '
'1.51, 0.43, 0.20'},
'subsystem': 'status',
'timestamp': 1674862675.853715},
{'cc_timestamp': 1674862677.099008,
'status': {'uptime': ' 15:37:57 up 27 min, 1 user, load average: '
'1.51, 0.43, 0.20'},
'subsystem': 'status',
'timestamp': 1674862677.075467},
{'cc_timestamp': 1674862678.309369,
'status': {'uptime': ' 15:37:58 up 27 min, 1 user, load average: '
'1.51, 0.43, 0.20'},
'subsystem': 'status',
'timestamp': 1674862678.288856},
{'cc_timestamp': 1674862679.399749,
'status': {'uptime': ' 15:37:59 up 27 min, 1 user, load average: '
'1.51, 0.43, 0.20'},
'subsystem': 'status',
'timestamp': 1674862679.378281},
{'cc_timestamp': 1674862680.404769,
'status': {'uptime': ' 15:38:00 up 27 min, 1 user, load average: '
'1.79, 0.51, 0.23'},
'subsystem': 'status',
'timestamp': 1674862680.394494},
{'cc_timestamp': 1674862681.595581,
'status': {'uptime': ' 15:38:01 up 27 min, 1 user, load average: '
'1.79, 0.51, 0.23'},
'subsystem': 'status',
'timestamp': 1674862681.587579},
{'cc_timestamp': 1674862683.099419,
'status': {'uptime': ' 15:38:03 up 27 min, 1 user, load average: '
'1.79, 0.51, 0.23'},
'subsystem': 'status',
'timestamp': 1674862683.068284},
{'cc_timestamp': 1674862684.426628,
'status': {'uptime': ' 15:38:04 up 27 min, 1 user, load average: '
'1.79, 0.51, 0.23'},
'subsystem': 'status',
'timestamp': 1674862684.323816},
{'cc_timestamp': 1674862686.989398,
'status': {'uptime': ' 15:38:05 up 27 min, 1 user, load average: '
'2.05, 0.58, 0.25'},
'subsystem': 'status',
'timestamp': 1674862685.915592},
{'cc_timestamp': 1674862688.04123,
'status': {'uptime': ' 15:38:08 up 27 min, 1 user, load average: '
'2.05, 0.58, 0.25'},
'subsystem': 'status',
'timestamp': 1674862688.005902},
{'cc_timestamp': 1674862689.467762,
'status': {'uptime': ' 15:38:09 up 27 min, 1 user, load average: '
'2.05, 0.58, 0.25'},
'subsystem': 'status',
'timestamp': 1674862689.445112},
{'cc_timestamp': 1674862690.966042,
'status': {'uptime': ' 15:38:10 up 27 min, 1 user, load average: '
'1.96, 0.59, 0.26'},
'subsystem': 'status',
'timestamp': 1674862690.946205},
{'cc_timestamp': 1674862692.366343,
'status': {'uptime': ' 15:38:12 up 27 min, 1 user, load average: '
'1.96, 0.59, 0.26'},
'subsystem': 'status',
'timestamp': 1674862692.34463},
{'cc_timestamp': 1674862694.275637,
'status': {'uptime': ' 15:38:13 up 27 min, 1 user, load average: '
'1.96, 0.59, 0.26'},
'subsystem': 'status',
'timestamp': 1674862693.57619},
{'cc_timestamp': 1674862695.271927,
'status': {'uptime': ' 15:38:15 up 27 min, 1 user, load average: '
'1.96, 0.59, 0.26'},
'subsystem': 'status',
'timestamp': 1674862695.257774},
{'cc_timestamp': 1674862696.396625,
'status': {'uptime': ' 15:38:16 up 27 min, 1 user, load average: '
'1.81, 0.58, 0.26'},
'subsystem': 'status',
'timestamp': 1674862696.379905},
{'cc_timestamp': 1674862697.619598,
'status': {'uptime': ' 15:38:17 up 27 min, 1 user, load average: '
'1.81, 0.58, 0.26'},
'subsystem': 'status',
'timestamp': 1674862697.578304},
{'cc_timestamp': 1674862699.076753,
'status': {'uptime': ' 15:38:19 up 27 min, 1 user, load average: '
'1.81, 0.58, 0.26'},
'subsystem': 'status',
'timestamp': 1674862699.06134},
{'cc_timestamp': 1674862700.247776,
'status': {'uptime': ' 15:38:20 up 27 min, 1 user, load average: '
'1.81, 0.58, 0.26'},
'subsystem': 'status',
'timestamp': 1674862700.220743},
{'cc_timestamp': 1674862701.45148,
'status': {'uptime': ' 15:38:21 up 27 min, 1 user, load average: '
'1.66, 0.57, 0.26'},
'subsystem': 'status',
'timestamp': 1674862701.440864},
{'cc_timestamp': 1674862703.569937,
'status': {'uptime': ' 15:38:22 up 27 min, 1 user, load average: '
'1.66, 0.57, 0.26'},
'subsystem': 'status',
'timestamp': 1674862702.530512},
{'cc_timestamp': 1674862704.625566,
'status': {'uptime': ' 15:38:24 up 27 min, 1 user, load average: '
'1.66, 0.57, 0.26'},
'subsystem': 'status',
'timestamp': 1674862704.605685},
{'cc_timestamp': 1674862705.689722,
'status': {'uptime': ' 15:38:25 up 27 min, 1 user, load average: '
'1.77, 0.61, 0.27'},
'subsystem': 'status',
'timestamp': 1674862705.666022},
{'cc_timestamp': 1674862706.623251,
'status': {'uptime': ' 15:38:26 up 27 min, 1 user, load average: '
'1.77, 0.61, 0.27'},
'subsystem': 'status',
'timestamp': 1674862706.563581},
{'cc_timestamp': 1674862708.322399,
'status': {'uptime': ' 15:38:28 up 27 min, 1 user, load average: '
'1.77, 0.61, 0.27'},
'subsystem': 'status',
'timestamp': 1674862708.25395},
{'cc_timestamp': 1674862709.604626,
'status': {'uptime': ' 15:38:29 up 27 min, 1 user, load average: '
'1.77, 0.61, 0.27'},
'subsystem': 'status',
'timestamp': 1674862709.534681},
{'cc_timestamp': 1674862711.059988,
'status': {'uptime': ' 15:38:31 up 27 min, 1 user, load average: '
'2.03, 0.69, 0.30'},
'subsystem': 'status',
'timestamp': 1674862711.034823},
{'cc_timestamp': 1674862713.120404,
'status': {'uptime': ' 15:38:33 up 27 min, 1 user, load average: '
'2.03, 0.69, 0.30'},
'subsystem': 'status',
'timestamp': 1674862713.082971},
{'cc_timestamp': 1674862715.331143,
'status': {'uptime': ' 15:38:35 up 27 min, 1 user, load average: '
'2.03, 0.69, 0.30'},
'subsystem': 'status',
'timestamp': 1674862715.274449},
{'cc_timestamp': 1674862716.866777,
'status': {'uptime': ' 15:38:36 up 27 min, 1 user, load average: '
'2.27, 0.76, 0.32'},
'subsystem': 'status',
'timestamp': 1674862716.765522},
{'cc_timestamp': 1674862720.542291,
'status': {'uptime': ' 15:38:40 up 28 min, 1 user, load average: '
'2.57, 0.84, 0.35'},
'subsystem': 'status',
'timestamp': 1674862720.372992},
{'cc_timestamp': 1674862723.191516,
'status': {'uptime': ' 15:38:42 up 28 min, 1 user, load average: '
'2.57, 0.84, 0.35'},
'subsystem': 'status',
'timestamp': 1674862722.919672},
{'cc_timestamp': 1674862724.811949,
'status': {'uptime': ' 15:38:44 up 28 min, 1 user, load average: '
'2.57, 0.84, 0.35'},
'subsystem': 'status',
'timestamp': 1674862724.541143},
{'cc_timestamp': 1674862726.550655,
'status': {'uptime': ' 15:38:46 up 28 min, 1 user, load average: '
'3.08, 0.98, 0.40'},
'subsystem': 'status',
'timestamp': 1674862726.088144},
{'cc_timestamp': 1674862729.586814,
'status': {'uptime': ' 15:38:48 up 28 min, 1 user, load average: '
'3.08, 0.98, 0.40'},
'subsystem': 'status',
'timestamp': 1674862728.885999},
{'cc_timestamp': 1674862730.913854,
'status': {'uptime': ' 15:38:50 up 28 min, 1 user, load average: '
'3.07, 1.01, 0.41'},
'subsystem': 'status',
'timestamp': 1674862730.877542},
{'cc_timestamp': 1674862732.250612,
'status': {'uptime': ' 15:38:52 up 28 min, 1 user, load average: '
'3.07, 1.01, 0.41'},
'subsystem': 'status',
'timestamp': 1674862732.034972},
{'cc_timestamp': 1674862733.663616,
'status': {'uptime': ' 15:38:53 up 28 min, 1 user, load average: '
'3.07, 1.01, 0.41'},
'subsystem': 'status',
'timestamp': 1674862733.635271},
{'cc_timestamp': 1674862738.690109,
'status': {'uptime': ' 15:38:55 up 28 min, 1 user, load average: '
'3.31, 1.10, 0.44'},
'subsystem': 'status',
'timestamp': 1674862735.639459},
{'cc_timestamp': 1674862739.932198,
'status': {'uptime': ' 15:38:59 up 28 min, 1 user, load average: '
'3.31, 1.10, 0.44'},
'subsystem': 'status',
'timestamp': 1674862739.915471},
{'cc_timestamp': 1674862740.848229,
'status': {'uptime': ' 15:39:00 up 28 min, 1 user, load average: '
'3.20, 1.11, 0.45'},
'subsystem': 'status',
'timestamp': 1674862740.831364},
{'cc_timestamp': 1674862743.161569,
'status': {'uptime': ' 15:39:02 up 28 min, 1 user, load average: '
'3.20, 1.11, 0.45'},
'subsystem': 'status',
'timestamp': 1674862742.040561},
{'cc_timestamp': 1674862744.118589,
'status': {'uptime': ' 15:39:04 up 28 min, 1 user, load average: '
'3.20, 1.11, 0.45'},
'subsystem': 'status',
'timestamp': 1674862744.096289},
{'cc_timestamp': 1674862745.448736,
'status': {'uptime': ' 15:39:05 up 28 min, 1 user, load average: '
'2.95, 1.09, 0.45'},
'subsystem': 'status',
'timestamp': 1674862745.396176},
{'cc_timestamp': 1674862748.237569,
'status': {'uptime': ' 15:39:06 up 28 min, 1 user, load average: '
'2.95, 1.09, 0.45'},
'subsystem': 'status',
'timestamp': 1674862746.659582},
{'cc_timestamp': 1674862749.278865,
'status': {'uptime': ' 15:39:09 up 28 min, 1 user, load average: '
'2.95, 1.09, 0.45'},
'subsystem': 'status',
'timestamp': 1674862749.153781},
{'cc_timestamp': 1674862750.571543,
'status': {'uptime': ' 15:39:10 up 28 min, 1 user, load average: '
'3.11, 1.16, 0.48'},
'subsystem': 'status',
'timestamp': 1674862750.553163},
{'cc_timestamp': 1674862753.608812,
'status': {'uptime': ' 15:39:12 up 28 min, 1 user, load average: '
'3.11, 1.16, 0.48'},
'subsystem': 'status',
'timestamp': 1674862752.072489},
{'cc_timestamp': 1674862756.122622,
'status': {'uptime': ' 15:39:15 up 28 min, 1 user, load average: '
'3.18, 1.21, 0.50'},
'subsystem': 'status',
'timestamp': 1674862755.658609},
{'cc_timestamp': 1674862757.886521,
'status': {'uptime': ' 15:39:17 up 28 min, 1 user, load average: '
'3.18, 1.21, 0.50'},
'subsystem': 'status',
'timestamp': 1674862757.873506},
{'cc_timestamp': 1674862759.217488,
'status': {'uptime': ' 15:39:19 up 28 min, 1 user, load average: '
'3.18, 1.21, 0.50'},
'subsystem': 'status',
'timestamp': 1674862759.205161},
{'cc_timestamp': 1674862760.080219,
'status': {'uptime': ' 15:39:20 up 28 min, 1 user, load average: '
'3.18, 1.21, 0.50'},
'subsystem': 'status',
'timestamp': 1674862760.070932},
{'cc_timestamp': 1674862761.637643,
'status': {'uptime': ' 15:39:21 up 28 min, 1 user, load average: '
'3.33, 1.27, 0.52'},
'subsystem': 'status',
'timestamp': 1674862761.627489},
{'cc_timestamp': 1674862763.436284,
'status': {'uptime': ' 15:39:23 up 28 min, 1 user, load average: '
'3.33, 1.27, 0.52'},
'subsystem': 'status',
'timestamp': 1674862763.398873},
{'cc_timestamp': 1674862764.599593,
'status': {'uptime': ' 15:39:24 up 28 min, 1 user, load average: '
'3.33, 1.27, 0.52'},
'subsystem': 'status',
'timestamp': 1674862764.572276},
{'cc_timestamp': 1674862765.701904,
'status': {'uptime': ' 15:39:25 up 28 min, 1 user, load average: '
'3.54, 1.35, 0.55'},
'subsystem': 'status',
'timestamp': 1674862765.674819},
{'cc_timestamp': 1674862767.002896,
'status': {'uptime': ' 15:39:26 up 28 min, 1 user, load average: '
'3.54, 1.35, 0.55'},
'subsystem': 'status',
'timestamp': 1674862766.987981},
{'cc_timestamp': 1674862768.319031,
'status': {'uptime': ' 15:39:28 up 28 min, 1 user, load average: '
'3.54, 1.35, 0.55'},
'subsystem': 'status',
'timestamp': 1674862768.27031},
{'cc_timestamp': 1674862769.985982,
'status': {'uptime': ' 15:39:29 up 28 min, 1 user, load average: '
'3.54, 1.35, 0.55'},
'subsystem': 'status',
'timestamp': 1674862769.617728},
{'cc_timestamp': 1674862770.982312,
'status': {'uptime': ' 15:39:30 up 28 min, 1 user, load average: '
'4.30, 1.54, 0.62'},
'subsystem': 'status',
'timestamp': 1674862770.915933},
{'cc_timestamp': 1674862772.143489,
'status': {'uptime': ' 15:39:32 up 28 min, 1 user, load average: '
'4.30, 1.54, 0.62'},
'subsystem': 'status',
'timestamp': 1674862772.129662},
{'cc_timestamp': 1674862773.12756,
'status': {'uptime': ' 15:39:33 up 28 min, 1 user, load average: '
'4.30, 1.54, 0.62'},
'subsystem': 'status',
'timestamp': 1674862773.091771},
{'cc_timestamp': 1674862774.037893,
'status': {'uptime': ' 15:39:34 up 28 min, 1 user, load average: '
'4.30, 1.54, 0.62'},
'subsystem': 'status',
'timestamp': 1674862774.018586},
{'cc_timestamp': 1674862775.367485,
'status': {'uptime': ' 15:39:35 up 28 min, 1 user, load average: '
'4.30, 1.54, 0.62'},
'subsystem': 'status',
'timestamp': 1674862775.302537},
{'cc_timestamp': 1674862776.40186,
'status': {'uptime': ' 15:39:36 up 28 min, 1 user, load average: '
'4.52, 1.63, 0.65'},
'subsystem': 'status',
'timestamp': 1674862776.36652},
{'cc_timestamp': 1674862777.689312,
'status': {'uptime': ' 15:39:37 up 28 min, 1 user, load average: '
'4.52, 1.63, 0.65'},
'subsystem': 'status',
'timestamp': 1674862777.671998},
{'cc_timestamp': 1674862778.796921,
'status': {'uptime': ' 15:39:38 up 28 min, 1 user, load average: '
'4.52, 1.63, 0.65'},
'subsystem': 'status',
'timestamp': 1674862778.628453},
{'cc_timestamp': 1674862780.03397,
'status': {'uptime': ' 15:39:39 up 29 min, 1 user, load average: '
'4.52, 1.63, 0.65'},
'subsystem': 'status',
'timestamp': 1674862779.963546},
{'cc_timestamp': 1674862781.13012,
'status': {'uptime': ' 15:39:41 up 29 min, 1 user, load average: '
'4.64, 1.70, 0.68'},
'subsystem': 'status',
'timestamp': 1674862781.105537},
{'cc_timestamp': 1674862782.576569,
'status': {'uptime': ' 15:39:42 up 29 min, 1 user, load average: '
'4.64, 1.70, 0.68'},
'subsystem': 'status',
'timestamp': 1674862782.559643},
{'cc_timestamp': 1674862783.737474,
'status': {'uptime': ' 15:39:43 up 29 min, 1 user, load average: '
'4.64, 1.70, 0.68'},
'subsystem': 'status',
'timestamp': 1674862783.548978},
{'cc_timestamp': 1674862785.009005,
'status': {'uptime': ' 15:39:44 up 29 min, 1 user, load average: '
'4.64, 1.70, 0.68'},
'subsystem': 'status',
'timestamp': 1674862784.589483},
{'cc_timestamp': 1674862785.86161,
'status': {'uptime': ' 15:39:45 up 29 min, 1 user, load average: '
'4.66, 1.76, 0.70'},
'subsystem': 'status',
'timestamp': 1674862785.838393},
{'cc_timestamp': 1674862786.978823,
'status': {'uptime': ' 15:39:46 up 29 min, 1 user, load average: '
'4.66, 1.76, 0.70'},
'subsystem': 'status',
'timestamp': 1674862786.922506},
{'cc_timestamp': 1674862788.371496,
'status': {'uptime': ' 15:39:48 up 29 min, 1 user, load average: '
'4.66, 1.76, 0.70'},
'subsystem': 'status',
'timestamp': 1674862788.346678},
{'cc_timestamp': 1674862789.537272,
'status': {'uptime': ' 15:39:49 up 29 min, 1 user, load average: '
'4.66, 1.76, 0.70'},
'subsystem': 'status',
'timestamp': 1674862789.501892},
{'cc_timestamp': 1674862790.658814,
'status': {'uptime': ' 15:39:50 up 29 min, 1 user, load average: '
'4.53, 1.78, 0.72'},
'subsystem': 'status',
'timestamp': 1674862790.587806},
{'cc_timestamp': 1674862791.913031,
'status': {'uptime': ' 15:39:51 up 29 min, 1 user, load average: '
'4.53, 1.78, 0.72'},
'subsystem': 'status',
'timestamp': 1674862791.824647},
{'cc_timestamp': 1674862793.704851,
'status': {'uptime': ' 15:39:53 up 29 min, 1 user, load average: '
'4.53, 1.78, 0.72'},
'subsystem': 'status',
'timestamp': 1674862793.602655},
{'cc_timestamp': 1674862794.891821,
'status': {'uptime': ' 15:39:54 up 29 min, 1 user, load average: '
'4.53, 1.78, 0.72'},
'subsystem': 'status',
'timestamp': 1674862794.751287},
{'cc_timestamp': 1674862796.210339,
'status': {'uptime': ' 15:39:56 up 29 min, 1 user, load average: '
'5.05, 1.93, 0.77'},
'subsystem': 'status',
'timestamp': 1674862796.121217},
{'cc_timestamp': 1674862797.337329,
'status': {'uptime': ' 15:39:57 up 29 min, 1 user, load average: '
'5.05, 1.93, 0.77'},
'subsystem': 'status',
'timestamp': 1674862797.240025},
{'cc_timestamp': 1674862798.473115,
'status': {'uptime': ' 15:39:58 up 29 min, 1 user, load average: '
'5.05, 1.93, 0.77'},
'subsystem': 'status',
'timestamp': 1674862798.358148},
{'cc_timestamp': 1674862799.663678,
'status': {'uptime': ' 15:39:59 up 29 min, 1 user, load average: '
'5.05, 1.93, 0.77'},
'subsystem': 'status',
'timestamp': 1674862799.329575},
{'cc_timestamp': 1674862800.897149,
'status': {'uptime': ' 15:40:00 up 29 min, 1 user, load average: '
'6.41, 2.27, 0.89'},
'subsystem': 'status',
'timestamp': 1674862800.739538},
{'cc_timestamp': 1674862802.683567,
'status': {'uptime': ' 15:40:02 up 29 min, 1 user, load average: '
'6.41, 2.27, 0.89'},
'subsystem': 'status',
'timestamp': 1674862802.078066},
{'cc_timestamp': 1674862803.618464,
'status': {'uptime': ' 15:40:03 up 29 min, 1 user, load average: '
'6.41, 2.27, 0.89'},
'subsystem': 'status',
'timestamp': 1674862803.58592},
{'cc_timestamp': 1674862804.735953,
'status': {'uptime': ' 15:40:04 up 29 min, 1 user, load average: '
'6.41, 2.27, 0.89'},
'subsystem': 'status',
'timestamp': 1674862804.712724},
{'cc_timestamp': 1674862806.588497,
'status': {'uptime': ' 15:40:05 up 29 min, 1 user, load average: '
'7.98, 2.66, 1.02'},
'subsystem': 'status',
'timestamp': 1674862805.857012},
{'cc_timestamp': 1674862807.829405,
'status': {'uptime': ' 15:40:07 up 29 min, 1 user, load average: '
'7.98, 2.66, 1.02'},
'subsystem': 'status',
'timestamp': 1674862807.646232},
{'cc_timestamp': 1674862809.394362,
'status': {'uptime': ' 15:40:08 up 29 min, 1 user, load average: '
'7.98, 2.66, 1.02'},
'subsystem': 'status',
'timestamp': 1674862808.893931},
{'cc_timestamp': 1674862810.764077,
'status': {'uptime': ' 15:40:10 up 29 min, 1 user, load average: '
'9.50, 3.07, 1.16'},
'subsystem': 'status',
'timestamp': 1674862810.663742},
{'cc_timestamp': 1674862812.436866,
'status': {'uptime': ' 15:40:11 up 29 min, 1 user, load average: '
'9.50, 3.07, 1.16'},
'subsystem': 'status',
'timestamp': 1674862811.587532},
{'cc_timestamp': 1674862814.121525,
'status': {'uptime': ' 15:40:13 up 29 min, 1 user, load average: '
'9.50, 3.07, 1.16'},
'subsystem': 'status',
'timestamp': 1674862813.393702},
{'cc_timestamp': 1674862815.389135,
'status': {'uptime': ' 15:40:15 up 29 min, 1 user, load average: '
'10.66, 3.41, 1.28'},
'subsystem': 'status',
'timestamp': 1674862815.37937},
{'cc_timestamp': 1674862816.541966,
'status': {'uptime': ' 15:40:16 up 29 min, 1 user, load average: '
'10.66, 3.41, 1.28'},
'subsystem': 'status',
'timestamp': 1674862816.420582},
{'cc_timestamp': 1674862818.58819,
'status': {'uptime': ' 15:40:18 up 29 min, 1 user, load average: '
'10.66, 3.41, 1.28'},
'subsystem': 'status',
'timestamp': 1674862818.433912}],
'paging': {'next': 'https://api.cogniac.io/1/gateways/sk5pmpgv/status?sort=cloudcore_timestamp&end=1700692965.69&reverse=False&start=0&limit=100&cursor=1674862818.5881900787353515625'},
'previous_status': {}}
Subsystem-specific requests.
The following API can be used to request status for a specific subsystem in a particular time range.
GET /1/gateways/{gateway_id}/status/{subsystem}
Host: https://api.cogniac.io
An example of retrieving the last 30 minutes of GPU status is shown below.
import requests
from requests.auth import HTTPBasicAuth
url_prefix = 'https://api.cogniac.io'
api_version = "1"
token = {} # add your token here
gateway_id = test_ef123'
subsystem = "gpus"
headers = {'Authorization': 'Bearer %s' % self.token['access_token']}
data = {'start':time()-30*60, 'end':time()}
res = requests.get(url_prefix + '/' + api_version + '/gateways/%s/status/%s' % (gateway_id, subsystem), headers=headers)
if res.status_code == 200:
status_data = json.loads(res.content)['data']
To retrieve the status for all GPUs over the last 30minutes: