Skip to content

Commit 0ecc7d2

Browse files
committed
Fix agent data not being stored
1 parent db4c0b4 commit 0ecc7d2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

includes/polling/applications/proxmox.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function proxmox_vm_exists($i, $c, &$pmxcache)
5757
$proxmox = str_replace("<<<app-proxmox>>>\n", '', $proxmox);
5858
}
5959

60-
if ($proxmox) {
60+
if (! empty($proxmox)) {
6161
$pmxlines = explode("\n", $proxmox);
6262
$pmxcluster = array_shift($pmxlines);
6363
dbUpdate(

includes/polling/unix-agent.inc.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
$agent_end = microtime(true);
4646
$agent_time = round(($agent_end - $agent_start) * 1000);
4747

48+
$agent_raw = "<<<app-proxmox>>>\nblah";
49+
4850
if (! empty($agent_raw)) {
4951
echo 'execution time: ' . $agent_time . 'ms';
5052

@@ -202,11 +204,11 @@
202204
DeviceCache::getPrimary()->serial = $agent_data['dmi']['system-serial-number'];
203205
}
204206
DeviceCache::getPrimary()->save();
205-
206-
// store results in array cache
207-
Cache::driver('array')->put('agent_data', $agent_data);
208207
}
209208

209+
// store results in array cache
210+
Cache::driver('array')->put('agent_data', $agent_data);
211+
210212
if (! empty($agent_sensors)) {
211213
echo 'Sensors: ';
212214
app('sensor-discovery')->sync(sensor_class: 'temperature', poller_type: 'agent');

0 commit comments

Comments
 (0)