mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
/// -> //
git-svn-id: http://www.observium.org/svn/observer/trunk@3240 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -17,7 +17,7 @@ if ($device['os'] == "apc")
|
||||
}
|
||||
|
||||
# Environmental monitoring on UPSes etc
|
||||
/// FIXME emConfigProbesTable may also be used? But not filled out on my device...
|
||||
// FIXME emConfigProbesTable may also be used? But not filled out on my device...
|
||||
$apc_env_data = snmpwalk_cache_oid($device, "iemConfigProbesTable", array(), "PowerNet-MIB");
|
||||
$apc_env_data = snmpwalk_cache_oid($device, "iemStatusProbesTable", $apc_env_data, "PowerNet-MIB");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
/// FIXME - dbFacile and fewer SNMP_GETs
|
||||
// FIXME - dbFacile and fewer SNMP_GETs
|
||||
|
||||
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_group'] == "cisco"))
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
/// Force10 C-Series
|
||||
// Force10 C-Series
|
||||
|
||||
#F10-C-SERIES-CHASSIS-MIB::chSysCardType.1 = INTEGER: lc4802E48TB(1024)
|
||||
#F10-C-SERIES-CHASSIS-MIB::chSysCardType.2 = INTEGER: lc0810EX8PB(2049)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
/// Force10 E-Series
|
||||
// Force10 E-Series
|
||||
|
||||
#F10-CHASSIS-MIB::chSysCardType.1 = INTEGER: rpmCardEF3(206)
|
||||
#F10-CHASSIS-MIB::chSysCardType.3 = INTEGER: lc2401E24PG3(69)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
/// Force10 S-Series
|
||||
// Force10 S-Series
|
||||
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitTemp.1 = Gauge32: 47
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitModelID.1 = STRING: S25-01-GE-24V
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/// FIXME: EMD "stack" support?
|
||||
/// FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigTempOffset.0 ?
|
||||
// FIXME: EMD "stack" support?
|
||||
// FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigTempOffset.0 ?
|
||||
|
||||
if ($device['os'] == "ipoman")
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
/// JunOSe Temperatures
|
||||
// JunOSe Temperatures
|
||||
|
||||
if ($device['os'] == "junose")
|
||||
{
|
||||
@@ -14,7 +14,7 @@ if ($device['os'] == "junose")
|
||||
{
|
||||
$entPhysicalIndex = snmp_get($device, "juniSystemTempPhysicalIndex.".$index, "-Oqv", "Juniper-System-MIB", "+".$config['install_dir']."/mibs/junose");
|
||||
$descr = snmp_get($device, "entPhysicalDescr.".$entPhysicalIndex, "-Oqv", "ENTITY-MIB");
|
||||
$descr = preg_replace("/^Juniper\ [0-9a-zA-Z\-]+/", "", $descr); /// Wipe out ugly Juniper crap. Why put vendor and model in here? Idiots!
|
||||
$descr = preg_replace("/^Juniper\ [0-9a-zA-Z\-]+/", "", $descr); // Wipe out ugly Juniper crap. Why put vendor and model in here? Idiots!
|
||||
$descr = str_replace("temperature sensor on", "", trim($descr));
|
||||
$oid = ".1.3.6.1.4.1.4874.2.2.2.1.9.4.1.3.".$index;
|
||||
$current = $entry['juniSystemTempValue'];
|
||||
|
||||
@@ -9,7 +9,7 @@ if ($device['os'] == "mgeups")
|
||||
echo("MGE UPS External ");
|
||||
|
||||
# Environmental monitoring on UPSes etc
|
||||
/// FIXME upsmgConfigEnvironmentTable and upsmgEnvironmentSensorTable are used but there are others ...
|
||||
// FIXME upsmgConfigEnvironmentTable and upsmgEnvironmentSensorTable are used but there are others ...
|
||||
$mge_env_data = snmpwalk_cache_oid($device, "upsmgConfigEnvironmentTable", array(), "MG-SNMP-UPS-MIB");
|
||||
$mge_env_data = snmpwalk_cache_oid($device, "upsmgEnvironmentSensorTable", $mge_env_data, "MG-SNMP-UPS-MIB");
|
||||
|
||||
@@ -51,7 +51,7 @@ upsmgEnvironmentInput2State.1 = open
|
||||
$high_limit = $mge_env_data[$index]['upsmgConfigTemperatureHigh'];
|
||||
$hysteresis = $mge_env_data[$index]['upsmgConfigTemperatureHysteresis'];
|
||||
|
||||
/// FIXME warninglevels might need some other calculation in stead of hysteresis
|
||||
// FIXME warninglevels might need some other calculation in stead of hysteresis
|
||||
$low_warn_limit = $low_limit + $hysteresis;
|
||||
$high_warn_limit = $high_limit - $hysteresis;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
if ($device['os_group'] == "unix")
|
||||
{
|
||||
/// FIXME snmp_walk
|
||||
// FIXME snmp_walk
|
||||
# ObserverNMS-style temperature
|
||||
$cmd = $config['snmpwalk'] . " -M " . $config['mibdir'] . " -M " . $config['mibdir'] . " -m SNMPv2-SMI -Osqn -CI " . snmp_gen_auth($device) . " " . $device['transport'].":".$device['hostname'].":".$device['port']." .1.3.6.1.4.1.2021.7891 | sed s/.1.3.6.1.4.1.2021.7891.// | grep '.1.1 ' | grep -v '.101.' | cut -d'.' -f 1";
|
||||
if ($debug) { echo("$cmd\n"); }
|
||||
@@ -14,7 +14,7 @@ if ($device['os_group'] == "unix")
|
||||
$oid = trim($oid);
|
||||
if ($oid != "")
|
||||
{
|
||||
/// FIXME snmp_get
|
||||
// FIXME snmp_get
|
||||
$descr_query = $config['snmpget'] . " -M " . $config['mibdir'] . " -m SNMPv2-SMI -Osqn " . snmp_gen_auth($device) . " " . $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)));
|
||||
$fulloid = ".1.3.6.1.4.1.2021.7891.$oid.101.1";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/// RFC1628 UPS
|
||||
// RFC1628 UPS
|
||||
if (isset($config['modules_compat']['rfc1628'][$device['os']]) && $config['modules_compat']['rfc1628'][$device['os']])
|
||||
{
|
||||
$oids = snmp_walk($device, "1.3.6.1.2.1.33.1.2.7", "-Osqn", "UPS-MIB");
|
||||
|
||||
Reference in New Issue
Block a user