Skip to content

Commit

Permalink
Reporting / rrd - fix regression in 895e58f, missing rrd target and s…
Browse files Browse the repository at this point in the history
…ysctl collection issue. partially merges #8024

(cherry picked from commit 8e3b4b7)
  • Loading branch information
AdSchellevis authored and fichtner committed Nov 4, 2024
1 parent f1afd27 commit 4853172
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class Temperature extends Base
public function run()
{
$data = $this->shellCmd(
'/sbin/sysctl -n dev.cpu.0.temperature hw.acpi.thermal.tz0.temperature hw.temperature.CPU'
'/sbin/sysctl -ni dev.cpu.0.temperature hw.acpi.thermal.tz0.temperature hw.temperature.CPU'
);
if (!empty($data)) {
return [$data[0]];
return [preg_replace('/[^0-9,.]/', '', $data[0])];
}
return [];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Temperature extends Base
protected int $ds_heartbeat = 120;
protected int $ds_min = -273;
protected int $ds_max = 5000;
protected static string $stdfilename = 'system-cputemp.rrd';

/**
* {@inheritdoc}
Expand Down

0 comments on commit 4853172

Please sign in to comment.