mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
cpu polling support for Juniper JunOS. tested on m7i only
git-svn-id: http://www.observium.org/svn/observer/trunk@910 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -60,6 +60,9 @@ $config['bad_if'] = array("voip-null", "virtual-", "unrouted", "eobc", "mpls", "
|
|||||||
|
|
||||||
$config['bad_if_regexp'] = array("/serial[0-9]:/");
|
$config['bad_if_regexp'] = array("/serial[0-9]:/");
|
||||||
|
|
||||||
|
$config['processor_filter'][] = "An electronic chip that makes the computer work.";
|
||||||
|
|
||||||
|
|
||||||
# Sensors
|
# Sensors
|
||||||
|
|
||||||
$config['allow_entity_sensor']['amperes'] = 1;
|
$config['allow_entity_sensor']['amperes'] = 1;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ echo("Processors : ");
|
|||||||
|
|
||||||
include("processors-ios.inc.php");
|
include("processors-ios.inc.php");
|
||||||
include("processors-junose.inc.php");
|
include("processors-junose.inc.php");
|
||||||
|
include("processors-junos.inc.php");
|
||||||
include("processors-hrdevice.inc.php");
|
include("processors-hrdevice.inc.php");
|
||||||
include("processors-ironware.inc.php");
|
include("processors-ironware.inc.php");
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,27 @@ function snmpwalk_cache_oid($poll_oid, $device, $array, $mib = NULL, $mibdir = N
|
|||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function snmpwalk_cache_multi_oid($device, $oid, $array, $mib = NULL, $mibdir = NULL) {
|
||||||
|
$data = snmp_walk($device, $oid, "-OQUs", $mib, $mibdir);
|
||||||
|
foreach(explode("\n", $data) as $entry) {
|
||||||
|
list($oid,$value) = explode("=", $entry);
|
||||||
|
$oid = trim($oid); $value = trim($value);
|
||||||
|
$oid_parts = explode(".", $oid);
|
||||||
|
$oid = $oid_parts['0'];
|
||||||
|
$index = $oid_parts['1'];
|
||||||
|
if(isset($oid_parts['2'])) { $index .= ".".$oid_parts['2']; }
|
||||||
|
if(isset($oid_parts['3'])) { $index .= ".".$oid_parts['3']; }
|
||||||
|
if(isset($oid_parts['4'])) { $index .= ".".$oid_parts['4']; }
|
||||||
|
if(isset($oid_parts['5'])) { $index .= ".".$oid_parts['5']; }
|
||||||
|
if(isset($oid_parts['6'])) { $index .= ".".$oid_parts['6']; }
|
||||||
|
if (!strstr($value, "at this OID") && isset($oid) && isset($index)) {
|
||||||
|
$array[$device[device_id]][$index][$oid] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $array;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function snmpwalk_cache_double_oid($device, $oid, $array, $mib = NULL, $mibdir = NULL) {
|
function snmpwalk_cache_double_oid($device, $oid, $array, $mib = NULL, $mibdir = NULL) {
|
||||||
$data = snmp_walk($device, $oid, "-OQUs", $mib, $mibdir);
|
$data = snmp_walk($device, $oid, "-OQUs", $mib, $mibdir);
|
||||||
foreach(explode("\n", $data) as $entry) {
|
foreach(explode("\n", $data) as $entry) {
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ $devices_polled = 0;
|
|||||||
|
|
||||||
echo("includes/discovery/".$type.".php \n");
|
echo("includes/discovery/".$type.".php \n");
|
||||||
|
|
||||||
|
$debug = 1;
|
||||||
|
|
||||||
|
|
||||||
$device_query = mysql_query("SELECT * FROM `devices` WHERE status = '1' $where ORDER BY device_id ASC");
|
$device_query = mysql_query("SELECT * FROM `devices` WHERE status = '1' $where ORDER BY device_id ASC");
|
||||||
while ($device = mysql_fetch_array($device_query)) {
|
while ($device = mysql_fetch_array($device_query)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user