mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Power discovery/polling enabled for IPMI, CISCO-ENTITY-SENSORS-MIB and ENTIY-SENSORS-MIB
git-svn-id: http://www.observium.org/svn/observer/trunk@2104 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -49,7 +49,7 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios")
|
||||
$entitysensor['percentRH'] = "humidity";
|
||||
$entitysensor['rpm'] = "fanspeed";
|
||||
$entitysensor['celsius'] = "temperature";
|
||||
$entitysensor['watts'] = "watts";
|
||||
$entitysensor['watts'] = "power";
|
||||
|
||||
if (is_array($oids))
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ $oids = snmpwalk_cache_multi_oid($device, "entPhySensorValue", $oids, "ENTITY-SE
|
||||
$entitysensor['voltsDC'] = "voltage";
|
||||
$entitysensor['voltsAC'] = "voltage";
|
||||
$entitysensor['amperes'] = "current";
|
||||
$entitysensor['watt'] = "power";
|
||||
$entitysensor['watts'] = "power";
|
||||
$entitysensor['hertz'] = "freq";
|
||||
$entitysensor['percentRH'] = "humidity";
|
||||
$entitysensor['rpm'] = "fanspeed";
|
||||
@@ -90,4 +90,4 @@ if (is_array($oids))
|
||||
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -101,6 +101,9 @@ function sensor_low_limit($class, $current)
|
||||
case 'fanspeed':
|
||||
$limit = $current * 0.80;
|
||||
break;
|
||||
case 'power':
|
||||
$limit = NULL;
|
||||
break;
|
||||
}
|
||||
return $limit;
|
||||
}
|
||||
@@ -130,6 +133,9 @@ function sensor_limit($class, $current)
|
||||
case 'fanspeed':
|
||||
$limit = $current * 1.30;
|
||||
break;
|
||||
case 'power':
|
||||
$limit = $current * 1.50;
|
||||
break;
|
||||
}
|
||||
return $limit;
|
||||
}
|
||||
@@ -322,4 +328,4 @@ function discover_toner(&$valid, $device, $oid, $index, $type, $descr, $capacity
|
||||
$valid[$type][$index] = 1;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -20,12 +20,16 @@ function poll_sensor($device, $class, $unit)
|
||||
|
||||
if (!is_file($rrd_file))
|
||||
{
|
||||
|
||||
rrdtool_create($rrd_file,"--step 300 \
|
||||
DS:sensor:GAUGE:600:-273:20000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:MIN:0.5:12:2400 \
|
||||
RRA:MAX:0.5:12:2400 \
|
||||
RRA:AVERAGE:0.5:12:2400");
|
||||
DS:sensor:GAUGE:600:-20000:20000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:AVERAGE:0.5:12:2400 \
|
||||
RRA:AVERAGE:0.5:288:750 \
|
||||
RRA:MAX:0.5:12:2400 \
|
||||
RRA:MAX:0.5:288:750 \
|
||||
RRA:MIN:0.5:12:2400 \
|
||||
RRA:MIN:0.5:288:750");
|
||||
}
|
||||
|
||||
echo("$sensor_value $unit\n");
|
||||
|
||||
@@ -920,7 +920,7 @@ $config['year'] = time() - (365 * 24 * 60 * 60);
|
||||
$ipmi_unit['Volts'] = 'voltage';
|
||||
$ipmi_unit['degrees C'] = 'temperature';
|
||||
$ipmi_unit['RPM'] = 'fanspeed';
|
||||
$ipmi_unit['Watts'] = '';
|
||||
$ipmi_unit['Watts'] = 'power';
|
||||
$ipmi_unit['discrete'] = '';
|
||||
|
||||
## INCLUDE THE VMWARE DEFINITION FILE.
|
||||
|
||||
Reference in New Issue
Block a user