mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Apply "Squiz" code style on old (pre-2014) files
This commit is contained in:
@@ -1,54 +1,50 @@
|
||||
<?php
|
||||
|
||||
$poll_device['sysDescr'] = str_replace("IOS (tm)", "IOS (tm),", $poll_device['sysDescr']);
|
||||
$poll_device['sysDescr'] = str_replace(") RELEASE", "), RELEASE", $poll_device['sysDescr']);
|
||||
$poll_device['sysDescr'] = str_replace('IOS (tm)', 'IOS (tm),', $poll_device['sysDescr']);
|
||||
$poll_device['sysDescr'] = str_replace(') RELEASE', '), RELEASE', $poll_device['sysDescr']);
|
||||
|
||||
echo("\n".$poll_device['sysDescr']."\n");
|
||||
echo "\n".$poll_device['sysDescr']."\n";
|
||||
|
||||
list(,$features,$version) = explode(",", $poll_device['sysDescr']);
|
||||
list(,$features,$version) = explode(',', $poll_device['sysDescr']);
|
||||
|
||||
$version = str_replace(" Version ", "", $version);
|
||||
list(,$features) = explode("(", $features);
|
||||
list(,$features) = explode("-", $features);
|
||||
$version = str_replace(' Version ', '', $version);
|
||||
list(,$features) = explode('(', $features);
|
||||
list(,$features) = explode('-', $features);
|
||||
|
||||
$oids = "entPhysicalModelName.1 entPhysicalContainedIn.1 entPhysicalName.1 entPhysicalSoftwareRev.1 entPhysicalModelName.1001 entPhysicalContainedIn.1001 cardDescr.1 cardSlotNumber.1";
|
||||
$oids = 'entPhysicalModelName.1 entPhysicalContainedIn.1 entPhysicalName.1 entPhysicalSoftwareRev.1 entPhysicalModelName.1001 entPhysicalContainedIn.1001 cardDescr.1 cardSlotNumber.1';
|
||||
|
||||
$data = snmp_get_multi($device, $oids, "-OQUs", "ENTITY-MIB:OLD-CISCO-CHASSIS-MIB");
|
||||
$data = snmp_get_multi($device, $oids, '-OQUs', 'ENTITY-MIB:OLD-CISCO-CHASSIS-MIB');
|
||||
|
||||
if ($data[1]['entPhysicalContainedIn'] == "0")
|
||||
{
|
||||
if (isset($data[1]['entPhysicalSoftwareRev']) && $data[1]['entPhysicalSoftwareRev'] != "")
|
||||
{
|
||||
$version = $data[1]['entPhysicalSoftwareRev'];
|
||||
}
|
||||
if (isset($data[1]['entPhysicalName']) && $data[1]['entPhysicalName'] != "")
|
||||
{
|
||||
$hardware = $data[1]['entPhysicalName'];
|
||||
}
|
||||
if (isset($data[1]['entPhysicalModelName']) && $data[1]['entPhysicalModelName'] != "")
|
||||
{
|
||||
$hardware = $data[1]['entPhysicalModelName'];
|
||||
}
|
||||
if ($data[1]['entPhysicalContainedIn'] == '0') {
|
||||
if (isset($data[1]['entPhysicalSoftwareRev']) && $data[1]['entPhysicalSoftwareRev'] != '') {
|
||||
$version = $data[1]['entPhysicalSoftwareRev'];
|
||||
}
|
||||
|
||||
if (isset($data[1]['entPhysicalName']) && $data[1]['entPhysicalName'] != '') {
|
||||
$hardware = $data[1]['entPhysicalName'];
|
||||
}
|
||||
|
||||
if (isset($data[1]['entPhysicalModelName']) && $data[1]['entPhysicalModelName'] != '') {
|
||||
$hardware = $data[1]['entPhysicalModelName'];
|
||||
}
|
||||
}
|
||||
|
||||
list($version) = explode(",", $version);
|
||||
list($version) = explode(',', $version);
|
||||
|
||||
# if ($slot_1 == "-1" && strpos($descr_1, "No") === FALSE) { $ciscomodel = $descr_1; }
|
||||
# if (($contained_1 == "0" || $name_1 == "Chassis") && strpos($model_1, "No") === FALSE) { $ciscomodel = $model_1; list($version_1) = explode(",",$ver_1); }
|
||||
# if ($contained_1001 == "0" && strpos($model_1001, "No") === FALSE) { $ciscomodel = $model_1001; }
|
||||
# $ciscomodel = str_replace("\"","",$ciscomodel);
|
||||
# if ($ciscomodel) { $hardware = $ciscomodel; unset($ciscomodel); }
|
||||
|
||||
if($hardware == "") { $hardware = snmp_get($device, "sysObjectID.0", "-Osqv", "SNMPv2-MIB:CISCO-PRODUCTS-MIB:ALTEON-ROOT-MIB"); }
|
||||
|
||||
#if(isset($cisco_hardware_oids[$poll_device['sysObjectID']])) { $hardware = $cisco_hardware_oids[$poll_device['sysObjectID']]; }
|
||||
|
||||
if (strpos($poll_device['sysDescr'], "IOS XR")) {
|
||||
list(,$version) = explode(",", $poll_device['sysDescr']);
|
||||
$version = trim($version);
|
||||
list(,$version) = explode(" ", $version);
|
||||
list($version) = explode("\n", $version);
|
||||
trim($version);
|
||||
// if ($slot_1 == "-1" && strpos($descr_1, "No") === FALSE) { $ciscomodel = $descr_1; }
|
||||
// if (($contained_1 == "0" || $name_1 == "Chassis") && strpos($model_1, "No") === FALSE) { $ciscomodel = $model_1; list($version_1) = explode(",",$ver_1); }
|
||||
// if ($contained_1001 == "0" && strpos($model_1001, "No") === FALSE) { $ciscomodel = $model_1001; }
|
||||
// $ciscomodel = str_replace("\"","",$ciscomodel);
|
||||
// if ($ciscomodel) { $hardware = $ciscomodel; unset($ciscomodel); }
|
||||
if ($hardware == '') {
|
||||
$hardware = snmp_get($device, 'sysObjectID.0', '-Osqv', 'SNMPv2-MIB:CISCO-PRODUCTS-MIB:ALTEON-ROOT-MIB');
|
||||
}
|
||||
|
||||
?>
|
||||
// if(isset($cisco_hardware_oids[$poll_device['sysObjectID']])) { $hardware = $cisco_hardware_oids[$poll_device['sysObjectID']]; }
|
||||
if (strpos($poll_device['sysDescr'], 'IOS XR')) {
|
||||
list(,$version) = explode(',', $poll_device['sysDescr']);
|
||||
$version = trim($version);
|
||||
list(,$version) = explode(' ', $version);
|
||||
list($version) = explode("\n", $version);
|
||||
trim($version);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<?php
|
||||
|
||||
$version = snmp_get($device, "sysConfFirmwareVersion.0", "-Ovq", "AIRPORT-BASESTATION-3-MIB");
|
||||
|
||||
?>
|
||||
$version = snmp_get($device, 'sysConfFirmwareVersion.0', '-Ovq', 'AIRPORT-BASESTATION-3-MIB');
|
||||
|
||||
@@ -1,52 +1,41 @@
|
||||
<?php
|
||||
|
||||
// Allied Telesis have somewhat messy MIBs. It's often hard to work out what is where. :)
|
||||
$hardware = snmp_get($device, 'atiswitchProductType.0', '-OsvQU', '+AtiSwitch-MIB');
|
||||
$version = snmp_get($device, 'atiswitchSwVersion.0', '-OsvQU', '+AtiSwitch-MIB');
|
||||
$software = snmp_get($device, 'atiswitchSw.0', '-OsvQU', '+AtiSwitch-MIB');
|
||||
|
||||
$hardware = snmp_get($device, "atiswitchProductType.0", "-OsvQU", "+AtiSwitch-MIB");
|
||||
$version = snmp_get($device, "atiswitchSwVersion.0", "-OsvQU", "+AtiSwitch-MIB");
|
||||
$software = snmp_get($device, "atiswitchSw.0", "-OsvQU", "+AtiSwitch-MIB");
|
||||
|
||||
if ($software && $version)
|
||||
{
|
||||
$version = $software . " " . $version;
|
||||
if ($software && $version) {
|
||||
$version = $software.' '.$version;
|
||||
}
|
||||
|
||||
# sysDescr.0 = STRING: "Allied Telesis AT-8624T/2M version 2.9.1-13 11-Dec-2007"
|
||||
# sysDescr.0 = STRING: "Allied Telesyn Ethernet Switch AT-8012M"
|
||||
# sysDescr.0 = STRING: "ATI AT-8000S" <------------------------------------- RADLAN ********
|
||||
# sysDescr.0 = STRING: "Allied Telesyn AT-8624T/2M version 2.8.1-02 05-Sep-2006"
|
||||
# sysDescr.0 = STRING: "AT-8126XL, AT-S21 version 1.4.2"
|
||||
|
||||
# AtiL2-MIB::atiL2SwProduct.0 = STRING: "AT-8326GB"
|
||||
# AtiL2-MIB::atiL2SwVersion.0 = STRING: "AT-S41 v1.1.6 "
|
||||
|
||||
if (!$hardware && !$version && !$features)
|
||||
{
|
||||
$hardware = snmp_get($device, "atiL2SwProduct.0", "-OsvQU", "+AtiL2-MIB");
|
||||
$version = snmp_get($device, "atiL2SwVersion.0", "-OsvQU", "+AtiL2-MIB");
|
||||
// sysDescr.0 = STRING: "Allied Telesis AT-8624T/2M version 2.9.1-13 11-Dec-2007"
|
||||
// sysDescr.0 = STRING: "Allied Telesyn Ethernet Switch AT-8012M"
|
||||
// sysDescr.0 = STRING: "ATI AT-8000S" <------------------------------------- RADLAN ********
|
||||
// sysDescr.0 = STRING: "Allied Telesyn AT-8624T/2M version 2.8.1-02 05-Sep-2006"
|
||||
// sysDescr.0 = STRING: "AT-8126XL, AT-S21 version 1.4.2"
|
||||
// AtiL2-MIB::atiL2SwProduct.0 = STRING: "AT-8326GB"
|
||||
// AtiL2-MIB::atiL2SwVersion.0 = STRING: "AT-S41 v1.1.6 "
|
||||
if (!$hardware && !$version && !$features) {
|
||||
$hardware = snmp_get($device, 'atiL2SwProduct.0', '-OsvQU', '+AtiL2-MIB');
|
||||
$version = snmp_get($device, 'atiL2SwVersion.0', '-OsvQU', '+AtiL2-MIB');
|
||||
}
|
||||
|
||||
#Allied Telesyn AT-8948 version 2.7.4-02 22-Aug-2005
|
||||
// Allied Telesyn AT-8948 version 2.7.4-02 22-Aug-2005
|
||||
list($a,$b,$c,$d,$e,$f) = explode(' ', $poll_device['sysDescr']);
|
||||
|
||||
list($a,$b,$c,$d,$e,$f) = explode(" ", $poll_device['sysDescr']);
|
||||
|
||||
if (!$hardware && !$version && !$features)
|
||||
{
|
||||
if ($a == "Allied" && $d == "version")
|
||||
{
|
||||
$version = $e;
|
||||
$features = $f;
|
||||
$hardware = $c;
|
||||
}
|
||||
if (!$hardware && !$version && !$features) {
|
||||
if ($a == 'Allied' && $d == 'version') {
|
||||
$version = $e;
|
||||
$features = $f;
|
||||
$hardware = $c;
|
||||
}
|
||||
}
|
||||
|
||||
if ($a == "Allied" && $d == "Switch")
|
||||
{
|
||||
$hardware = $e;
|
||||
if ($a == 'Allied' && $d == 'Switch') {
|
||||
$hardware = $e;
|
||||
}
|
||||
|
||||
$version = str_replace("\"","", $version);
|
||||
$features = str_replace("\"","", $features);
|
||||
$hardware = str_replace("\"","", $hardware);
|
||||
|
||||
?>
|
||||
$version = str_replace('"', '', $version);
|
||||
$features = str_replace('"', '', $features);
|
||||
$hardware = str_replace('"', '', $hardware);
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
<?php
|
||||
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.1.1.1.0", "-OQv", "", ""),'"');
|
||||
if (!$hardware) { $hardware = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.2.1.1.0", "-OQv", "", ""),'"'); }
|
||||
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.1.1.4.0", "-OQv", "", ""),'"');
|
||||
if (!$version) { $version = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.2.1.4.0", "-OQv", "", ""),'"'); }
|
||||
|
||||
$serial = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.1.1.3.0", "-OQv", "", ""),'"');
|
||||
if (!$serial) { $serial = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.2.1.3.0", "-OQv", "", ""),'"'); }
|
||||
|
||||
if (isHexString($serial))
|
||||
{
|
||||
# Sometimes firmware outputs serial as hex-string
|
||||
$serial = snmp_hexstring($serial);
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.18928.1.1.1.1.0', '-OQv', '', ''), '"');
|
||||
if (!$hardware) {
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.18928.1.2.1.1.0', '-OQv', '', ''), '"');
|
||||
}
|
||||
|
||||
?>
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.18928.1.1.1.4.0', '-OQv', '', ''), '"');
|
||||
if (!$version) {
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.18928.1.2.1.4.0', '-OQv', '', ''), '"');
|
||||
}
|
||||
|
||||
$serial = trim(snmp_get($device, '1.3.6.1.4.1.18928.1.1.1.3.0', '-OQv', '', ''), '"');
|
||||
if (!$serial) {
|
||||
$serial = trim(snmp_get($device, '1.3.6.1.4.1.18928.1.2.1.3.0', '-OQv', '', ''), '"');
|
||||
}
|
||||
|
||||
if (isHexString($serial)) {
|
||||
// Sometimes firmware outputs serial as hex-string
|
||||
$serial = snmp_hexstring($serial);
|
||||
}
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
<?php
|
||||
|
||||
// ArubaOS (MODEL: Aruba3600), Version 6.1.2.2 (29541)
|
||||
$badchars = array("(", ")", ",");
|
||||
list(,,$hardware,,$version,) = str_replace($badchars, "", explode (" ", $poll_device['sysDescr']));
|
||||
$badchars = array( '(', ')', ',',);
|
||||
list(,,$hardware,,$version,) = str_replace($badchars, '', explode(' ', $poll_device['sysDescr']));
|
||||
|
||||
/// Build SNMP Cache Array
|
||||
|
||||
//stuff about the controller
|
||||
$switch_info_oids = array('wlsxSwitchRole','wlsxSwitchMasterIp');
|
||||
echo("Caching Oids: ");
|
||||
foreach ($switch_info_oids as $oid) { echo("$oid "); $aruba_info = snmpwalk_cache_oid($device, $oid, $aruba_info, "WLSX-SWITCH-MIB"); }
|
||||
|
||||
echo("\n");
|
||||
|
||||
if ($aruba_info[0]['wlsxSwitchRole']=='master') {
|
||||
$features="Master Controller";
|
||||
} else {
|
||||
$features="Local Controller for ".$aruba_info[0]['wlsxSwitchMasterIp'];
|
||||
// Build SNMP Cache Array
|
||||
// stuff about the controller
|
||||
$switch_info_oids = array(
|
||||
'wlsxSwitchRole',
|
||||
'wlsxSwitchMasterIp',
|
||||
);
|
||||
echo 'Caching Oids: ';
|
||||
foreach ($switch_info_oids as $oid) {
|
||||
echo "$oid ";
|
||||
$aruba_info = snmpwalk_cache_oid($device, $oid, $aruba_info, 'WLSX-SWITCH-MIB');
|
||||
}
|
||||
|
||||
?>
|
||||
echo "\n";
|
||||
|
||||
if ($aruba_info[0]['wlsxSwitchRole'] == 'master') {
|
||||
$features = 'Master Controller';
|
||||
}
|
||||
else {
|
||||
$features = 'Local Controller for '.$aruba_info[0]['wlsxSwitchMasterIp'];
|
||||
}
|
||||
|
||||
@@ -1,42 +1,40 @@
|
||||
<?php
|
||||
|
||||
echo("Doing Nortel/Avaya ERS ");
|
||||
echo 'Doing Nortel/Avaya ERS ';
|
||||
|
||||
$sysObjectID = snmp_get($device, "sysObjectID.0", "-Oqvn");
|
||||
$sysObjectID = snmp_get($device, 'sysObjectID.0', '-Oqvn');
|
||||
|
||||
# Try multiple ways of getting firmware version
|
||||
$version = snmp_get($device, "SNMPv2-SMI::enterprises.2272.1.1.7.0", "-Oqvn");
|
||||
$version = explode(" on", $version);
|
||||
// Try multiple ways of getting firmware version
|
||||
$version = snmp_get($device, 'SNMPv2-SMI::enterprises.2272.1.1.7.0', '-Oqvn');
|
||||
$version = explode(' on', $version);
|
||||
$version = $version[0];
|
||||
|
||||
if ($version == "") {
|
||||
$version = snmp_get($device, "SNMPv2-SMI::enterprises.45.1.6.4.2.1.10.0", "-Oqvn");
|
||||
if ($version == "") {
|
||||
$version = "Unknown Version";
|
||||
}
|
||||
if ($version == '') {
|
||||
$version = snmp_get($device, 'SNMPv2-SMI::enterprises.45.1.6.4.2.1.10.0', '-Oqvn');
|
||||
if ($version == '') {
|
||||
$version = 'Unknown Version';
|
||||
}
|
||||
}
|
||||
|
||||
# Get hardware details
|
||||
$sysDescr = snmp_get($device, "SNMPv2-MIB::sysDescr.0", "-Oqvn");
|
||||
// Get hardware details
|
||||
$sysDescr = snmp_get($device, 'SNMPv2-MIB::sysDescr.0', '-Oqvn');
|
||||
|
||||
$details = explode(" ", $sysDescr);
|
||||
$details = str_replace("ERS-", "Ethernet Routing Switch ", $details);
|
||||
$details = explode(' ', $sysDescr);
|
||||
$details = str_replace('ERS-', 'Ethernet Routing Switch ', $details);
|
||||
|
||||
$hardware = explode(" (", $details[0]);
|
||||
$hardware = explode(' (', $details[0]);
|
||||
$hardware = $hardware[0];
|
||||
|
||||
# Is this a 5500 series or 5600 series stack?
|
||||
$features = "";
|
||||
// Is this a 5500 series or 5600 series stack?
|
||||
$features = '';
|
||||
|
||||
$stack = snmp_walk($device, "SNMPv2-SMI::enterprises.45.1.6.3.3.1.1.6.8", "-OsqnU");
|
||||
$stack = explode("\n", $stack);
|
||||
$stack = snmp_walk($device, 'SNMPv2-SMI::enterprises.45.1.6.3.3.1.1.6.8', '-OsqnU');
|
||||
$stack = explode("\n", $stack);
|
||||
$stack_size = count($stack);
|
||||
if ($stack_size > 1) {
|
||||
$features = "Stack of $stack_size units";
|
||||
$features = "Stack of $stack_size units";
|
||||
}
|
||||
|
||||
$version = str_replace("\"","", $version);
|
||||
$features = str_replace("\"","", $features);
|
||||
$hardware = str_replace("\"","", $hardware);
|
||||
|
||||
?>
|
||||
$version = str_replace('"', '', $version);
|
||||
$features = str_replace('"', '', $features);
|
||||
$hardware = str_replace('"', '', $hardware);
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
<?php
|
||||
|
||||
if (strstr($poll_device['sysDescr'], "AlterPath"))
|
||||
{
|
||||
list($hardware, $version) = explode("-", trim(str_replace("version:", "", (str_replace("V_", "", $poll_device['sysDescr'])))), 2);
|
||||
$hardware = trim($hardware);
|
||||
$version = trim($version);
|
||||
$features = trim(str_replace("#1", "", $version));
|
||||
if (strstr($poll_device['sysDescr'], 'AlterPath')) {
|
||||
list($hardware, $version) = explode('-', trim(str_replace('version:', '', (str_replace('V_', '', $poll_device['sysDescr'])))), 2);
|
||||
$hardware = trim($hardware);
|
||||
$version = trim($version);
|
||||
$features = trim(str_replace('#1', '', $version));
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
preg_match('/Blade Network Technologies (.*)$/', $poll_device['sysDescr'], $store);
|
||||
|
||||
if (isset($store[1]))
|
||||
{
|
||||
$hardware = $store[1];
|
||||
if (isset($store[1])) {
|
||||
$hardware = $store[1];
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,45 +1,41 @@
|
||||
<?php
|
||||
|
||||
# SNMPv2-SMI::enterprises.2435.2.4.3.2435.5.13.3.0 = STRING: "Brother HL-2070N series"
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.2435.2.4.3.2435.5.13.3.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.2435.2.4.3.2435.5.13.3.0 = STRING: "Brother HL-2070N series"
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.2435.2.4.3.2435.5.13.3.0', '-OQv', '', ''), '" ');
|
||||
|
||||
# SNMPv2-SMI::enterprises.11.2.3.9.4.2.1.1.3.3.0 = STRING: "A7J913764"
|
||||
$serial = trim(snmp_get($device, "1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.11.2.3.9.4.2.1.1.3.3.0 = STRING: "A7J913764"
|
||||
$serial = trim(snmp_get($device, '1.3.6.1.4.1.11.2.3.9.4.2.1.1.3.3.0', '-OQv', '', ''), '" ');
|
||||
|
||||
# SNMPv2-SMI::enterprises.2435.2.4.3.1240.6.5.0 = STRING: "Firmware Ver.1.33 (06.07.21)"
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.2435.2.4.3.1240.6.5.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.2435.2.4.3.1240.6.5.0 = STRING: "Firmware Ver.1.33 (06.07.21)"
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.2435.2.4.3.1240.6.5.0', '-OQv', '', ''), '" ');
|
||||
|
||||
preg_match("/Ver\.(.*) \(/", $version, $matches);
|
||||
if ($matches[1]) { $version = $matches[1]; }
|
||||
|
||||
# SNMPv2-SMI::enterprises.2435.2.3.9.1.1.7.0 = STRING: "MFG:Brother;CMD:HBP,PJL,PCL,PCLXL,POSTSCRIPT;MDL:MFC-8440;CLS:PRINTER;"
|
||||
if ($hardware == '')
|
||||
{
|
||||
$jdinfo = explode(';',trim(snmp_get($device, "1.3.6.1.4.1.2435.2.3.9.1.1.7.0", "-OQv", "", ""),'" '));
|
||||
|
||||
foreach ($jdinfo as $jdi)
|
||||
{
|
||||
list($key,$value) = explode(':',$jdi);
|
||||
$jetdirect[$key] = $value;
|
||||
}
|
||||
|
||||
$hardware = $jetdirect['MDL'];
|
||||
preg_match('/Ver\.(.*) \(/', $version, $matches);
|
||||
if ($matches[1]) {
|
||||
$version = $matches[1];
|
||||
}
|
||||
|
||||
# SNMPv2-SMI::enterprises.2435.2.3.9.4.2.1.5.5.1.0 = STRING: "000A5J431816"
|
||||
if ($serial == '')
|
||||
{
|
||||
$serial = trim(snmp_get($device, "1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.1.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.2435.2.3.9.1.1.7.0 = STRING: "MFG:Brother;CMD:HBP,PJL,PCL,PCLXL,POSTSCRIPT;MDL:MFC-8440;CLS:PRINTER;"
|
||||
if ($hardware == '') {
|
||||
$jdinfo = explode(';', trim(snmp_get($device, '1.3.6.1.4.1.2435.2.3.9.1.1.7.0', '-OQv', '', ''), '" '));
|
||||
|
||||
foreach ($jdinfo as $jdi) {
|
||||
list($key,$value) = explode(':', $jdi);
|
||||
$jetdirect[$key] = $value;
|
||||
}
|
||||
|
||||
$hardware = $jetdirect['MDL'];
|
||||
}
|
||||
|
||||
# Strip off useless brand fields
|
||||
$hardware = str_replace('Brother ','',$hardware);
|
||||
$hardware = str_ireplace(' series','',$hardware);
|
||||
|
||||
if (isHexString($serial))
|
||||
{
|
||||
# Sometimes firmware outputs serial as hex-string
|
||||
$serial = snmp_hexstring($serial);
|
||||
// SNMPv2-SMI::enterprises.2435.2.3.9.4.2.1.5.5.1.0 = STRING: "000A5J431816"
|
||||
if ($serial == '') {
|
||||
$serial = trim(snmp_get($device, '1.3.6.1.4.1.2435.2.3.9.4.2.1.5.5.1.0', '-OQv', '', ''), '" ');
|
||||
}
|
||||
|
||||
?>
|
||||
// Strip off useless brand fields
|
||||
$hardware = str_replace('Brother ', '', $hardware);
|
||||
$hardware = str_ireplace(' series', '', $hardware);
|
||||
|
||||
if (isHexString($serial)) {
|
||||
// Sometimes firmware outputs serial as hex-string
|
||||
$serial = snmp_hexstring($serial);
|
||||
}
|
||||
|
||||
@@ -1,37 +1,30 @@
|
||||
<?php
|
||||
|
||||
# SNMPv2-SMI::enterprises.253.8.51.10.2.1.7.2.28110202 = STRING: "MFG:Dell;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,POSTSCRIPT;MDL:Laser Printer
|
||||
# 3100cn;DES:Dell Laser Printer 3100cn;CLS:PRINTER;STS:AAAMAwAAAAAAAgJ/HgMKBigDCgY8AwAzcJqwggAAwAAACAAAAAAA/w==;"
|
||||
// SNMPv2-SMI::enterprises.253.8.51.10.2.1.7.2.28110202 = STRING: "MFG:Dell;CMD:PJL,RASTER,DOWNLOAD,PCLXL,PCL,POSTSCRIPT;MDL:Laser Printer
|
||||
// 3100cn;DES:Dell Laser Printer 3100cn;CLS:PRINTER;STS:AAAMAwAAAAAAAgJ/HgMKBigDCgY8AwAzcJqwggAAwAAACAAAAAAA/w==;"
|
||||
$modelinfo = explode(';', trim(snmp_get($device, '1.3.6.1.4.1.253.8.51.10.2.1.7.2.28110202', '-OQv'), '" '));
|
||||
|
||||
$modelinfo = explode(';',trim(snmp_get($device, "1.3.6.1.4.1.253.8.51.10.2.1.7.2.28110202", "-OQv"),'" '));
|
||||
// SNMPv2-SMI::enterprises.674.10898.100.2.1.2.1.3.1 = STRING: "COMMAND SET:;MODEL:Dell Laser Printer 5310n"
|
||||
$modelinfo = array_merge($modelinfo, explode(';', trim(snmp_get($device, '1.3.6.1.4.1.674.10898.100.2.1.2.1.3.1', '-OQv', '', ''), '" ')));
|
||||
|
||||
# SNMPv2-SMI::enterprises.674.10898.100.2.1.2.1.3.1 = STRING: "COMMAND SET:;MODEL:Dell Laser Printer 5310n"
|
||||
$modelinfo = array_merge($modelinfo,explode(';',trim(snmp_get($device, "1.3.6.1.4.1.674.10898.100.2.1.2.1.3.1", "-OQv", "", ""),'" ')));
|
||||
// SNMPv2-SMI::enterprises.641.2.1.2.1.3.1 = STRING: "COMMAND SET:;MODEL:Dell Laser Printer 1700n"
|
||||
$modelinfo = array_merge($modelinfo, explode(';', trim(snmp_get($device, '1.3.6.1.4.1.641.2.1.2.1.3.1', '-OQv', '', ''), '" ')));
|
||||
|
||||
# SNMPv2-SMI::enterprises.641.2.1.2.1.3.1 = STRING: "COMMAND SET:;MODEL:Dell Laser Printer 1700n"
|
||||
$modelinfo = array_merge($modelinfo,explode(';',trim(snmp_get($device, "1.3.6.1.4.1.641.2.1.2.1.3.1", "-OQv", "", ""),'" ')));
|
||||
|
||||
foreach ($modelinfo as $line)
|
||||
{
|
||||
list($key,$value) = explode(':',$line);
|
||||
$dell_laser[$key] = $value;
|
||||
foreach ($modelinfo as $line) {
|
||||
list($key,$value) = explode(':', $line);
|
||||
$dell_laser[$key] = $value;
|
||||
}
|
||||
|
||||
$hardware = ($dell_laser['MDL'] != "" ? $dell_laser['MDL'] : $dell_laser['MODEL']);
|
||||
$hardware = ($dell_laser['MDL'] != '' ? $dell_laser['MDL'] : $dell_laser['MODEL']);
|
||||
|
||||
list(,$version) = explode('Engine ',$poll_device['sysDescr']);
|
||||
list(,$version) = explode('Engine ', $poll_device['sysDescr']);
|
||||
|
||||
if ($version)
|
||||
{
|
||||
$version = "Engine " . trim($version,')');
|
||||
if ($version) {
|
||||
$version = 'Engine '.trim($version, ')');
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.674.10898.100.1.1.1.0", "-OQv"),'"');
|
||||
if (!$version)
|
||||
{
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.641.1.1.1.0", "-OQv"),'"');
|
||||
}
|
||||
else {
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.674.10898.100.1.1.1.0', '-OQv'), '"');
|
||||
if (!$version) {
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.641.1.1.1.0', '-OQv'), '"');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
$version = trim(snmp_get($device, ".1.3.6.1.4.1.674.10892.2.1.2.1.0", "-OQv"),'"');
|
||||
$hardware = trim(snmp_get($device, ".1.3.6.1.4.1.674.10892.2.1.1.2.0", "-OQv"),'"');
|
||||
$serial = trim(snmp_get($device, ".1.3.6.1.4.1.674.10892.2.1.1.11.0", "-OQv"),'"');
|
||||
|
||||
?>
|
||||
$version = trim(snmp_get($device, '.1.3.6.1.4.1.674.10892.2.1.2.1.0', '-OQv'), '"');
|
||||
$hardware = trim(snmp_get($device, '.1.3.6.1.4.1.674.10892.2.1.1.2.0', '-OQv'), '"');
|
||||
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.674.10892.2.1.1.11.0', '-OQv'), '"');
|
||||
|
||||
@@ -1,46 +1,40 @@
|
||||
<?php
|
||||
|
||||
echo("Doing Extreme: ");
|
||||
echo 'Doing Extreme: ';
|
||||
|
||||
#BD6808 - Version 7.8.3 (Build 5) by Release_Master 03/15/10 14:27:35
|
||||
#Summit48 - Version 4.1.19 (Build 2) by Release_Master Wed 08/09/2000 6:09p
|
||||
#Summit24e3 - Version 6.2e.1 (Build 20) by Release_Master_ABU Tue 05/27/2003 16:46:08
|
||||
#Summit48 - 1720 Garry - Version 4.1.19 (Build 2) by Release_Master Wed 08/09/2000 6:09p
|
||||
#Summit48(Yonetan) - Version 4.1.19 (Build 2) by Release_Master Wed 08/09/2000 6:09p
|
||||
#Alpine3808 - Version 7.2.0 (Build 33) by Release_Master 07/09/04 14:05:12
|
||||
|
||||
if (!strpos($poll_device['sysDescr'], "XOS"))
|
||||
{
|
||||
echo(" Extremeware \n");
|
||||
list(, $datas) = explode(" - ", $poll_device['sysDescr']);
|
||||
$datas = str_replace("(","", $datas);
|
||||
$datas = str_replace(")","", $datas);
|
||||
list($a,$b,$c,$d,$e,$f,$g,$h) = explode(" ", $datas);
|
||||
if ($a == "Version") {
|
||||
$version = $b;
|
||||
$features = $c . " " . $d . " " . $g;
|
||||
}
|
||||
// BD6808 - Version 7.8.3 (Build 5) by Release_Master 03/15/10 14:27:35
|
||||
// Summit48 - Version 4.1.19 (Build 2) by Release_Master Wed 08/09/2000 6:09p
|
||||
// Summit24e3 - Version 6.2e.1 (Build 20) by Release_Master_ABU Tue 05/27/2003 16:46:08
|
||||
// Summit48 - 1720 Garry - Version 4.1.19 (Build 2) by Release_Master Wed 08/09/2000 6:09p
|
||||
// Summit48(Yonetan) - Version 4.1.19 (Build 2) by Release_Master Wed 08/09/2000 6:09p
|
||||
// Alpine3808 - Version 7.2.0 (Build 33) by Release_Master 07/09/04 14:05:12
|
||||
if (!strpos($poll_device['sysDescr'], 'XOS')) {
|
||||
echo " Extremeware \n";
|
||||
list(, $datas) = explode(' - ', $poll_device['sysDescr']);
|
||||
$datas = str_replace('(', '', $datas);
|
||||
$datas = str_replace(')', '', $datas);
|
||||
list($a,$b,$c,$d,$e,$f,$g,$h) = explode(' ', $datas);
|
||||
if ($a == 'Version') {
|
||||
$version = $b;
|
||||
$features = $c.' '.$d.' '.$g;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#ExtremeXOS version 12.4.1.7 v1241b7 by release-manager on Sat Mar 13 02:36:57 EST 2010
|
||||
#ExtremeWare XOS version 11.5.2.10 v1152b10 by release-manager on Thu Oct 26 09:53:04 PDT 2006
|
||||
|
||||
echo(" XOS \n");
|
||||
list($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m) = explode(" ", str_replace("ExtremeWare XOS", "ExtremeXOS", $poll_device['sysDescr']));
|
||||
if ($b == "version")
|
||||
{
|
||||
$version = $c;
|
||||
$features = $d . " ".$i." ".$j." ".$m;
|
||||
}
|
||||
else {
|
||||
// ExtremeXOS version 12.4.1.7 v1241b7 by release-manager on Sat Mar 13 02:36:57 EST 2010
|
||||
// ExtremeWare XOS version 11.5.2.10 v1152b10 by release-manager on Thu Oct 26 09:53:04 PDT 2006
|
||||
echo " XOS \n";
|
||||
list($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m) = explode(' ', str_replace('ExtremeWare XOS', 'ExtremeXOS', $poll_device['sysDescr']));
|
||||
if ($b == 'version') {
|
||||
$version = $c;
|
||||
$features = $d.' '.$i.' '.$j.' '.$m;
|
||||
}
|
||||
}
|
||||
|
||||
$hardware = rewrite_extreme_hardware($poll_device['sysObjectID']);
|
||||
if ($hardware == $poll_device['sysObjectID']) { unset($hardware); }
|
||||
if ($hardware == $poll_device['sysObjectID']) {
|
||||
unset($hardware);
|
||||
}
|
||||
|
||||
$version = str_replace("\"","", $version);
|
||||
$features = str_replace("\"","", $features);
|
||||
$hardware = str_replace("\"","", $hardware);
|
||||
|
||||
?>
|
||||
$version = str_replace('"', '', $version);
|
||||
$features = str_replace('"', '', $features);
|
||||
$hardware = str_replace('"', '', $hardware);
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.1588.2.1.1.1.1.6.0", "-Ovq"),'"');
|
||||
$hardware = trim(snmp_get($device, "ENTITY-MIB::entPhysicalDescr.1", "-Ovq"),'"');
|
||||
|
||||
?>
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.1588.2.1.1.1.1.6.0', '-Ovq'), '"');
|
||||
$hardware = trim(snmp_get($device, 'ENTITY-MIB::entPhysicalDescr.1', '-Ovq'), '"');
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
|
||||
preg_match("/v(.*)/", $poll_device['sysDescr'], $matches);
|
||||
preg_match('/v(.*)/', $poll_device['sysDescr'], $matches);
|
||||
|
||||
$version = (isset($matches[1]) ? $matches[1] : "");
|
||||
//$hardware = "Still need to figger hardware out!";
|
||||
//$serial = "Still need to figger serial out!";
|
||||
//$features = "Still need to figger features out!";
|
||||
|
||||
?>
|
||||
$version = (isset($matches[1]) ? $matches[1] : '');
|
||||
// $hardware = "Still need to figger hardware out!";
|
||||
// $serial = "Still need to figger serial out!";
|
||||
// $features = "Still need to figger features out!";
|
||||
|
||||
@@ -1,55 +1,44 @@
|
||||
<?php
|
||||
|
||||
echo("Doing Force10 FTOS ");
|
||||
echo 'Doing Force10 FTOS ';
|
||||
|
||||
// Stats for S-Series
|
||||
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitModelID.1 = STRING: S25-01-GE-24V
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitStatus.1 = INTEGER: ok(1)
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitDescription.1 = STRING: 24-port E/FE/GE with POE (SB)
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitCodeVersion.1 = STRING: 7.8.1.3
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitCodeVersionInFlash.1 = STRING:
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitSerialNumber.1 = STRING: DL2E9250002
|
||||
#F10-S-SERIES-CHASSIS-MIB::chStackUnitUpTime.1 = Timeticks: (262804700) 30 days, 10:00:47.00
|
||||
|
||||
// F10-S-SERIES-CHASSIS-MIB::chStackUnitModelID.1 = STRING: S25-01-GE-24V
|
||||
// F10-S-SERIES-CHASSIS-MIB::chStackUnitStatus.1 = INTEGER: ok(1)
|
||||
// F10-S-SERIES-CHASSIS-MIB::chStackUnitDescription.1 = STRING: 24-port E/FE/GE with POE (SB)
|
||||
// F10-S-SERIES-CHASSIS-MIB::chStackUnitCodeVersion.1 = STRING: 7.8.1.3
|
||||
// F10-S-SERIES-CHASSIS-MIB::chStackUnitCodeVersionInFlash.1 = STRING:
|
||||
// F10-S-SERIES-CHASSIS-MIB::chStackUnitSerialNumber.1 = STRING: DL2E9250002
|
||||
// F10-S-SERIES-CHASSIS-MIB::chStackUnitUpTime.1 = Timeticks: (262804700) 30 days, 10:00:47.00
|
||||
// Stats for C-Series
|
||||
|
||||
#F10-C-SERIES-CHASSIS-MIB::chType.0 = INTEGER: c300(7)
|
||||
#F10-C-SERIES-CHASSIS-MIB::chChassisMode.0 = INTEGER: cseries1(4)
|
||||
#F10-C-SERIES-CHASSIS-MIB::chSwVersion.0 = STRING: 8.2.1.2
|
||||
#F10-C-SERIES-CHASSIS-MIB::chMacAddr.0 = STRING: 0:1:e8:3b:ea:b5
|
||||
#F10-C-SERIES-CHASSIS-MIB::chSerialNumber.0 = STRING: TY000000491
|
||||
#F10-C-SERIES-CHASSIS-MIB::chPartNum.0 = STRING: 7520029900
|
||||
#F10-C-SERIES-CHASSIS-MIB::chProductRev.0 = STRING: 04
|
||||
#F10-C-SERIES-CHASSIS-MIB::chVendorId.0 = STRING: 04
|
||||
#F10-C-SERIES-CHASSIS-MIB::chDateCode.0 = STRING: "01182007"
|
||||
#F10-C-SERIES-CHASSIS-MIB::chCountryCode.0 = STRING: "01"
|
||||
|
||||
// F10-C-SERIES-CHASSIS-MIB::chType.0 = INTEGER: c300(7)
|
||||
// F10-C-SERIES-CHASSIS-MIB::chChassisMode.0 = INTEGER: cseries1(4)
|
||||
// F10-C-SERIES-CHASSIS-MIB::chSwVersion.0 = STRING: 8.2.1.2
|
||||
// F10-C-SERIES-CHASSIS-MIB::chMacAddr.0 = STRING: 0:1:e8:3b:ea:b5
|
||||
// F10-C-SERIES-CHASSIS-MIB::chSerialNumber.0 = STRING: TY000000491
|
||||
// F10-C-SERIES-CHASSIS-MIB::chPartNum.0 = STRING: 7520029900
|
||||
// F10-C-SERIES-CHASSIS-MIB::chProductRev.0 = STRING: 04
|
||||
// F10-C-SERIES-CHASSIS-MIB::chVendorId.0 = STRING: 04
|
||||
// F10-C-SERIES-CHASSIS-MIB::chDateCode.0 = STRING: "01182007"
|
||||
// F10-C-SERIES-CHASSIS-MIB::chCountryCode.0 = STRING: "01"
|
||||
// Stats for E-Series
|
||||
|
||||
#F10-CHASSIS-MIB::chSysSwRuntimeImgVersion.1.1 = STRING: 7.6.1.2
|
||||
#F10-CHASSIS-MIB::chSysSwRuntimeImgVersion.8.1 = STRING: 7.6.1.2
|
||||
|
||||
// F10-CHASSIS-MIB::chSysSwRuntimeImgVersion.1.1 = STRING: 7.6.1.2
|
||||
// F10-CHASSIS-MIB::chSysSwRuntimeImgVersion.8.1 = STRING: 7.6.1.2
|
||||
$hardware = rewrite_ftos_hardware($poll_device['sysObjectID']);
|
||||
|
||||
if (strstr($poll_device['sysObjectID'], ".1.3.6.1.4.1.6027.1.3."))
|
||||
{
|
||||
echo("S-Series ");
|
||||
$version = snmp_get($device, "chStackUnitCodeVersion.1", "-Oqvn", "F10-S-SERIES-CHASSIS-MIB");
|
||||
if (strstr($poll_device['sysObjectID'], '.1.3.6.1.4.1.6027.1.3.')) {
|
||||
echo 'S-Series ';
|
||||
$version = snmp_get($device, 'chStackUnitCodeVersion.1', '-Oqvn', 'F10-S-SERIES-CHASSIS-MIB');
|
||||
}
|
||||
elseif (strstr($poll_device['sysObjectID'], ".1.3.6.1.4.1.6027.1.2."))
|
||||
{
|
||||
echo("C-Series ");
|
||||
$version = snmp_get($device, "chSwVersion.0", "-Oqvn", "F10-C-SERIES-CHASSIS-MIB");
|
||||
else if (strstr($poll_device['sysObjectID'], '.1.3.6.1.4.1.6027.1.2.')) {
|
||||
echo 'C-Series ';
|
||||
$version = snmp_get($device, 'chSwVersion.0', '-Oqvn', 'F10-C-SERIES-CHASSIS-MIB');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo("E-Series ");
|
||||
$version = snmp_get($device, "chSysSwRuntimeImgVersion.1.1", "-Oqvn", "F10-CHASSIS-MIB");
|
||||
else {
|
||||
echo 'E-Series ';
|
||||
$version = snmp_get($device, 'chSysSwRuntimeImgVersion.1.1', '-Oqvn', 'F10-CHASSIS-MIB');
|
||||
}
|
||||
|
||||
$version = str_replace("\"","", $version);
|
||||
$features = str_replace("\"","", $features);
|
||||
$hardware = str_replace("\"","", $hardware);
|
||||
|
||||
?>
|
||||
$version = str_replace('"', '', $version);
|
||||
$features = str_replace('"', '', $features);
|
||||
$hardware = str_replace('"', '', $hardware);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
|
||||
$version = trim(snmp_get($device, "accessSwitchFWVersion.0", "-OQv", "ZYXEL-AS-MIB"),'"');
|
||||
$version = trim(snmp_get($device, 'accessSwitchFWVersion.0', '-OQv', 'ZYXEL-AS-MIB'), '"');
|
||||
|
||||
preg_match("/IES-(\d)*/",$poll_device['sysDescr'], $matches);
|
||||
preg_match('/IES-(\d)*/', $poll_device['sysDescr'], $matches);
|
||||
$hardware = $matches[0];
|
||||
|
||||
?>
|
||||
@@ -1,10 +1,13 @@
|
||||
<?php
|
||||
|
||||
# IPOMANII-MIB::ipmIdentAgentSoftwareVersion.0 = STRING: "PDU System v1.06 (SN 11130141042005)"
|
||||
$SoftwareVersion = trim(snmp_get($device, "ipmIdentAgentSoftwareVersion.0", "-OQv", "IPOMANII-MIB"),'" ');
|
||||
// IPOMANII-MIB::ipmIdentAgentSoftwareVersion.0 = STRING: "PDU System v1.06 (SN 11130141042005)"
|
||||
$SoftwareVersion = trim(snmp_get($device, 'ipmIdentAgentSoftwareVersion.0', '-OQv', 'IPOMANII-MIB'), '" ');
|
||||
|
||||
preg_match("/v(.*) \(SN (.*)\)/", $SoftwareVersion, $matches);
|
||||
if ($matches[1]) { $version = $matches[1]; }
|
||||
if ($matches[2]) { $serial = $matches[2]; }
|
||||
preg_match('/v(.*) \(SN (.*)\)/', $SoftwareVersion, $matches);
|
||||
if ($matches[1]) {
|
||||
$version = $matches[1];
|
||||
}
|
||||
|
||||
?>
|
||||
if ($matches[2]) {
|
||||
$serial = $matches[2];
|
||||
}
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
<?php
|
||||
|
||||
#FIXME snmp_ function!
|
||||
$hardware = trim(exec($config['snmpget'] . " -M ".$config['mibdir'] . " -O vqs -m FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB " . snmp_gen_auth($device) . " " .
|
||||
$device['hostname'].":".$device['port'] . " sysObjectID.0"));
|
||||
// FIXME snmp_ function!
|
||||
$hardware = trim(
|
||||
exec(
|
||||
$config['snmpget'].' -M '.$config['mibdir'].' -O vqs -m FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB '.snmp_gen_auth($device).' '.$device['hostname'].':'.$device['port'].' sysObjectID.0'
|
||||
)
|
||||
);
|
||||
|
||||
$hardware = rewrite_ironware_hardware($hardware);
|
||||
|
||||
$version = trim(exec($config['snmpget'] . " -M ".$config['mibdir'] . " -O vqs -m FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB " . snmp_gen_auth($device) . " " .
|
||||
$device['hostname'].":".$device['port'] . " snAgBuildVer.0"));
|
||||
$version = trim(
|
||||
exec(
|
||||
$config['snmpget'].' -M '.$config['mibdir'].' -O vqs -m FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB '.snmp_gen_auth($device).' '.$device['hostname'].':'.$device['port'].' snAgBuildVer.0'
|
||||
)
|
||||
);
|
||||
|
||||
$version = str_replace("V", "", $version);
|
||||
$version = str_replace("\"", "", $version);
|
||||
|
||||
?>
|
||||
$version = str_replace('V', '', $version);
|
||||
$version = str_replace('"', '', $version);
|
||||
|
||||
@@ -1,31 +1,25 @@
|
||||
<?php
|
||||
|
||||
# ...7.0 = STRING: "MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PCL,POSTSCRIPT,PCLXL;MDL:hp LaserJet 1320 series;CLS:PRINTER;DES:Hewlett-Packard LaserJet 1320 series;MEM:9MB;COMMENT:RES=1200x1;"
|
||||
// ...7.0 = STRING: "MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PCL,POSTSCRIPT,PCLXL;MDL:hp LaserJet 1320 series;CLS:PRINTER;DES:Hewlett-Packard LaserJet 1320 series;MEM:9MB;COMMENT:RES=1200x1;"
|
||||
$jdinfo = explode(';', trim(snmp_get($device, '1.3.6.1.4.1.11.2.3.9.1.1.7.0', '-OQv', '', ''), '" '));
|
||||
|
||||
$jdinfo = explode(';',trim(snmp_get($device, "1.3.6.1.4.1.11.2.3.9.1.1.7.0", "-OQv", "", ""),'" '));
|
||||
|
||||
foreach ($jdinfo as $jdi)
|
||||
{
|
||||
list($key,$value) = explode(':',$jdi);
|
||||
$jetdirect[$key] = $value;
|
||||
foreach ($jdinfo as $jdi) {
|
||||
list($key,$value) = explode(':', $jdi);
|
||||
$jetdirect[$key] = $value;
|
||||
}
|
||||
|
||||
$hardware = $jetdirect['DES'];
|
||||
|
||||
if ($hardware == '')
|
||||
{
|
||||
$hardware = $jetdirect['DESCRIPTION'];
|
||||
if ($hardware == '') {
|
||||
$hardware = $jetdirect['DESCRIPTION'];
|
||||
}
|
||||
|
||||
if ($hardware == '')
|
||||
{
|
||||
$hardware = $jetdirect['MODEL'];
|
||||
if ($hardware == '') {
|
||||
$hardware = $jetdirect['MODEL'];
|
||||
}
|
||||
|
||||
# Strip off useless brand fields
|
||||
$hardware = str_replace('HP ','',$hardware);
|
||||
$hardware = str_replace('Hewlett-Packard ','',$hardware);
|
||||
$hardware = str_ireplace(' Series','',$hardware);
|
||||
// Strip off useless brand fields
|
||||
$hardware = str_replace('HP ', '', $hardware);
|
||||
$hardware = str_replace('Hewlett-Packard ', '', $hardware);
|
||||
$hardware = str_ireplace(' Series', '', $hardware);
|
||||
$hardware = ucfirst($hardware);
|
||||
|
||||
?>
|
||||
@@ -1,19 +1,17 @@
|
||||
<?php
|
||||
|
||||
$jun_ver = snmp_get($device, ".1.3.6.1.2.1.25.6.3.1.2.2", "-Oqv", "HOST-RESOURCES-MIB");
|
||||
$jun_ver = snmp_get($device, '.1.3.6.1.2.1.25.6.3.1.2.2', '-Oqv', 'HOST-RESOURCES-MIB');
|
||||
|
||||
if (strpos($poll_device['sysDescr'], "olive"))
|
||||
{
|
||||
$hardware = "Olive";
|
||||
$serial = "";
|
||||
} else {
|
||||
$hardware = snmp_get($device, "sysObjectID.0", "-Ovqs", "+Juniper-Products-MIB:JUNIPER-CHASSIS-DEFINES-MIB", $config['install_dir']."/mibs/junos");
|
||||
$hardware = "Juniper " . rewrite_junos_hardware($hardware);
|
||||
$serial = snmp_get($device, ".1.3.6.1.4.1.2636.3.1.3.0", "-OQv", "+JUNIPER-MIB", "+".$config['install_dir']."/mibs/junos");
|
||||
if (strpos($poll_device['sysDescr'], 'olive')) {
|
||||
$hardware = 'Olive';
|
||||
$serial = '';
|
||||
}
|
||||
else {
|
||||
$hardware = snmp_get($device, 'sysObjectID.0', '-Ovqs', '+Juniper-Products-MIB:JUNIPER-CHASSIS-DEFINES-MIB', $config['install_dir'].'/mibs/junos');
|
||||
$hardware = 'Juniper '.rewrite_junos_hardware($hardware);
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.2636.3.1.3.0', '-OQv', '+JUNIPER-MIB', '+'.$config['install_dir'].'/mibs/junos');
|
||||
}
|
||||
|
||||
list($version) = explode("]", $jun_ver);
|
||||
list(,$version) = explode("[", $version);
|
||||
$features = "";
|
||||
|
||||
?>
|
||||
list($version) = explode(']', $jun_ver);
|
||||
list(,$version) = explode('[', $version);
|
||||
$features = '';
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
<?php
|
||||
|
||||
if (strpos($poll_device['sysDescr'], "olive"))
|
||||
{
|
||||
$hardware = "Olive";
|
||||
$serial = "";
|
||||
if (strpos($poll_device['sysDescr'], 'olive')) {
|
||||
$hardware = 'Olive';
|
||||
$serial = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$junose_hardware = snmp_get($device, "sysObjectID.0", "-Ovqs", "+Juniper-Products-MIB", $config['install_dir']."/mibs/junose");
|
||||
$junose_version = snmp_get($device, "juniSystemSwVersion.0", "-Ovqs", "+Juniper-System-MIB", $config['install_dir']."/mibs/junose");
|
||||
$junose_serial = "";
|
||||
else {
|
||||
$junose_hardware = snmp_get($device, 'sysObjectID.0', '-Ovqs', '+Juniper-Products-MIB', $config['install_dir'].'/mibs/junose');
|
||||
$junose_version = snmp_get($device, 'juniSystemSwVersion.0', '-Ovqs', '+Juniper-System-MIB', $config['install_dir'].'/mibs/junose');
|
||||
$junose_serial = '';
|
||||
|
||||
$hardware = "Juniper " . rewrite_junose_hardware($junose_hardware);
|
||||
$hardware = 'Juniper '.rewrite_junose_hardware($junose_hardware);
|
||||
}
|
||||
|
||||
list($version) = explode(" ", $junose_version);
|
||||
list(,$version) = explode("(", $version);
|
||||
list($features) = explode("]", $junose_version);
|
||||
list(,$features) = explode("[", $features);
|
||||
|
||||
?>
|
||||
list($version) = explode(' ', $junose_version);
|
||||
list(,$version) = explode('(', $version);
|
||||
list($features) = explode(']', $junose_version);
|
||||
list(,$features) = explode('[', $features);
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<?php
|
||||
|
||||
#JUNIPER-WX-COMMON-MIB::jnxWxSysSwVersion.0 = STRING: 5.6.2.0
|
||||
#JUNIPER-WX-COMMON-MIB::jnxWxSysHwVersion.0 = STRING: 1.0
|
||||
#JUNIPER-WX-COMMON-MIB::jnxWxSysSerialNumber.0 = STRING: 0060000604
|
||||
#JUNIPER-WX-COMMON-MIB::jnxWxChassisType.0 = INTEGER: jnxWx60(10)
|
||||
// JUNIPER-WX-COMMON-MIB::jnxWxSysSwVersion.0 = STRING: 5.6.2.0
|
||||
// JUNIPER-WX-COMMON-MIB::jnxWxSysHwVersion.0 = STRING: 1.0
|
||||
// JUNIPER-WX-COMMON-MIB::jnxWxSysSerialNumber.0 = STRING: 0060000604
|
||||
// JUNIPER-WX-COMMON-MIB::jnxWxChassisType.0 = INTEGER: jnxWx60(10)
|
||||
$version = snmp_get($device, 'jnxWxSysSwVersion.0', '-Ovq', 'JUNIPER-WX-GLOBAL-REG');
|
||||
|
||||
$version = snmp_get($device, "jnxWxSysSwVersion.0", "-Ovq", "JUNIPER-WX-GLOBAL-REG");
|
||||
$serial = snmp_get($device, 'jnxWxSysSerialNumber.0', '-Ovq', 'JUNIPER-WX-GLOBAL-REG');
|
||||
|
||||
$serial = snmp_get($device, "jnxWxSysSerialNumber.0", "-Ovq", "JUNIPER-WX-GLOBAL-REG");
|
||||
|
||||
$hardware = snmp_get($device, "jnxWxChassisType.0", "-Ovq", "JUNIPER-WX-GLOBAL-REG");
|
||||
$hardware = strtoupper(str_replace('jnx','',$hardware));
|
||||
$hardware .= ' ' . snmp_get($device, "jnxWxSysHwVersion.0", "-Ovq", "JUNIPER-WX-GLOBAL-REG");
|
||||
|
||||
?>
|
||||
$hardware = snmp_get($device, 'jnxWxChassisType.0', '-Ovq', 'JUNIPER-WX-GLOBAL-REG');
|
||||
$hardware = strtoupper(str_replace('jnx', '', $hardware));
|
||||
$hardware .= ' '.snmp_get($device, 'jnxWxSysHwVersion.0', '-Ovq', 'JUNIPER-WX-GLOBAL-REG');
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<?php
|
||||
|
||||
# SNMPv2-SMI::enterprises.18334.1.1.1.1.6.2.1.0 = STRING: "KONICA MINOLTA magicolor 4650"
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.18334.1.1.1.1.6.2.1.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.18334.1.1.1.1.6.2.1.0 = STRING: "KONICA MINOLTA magicolor 4650"
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.18334.1.1.1.1.6.2.1.0', '-OQv', '', ''), '" ');
|
||||
|
||||
# SNMPv2-SMI::enterprises.18334.1.1.1.1.6.1.0 = STRING: "1.74"
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.18334.1.1.1.1.6.1.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.18334.1.1.1.1.6.1.0 = STRING: "1.74"
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.18334.1.1.1.1.6.1.0', '-OQv', '', ''), '" ');
|
||||
|
||||
# Strip off useless brand fields
|
||||
$hardware = str_ireplace('KONICA MINOLTA ','',$hardware);
|
||||
// Strip off useless brand fields
|
||||
$hardware = str_ireplace('KONICA MINOLTA ', '', $hardware);
|
||||
$hardware = ucfirst($hardware);
|
||||
|
||||
?>
|
||||
@@ -1,14 +1,11 @@
|
||||
<?php
|
||||
|
||||
# Some useful OIDs at http://www.kyoceramita.be/en/index/kyoware_solutions/system_management/kyocount_3_01.-contextmargin-65897-files-62084-File.cpsdownload.tmp/Models.xml
|
||||
// Some useful OIDs at http://www.kyoceramita.be/en/index/kyoware_solutions/system_management/kyocount_3_01.-contextmargin-65897-files-62084-File.cpsdownload.tmp/Models.xml
|
||||
// SNMPv2-SMI::enterprises.1347.43.5.1.1.1.1 = STRING: "FS-1028MFP"
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.1347.43.5.1.1.1.1', '-OQv', '', ''), '" ');
|
||||
|
||||
# SNMPv2-SMI::enterprises.1347.43.5.1.1.1.1 = STRING: "FS-1028MFP"
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.1347.43.5.1.1.1.1", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.1347.43.5.1.1.28.1 = STRING: "QUV9600664"
|
||||
$serial = trim(snmp_get($device, '1.3.6.1.4.1.1347.43.5.1.1.28.1', '-OQv', '', ''), '" ');
|
||||
|
||||
# SNMPv2-SMI::enterprises.1347.43.5.1.1.28.1 = STRING: "QUV9600664"
|
||||
$serial = trim(snmp_get($device, "1.3.6.1.4.1.1347.43.5.1.1.28.1", "-OQv", "", ""),'" ');
|
||||
|
||||
# SNMPv2-SMI::enterprises.1347.43.5.4.1.5.1.1 = STRING: "2H9_2F00.002.002"
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.1347.43.5.4.1.5.1.1", "-OQv", "", ""),'" ');
|
||||
|
||||
?>
|
||||
// SNMPv2-SMI::enterprises.1347.43.5.4.1.5.1.1 = STRING: "2H9_2F00.002.002"
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.1347.43.5.4.1.5.1.1', '-OQv', '', ''), '" ');
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
<?php
|
||||
|
||||
# MG-SNMP-UPS-MIB::upsmgIdentFamilyName.0 = STRING: "PULSAR M"
|
||||
# MG-SNMP-UPS-MIB::upsmgIdentModelName.0 = STRING: "2200"
|
||||
# MG-SNMP-UPS-MIB::upsmgIdentSerialNumber.0 = STRING: "AQ1H01024"
|
||||
// MG-SNMP-UPS-MIB::upsmgIdentFamilyName.0 = STRING: "PULSAR M"
|
||||
// MG-SNMP-UPS-MIB::upsmgIdentModelName.0 = STRING: "2200"
|
||||
// MG-SNMP-UPS-MIB::upsmgIdentSerialNumber.0 = STRING: "AQ1H01024"
|
||||
$version = trim(snmp_get($device, 'upsmgIdentFirmwareVersion.0', '-OQv', 'MG-SNMP-UPS-MIB'), '" ');
|
||||
|
||||
$version = trim(snmp_get($device, "upsmgIdentFirmwareVersion.0", "-OQv", "MG-SNMP-UPS-MIB"),'" ');
|
||||
$hardware = trim(snmp_get($device, 'upsmgIdentFamilyName.0', '-OQv', 'MG-SNMP-UPS-MIB'), '" ');
|
||||
$hardware .= ' '.trim(snmp_get($device, 'upsmgIdentModelName.0', '-OQv', 'MG-SNMP-UPS-MIB'), '" ');
|
||||
|
||||
$hardware = trim(snmp_get($device,"upsmgIdentFamilyName.0","-OQv","MG-SNMP-UPS-MIB"),'" ');
|
||||
$hardware .= ' ' . trim(snmp_get($device,"upsmgIdentModelName.0","-OQv","MG-SNMP-UPS-MIB"),'" ');
|
||||
|
||||
$serial = trim(snmp_get($device,"upsmgIdentSerialNumber.0","-OQv","MG-SNMP-UPS-MIB"),'" ');
|
||||
|
||||
?>
|
||||
$serial = trim(snmp_get($device, 'upsmgIdentSerialNumber.0', '-OQv', 'MG-SNMP-UPS-MIB'), '" ');
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
<?php
|
||||
|
||||
# AKCP clone
|
||||
|
||||
include('includes/polling/os/akcp.inc.php');
|
||||
|
||||
?>
|
||||
// AKCP clone
|
||||
require 'includes/polling/os/akcp.inc.php';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<?php
|
||||
|
||||
$version = trim(snmp_get($device, "1.3.6.1.2.1.33.1.1.3.0", "-OQv", "UPS-MIB"),'"');
|
||||
|
||||
?>
|
||||
$version = trim(snmp_get($device, '1.3.6.1.2.1.33.1.1.3.0', '-OQv', 'UPS-MIB'), '"');
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<?php
|
||||
|
||||
#NS-ROOT-MIB::sysHardwareVersionDesc.0 = STRING: "7000 v1 6*EZ+2*EM"
|
||||
#NS-ROOT-MIB::sysBuildVersion.0 = STRING: "NetScaler NS8.1: Build 69.4, Date: Jan 28 2010, 02:00:43 "
|
||||
// NS-ROOT-MIB::sysHardwareVersionDesc.0 = STRING: "7000 v1 6*EZ+2*EM"
|
||||
// NS-ROOT-MIB::sysBuildVersion.0 = STRING: "NetScaler NS8.1: Build 69.4, Date: Jan 28 2010, 02:00:43 "
|
||||
$hardware = str_replace('"', '', snmp_get($device, 'sysHardwareVersionDesc.0', '-Osqv', 'SNMPv2-MIB:NS-ROOT-MIB'));
|
||||
$version = str_replace('"', '', snmp_get($device, 'sysBuildVersion.0', '-Osqv', 'SNMPv2-MIB:NS-ROOT-MIB'));
|
||||
$serial = str_replace('"', '', snmp_get($device, 'sysHardwareSerialNumber.0', '-Osqv', 'SNMPv2-MIB:NS-ROOT-MIB'));
|
||||
|
||||
$hardware = str_replace("\"", "", snmp_get($device, "sysHardwareVersionDesc.0", "-Osqv", "SNMPv2-MIB:NS-ROOT-MIB"));
|
||||
$version = str_replace("\"", "", snmp_get($device, "sysBuildVersion.0", "-Osqv", "SNMPv2-MIB:NS-ROOT-MIB"));
|
||||
$serial = str_replace("\"", "", snmp_get($device, "sysHardwareSerialNumber.0", "-Osqv", "SNMPv2-MIB:NS-ROOT-MIB"));
|
||||
list($version,$features) = explode(':', $version);
|
||||
list(,$version) = explode(' ', $version);
|
||||
list($features) = explode(',', trim($features));
|
||||
|
||||
list($version,$features) = explode(":", $version);
|
||||
list(,$version) = explode(" ", $version);
|
||||
list($features) = explode(",", trim($features));
|
||||
|
||||
include("includes/polling/netscaler-stats.inc.php");
|
||||
|
||||
?>
|
||||
require 'includes/polling/netscaler-stats.inc.php';
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
<?php
|
||||
|
||||
# SNMPv2-MIB::sysDescr.0 = STRING: NRG MP C4500 1.60 / NRG Network Printer C model / NRG Network Scanner C model / NRG Network Facsimile C model
|
||||
# SNMPv2-MIB::sysDescr.0 = STRING: NRG SP C410DN 1.01 / NRG Network Printer C model
|
||||
# SNMPv2-MIB::sysDescr.0 = STRING: NRG MP 171 1.01 / NRG Network Printer C model / NRG Network Scanner C model / NRG Network Facsimile C model
|
||||
// SNMPv2-MIB::sysDescr.0 = STRING: NRG MP C4500 1.60 / NRG Network Printer C model / NRG Network Scanner C model / NRG Network Facsimile C model
|
||||
// SNMPv2-MIB::sysDescr.0 = STRING: NRG SP C410DN 1.01 / NRG Network Printer C model
|
||||
// SNMPv2-MIB::sysDescr.0 = STRING: NRG MP 171 1.01 / NRG Network Printer C model / NRG Network Scanner C model / NRG Network Facsimile C model
|
||||
$descr = trim(snmp_get($device, '.1.3.6.1.2.1.1.1.0', '-OQv', '', ''), '" ');
|
||||
|
||||
$descr = trim(snmp_get($device, ".1.3.6.1.2.1.1.1.0", "-OQv", "", ""),'" ');
|
||||
$ninfo = trim(substr($descr, 0, strpos($descr, '/')));
|
||||
|
||||
$ninfo=trim(substr($descr,0,strpos($descr,'/')));
|
||||
$hardware = trim(substr($ninfo, 0, strrpos($ninfo, ' ')));
|
||||
$version = trim(substr($ninfo, strrpos($ninfo, ' ')));
|
||||
|
||||
$hardware=trim(substr($ninfo,0,strrpos($ninfo,' ')));
|
||||
$version=trim(substr($ninfo,strrpos($ninfo,' ')));
|
||||
|
||||
# SNMPv2-SMI::enterprises.367.3.2.1.2.1.4.0 = STRING: "M6394300657"
|
||||
# $serial = trim(snmp_get($device, "1.3.6.1.4.1.367.3.2.1.2.1.4.0", "-OQv", "", ""),'" ');
|
||||
|
||||
?>
|
||||
// SNMPv2-SMI::enterprises.367.3.2.1.2.1.4.0 = STRING: "M6394300657"
|
||||
// $serial = trim(snmp_get($device, "1.3.6.1.4.1.367.3.2.1.2.1.4.0", "-OQv", "", ""),'" ');
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<?php
|
||||
|
||||
# Jetdirect compatible
|
||||
// Jetdirect compatible
|
||||
require 'includes/polling/os/jetdirect.inc.php';
|
||||
|
||||
include('includes/polling/os/jetdirect.inc.php');
|
||||
|
||||
# Strip off useless brand fields
|
||||
$hardware = str_replace('OKI ','',$hardware);
|
||||
|
||||
?>
|
||||
// Strip off useless brand fields
|
||||
$hardware = str_replace('OKI ', '', $hardware);
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
<?php
|
||||
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.25461.2.1.2.2.1.0", "-OQv", "", ""),'" ');
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.25461.2.1.2.1.1.0", "-OQv", "", ""),'" ');
|
||||
$serial = trim(snmp_get($device, "1.3.6.1.4.1.25461.2.1.2.1.3.0", "-OQv", "", ""),'" ');
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.25461.2.1.2.2.1.0', '-OQv', '', ''), '" ');
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.25461.2.1.2.1.1.0', '-OQv', '', ''), '" ');
|
||||
$serial = trim(snmp_get($device, '1.3.6.1.4.1.25461.2.1.2.1.3.0', '-OQv', '', ''), '" ');
|
||||
|
||||
# list(,,,$hardware) = explode (" ", $poll_device['sysDescr']);
|
||||
// list(,,,$hardware) = explode (" ", $poll_device['sysDescr']);
|
||||
$sessrrd = $config['rrd_dir'].'/'.$device['hostname'].'/panos-sessions.rrd';
|
||||
$sessions = snmp_get($device, '1.3.6.1.4.1.25461.2.1.2.3.3.0', '-Ovq');
|
||||
|
||||
$sessrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/panos-sessions.rrd";
|
||||
$sessions = snmp_get($device, "1.3.6.1.4.1.25461.2.1.2.3.3.0", "-Ovq");
|
||||
if (is_numeric($sessions)) {
|
||||
if (!is_file($sessrrd)) {
|
||||
rrdtool_create($sessrrd, ' --step 300 DS:sessions:GAUGE:600:0:3000000 '.$config['rrd_rra']);
|
||||
}
|
||||
|
||||
if (is_numeric($sessions))
|
||||
{
|
||||
if (!is_file($sessrrd))
|
||||
{
|
||||
rrdtool_create($sessrrd," --step 300 DS:sessions:GAUGE:600:0:3000000 ".$config['rrd_rra']); }
|
||||
rrdtool_update($sessrrd,"N:$sessions");
|
||||
$graphs['panos_sessions'] = TRUE;
|
||||
rrdtool_update($sessrrd, "N:$sessions");
|
||||
$graphs['panos_sessions'] = true;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
<?php
|
||||
|
||||
#.1.3.6.1.2.1.33.1.1.2.0 = STRING: "TRIPP LITE PDUMH20HVATNET"
|
||||
#.1.3.6.1.2.1.33.1.1.4.0 = STRING: "12.04.0052"
|
||||
#.1.3.6.1.2.1.33.1.1.5.0 = STRING: "sysname.company.com"
|
||||
#.1.3.6.1.4.1.850.100.1.1.4.0 = STRING: "9942AY0AC796000912"
|
||||
#.1.3.6.1.4.1.850.10.2.2.1.12.1 = STRING: "This Is My Location"
|
||||
|
||||
$hardware = snmp_get($device, "upsIdentModel.0", "-Ovq", "UPS-MIB");
|
||||
// .1.3.6.1.2.1.33.1.1.2.0 = STRING: "TRIPP LITE PDUMH20HVATNET"
|
||||
// .1.3.6.1.2.1.33.1.1.4.0 = STRING: "12.04.0052"
|
||||
// .1.3.6.1.2.1.33.1.1.5.0 = STRING: "sysname.company.com"
|
||||
// .1.3.6.1.4.1.850.100.1.1.4.0 = STRING: "9942AY0AC796000912"
|
||||
// .1.3.6.1.4.1.850.10.2.2.1.12.1 = STRING: "This Is My Location"
|
||||
$hardware = snmp_get($device, 'upsIdentModel.0', '-Ovq', 'UPS-MIB');
|
||||
$hardware = preg_split('/TRIPP\ LITE/', $hardware);
|
||||
$hardware = $hardware[1];
|
||||
$sysLocation = trim(snmp_get($device, ".1.3.6.1.4.1.850.10.2.2.1.12.1", "-Ovq", "TRIPPLITE-MIB"), "\"");
|
||||
$sysName = trim(snmp_get($device, ".1.3.6.1.2.1.33.1.1.5.0", "-Ovq", "TRIPPLITE-MIB"), "\"");
|
||||
$serial = trim(snmp_get($device, ".1.3.6.1.4.1.850.100.1.1.4.0", "-Ovq", "TRIPPLITE-MIB"), "\"");
|
||||
$version = snmp_get($device, "upsIdentAgentSoftwareVersion.0", "-Ovq", "UPS-MIB");
|
||||
|
||||
?>
|
||||
$sysLocation = trim(snmp_get($device, '.1.3.6.1.4.1.850.10.2.2.1.12.1', '-Ovq', 'TRIPPLITE-MIB'), '"');
|
||||
$sysName = trim(snmp_get($device, '.1.3.6.1.2.1.33.1.1.5.0', '-Ovq', 'TRIPPLITE-MIB'), '"');
|
||||
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.850.100.1.1.4.0', '-Ovq', 'TRIPPLITE-MIB'), '"');
|
||||
$version = snmp_get($device, 'upsIdentAgentSoftwareVersion.0', '-Ovq', 'UPS-MIB');
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
<?php
|
||||
|
||||
$hardware = "Dell ".snmp_get($device, "productIdentificationDisplayName.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$version = snmp_get($device, "productIdentificationVersion.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$features = snmp_get($device, "productIdentificationDescription.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$hardware = 'Dell '.snmp_get($device, 'productIdentificationDisplayName.0', '-Ovq', 'Dell-Vendor-MIB');
|
||||
$version = snmp_get($device, 'productIdentificationVersion.0', '-Ovq', 'Dell-Vendor-MIB');
|
||||
$features = snmp_get($device, 'productIdentificationDescription.0', '-Ovq', 'Dell-Vendor-MIB');
|
||||
|
||||
if (strstr($hardware,"No Such Object available"))
|
||||
{
|
||||
$hardware = $poll_device['sysDescr'];
|
||||
if (strstr($hardware, 'No Such Object available')) {
|
||||
$hardware = $poll_device['sysDescr'];
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,5 +1,3 @@
|
||||
<?php
|
||||
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.674.10893.2.102.3.1.1.9.1", "-OQv", "", ""),'"');
|
||||
|
||||
?>
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.674.10893.2.102.3.1.1.9.1', '-OQv', '', ''), '"');
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
<?php
|
||||
|
||||
if ($poll_device['sysDescr'] == "Neyland 24T")
|
||||
{
|
||||
#$hardware = snmp_get($device, "productIdentificationVendor.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$hardware = "Dell ".snmp_get($device, "productIdentificationDisplayName.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$version = snmp_get($device, "productIdentificationVersion.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$icon = 'dell';
|
||||
if ($poll_device['sysDescr'] == 'Neyland 24T') {
|
||||
// $hardware = snmp_get($device, "productIdentificationVendor.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$hardware = 'Dell '.snmp_get($device, 'productIdentificationDisplayName.0', '-Ovq', 'Dell-Vendor-MIB');
|
||||
$version = snmp_get($device, 'productIdentificationVersion.0', '-Ovq', 'Dell-Vendor-MIB');
|
||||
$icon = 'dell';
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = snmp_get($device, "rndBrgVersion.0", "-Ovq", "RADLAN-MIB");
|
||||
$hardware = str_replace("ATI", "Allied Telesis", $poll_device['sysDescr']);
|
||||
$icon = 'allied';
|
||||
else {
|
||||
$version = snmp_get($device, 'rndBrgVersion.0', '-Ovq', 'RADLAN-MIB');
|
||||
$hardware = str_replace('ATI', 'Allied Telesis', $poll_device['sysDescr']);
|
||||
$icon = 'allied';
|
||||
}
|
||||
$features = snmp_get($device, "rndBaseBootVersion.00", "-Ovq", "RADLAN-MIB");
|
||||
|
||||
$version = str_replace("\"","", $version);
|
||||
$features = str_replace("\"","", $features);
|
||||
$hardware = str_replace("\"","", $hardware);
|
||||
$features = snmp_get($device, 'rndBaseBootVersion.00', '-Ovq', 'RADLAN-MIB');
|
||||
|
||||
?>
|
||||
$version = str_replace('"', '', $version);
|
||||
$features = str_replace('"', '', $features);
|
||||
$hardware = str_replace('"', '', $hardware);
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<?php
|
||||
|
||||
# SNMPv2-SMI::enterprises.367.3.2.1.1.1.1.0 = STRING: "Aficio MP 3350"
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.367.3.2.1.1.1.1.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.367.3.2.1.1.1.1.0 = STRING: "Aficio MP 3350"
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.367.3.2.1.1.1.1.0', '-OQv', '', ''), '" ');
|
||||
|
||||
# SNMPv2-SMI::enterprises.367.3.2.1.1.1.2.0 = STRING: "1.15"
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.367.3.2.1.1.1.2.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.367.3.2.1.1.1.2.0 = STRING: "1.15"
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.367.3.2.1.1.1.2.0', '-OQv', '', ''), '" ');
|
||||
|
||||
# SNMPv2-SMI::enterprises.367.3.2.1.2.1.4.0 = STRING: "M6394300657"
|
||||
$serial = trim(snmp_get($device, "1.3.6.1.4.1.367.3.2.1.2.1.4.0", "-OQv", "", ""),'" ');
|
||||
|
||||
?>
|
||||
// SNMPv2-SMI::enterprises.367.3.2.1.2.1.4.0 = STRING: "M6394300657"
|
||||
$serial = trim(snmp_get($device, '1.3.6.1.4.1.367.3.2.1.2.1.4.0', '-OQv', '', ''), '" ');
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
<?php
|
||||
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.1.0 = STRING: "NSA 2400"
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.2.0 = STRING: "0017C599BD08"
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.3.0 = STRING: "SonicOS Enhanced 5.8.1.7-4o"
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.4.0 = STRING: "5.0.3.3"
|
||||
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.1.0 = STRING: "TZ 210"
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.2.0 = STRING: "0017C568903C"
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.3.0 = STRING: "SonicOS Enhanced 5.6.0.11-61o"
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.4.0 = STRING: "5.0.2.11"
|
||||
|
||||
$hardware = trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.1.0", "-OQv", "", ""),'" ');
|
||||
$serial = trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.2.0", "-OQv", "", ""),'" ');
|
||||
$fwversion = trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.3.0", "-OQv", "", ""),'" ');
|
||||
$romversion = trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.4.0", "-OQv", "", ""),'" ');
|
||||
$version = "(Firmware $fwversion / ROM $romversion)";
|
||||
|
||||
?>
|
||||
// SNMPv2-SMI::enterprises.8741.2.1.1.1.0 = STRING: "NSA 2400"
|
||||
// SNMPv2-SMI::enterprises.8741.2.1.1.2.0 = STRING: "0017C599BD08"
|
||||
// SNMPv2-SMI::enterprises.8741.2.1.1.3.0 = STRING: "SonicOS Enhanced 5.8.1.7-4o"
|
||||
// SNMPv2-SMI::enterprises.8741.2.1.1.4.0 = STRING: "5.0.3.3"
|
||||
// SNMPv2-SMI::enterprises.8741.2.1.1.1.0 = STRING: "TZ 210"
|
||||
// SNMPv2-SMI::enterprises.8741.2.1.1.2.0 = STRING: "0017C568903C"
|
||||
// SNMPv2-SMI::enterprises.8741.2.1.1.3.0 = STRING: "SonicOS Enhanced 5.6.0.11-61o"
|
||||
// SNMPv2-SMI::enterprises.8741.2.1.1.4.0 = STRING: "5.0.2.11"
|
||||
$hardware = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.1.0', '-OQv', '', ''), '" ');
|
||||
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.2.0', '-OQv', '', ''), '" ');
|
||||
$fwversion = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.3.0', '-OQv', '', ''), '" ');
|
||||
$romversion = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.4.0', '-OQv', '', ''), '" ');
|
||||
$version = "(Firmware $fwversion / ROM $romversion)";
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
<?php
|
||||
|
||||
$serial = "";
|
||||
#list(,$hardware,) = explode(" ", $hardware);
|
||||
$serial = '';
|
||||
// list(,$hardware,) = explode(" ", $hardware);
|
||||
$hardware = $poll_device['sysDescr'];
|
||||
|
||||
$features = "";
|
||||
$features = '';
|
||||
|
||||
// Filthy hack to get software version. may not work on anything but 585v7 :)
|
||||
$loop = shell_exec($config['snmpget'].' -M '.$config['mibdir'].' -Ovq '.snmp_gen_auth($device).' '.$device['hostname'].' ifDescr.101');
|
||||
|
||||
$loop = shell_exec($config['snmpget'] . " -M ".$config['mibdir'] . ' -Ovq '. snmp_gen_auth($device) .' '.$device['hostname'].' ifDescr.101');
|
||||
|
||||
if ($loop)
|
||||
{
|
||||
preg_match('@([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)@i',
|
||||
$loop, $matches);
|
||||
if ($loop) {
|
||||
preg_match('@([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)@i', $loop, $matches);
|
||||
$version = $matches[1];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
|
||||
$fnSysVersion = snmp_get($device, ".1.3.6.1.4.1.388.11.2.2.1.3.2.0", "-Ovq");
|
||||
$serial = trim(snmp_get($device, ".1.3.6.1.4.1.388.11.2.2.1.1.0", "-Ovq"),'"');
|
||||
$version = trim(snmp_get($device, ".1.3.6.1.4.1.388.11.2.2.1.3.2.0", "-Ovq"),'"');
|
||||
//preg_match("/HW=(^\s]+)/",$sysDescr,$hardwarematches);
|
||||
preg_match("/\s+[^\s]+/",$poll_device['sysDescr'],$hardwarematches);
|
||||
$hardware = $hardwarematches[0];
|
||||
?>
|
||||
$fnSysVersion = snmp_get($device, '.1.3.6.1.4.1.388.11.2.2.1.3.2.0', '-Ovq');
|
||||
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.388.11.2.2.1.1.0', '-Ovq'), '"');
|
||||
$version = trim(snmp_get($device, '.1.3.6.1.4.1.388.11.2.2.1.3.2.0', '-Ovq'), '"');
|
||||
// preg_match("/HW=(^\s]+)/",$sysDescr,$hardwarematches);
|
||||
preg_match('/\s+[^\s]+/', $poll_device['sysDescr'], $hardwarematches);
|
||||
$hardware = $hardwarematches[0];
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<?php
|
||||
|
||||
# Tranzeo sysDescr is quite uniform :
|
||||
#
|
||||
# Tranzeo TR6SL5, OS 6.8.0(1024), FW TR6-5.0.2SL5, 5.xGHz, 0dBi int. antenna
|
||||
# Tranzeo TR6Rt, OS 6.8.0(1024), FW TR6-3.6.0Rt, 5.xGHz, 19dBi int. antenna
|
||||
# Tranzeo TR6CPQ, OS 6.3.34(1019), FW TR6-2.0.12CPQ, 2.4GHz, 15dBi int. antenna
|
||||
# Tranzeo TR900Rt, OS 6.8.0(1024), FW TR900-3.3.3Rt, 900MHz, 17dBi ext. antenna
|
||||
// Tranzeo sysDescr is quite uniform :
|
||||
//
|
||||
// Tranzeo TR6SL5, OS 6.8.0(1024), FW TR6-5.0.2SL5, 5.xGHz, 0dBi int. antenna
|
||||
// Tranzeo TR6Rt, OS 6.8.0(1024), FW TR6-3.6.0Rt, 5.xGHz, 19dBi int. antenna
|
||||
// Tranzeo TR6CPQ, OS 6.3.34(1019), FW TR6-2.0.12CPQ, 2.4GHz, 15dBi int. antenna
|
||||
// Tranzeo TR900Rt, OS 6.8.0(1024), FW TR900-3.3.3Rt, 900MHz, 17dBi ext. antenna
|
||||
list($hardware, $version, $features, $hardware_antenna) = explode(', ', $poll_device['sysDescr']);
|
||||
|
||||
list($hardware, $version, $features, $hardware_antenna) = explode(", ", $poll_device['sysDescr']);
|
||||
|
||||
list(,$version) = explode(" ", $version);
|
||||
list($version) = explode("(", $version);
|
||||
list(,$features) = explode(" ", $features);
|
||||
|
||||
?>
|
||||
list(,$version) = explode(' ', $version);
|
||||
list($version) = explode('(', $version);
|
||||
list(,$features) = explode(' ', $features);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
|
||||
$hardware = trim(snmp_get($device, ".1.3.6.1.4.1.2011.2.33.20.1.1.1.3.0", "-OQv"),'"');
|
||||
$hardware = trim(snmp_get($device, '.1.3.6.1.4.1.2011.2.33.20.1.1.1.3.0', '-OQv'), '"');
|
||||
|
||||
preg_match("/Version .*\n/",$poll_device['sysDescr'], $matches);
|
||||
$version = trim(str_replace("Version ","",$matches[0]));
|
||||
|
||||
?>
|
||||
preg_match("/Version .*\n/", $poll_device['sysDescr'], $matches);
|
||||
$version = trim(str_replace('Version ', '', $matches[0]));
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<?php
|
||||
|
||||
list($features, $version) = explode("-", trim(str_replace("Vyatta", "", snmp_get($device, "SNMPv2-MIB::sysDescr.0", "-Oqv", "SNMPv2-MIB"))), 2);
|
||||
|
||||
?>
|
||||
list($features, $version) = explode('-', trim(str_replace('Vyatta', '', snmp_get($device, 'SNMPv2-MIB::sysDescr.0', '-Oqv', 'SNMPv2-MIB'))), 2);
|
||||
|
||||
@@ -1,25 +1,19 @@
|
||||
<?php
|
||||
|
||||
# ...253.8.51.1.2.1.20.1 = STRING: "MFG:Xerox;CMD:Adobe PostScript 3,PCL;MDL:Phaser 4510N;CLS:Printer;DES:Xerox Phaser 4510 Laser Printer, PostScript 3, Letter/A4 Size"
|
||||
// ...253.8.51.1.2.1.20.1 = STRING: "MFG:Xerox;CMD:Adobe PostScript 3,PCL;MDL:Phaser 4510N;CLS:Printer;DES:Xerox Phaser 4510 Laser Printer, PostScript 3, Letter/A4 Size"
|
||||
$xinfo = explode(';', trim(snmp_get($device, '1.3.6.1.4.1.253.8.51.1.2.1.20.1', '-OQv', '', ''), '" '));
|
||||
|
||||
$xinfo = explode(';',trim(snmp_get($device, "1.3.6.1.4.1.253.8.51.1.2.1.20.1", "-OQv", "", ""),'" '));
|
||||
|
||||
foreach ($xinfo as $xi)
|
||||
{
|
||||
list($key,$value) = explode(':',$xi);
|
||||
$xerox[$key] = $value;
|
||||
foreach ($xinfo as $xi) {
|
||||
list($key,$value) = explode(':', $xi);
|
||||
$xerox[$key] = $value;
|
||||
}
|
||||
|
||||
list($hardware) = explode(',',$xerox['DES']);
|
||||
list($hardware) = explode(',', $xerox['DES']);
|
||||
|
||||
#SNMPv2-SMI::enterprises.236.11.5.1.1.1.1.0 = STRING: "Xerox Phaser 3200MFP"
|
||||
#SNMPv2-SMI::enterprises.236.11.5.1.1.1.2.0 = STRING: "1.15"
|
||||
|
||||
if ($hardware == '')
|
||||
{
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.236.11.5.1.1.1.1.0", "-OQv", "", ""),'" ');
|
||||
// SNMPv2-SMI::enterprises.236.11.5.1.1.1.1.0 = STRING: "Xerox Phaser 3200MFP"
|
||||
// SNMPv2-SMI::enterprises.236.11.5.1.1.1.2.0 = STRING: "1.15"
|
||||
if ($hardware == '') {
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.236.11.5.1.1.1.1.0', '-OQv', '', ''), '" ');
|
||||
}
|
||||
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.236.11.5.1.1.1.2.0", "-OQv", "", ""),'" ');
|
||||
|
||||
?>
|
||||
$version = trim(snmp_get($device, '1.3.6.1.4.1.236.11.5.1.1.1.2.0', '-OQv', '', ''), '" ');
|
||||
|
||||
@@ -5,5 +5,3 @@ list($version) = explode(',', $poll_device['sysDescr']);
|
||||
preg_match('/Version V(\S+) (.+) Software,/', $poll_device['sysDescr'], $matches);
|
||||
|
||||
$hardware = $matches[2];
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<?php
|
||||
|
||||
$hardware = $poll_device['sysDescr'];
|
||||
|
||||
?>
|
||||
@@ -1,5 +1,3 @@
|
||||
<?php
|
||||
|
||||
$hardware = $poll_device['sysDescr'];
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user