mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 10:58:42 +00:00
fix sensors (maybe)
git-svn-id: http://www.observium.org/svn/observer/trunk@2236 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
b3bd336515
commit
a2891ea8f2
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "ios" || $device['os_group'] == "ios")
|
if ($device['os'] == "ios" || $device['os_group'] == "ios")
|
||||||
{
|
{
|
||||||
@ -141,8 +141,8 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios")
|
|||||||
if ($descr == "") { $ok = FALSE; } ## Invalid description. Lots of these on Nexus
|
if ($descr == "") { $ok = FALSE; } ## Invalid description. Lots of these on Nexus
|
||||||
|
|
||||||
if ($ok) {
|
if ($ok) {
|
||||||
# echo("\n$valid_sensor, $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $limit, $warn_limit, $current");
|
# echo("\n".$valid['sensor'].", $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $limit, $warn_limit, $current");
|
||||||
discover_sensor($valid_sensor, $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $limit, $warn_limit, $current);
|
discover_sensor($valid['sensor'], $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $limit, $warn_limit, $current);
|
||||||
}
|
}
|
||||||
$cisco_entity_temperature = 1;
|
$cisco_entity_temperature = 1;
|
||||||
unset($limit, $limit_low, $warn_limit, $warn_limit_low);
|
unset($limit, $limit_low, $warn_limit, $warn_limit_low);
|
||||||
|
@ -3,9 +3,9 @@ echo("Current: ");
|
|||||||
|
|
||||||
include_dir("includes/discovery/current");
|
include_dir("includes/discovery/current");
|
||||||
|
|
||||||
if ($debug) { print_r($valid['current']); }
|
if ($debug) { print_r($valid['sensor']['current']); }
|
||||||
|
|
||||||
check_valid_sensors($device, 'current', $valid_sensor);
|
check_valid_sensors($device, 'current', $valid['sensor']);
|
||||||
|
|
||||||
echo("\n");
|
echo("\n");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## APC
|
## APC
|
||||||
if ($device['os'] == "apc")
|
if ($device['os'] == "apc")
|
||||||
@ -42,7 +42,7 @@ if ($device['os'] == "apc")
|
|||||||
{
|
{
|
||||||
$descr = "Output";
|
$descr = "Output";
|
||||||
}
|
}
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ if ($device['os'] == "apc")
|
|||||||
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
|
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
|
||||||
$warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", "");
|
$warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", "");
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ if ($device['os'] == "apc")
|
|||||||
$warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", ""); # No / $precision here! Nice, APC!
|
$warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", ""); # No / $precision here! Nice, APC!
|
||||||
$descr = "Output Feed";
|
$descr = "Output Feed";
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($oids);
|
unset($oids);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "gamatronicups")
|
if ($device['os'] == "gamatronicups")
|
||||||
{
|
{
|
||||||
@ -16,7 +16,7 @@ if ($device['os'] == "gamatronicups")
|
|||||||
$warnlimit = NULL;
|
$warnlimit = NULL;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '1', '1', $lowlimit, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '1', '1', $lowlimit, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 1; $i <= 3; $i++)
|
for ($i = 1; $i <= 3; $i++)
|
||||||
@ -31,7 +31,7 @@ if ($device['os'] == "gamatronicups")
|
|||||||
$warnlimit = NULL;
|
$warnlimit = NULL;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '1', '1', $lowlimit, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '1', '1', $lowlimit, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor, $cache;
|
|
||||||
|
|
||||||
## IPOMANII-MIB
|
## IPOMANII-MIB
|
||||||
if ($device['os'] == "ipoman")
|
if ($device['os'] == "ipoman")
|
||||||
@ -39,7 +39,7 @@ if ($device['os'] == "ipoman")
|
|||||||
$current = $entry['inletStatusCurrent'] / $divisor;
|
$current = $entry['inletStatusCurrent'] / $divisor;
|
||||||
$high_limit = $entry['inletConfigCurrentHigh'] / 10;
|
$high_limit = $entry['inletConfigCurrentHigh'] / 10;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $cur_oid, '1.3.1.3.'.$index, 'ipoman', $descr, $divisor, '1', NULL, NULL, NULL, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $cur_oid, '1.3.1.3.'.$index, 'ipoman', $descr, $divisor, '1', NULL, NULL, NULL, $high_limit, $current);
|
||||||
# FIXME: iPoMan 1201 also says it has 2 inlets, at least until firmware 1.06 - wtf?
|
# FIXME: iPoMan 1201 also says it has 2 inlets, at least until firmware 1.06 - wtf?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ if ($device['os'] == "ipoman")
|
|||||||
$current = $entry['outletStatusCurrent'] / $divisor;
|
$current = $entry['outletStatusCurrent'] / $divisor;
|
||||||
$high_limit = $entry['outletConfigCurrentHigh'] / 10;
|
$high_limit = $entry['outletConfigCurrentHigh'] / 10;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $cur_oid, '2.3.1.3.'.$index, 'ipoman', $descr, $divisor, '1', NULL, NULL, NULL, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $cur_oid, '2.3.1.3.'.$index, 'ipoman', $descr, $divisor, '1', NULL, NULL, NULL, $high_limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## MGE UPS
|
## MGE UPS
|
||||||
if ($device['os'] == "mgeups")
|
if ($device['os'] == "mgeups")
|
||||||
@ -29,7 +29,7 @@ if ($device['os'] == "mgeups")
|
|||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
$lowwarnlimit = NULL;
|
$lowwarnlimit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, $lowwarnlimit, $warnlimit, $limit, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, $lowwarnlimit, $warnlimit, $limit, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.6.1", "-OsqnU"));
|
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.6.1", "-OsqnU"));
|
||||||
@ -55,7 +55,7 @@ if ($device['os'] == "mgeups")
|
|||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
$lowwarnlimit = NULL;
|
$lowwarnlimit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, $lowwarnlimit, $warnlimit, $limit, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, $lowwarnlimit, $warnlimit, $limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "netvision")
|
if ($device['os'] == "netvision")
|
||||||
{
|
{
|
||||||
@ -16,7 +16,7 @@ if ($device['os'] == "netvision")
|
|||||||
$warnlimit = NULL;
|
$warnlimit = NULL;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 1; $i <= 3; $i++)
|
for ($i = 1; $i <= 3; $i++)
|
||||||
@ -31,7 +31,7 @@ if ($device['os'] == "netvision")
|
|||||||
$warnlimit = NULL;
|
$warnlimit = NULL;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## RFC1628 UPS
|
## RFC1628 UPS
|
||||||
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
|
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
|
||||||
@ -25,7 +25,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$type = "rfc1628";
|
$type = "rfc1628";
|
||||||
$index = 500+$current_id;
|
$index = 500+$current_id;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$precision = 1;
|
$precision = 1;
|
||||||
$index = $i;
|
$index = $i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.3.2.0", "-OsqnU"));
|
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.3.2.0", "-OsqnU"));
|
||||||
@ -56,7 +56,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$precision = 1;
|
$precision = 1;
|
||||||
$index = 100+$i;
|
$index = 100+$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.5.2.0", "-OsqnU"));
|
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.5.2.0", "-OsqnU"));
|
||||||
@ -71,7 +71,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$precision = 1;
|
$precision = 1;
|
||||||
$index = 200+$i;
|
$index = 200+$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == 'sentry3')
|
if ($device['os'] == 'sentry3')
|
||||||
{
|
{
|
||||||
@ -41,7 +41,7 @@ if ($device['os'] == 'sentry3')
|
|||||||
$current = snmp_get($device,"$infeed_oid", "-Ovq", "Sentry3-MIB") / $divisor;
|
$current = snmp_get($device,"$infeed_oid", "-Ovq", "Sentry3-MIB") / $divisor;
|
||||||
|
|
||||||
if ($current >= 0) {
|
if ($current >= 0) {
|
||||||
discover_sensor($valid_sensor, 'current', $device, $infeed_oid, $towers, 'sentry3', $descr, $divisor, $multiplier, $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $infeed_oid, $towers, 'sentry3', $descr, $divisor, $multiplier, $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
@ -75,7 +75,7 @@ if ($device['os'] == 'sentry3')
|
|||||||
$outlet_current = snmp_get($device,"$outlet_oid", "-Ovq", "Sentry3-MIB") / $outlet_divisor;
|
$outlet_current = snmp_get($device,"$outlet_oid", "-Ovq", "Sentry3-MIB") / $outlet_divisor;
|
||||||
|
|
||||||
if ($outlet_current >= 0) {
|
if ($outlet_current >= 0) {
|
||||||
discover_sensor($valid_sensor, 'current', $device, $outlet_oid, $outlet_insert_index, 'sentry3', $outlet_descr, $outlet_divisor, $multiplier, $outlet_low_limit, $outlet_low_warn_limit, $outlet_high_warn_limit, $outlet_high_limit, $outlet_current);
|
discover_sensor($valid['sensor'], 'current', $device, $outlet_oid, $outlet_insert_index, 'sentry3', $outlet_descr, $outlet_divisor, $multiplier, $outlet_low_limit, $outlet_low_warn_limit, $outlet_high_warn_limit, $outlet_high_limit, $outlet_current);
|
||||||
}
|
}
|
||||||
} // if ($outlet_data)
|
} // if ($outlet_data)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## XUPS-MIB
|
## XUPS-MIB
|
||||||
if ($device['os'] == "powerware")
|
if ($device['os'] == "powerware")
|
||||||
@ -25,7 +25,7 @@ if ($device['os'] == "powerware")
|
|||||||
$type = "xups";
|
$type = "xups";
|
||||||
$index = "1.2.3.".$current_id;
|
$index = "1.2.3.".$current_id;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ if ($device['os'] == "powerware")
|
|||||||
$divisor = 1;
|
$divisor = 1;
|
||||||
$index = "4.4.1.3.".$i;
|
$index = "4.4.1.3.".$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = trim(snmp_walk($device, "xupsInputCurrent", "-OsqnU", "XUPS-MIB"));
|
$oids = trim(snmp_walk($device, "xupsInputCurrent", "-OsqnU", "XUPS-MIB"));
|
||||||
@ -56,7 +56,7 @@ if ($device['os'] == "powerware")
|
|||||||
$divisor = 1;
|
$divisor = 1;
|
||||||
$index = "3.4.1.3.".$i;
|
$index = "3.4.1.3.".$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
echo(" ENTITY-SENSOR ");
|
echo(" ENTITY-SENSOR ");
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ if (is_array($oids))
|
|||||||
if ($valid && mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = '".$type."' AND `sensor_type` = 'cisco-entity-sensor' AND `sensor_index` = '".$index."'"),0) == "0")
|
if ($valid && mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = '".$type."' AND `sensor_type` = 'cisco-entity-sensor' AND `sensor_index` = '".$index."'"),0) == "0")
|
||||||
## Check to make sure we've not already seen this sensor via cisco's entity sensor mib
|
## Check to make sure we've not already seen this sensor via cisco's entity sensor mib
|
||||||
{
|
{
|
||||||
discover_sensor($valid_sensor, $type, $device, $oid, $index, 'entity-sensor', $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], $type, $device, $oid, $index, 'entity-sensor', $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
echo("Fanspeeds : ");
|
echo("Fanspeeds : ");
|
||||||
include_dir("includes/discovery/fanspeeds");
|
include_dir("includes/discovery/fanspeeds");
|
||||||
|
|
||||||
if ($debug) { print_r($valid['fanspeed']); }
|
if ($debug) { print_r($valid['sensor']['fanspeed']); }
|
||||||
|
|
||||||
check_valid_sensors($device, 'fanspeed', $valid_sensor);
|
check_valid_sensors($device, 'fanspeed', $valid['sensor']);
|
||||||
|
|
||||||
echo("\n");
|
echo("\n");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## Areca Fanspeeds
|
## Areca Fanspeeds
|
||||||
if ($device['os'] == "areca")
|
if ($device['os'] == "areca")
|
||||||
@ -19,7 +19,7 @@ if ($device['os'] == "areca")
|
|||||||
$oid = "1.3.6.1.4.1.18928.1.2.2.1.9.1.3." . $index;
|
$oid = "1.3.6.1.4.1.18928.1.2.2.1.9.1.3." . $index;
|
||||||
$current = snmp_get($device, $oid, "-Oqv", "");
|
$current = snmp_get($device, $oid, "-Oqv", "");
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'fanspeed', $device, $oid, $index, 'areca', trim($descr,'"'), '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'fanspeed', $device, $oid, $index, 'areca', trim($descr,'"'), '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## LMSensors Fanspeeds
|
## LMSensors Fanspeeds
|
||||||
if ($device['os'] == "linux")
|
if ($device['os'] == "linux")
|
||||||
@ -22,7 +22,7 @@ if ($device['os'] == "linux")
|
|||||||
$descr = trim(str_ireplace("fan-", "", $descr));
|
$descr = trim(str_ireplace("fan-", "", $descr));
|
||||||
if ($current > '0')
|
if ($current > '0')
|
||||||
{
|
{
|
||||||
discover_sensor($valid_sensor, 'fanspeed', $device, $oid, $index, 'lmsensors', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'fanspeed', $device, $oid, $index, 'lmsensors', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## Supermicro Fanspeeds
|
## Supermicro Fanspeeds
|
||||||
if ($device['os'] == "linux")
|
if ($device['os'] == "linux")
|
||||||
@ -35,7 +35,7 @@ if ($device['os'] == "linux")
|
|||||||
$descr = str_replace(' Speed','',$descr);
|
$descr = str_replace(' Speed','',$descr);
|
||||||
if ($monitor == 'true')
|
if ($monitor == 'true')
|
||||||
{
|
{
|
||||||
discover_sensor($valid_sensor, 'fanspeed', $device, $fan_oid, $index, 'supermicro', $descr, $divisor, '1', $low_limit, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'fanspeed', $device, $fan_oid, $index, 'supermicro', $descr, $divisor, '1', $low_limit, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ echo("Frequencies: ");
|
|||||||
|
|
||||||
include_dir("includes/discovery/frequencies");
|
include_dir("includes/discovery/frequencies");
|
||||||
|
|
||||||
if ($debug) { print_r($valid['frequency']); }
|
if ($debug) { print_r($valid['sensor']['frequency']); }
|
||||||
|
|
||||||
check_valid_sensors($device, 'frequency', $valid_sensor);
|
check_valid_sensors($device, 'frequency', $valid['sensor']);
|
||||||
|
|
||||||
echo("\n");
|
echo("\n");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## APC
|
## APC
|
||||||
if ($device['os'] == "apc")
|
if ($device['os'] == "apc")
|
||||||
@ -20,7 +20,7 @@ if ($device['os'] == "apc")
|
|||||||
$index = $split_oid[count($split_oid)-1];
|
$index = $split_oid[count($split_oid)-1];
|
||||||
$oid = "1.3.6.1.4.1.318.1.1.8.5.3.2.1.4." . $index;
|
$oid = "1.3.6.1.4.1.318.1.1.8.5.3.2.1.4." . $index;
|
||||||
$descr = "Input Feed " . chr(64+$index);
|
$descr = "Input Feed " . chr(64+$index);
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $oid, "3.2.1.4.$index", $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $oid, "3.2.1.4.$index", $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ if ($device['os'] == "apc")
|
|||||||
$index = $split_oid[count($split_oid)-3];
|
$index = $split_oid[count($split_oid)-3];
|
||||||
$oid = "1.3.6.1.4.1.318.1.1.8.5.4.2.1.4." . $index;
|
$oid = "1.3.6.1.4.1.318.1.1.8.5.4.2.1.4." . $index;
|
||||||
$descr = "Output Feed"; if (count(explode("\n", $oids)) > 1) { $descr .= " $index"; }
|
$descr = "Output Feed"; if (count(explode("\n", $oids)) > 1) { $descr .= " $index"; }
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $oid, "4.2.1.4.$index", $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $oid, "4.2.1.4.$index", $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ if ($device['os'] == "apc")
|
|||||||
$type = "apc";
|
$type = "apc";
|
||||||
$index = "3.2.4.0";
|
$index = "3.2.4.0";
|
||||||
$descr = "Input";
|
$descr = "Input";
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.4.2.2.0", "-OsqnU", "");
|
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.4.2.2.0", "-OsqnU", "");
|
||||||
@ -66,7 +66,7 @@ if ($device['os'] == "apc")
|
|||||||
$type = "apc";
|
$type = "apc";
|
||||||
$index = "4.2.2.0";
|
$index = "4.2.2.0";
|
||||||
$descr = "Output";
|
$descr = "Output";
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor, $cache;
|
|
||||||
|
|
||||||
## IPOMANII-MIB
|
## IPOMANII-MIB
|
||||||
if ($device['os'] == "ipoman")
|
if ($device['os'] == "ipoman")
|
||||||
@ -36,7 +36,7 @@ if ($device['os'] == "ipoman")
|
|||||||
$current = $entry['inletStatusFrequency'] / 10;
|
$current = $entry['inletStatusFrequency'] / 10;
|
||||||
$low_limit = $entry['inletConfigFrequencyLow'];
|
$low_limit = $entry['inletConfigFrequencyLow'];
|
||||||
$high_limit = $entry['inletConfigFrequencyHigh'];
|
$high_limit = $entry['inletConfigFrequencyHigh'];
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, 'ipoman', $descr, $divisor, '1', $low_limit, NULL, NULL, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, 'ipoman', $descr, $divisor, '1', $low_limit, NULL, NULL, $high_limit, $current);
|
||||||
# FIXME: iPoMan 1201 also says it has 2 inlets, at least until firmware 1.06 - wtf?
|
# FIXME: iPoMan 1201 also says it has 2 inlets, at least until firmware 1.06 - wtf?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## MGE UPS Frequencies
|
## MGE UPS Frequencies
|
||||||
if ($device['os'] == "mgeups")
|
if ($device['os'] == "mgeups")
|
||||||
@ -23,7 +23,7 @@ if ($device['os'] == "mgeups")
|
|||||||
$type = "mge-ups";
|
$type = "mge-ups";
|
||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = $i;
|
$index = $i;
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.6.1", "-OsqnU"));
|
$oids = trim(snmp_walk($device, "1.3.6.1.4.1.705.1.6.1", "-OsqnU"));
|
||||||
if ($debug) { echo($oids."\n"); }
|
if ($debug) { echo($oids."\n"); }
|
||||||
@ -42,7 +42,7 @@ if ($device['os'] == "mgeups")
|
|||||||
$type = "mge-ups";
|
$type = "mge-ups";
|
||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = 100+$i;
|
$index = 100+$i;
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "netvision")
|
if ($device['os'] == "netvision")
|
||||||
{
|
{
|
||||||
@ -10,7 +10,7 @@ if ($device['os'] == "netvision")
|
|||||||
$type = "netvision";
|
$type = "netvision";
|
||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = '3.2.0';
|
$index = '3.2.0';
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
|
|
||||||
$freq_oid = "1.3.6.1.4.1.4555.1.1.1.1.4.2.0";
|
$freq_oid = "1.3.6.1.4.1.4555.1.1.1.1.4.2.0";
|
||||||
$descr = "Output";
|
$descr = "Output";
|
||||||
@ -18,7 +18,7 @@ if ($device['os'] == "netvision")
|
|||||||
$type = "netvision";
|
$type = "netvision";
|
||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = '4.2.0';
|
$index = '4.2.0';
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## RFC1628
|
## RFC1628
|
||||||
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
|
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
|
||||||
@ -18,7 +18,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$type = "rfc1628";
|
$type = "rfc1628";
|
||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = '3.2.0.'.$i;
|
$index = '3.2.0.'.$i;
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$freq_oid = "1.3.6.1.2.1.33.1.4.2.0";
|
$freq_oid = "1.3.6.1.2.1.33.1.4.2.0";
|
||||||
@ -27,7 +27,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$type = "rfc1628";
|
$type = "rfc1628";
|
||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = '4.2.0';
|
$index = '4.2.0';
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
|
|
||||||
$freq_oid = "1.3.6.1.2.1.33.1.5.1.0";
|
$freq_oid = "1.3.6.1.2.1.33.1.5.1.0";
|
||||||
$descr = "Bypass";
|
$descr = "Bypass";
|
||||||
@ -35,7 +35,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$type = "rfc1628";
|
$type = "rfc1628";
|
||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = '5.1.0';
|
$index = '5.1.0';
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## XUPS
|
## XUPS
|
||||||
if ($device['os'] == "powerware")
|
if ($device['os'] == "powerware")
|
||||||
@ -16,7 +16,7 @@ if ($device['os'] == "powerware")
|
|||||||
$current = snmp_get($device, $freq_oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $freq_oid, "-Oqv") / $divisor;
|
||||||
$type = "xups";
|
$type = "xups";
|
||||||
$index = '3.1.0';
|
$index = '3.1.0';
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
|
|
||||||
# XUPS-MIB::xupsOutputFrequency.0 = INTEGER: 500
|
# XUPS-MIB::xupsOutputFrequency.0 = INTEGER: 500
|
||||||
$freq_oid = "1.3.6.1.4.1.534.1.4.2.0";
|
$freq_oid = "1.3.6.1.4.1.534.1.4.2.0";
|
||||||
@ -25,7 +25,7 @@ if ($device['os'] == "powerware")
|
|||||||
$current = snmp_get($device, $freq_oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $freq_oid, "-Oqv") / $divisor;
|
||||||
$type = "xups";
|
$type = "xups";
|
||||||
$index = '4.2.0';
|
$index = '4.2.0';
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
|
|
||||||
# XUPS-MIB::xupsBypassFrequency.0 = INTEGER: 500
|
# XUPS-MIB::xupsBypassFrequency.0 = INTEGER: 500
|
||||||
$freq_oid = "1.3.6.1.4.1.534.1.5.1.0";
|
$freq_oid = "1.3.6.1.4.1.534.1.5.1.0";
|
||||||
@ -38,7 +38,7 @@ if ($device['os'] == "powerware")
|
|||||||
$current /= $divisor;
|
$current /= $divisor;
|
||||||
$type = "xups";
|
$type = "xups";
|
||||||
$index = '5.1.0';
|
$index = '5.1.0';
|
||||||
discover_sensor($valid_sensor, 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,17 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
$id = $device['device_id'];
|
|
||||||
$hostname = $device['hostname'];
|
|
||||||
$community = $device['community'];
|
|
||||||
$snmpver = $device['snmpver'];
|
|
||||||
$port = $device['port'];
|
|
||||||
|
|
||||||
echo("Humidity : ");
|
echo("Humidity : ");
|
||||||
|
|
||||||
include_dir("includes/discovery/humidity");
|
include_dir("includes/discovery/humidity");
|
||||||
|
|
||||||
if ($debug) { print_r($valid['humidity']); }
|
if ($debug) { print_r($valid['sensor']['humidity']); }
|
||||||
|
|
||||||
check_valid_sensors($device, 'humidity', $valid_sensor);
|
check_valid_sensors($device, 'humidity', $valid['sensor']);
|
||||||
|
|
||||||
echo("\n");
|
echo("\n");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == 'akcp' || $device['os'] == 'minkelsrms')
|
if ($device['os'] == 'akcp' || $device['os'] == 'minkelsrms')
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ if ($device['os'] == 'akcp' || $device['os'] == 'minkelsrms')
|
|||||||
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
|
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
|
||||||
$warnlowlimit = snmp_get($device, $warnlowlimit_oid, "-Oqv", "");
|
$warnlowlimit = snmp_get($device, $warnlowlimit_oid, "-Oqv", "");
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'humidity', $device, $oid, $index, 'akcp', $descr, '1', '1', $lowlimit, $warnlowlimit, $limit, $warnlimit, $humidity);
|
discover_sensor($valid['sensor'], 'humidity', $device, $oid, $index, 'akcp', $descr, '1', '1', $lowlimit, $warnlowlimit, $limit, $warnlimit, $humidity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# FIXME: EMD "stack" support
|
# FIXME: EMD "stack" support
|
||||||
# FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigHumiOffset.0 ?
|
# FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigHumiOffset.0 ?
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "ipoman")
|
if ($device['os'] == "ipoman")
|
||||||
{
|
{
|
||||||
@ -22,7 +22,7 @@ if ($device['os'] == "ipoman")
|
|||||||
$current_oid = ".1.3.6.1.4.1.2468.1.4.2.1.5.1.1.3.0";
|
$current_oid = ".1.3.6.1.4.1.2468.1.4.2.1.5.1.1.3.0";
|
||||||
$descr = trim(str_replace("\"", "", $descr));
|
$descr = trim(str_replace("\"", "", $descr));
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'humidity', $device, $current_oid, "1", 'ipoman', $descr, '10', '1', $low_limit, NULL, NULL, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'humidity', $device, $current_oid, "1", 'ipoman', $descr, '10', '1', $low_limit, NULL, NULL, $high_limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == 'sentry3')
|
if ($device['os'] == 'sentry3')
|
||||||
{
|
{
|
||||||
@ -29,7 +29,7 @@ if ($device['os'] == 'sentry3')
|
|||||||
$current = snmp_get($device,"$humidity_oid", "-Ovq", "Sentry3-MIB");
|
$current = snmp_get($device,"$humidity_oid", "-Ovq", "Sentry3-MIB");
|
||||||
|
|
||||||
if ($current >= 0) {
|
if ($current >= 0) {
|
||||||
discover_sensor($valid_sensor, 'humidity', $device, $humidity_oid, $index, 'sentry3', $descr, $divisor, $multiplier, $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'humidity', $device, $humidity_oid, $index, 'sentry3', $descr, $divisor, $multiplier, $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($data);
|
unset($data);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## IPMI
|
## IPMI
|
||||||
if ($ipmi['host'] = get_dev_attrib($device,'ipmi_hostname'))
|
if ($ipmi['host'] = get_dev_attrib($device,'ipmi_hostname'))
|
||||||
@ -21,7 +21,7 @@ if ($ipmi['host'] = get_dev_attrib($device,'ipmi_hostname'))
|
|||||||
$index++;
|
$index++;
|
||||||
if (trim($current) != "na" && $ipmi_unit[trim($unit)])
|
if (trim($current) != "na" && $ipmi_unit[trim($unit)])
|
||||||
{
|
{
|
||||||
discover_sensor($valid_sensor, $ipmi_unit[trim($unit)], $device, trim($desc), $index, 'ipmi', trim($desc), '1', '1',
|
discover_sensor($valid['sensor'], $ipmi_unit[trim($unit)], $device, trim($desc), $index, 'ipmi', trim($desc), '1', '1',
|
||||||
(trim($low_limit) == 'na' ? NULL : trim($low_limit)), (trim($low_warn) == 'na' ? NULL : trim($low_warn)),
|
(trim($low_limit) == 'na' ? NULL : trim($low_limit)), (trim($low_warn) == 'na' ? NULL : trim($low_warn)),
|
||||||
(trim($high_warn) == 'na' ? NULL : trim($high_warn)), (trim($high_limit) == 'na' ? NULL : trim($high_limit)),
|
(trim($high_warn) == 'na' ? NULL : trim($high_warn)), (trim($high_limit) == 'na' ? NULL : trim($high_limit)),
|
||||||
$current, 'ipmi');
|
$current, 'ipmi');
|
||||||
|
@ -4,9 +4,9 @@ echo("Power: ");
|
|||||||
|
|
||||||
include_dir("includes/discovery/power");
|
include_dir("includes/discovery/power");
|
||||||
|
|
||||||
if ($debug) { print_r($valid['power']); }
|
if ($debug) { print_r($valid['sensor']['power']); }
|
||||||
|
|
||||||
check_valid_sensors($device, 'power', $valid_sensor);
|
check_valid_sensors($device, 'power', $valid['sensor']);
|
||||||
|
|
||||||
echo("\n");
|
echo("\n");
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
$valid['sensor'] = array();
|
||||||
|
|
||||||
$valid_sensor = array();
|
|
||||||
|
|
||||||
echo("Sensors: ");
|
echo("Sensors: ");
|
||||||
|
|
||||||
@ -18,6 +16,4 @@ include("includes/discovery/current.inc.php");
|
|||||||
include("includes/discovery/power.inc.php");
|
include("includes/discovery/power.inc.php");
|
||||||
include("includes/discovery/fanspeeds.inc.php");
|
include("includes/discovery/fanspeeds.inc.php");
|
||||||
|
|
||||||
unset($valid_sensor);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -4,9 +4,9 @@ echo("Temperatures: ");
|
|||||||
|
|
||||||
include_dir("includes/discovery/temperatures");
|
include_dir("includes/discovery/temperatures");
|
||||||
|
|
||||||
if ($debug) { print_r($valid_sensor['temperature']); }
|
if ($debug) { print_r($valid['sensor']['temperature']); }
|
||||||
|
|
||||||
check_valid_sensors($device, 'temperature', $valid_sensor);
|
check_valid_sensors($device, 'temperature', $valid['sensor']);
|
||||||
|
|
||||||
echo("\n");
|
echo("\n");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "akcp" || $device['os'] == "minkelsrms")
|
if ($device['os'] == "akcp" || $device['os'] == "minkelsrms")
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ if ($device['os'] == "akcp" || $device['os'] == "minkelsrms")
|
|||||||
$limit = snmp_get($device, $limit_oid, "-Oqv", "");
|
$limit = snmp_get($device, $limit_oid, "-Oqv", "");
|
||||||
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
|
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, $temperature_id, 'akcp', $descr, '1', '1', $lowlimit, $low_warn_limit, $warnlimit, $limit, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $temperature_id, 'akcp', $descr, '1', '1', $lowlimit, $low_warn_limit, $warnlimit, $limit, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "aos")
|
if ($device['os'] == "aos")
|
||||||
{
|
{
|
||||||
@ -12,7 +12,7 @@ if ($device['os'] == "aos")
|
|||||||
if ($descr != "" && is_numeric($temperature) && $temperature > "0")
|
if ($descr != "" && is_numeric($temperature) && $temperature > "0")
|
||||||
{
|
{
|
||||||
$temperature_oid = ".1.3.6.1.4.1.18248.1.1.1.0";
|
$temperature_oid = ".1.3.6.1.4.1.18248.1.1.1.0";
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, ".1.3.6.1.4.1.6486.800.1.2.1.16.1.1.1.17.0", "1", 'alcatel-device', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, ".1.3.6.1.4.1.6486.800.1.2.1.16.1.1.1.17.0", "1", 'alcatel-device', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "apc")
|
if ($device['os'] == "apc")
|
||||||
{
|
{
|
||||||
@ -15,7 +15,7 @@ if ($device['os'] == "apc")
|
|||||||
$index = 0;
|
$index = 0;
|
||||||
$descr = "Internal Temperature";
|
$descr = "Internal Temperature";
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, 'apc', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'apc', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
# InRow Chiller.
|
# InRow Chiller.
|
||||||
# A silly check to find out if it's the right hardware.
|
# A silly check to find out if it's the right hardware.
|
||||||
@ -35,7 +35,7 @@ if ($device['os'] == "apc")
|
|||||||
list($oid,$current) = explode(' ',$oids);
|
list($oid,$current) = explode(' ',$oids);
|
||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$sensorType = substr($descr, 0, 2);
|
$sensorType = substr($descr, 0, 2);
|
||||||
echo(discover_sensor($valid_sensor, 'temperature', $device, $oid, '0', $sensorType, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current));
|
echo(discover_sensor($valid['sensor'], 'temperature', $device, $oid, '0', $sensorType, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "areca")
|
if ($device['os'] == "areca")
|
||||||
{
|
{
|
||||||
@ -21,7 +21,7 @@ if ($device['os'] == "areca")
|
|||||||
$descr = "Hard disk $temperature_id";
|
$descr = "Hard disk $temperature_id";
|
||||||
if ($temperature != -128) # -128 = not measured/present
|
if ($temperature != -128) # -128 = not measured/present
|
||||||
{
|
{
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, zeropad($temperature_id), 'areca', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, zeropad($temperature_id), 'areca', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ if ($device['os'] == "areca")
|
|||||||
$oid = "1.3.6.1.4.1.18928.1.2.2.1.10.1.3." . $index;
|
$oid = "1.3.6.1.4.1.18928.1.2.2.1.10.1.3." . $index;
|
||||||
$current = snmp_get($device, $oid, "-Oqv", "");
|
$current = snmp_get($device, $oid, "-Oqv", "");
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, 'areca', trim($descr,'"'), '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'areca', trim($descr,'"'), '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
global $entity_temperature;
|
global $entity_temperature;
|
||||||
|
|
||||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = 'temperature' AND (`sensor_type` = 'cisco-entity-sensor' OR `sensor_type` = 'entity-sensor')"),0) == "0" && ($device['os'] == "ios" || $device['os_group'] == "ios"))
|
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = 'temperature' AND (`sensor_type` = 'cisco-entity-sensor' OR `sensor_type` = 'entity-sensor')"),0) == "0" && ($device['os'] == "ios" || $device['os_group'] == "ios"))
|
||||||
@ -26,7 +26,7 @@ if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` =
|
|||||||
$descr = str_replace("temperature", "", $descr);
|
$descr = str_replace("temperature", "", $descr);
|
||||||
$descr = trim($descr);
|
$descr = trim($descr);
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, 'cisco', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'cisco', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "cometsystem-p85xx")
|
if ($device['os'] == "cometsystem-p85xx")
|
||||||
{
|
{
|
||||||
@ -56,7 +56,7 @@ if ($device['os'] == "cometsystem-p85xx")
|
|||||||
$limit = trim($sensor['limit_high'], ' "');
|
$limit = trim($sensor['limit_high'], ' "');
|
||||||
$temperature = $sensor['temp_intval'];
|
$temperature = $sensor['temp_intval'];
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, $temperature_id, 'cometsystem-p85xx', $descr, '10', '1', $lowlimit, NULL, NULL, $limit, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $temperature_id, 'cometsystem-p85xx', $descr, '10', '1', $lowlimit, NULL, NULL, $limit, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if (strstr($device['hardware'], "dell"))
|
if (strstr($device['hardware'], "dell"))
|
||||||
{
|
{
|
||||||
@ -18,7 +18,7 @@ if (strstr($device['hardware'], "dell"))
|
|||||||
$fulloid = ".1.3.6.1.4.1.674.10892.1.700.20.1.6.$oid";
|
$fulloid = ".1.3.6.1.4.1.674.10892.1.700.20.1.6.$oid";
|
||||||
$temp = snmp_get($device, $fulloid, "-Oqv");
|
$temp = snmp_get($device, $fulloid, "-Oqv");
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $fulloid, $oid, 'dell', $descr, '10', '1', NULL, NULL, NULL, NULL, $temp);
|
discover_sensor($valid['sensor'], 'temperature', $device, $fulloid, $oid, 'dell', $descr, '10', '1', NULL, NULL, NULL, NULL, $temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
### Force10 C-Series
|
### Force10 C-Series
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ if ($device['os'] == "ftos" || $device['os_group'] == "ftos")
|
|||||||
$entry['oid'] = ".1.3.6.1.4.1.6027.3.8.1.2.1.1.5.".$index;
|
$entry['oid'] = ".1.3.6.1.4.1.6027.3.8.1.2.1.1.5.".$index;
|
||||||
$entry['current'] = $entry['chSysCardTemp'];
|
$entry['current'] = $entry['chSysCardTemp'];
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $entry['oid'], $index, 'ftos-cseries', $entry['descr'], '1', '1', NULL, NULL, NULL, NULL, $entry['current']);
|
discover_sensor($valid['sensor'], 'temperature', $device, $entry['oid'], $index, 'ftos-cseries', $entry['descr'], '1', '1', NULL, NULL, NULL, NULL, $entry['current']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
### Force10 E-Series
|
### Force10 E-Series
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ if ($device['os'] == "ftos" || $device['os_group'] == "ftos")
|
|||||||
$oid = ".1.3.6.1.4.1.6027.3.1.1.2.3.1.8.".$index;
|
$oid = ".1.3.6.1.4.1.6027.3.1.1.2.3.1.8.".$index;
|
||||||
$current = $entry['chSysCardUpperTemp'];
|
$current = $entry['chSysCardUpperTemp'];
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, 'ftos-eseries', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'ftos-eseries', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
### Force10 S-Series
|
### Force10 S-Series
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ if ($device['os'] == "ftos" || $device['os_group'] == "ftos")
|
|||||||
$oid = ".1.3.6.1.4.1.6027.3.10.1.2.2.1.14.".$index;
|
$oid = ".1.3.6.1.4.1.6027.3.10.1.2.2.1.14.".$index;
|
||||||
$current = $entry['chStackUnitTemp'];
|
$current = $entry['chStackUnitTemp'];
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, 'ftos-sseries', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'ftos-sseries', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# FIXME: EMD "stack" support?
|
# FIXME: EMD "stack" support?
|
||||||
# FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigTempOffset.0 ?
|
# FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigTempOffset.0 ?
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "ipoman")
|
if ($device['os'] == "ipoman")
|
||||||
{
|
{
|
||||||
@ -22,7 +22,7 @@ if ($device['os'] == "ipoman")
|
|||||||
$current_oid = ".1.3.6.1.4.1.2468.1.4.2.1.5.1.1.2.0";
|
$current_oid = ".1.3.6.1.4.1.2468.1.4.2.1.5.1.1.2.0";
|
||||||
$descr = trim(str_replace("\"", "", $descr));
|
$descr = trim(str_replace("\"", "", $descr));
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $current_oid, "1", 'ipoman', $descr, '10', '1', $low_limit, NULL, NULL, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $current_oid, "1", 'ipoman', $descr, '10', '1', $low_limit, NULL, NULL, $high_limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "ironware")
|
if ($device['os'] == "ironware")
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ if ($device['os'] == "ironware")
|
|||||||
|
|
||||||
$current = $temperature / 2;
|
$current = $temperature / 2;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, $oid, 'ironware', $descr, '2', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $oid, 'ironware', $descr, '2', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "junos" || $device['os_group'] == "junos")
|
if ($device['os'] == "junos" || $device['os_group'] == "junos")
|
||||||
{
|
{
|
||||||
@ -26,7 +26,7 @@ if ($device['os'] == "junos" || $device['os_group'] == "junos")
|
|||||||
$descr = str_replace("sensor", "", $descr);
|
$descr = str_replace("sensor", "", $descr);
|
||||||
$descr = trim($descr);
|
$descr = trim($descr);
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, $oid, 'junos', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $oid, 'junos', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## JunOSe Temperatures
|
## JunOSe Temperatures
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ if ($device['os'] == "junose")
|
|||||||
$oid = ".1.3.6.1.4.1.4874.2.2.2.1.9.4.1.3.".$index;
|
$oid = ".1.3.6.1.4.1.4874.2.2.2.1.9.4.1.3.".$index;
|
||||||
$current = $entry['juniSystemTempValue'];
|
$current = $entry['juniSystemTempValue'];
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, 'junose', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'junose', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "linux")
|
if ($device['os'] == "linux")
|
||||||
{
|
{
|
||||||
@ -23,7 +23,7 @@ if ($device['os'] == "linux")
|
|||||||
$descr = trim($descr);
|
$descr = trim($descr);
|
||||||
if ($temperature != "0" && $temperature <= "1000")
|
if ($temperature != "0" && $temperature <= "1000")
|
||||||
{
|
{
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, $temperature_id, 'lmsensors', $descr, '1000', '1', NULL, NULL, NULL, NULL, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $temperature_id, 'lmsensors', $descr, '1000', '1', NULL, NULL, NULL, NULL, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os_group'] == "unix")
|
if ($device['os_group'] == "unix")
|
||||||
{
|
{
|
||||||
@ -20,7 +20,7 @@ if ($device['os_group'] == "unix")
|
|||||||
$descr_query = $config['snmpget'] . " -M " . $config['mibdir'] . " -".$device['snmpver']." -m SNMPv2-SMI -Osqn -c ".$device['community']." ".$device['transport'].':'.$device['hostname'].":".$device['port']." .1.3.6.1.4.1.2021.7891.$oid.2.1 | sed s/.1.3.6.1.4.1.2021.7891.$oid.2.1\ //";
|
$descr_query = $config['snmpget'] . " -M " . $config['mibdir'] . " -".$device['snmpver']." -m SNMPv2-SMI -Osqn -c ".$device['community']." ".$device['transport'].':'.$device['hostname'].":".$device['port']." .1.3.6.1.4.1.2021.7891.$oid.2.1 | sed s/.1.3.6.1.4.1.2021.7891.$oid.2.1\ //";
|
||||||
$descr = trim(str_replace("\"", "", shell_exec($descr_query)));
|
$descr = trim(str_replace("\"", "", shell_exec($descr_query)));
|
||||||
$fulloid = ".1.3.6.1.4.1.2021.7891.$oid.101.1";
|
$fulloid = ".1.3.6.1.4.1.2021.7891.$oid.101.1";
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $fulloid, $oid, 'observium', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $fulloid, $oid, 'observium', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "papouch-tme")
|
if ($device['os'] == "papouch-tme")
|
||||||
{
|
{
|
||||||
@ -13,7 +13,7 @@ if ($device['os'] == "papouch-tme")
|
|||||||
{
|
{
|
||||||
$temperature_oid = ".1.3.6.1.4.1.18248.1.1.1.0";
|
$temperature_oid = ".1.3.6.1.4.1.18248.1.1.1.0";
|
||||||
$descr = trim(str_replace("\"", "", $descr));
|
$descr = trim(str_replace("\"", "", $descr));
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, "1", 'papouch-tme', $descr, '10', '1', NULL, NULL, NULL, NULL, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, "1", 'papouch-tme', $descr, '10', '1', NULL, NULL, NULL, NULL, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "powerconnect")
|
if ($device['os'] == "powerconnect")
|
||||||
{
|
{
|
||||||
@ -16,7 +16,7 @@ if ($device['os'] == "powerconnect")
|
|||||||
$index = "0";
|
$index = "0";
|
||||||
$descr = "Internal Temperature";
|
$descr = "Internal Temperature";
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, $type, $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
|
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
|
||||||
{
|
{
|
||||||
@ -20,7 +20,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$temperature = snmp_get($device, $temperature_oid, "-Ovq");
|
$temperature = snmp_get($device, $temperature_oid, "-Ovq");
|
||||||
$descr = "Battery" . (count(explode("\n",$oids)) == 1 ? '' : ' ' . ($temperature_id+1));
|
$descr = "Battery" . (count(explode("\n",$oids)) == 1 ? '' : ' ' . ($temperature_id+1));
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, $temperature_id, 'rfc1628', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $temperature_id, 'rfc1628', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "sentry3")
|
if ($device['os'] == "sentry3")
|
||||||
{
|
{
|
||||||
@ -29,7 +29,7 @@ if ($device['os'] == "sentry3")
|
|||||||
$current = snmp_get($device,"$temperature_oid", "-Ovq", "Sentry3-MIB") / $divisor;
|
$current = snmp_get($device,"$temperature_oid", "-Ovq", "Sentry3-MIB") / $divisor;
|
||||||
|
|
||||||
if ($current >= 0) {
|
if ($current >= 0) {
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, $index, 'sentry3', $descr, $divisor, $multiplier, $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $index, 'sentry3', $descr, $divisor, $multiplier, $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($data);
|
unset($data);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "linux")
|
if ($device['os'] == "linux")
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@ if ($device['os'] == "linux")
|
|||||||
if ($monitor == 'true')
|
if ($monitor == 'true')
|
||||||
{
|
{
|
||||||
$descr = trim(str_ireplace("temperature", "", $descr));
|
$descr = trim(str_ireplace("temperature", "", $descr));
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, trim($index,'.'), 'supermicro', $descr, $divisor, '1', NULL, NULL, NULL, $limit, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, trim($index,'.'), 'supermicro', $descr, $divisor, '1', NULL, NULL, NULL, $limit, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "powerware")
|
if ($device['os'] == "powerware")
|
||||||
{
|
{
|
||||||
@ -25,7 +25,7 @@ if ($device['os'] == "powerware")
|
|||||||
$temperature = snmp_get($device, $temperature_oid, "-Ovq");
|
$temperature = snmp_get($device, $temperature_oid, "-Ovq");
|
||||||
$descr = "Ambient" . (count(explode("\n",$oids)) == 1 ? '' : ' ' . ($temperature_id+1));
|
$descr = "Ambient" . (count(explode("\n",$oids)) == 1 ? '' : ' ' . ($temperature_id+1));
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $temperature_oid, '1.6.1.'.$temperature_id, 'powerware', $descr, '1', '1', $lowlimit, NULL, NULL, $highlimit, $temperature);
|
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, '1.6.1.'.$temperature_id, 'powerware', $descr, '1', '1', $lowlimit, NULL, NULL, $highlimit, $temperature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == 'ies')
|
if ($device['os'] == 'ies')
|
||||||
{
|
{
|
||||||
@ -20,7 +20,7 @@ if ($device['os'] == 'ies')
|
|||||||
$oid = ".1.3.6.1.4.1.890.1.5.1.1.6.1.2.".$index;
|
$oid = ".1.3.6.1.4.1.890.1.5.1.1.6.1.2.".$index;
|
||||||
$current = $entry['accessSwitchSysTempCurValue'];
|
$current = $entry['accessSwitchSysTempCurValue'];
|
||||||
$divisor = '1';
|
$divisor = '1';
|
||||||
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, 'zyxel-ies', $descr, '1', '1', NULL, $entry['accessSwitchSysTempHighThresh'], NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'zyxel-ies', $descr, '1', '1', NULL, $entry['accessSwitchSysTempHighThresh'], NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ echo("Voltages: ");
|
|||||||
|
|
||||||
include_dir("includes/discovery/voltages");
|
include_dir("includes/discovery/voltages");
|
||||||
|
|
||||||
if ($debug) { print_r($valid['voltage']); }
|
if ($debug) { print_r($valid['sensor']['voltage']); }
|
||||||
|
|
||||||
check_valid_sensors($device, 'voltage', $valid_sensor);
|
check_valid_sensors($device, 'voltage', $valid['sensor']);
|
||||||
|
|
||||||
echo("\n");
|
echo("\n");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## APC Voltages
|
## APC Voltages
|
||||||
if ($device['os'] == "apc")
|
if ($device['os'] == "apc")
|
||||||
@ -21,7 +21,7 @@ if ($device['os'] == "apc")
|
|||||||
$oid = "1.3.6.1.4.1.318.1.1.8.5.3.3.1.3." . $index . ".1.1";
|
$oid = "1.3.6.1.4.1.318.1.1.8.5.3.3.1.3." . $index . ".1.1";
|
||||||
$descr = "Input Feed " . chr(64+$index);
|
$descr = "Input Feed " . chr(64+$index);
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $oid, "3.3.1.3.$index", $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $oid, "3.3.1.3.$index", $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ if ($device['os'] == "apc")
|
|||||||
$oid = "1.3.6.1.4.1.318.1.1.8.5.4.3.1.3." . $index . ".1.1";
|
$oid = "1.3.6.1.4.1.318.1.1.8.5.4.3.1.3." . $index . ".1.1";
|
||||||
$descr = "Output Feed"; if (count(explode("\n", $oids)) > 1) { $descr .= " $index"; }
|
$descr = "Output Feed"; if (count(explode("\n", $oids)) > 1) { $descr .= " $index"; }
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $oid, "4.3.1.3.$index", $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $oid, "4.3.1.3.$index", $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ if ($device['os'] == "apc")
|
|||||||
$index = "3.2.1.0";
|
$index = "3.2.1.0";
|
||||||
$descr = "Input";
|
$descr = "Input";
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.4.2.1.0", "-OsqnU", "");
|
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.4.2.1.0", "-OsqnU", "");
|
||||||
@ -70,7 +70,7 @@ if ($device['os'] == "apc")
|
|||||||
$index = "4.2.1.0";
|
$index = "4.2.1.0";
|
||||||
$descr = "Output";
|
$descr = "Output";
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
#PDU
|
#PDU
|
||||||
@ -86,7 +86,7 @@ if ($device['os'] == "apc")
|
|||||||
$index = "1";
|
$index = "1";
|
||||||
$descr = "Input";
|
$descr = "Input";
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## Areca Voltages
|
## Areca Voltages
|
||||||
if ($device['os'] == "areca")
|
if ($device['os'] == "areca")
|
||||||
@ -22,7 +22,7 @@ if ($device['os'] == "areca")
|
|||||||
$current = snmp_get($device, $oid, "-Oqv", "") / $divisor;
|
$current = snmp_get($device, $oid, "-Oqv", "") / $divisor;
|
||||||
if ($descr != '"Battery Status"' || $current != 0.255) # FIXME not sure if this is supposed to be a voltage, but without BBU it's 225, then ignore.
|
if ($descr != '"Battery Status"' || $current != 0.255) # FIXME not sure if this is supposed to be a voltage, but without BBU it's 225, then ignore.
|
||||||
{
|
{
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $oid, $index, $type, trim($descr,'"'), $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, trim($descr,'"'), $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "gamatronicups")
|
if ($device['os'] == "gamatronicups")
|
||||||
{
|
{
|
||||||
@ -15,7 +15,7 @@ if ($device['os'] == "gamatronicups")
|
|||||||
$lowlimit = 0;
|
$lowlimit = 0;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
||||||
}
|
}
|
||||||
|
|
||||||
for($i = 1; $i <= 3 ;$i++)
|
for($i = 1; $i <= 3 ;$i++)
|
||||||
@ -29,7 +29,7 @@ if ($device['os'] == "gamatronicups")
|
|||||||
$lowlimit = 0;
|
$lowlimit = 0;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor, $cache;
|
|
||||||
|
|
||||||
## IPOMANII-MIB
|
## IPOMANII-MIB
|
||||||
if ($device['os'] == "ipoman")
|
if ($device['os'] == "ipoman")
|
||||||
@ -37,7 +37,7 @@ if ($device['os'] == "ipoman")
|
|||||||
$low_limit = $entry['inletConfigVoltageLow'];
|
$low_limit = $entry['inletConfigVoltageLow'];
|
||||||
$high_limit = $entry['inletConfigVoltageHigh'];
|
$high_limit = $entry['inletConfigVoltageHigh'];
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, 'ipoman', $descr, $divisor, '1', $low_limit, NULL, NULL, $high_limit, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, 'ipoman', $descr, $divisor, '1', $low_limit, NULL, NULL, $high_limit, $current);
|
||||||
# FIXME: iPoMan 1201 also says it has 2 inlets, at least until firmware 1.06 - wtf?
|
# FIXME: iPoMan 1201 also says it has 2 inlets, at least until firmware 1.06 - wtf?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## LMSensors Voltages
|
## LMSensors Voltages
|
||||||
if ($device['os'] == "linux")
|
if ($device['os'] == "linux")
|
||||||
{
|
{
|
||||||
@ -22,7 +20,7 @@ if ($device['os'] == "linux")
|
|||||||
$oid = "1.3.6.1.4.1.2021.13.16.4.1.3." . $index;
|
$oid = "1.3.6.1.4.1.2021.13.16.4.1.3." . $index;
|
||||||
$current = snmp_get($device, $oid, "-Oqv", "LM-SENSORS-MIB") / $divisor;
|
$current = snmp_get($device, $oid, "-Oqv", "LM-SENSORS-MIB") / $divisor;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## MGE UPS Voltages
|
## MGE UPS Voltages
|
||||||
if ($device['os'] == "mgeups")
|
if ($device['os'] == "mgeups")
|
||||||
@ -24,7 +24,7 @@ if ($device['os'] == "mgeups")
|
|||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = $i;
|
$index = $i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = trim(snmp_walk($device, "mgeinputVoltage", "-OsqnU", "MG-SNMP-UPS-MIB"));
|
$oids = trim(snmp_walk($device, "mgeinputVoltage", "-OsqnU", "MG-SNMP-UPS-MIB"));
|
||||||
@ -45,7 +45,7 @@ if ($device['os'] == "mgeups")
|
|||||||
$divisor = 10;
|
$divisor = 10;
|
||||||
$index = 100+$i;
|
$index = 100+$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "netvision")
|
if ($device['os'] == "netvision")
|
||||||
{
|
{
|
||||||
@ -15,7 +15,7 @@ if ($device['os'] == "netvision")
|
|||||||
$lowlimit = 0;
|
$lowlimit = 0;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
||||||
|
|
||||||
for($i = 1; $i <= 3 ;$i++)
|
for($i = 1; $i <= 3 ;$i++)
|
||||||
{
|
{
|
||||||
@ -28,7 +28,7 @@ if ($device['os'] == "netvision")
|
|||||||
$lowlimit = 0;
|
$lowlimit = 0;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
||||||
}
|
}
|
||||||
|
|
||||||
for($i = 1; $i <= 3 ;$i++)
|
for($i = 1; $i <= 3 ;$i++)
|
||||||
@ -42,7 +42,7 @@ if ($device['os'] == "netvision")
|
|||||||
$lowlimit = 0;
|
$lowlimit = 0;
|
||||||
$limit = NULL;
|
$limit = NULL;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## RFC1628 UPS Voltages
|
## RFC1628 UPS Voltages
|
||||||
#if ($device['os'] == "netmanplus" || $device['os'] == "deltaups")
|
#if ($device['os'] == "netmanplus" || $device['os'] == "deltaups")
|
||||||
@ -27,7 +27,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$type = "rfc1628";
|
$type = "rfc1628";
|
||||||
$index = "1.2.5.".$volt_id;
|
$index = "1.2.5.".$volt_id;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
||||||
$index = $i;
|
$index = $i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.3.2.0", "-OsqnU"));
|
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.3.2.0", "-OsqnU"));
|
||||||
@ -59,7 +59,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
||||||
$index = 100+$i;
|
$index = 100+$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.5.2.0", "-OsqnU"));
|
$oids = trim(snmp_walk($device, "1.3.6.1.2.1.33.1.5.2.0", "-OsqnU"));
|
||||||
@ -75,7 +75,7 @@ if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'
|
|||||||
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
||||||
$index = 200+$i;
|
$index = 200+$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
if ($device['os'] == "sentry3")
|
if ($device['os'] == "sentry3")
|
||||||
{
|
{
|
||||||
@ -22,7 +22,7 @@ if ($device['os'] == "sentry3")
|
|||||||
$oid = "1.3.6.1.4.1.1718.3.2.2.1.11.1." . $index;
|
$oid = "1.3.6.1.4.1.1718.3.2.2.1.11.1." . $index;
|
||||||
$current = snmp_get($device, $oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $oid, "-Oqv") / $divisor;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## Supermicro Voltages
|
## Supermicro Voltages
|
||||||
if ($device['os'] == "linux")
|
if ($device['os'] == "linux")
|
||||||
@ -36,7 +36,7 @@ if ($device['os'] == "linux")
|
|||||||
|
|
||||||
if ($monitor == 'true')
|
if ($monitor == 'true')
|
||||||
{
|
{
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', $lowlimit, NULL, NULL, $limit, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', $lowlimit, NULL, NULL, $limit, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $valid_sensor;
|
|
||||||
|
|
||||||
## XUPS-MIB
|
## XUPS-MIB
|
||||||
if ($device['os'] == "powerware")
|
if ($device['os'] == "powerware")
|
||||||
@ -26,7 +26,7 @@ if ($device['os'] == "powerware")
|
|||||||
$type = "xups";
|
$type = "xups";
|
||||||
$index = '1.2.5.'.$volt_id;
|
$index = '1.2.5.'.$volt_id;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $volt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ if ($device['os'] == "powerware")
|
|||||||
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
||||||
$index = '3.4.1.2.'.$i;
|
$index = '3.4.1.2.'.$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
# XUPS-MIB::xupsOutputNumPhases.0 = INTEGER: 1
|
# XUPS-MIB::xupsOutputNumPhases.0 = INTEGER: 1
|
||||||
@ -61,7 +61,7 @@ if ($device['os'] == "powerware")
|
|||||||
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
||||||
$index = '4.4.1.2.'.$i;
|
$index = '4.4.1.2.'.$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
# XUPS-MIB::xupsBypassNumPhases.0 = INTEGER: 1
|
# XUPS-MIB::xupsBypassNumPhases.0 = INTEGER: 1
|
||||||
@ -77,7 +77,7 @@ if ($device['os'] == "powerware")
|
|||||||
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
$current = snmp_get($device, $volt_oid, "-Oqv") / $divisor;
|
||||||
$index = '5.3.1.2.'.$i;
|
$index = '5.3.1.2.'.$i;
|
||||||
|
|
||||||
discover_sensor($valid_sensor, 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, $type, $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user