Finished dell rac support and updated mib

This commit is contained in:
laf
2015-05-19 01:04:17 +01:00
parent c332e17c3a
commit 57a08a0ade
10 changed files with 2920 additions and 21 deletions
@@ -0,0 +1,9 @@
<?php
$class = "state";
$unit = "";
$unit_long = "State";
include("includes/graphs/device/sensor.inc.php");
?>
+17
View File
@@ -0,0 +1,17 @@
<?php
$scale_min = "0";
$scale_max = "10";
include("includes/graphs/common.inc.php");
$rrd_options .= " COMMENT:' Min Max Last\\n'";
$rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
$rrd_options .= " LINE1.5:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],21)."'";
$rrd_options .= " GPRINT:sensor:MIN:%4.1lf";
$rrd_options .= " GPRINT:sensor:MAX:%4.1lf";
$rrd_options .= " GPRINT:sensor:LAST:%4.1lf\\\\l";
if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
+3
View File
@@ -14,6 +14,7 @@ $current = dbFetchCell("select count(*) from sensors WHERE sensor_class='cu
$freqs = dbFetchCell("select count(*) from sensors WHERE sensor_class='frequency' AND device_id = ?", array($device['device_id']));
$power = dbFetchCell("select count(*) from sensors WHERE sensor_class='power' AND device_id = ?", array($device['device_id']));
$dBm = dbFetchCell("select count(*) from sensors WHERE sensor_class='dBm' AND device_id = ?", array($device['device_id']));
$states = dbFetchCell("select count(*) from sensors WHERE sensor_class='state' AND device_id = ?", array($device['device_id']));
unset($datas);
$datas[] = 'overview';
@@ -30,6 +31,7 @@ if ($freqs) { $datas[] = 'frequency'; }
if ($current) { $datas[] = 'current'; }
if ($power) { $datas[] = 'power'; }
if ($dBm) { $datas[] = 'dbm'; }
if ($states) { $datas[] = 'state'; }
$type_text['overview'] = "Overview";
$type_text['charge'] = "Battery Charge";
@@ -45,6 +47,7 @@ $type_text['frequency'] = "Frequency";
$type_text['current'] = "Current";
$type_text['power'] = "Power";
$type_text['dbm'] = "dBm";
$type_text['state'] = "State";
$link_array = array('page' => 'device',
'device' => $device['device_id'],
+7
View File
@@ -0,0 +1,7 @@
<?php
$class = "state";
$unit = "";
$graph_type = "sensor_state";
include("sensors.inc.php");