Skip to content

Commit

Permalink
Polling
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMysteriousX committed Feb 10, 2024
1 parent 7a4a3e2 commit d61b6c4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/polling/sensors/charge/dell-powervault.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
$connUnitSensorMessage = explode(':', $sensor_value);
preg_match('/^ ([0-9]+)%$/', array_pop($connUnitSensorMessage), $matches);
$sensor_value = $matches[1];

unset($matches,
$connUnitSensorMessage
);
8 changes: 8 additions & 0 deletions includes/polling/sensors/current/dell-powervault.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
$connUnitSensorMessage = explode(':', $sensor_value);
preg_match('/^ ([0-9]+\.[0-9]+)A$/', array_pop($connUnitSensorMessage), $matches);
$sensor_value = $matches[1];

unset($matches,
$connUnitSensorMessage
);
4 changes: 4 additions & 0 deletions includes/polling/sensors/state/dell-powervault.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
$connUnitSensorMessage = explode(':', $sensor_value);
$sensor_value = array_pop($connUnitSensorMessage) === " OK" ? 1 : 2;
unset($connUnitSensorMessage);
8 changes: 8 additions & 0 deletions includes/polling/sensors/temperature/dell-powervault.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
$connUnitSensorMessage = explode(':', $sensor_value);
preg_match('/^ ([0-9]+) C ([0-9]+\.[0-9]+)F$/', array_pop($connUnitSensorMessage), $matches);
$sensor_value = $matches[1];

unset($matches,
$connUnitSensorMessage
);
8 changes: 8 additions & 0 deletions includes/polling/sensors/voltage/dell-powervault.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
$connUnitSensorMessage = explode(':', $sensor_value);
preg_match('/^ ([0-9]+\.[0-9]+)V$/', array_pop($connUnitSensorMessage), $matches);
$sensor_value = $matches[1];

unset($matches,
$connUnitSensorMessage
);

0 comments on commit d61b6c4

Please sign in to comment.