From e866cdedafbeb92eb18bedb0a526b3ded84eb636 Mon Sep 17 00:00:00 2001 From: Casey Schoonover Date: Tue, 19 Apr 2016 15:18:52 -0500 Subject: [PATCH 1/2] Added CPU temperature discovery/polling for DNOS --- .../sensors/temperatures/dnos.inc.php | 22 +++++++++++++++++++ includes/polling/temperatures/dnos.inc.php | 20 +++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 includes/discovery/sensors/temperatures/dnos.inc.php create mode 100644 includes/polling/temperatures/dnos.inc.php diff --git a/includes/discovery/sensors/temperatures/dnos.inc.php b/includes/discovery/sensors/temperatures/dnos.inc.php new file mode 100644 index 000000000..827e42056 --- /dev/null +++ b/includes/discovery/sensors/temperatures/dnos.inc.php @@ -0,0 +1,22 @@ + $t) { + $t = explode(' ',$t); + $oid = $t[0]; + $val = $t[1]; + + if (substr($oid, -1) == '1') { + // This code will only pull CPU temp for each stack member, but there is no reason why the additional values couldn't be graphed + $counter = $counter + 1; + discover_sensor($valid['sensor'], 'temperature', $device, $oid, $counter, 'dnos', + 'Unit '.$counter.' CPU temperature', '1', '1', null, null, null, null, $val); + } + } +} diff --git a/includes/polling/temperatures/dnos.inc.php b/includes/polling/temperatures/dnos.inc.php new file mode 100644 index 000000000..9ec0b6bbd --- /dev/null +++ b/includes/polling/temperatures/dnos.inc.php @@ -0,0 +1,20 @@ + $t) { + $t = explode(' ',$t); + $oid = $t[0]; + $val = $t[1]; + + + if (substr($oid, -1) == '1') { + $counter = $counter + 1; + discover_sensor($valid['sensor'], 'temperature', $device, $oid, $counter, 'dnos', + 'Unit '.$counter.' CPU temperature', '1', '1', null, null, null, null, $val); + } + } +} From 6bdb8fc0964a0c84c208dd6dbdd8a610890b7edf Mon Sep 17 00:00:00 2001 From: Casey Schoonover Date: Wed, 20 Apr 2016 15:39:44 -0500 Subject: [PATCH 2/2] Removed includes/polling/temperatures/dnos.inc.php - polling script appears unnecessary --- includes/polling/temperatures/dnos.inc.php | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 includes/polling/temperatures/dnos.inc.php diff --git a/includes/polling/temperatures/dnos.inc.php b/includes/polling/temperatures/dnos.inc.php deleted file mode 100644 index 9ec0b6bbd..000000000 --- a/includes/polling/temperatures/dnos.inc.php +++ /dev/null @@ -1,20 +0,0 @@ - $t) { - $t = explode(' ',$t); - $oid = $t[0]; - $val = $t[1]; - - - if (substr($oid, -1) == '1') { - $counter = $counter + 1; - discover_sensor($valid['sensor'], 'temperature', $device, $oid, $counter, 'dnos', - 'Unit '.$counter.' CPU temperature', '1', '1', null, null, null, null, $val); - } - } -}