[ 'timeout' => 5, 'header' => "User-Agent: PHP/" . PHP_VERSION . "\r\n" ] ]); $json = @file_get_contents($apiUrl, false, $context); if ($json === false) { die('

Could not fetch data from the API.

'); } $data = json_decode($json, true); if ($data === null) { die('

Malformed JSON returned from the API.

'); } /* ---- Render client dashboard ---- */ ?> Cosmostat - <?= h($_SERVER['SERVER_NAME']) ?>

Matt-Cloud Cosmostat Dashboard

This dashboard shows the local Matt-Cloud system stats.

Component Desriptor

To view the component descriptor, you may
curl -s https:///descriptor

This will return the entire JSON descriptor variable.
The endpoint agent uses this descriptor to build out its local System Object.
The agent then reports back to the Cosmostat Server with all the data found in the descriptor.
Full Source Code can be found at its Gitea page.

System Properties

Live System Metrics

Connecting...

Components

[ 'timeout' => 5, 'header' => "User-Agent: PHP/" . PHP_VERSION . "\r\n" ] ]); $json = @file_get_contents($apiUrl, false, $context); if ($json === false) { die('

Could not fetch data from the API.

'); } $clients = json_decode($json, true); if ($clients === null || !is_array($clients)) { die('

Malformed JSON returned from the API.

'); } /* ---- Determine selected host ---- */ $selectedId = $_GET['host'] ?? ''; $selectedIdx = null; foreach ($clients as $idx => $client) { if (isset($client['short_id']) && $client['short_id'] === $selectedId) { $selectedIdx = $idx; break; } } if ($selectedIdx === null) { // Default to the first client (if any) $selectedIdx = 0; $selectedId = $clients[$selectedIdx]['short_id'] ?? ''; } $client = $clients[$selectedIdx] ?? null; $properties = $client['client_properties'][0] ?? []; $systemProperties = $properties['system_properties'] ?? []; $systemComponents = $properties['system_components'] ?? []; $selectedHost = $clients[$selectedIdx]['hostname'] ?? 'Unknown'; /* ---- Render server dashboard ---- */ ?> Cosmostat - <?= h($selectedHost) ?>

Matt-Cloud Cosmostat Dashboard

This dashboard shows the local Matt-Cloud system stats.

Component Desriptor

To view the component descriptor, you may
curl -s https:///descriptor

This will return the entire JSON descriptor variable.
The endpoint agent uses this descriptor to build out its local System Object.
The agent then reports back to the Cosmostat Server with all the data found in the descriptor.
Full Source Code can be found at its Gitea page.

System Properties

Live System Metrics

Connecting...

Components