mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
powerconnect cpu :>
git-svn-id: http://www.observium.org/svn/observer/trunk@592 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -78,6 +78,21 @@ while($device = mysql_fetch_array($device_query)) {
|
||||
$graph_type = "device_uptime"; include ("includes/print-device-graph.php"); break;
|
||||
echo("<br />");
|
||||
|
||||
break;
|
||||
|
||||
case "powerconnect":
|
||||
echo("<div class=graphhead>Processor Utilisation</div>");
|
||||
$graph_type = "device_cpu"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
/*
|
||||
echo("<div class=graphhead>Memory Usage</div>");
|
||||
$graph_type = "device_memory"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
*/
|
||||
echo("<div class=graphhead>Device Uptime</div>");
|
||||
$graph_type = "device_uptime"; include ("includes/print-device-graph.php"); break;
|
||||
echo("<br />");
|
||||
|
||||
break;
|
||||
case "Snom":
|
||||
echo("<div class=graphhead>Calls</div>");
|
||||
|
@@ -7,4 +7,27 @@ $snmp_cmd .= " productIdentificationDisplayName.0 productIdentificationVersion.0
|
||||
|
||||
list($hardware, $version, $features) = explode("\n", shell_exec($snmp_cmd));
|
||||
|
||||
$cpurrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/powerconnect-cpu.rrd";
|
||||
|
||||
$cpu_cmd = $config['snmpget'] . " -m RADLAN-rndMng -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'];
|
||||
$cpu_cmd .= " RADLAN-rndMng::rlCpuUtilDuringLastSecond.0";
|
||||
$cpu_usage = trim(shell_exec($cpu_cmd));
|
||||
|
||||
if (!is_file($cpurrd)) {
|
||||
$rrdcreate = shell_exec($config['rrdtool'] ." create $cpurrd --step 300 DS:LOAD:GAUGE:600:-1:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:1:2000 \
|
||||
RRA:AVERAGE:0.5:6:2000 \
|
||||
RRA:AVERAGE:0.5:24:2000 \
|
||||
RRA:AVERAGE:0.5:288:2000 \
|
||||
RRA:MAX:0.5:1:2000 \
|
||||
RRA:MAX:0.5:6:2000 \
|
||||
RRA:MAX:0.5:24:2000 \
|
||||
RRA:MAX:0.5:288:2000 \
|
||||
RRA:MIN:0.5:1:2000 \
|
||||
RRA:MIN:0.5:6:2000 \
|
||||
RRA:MIN:0.5:24:2000 \
|
||||
RRA:MIN:0.5:288:2000");
|
||||
}
|
||||
|
||||
rrdtool_update($cpurrd, "N:$cpu_usage");
|
||||
|
||||
?>
|
||||
|
6844
mibs/RADLAN-MIB.txt
Normal file
6844
mibs/RADLAN-MIB.txt
Normal file
File diff suppressed because it is too large
Load Diff
43
mibs/rfc1442v.smi
Normal file
43
mibs/rfc1442v.smi
Normal file
@@ -0,0 +1,43 @@
|
||||
-- file: rfc1442v.smi - SNMPv1 version of RFC 1442
|
||||
|
||||
SNMPv2-SMI-v1 DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
NetworkAddress, IpAddress, Counter, Gauge,
|
||||
TimeTicks
|
||||
FROM RFC1155-SMI
|
||||
OBJECT-TYPE
|
||||
FROM RFC-1212;
|
||||
|
||||
-- No macro MODULE-IDENTITY in SNMPv1
|
||||
-- No macro OBJECT-IDENTITY in SNMPv1
|
||||
-- SMI Counter
|
||||
Counter-32 ::= Counter
|
||||
-- Counter64 - no equivalent in SNMPv1
|
||||
-- SMI Gauge
|
||||
Gauge-32 ::= Gauge
|
||||
Integer-32 ::= INTEGER (-2147483648..2147483647)
|
||||
Unsigned-32 ::= Gauge
|
||||
-- SMI IpAddress
|
||||
-- NsapAddress - no equivalent in SNMPv1
|
||||
-- SMI Opaque
|
||||
-- SMI TimeTicks
|
||||
-- UInteger32 - no equivalent in SNMPv1
|
||||
-- Using defintion of macro OBJECT-TYPE from RFC 1212
|
||||
-- No macro NOTIFICATION-TYPE in SNMPv1
|
||||
|
||||
internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
|
||||
directory OBJECT IDENTIFIER ::= { internet 1 }
|
||||
mgmt OBJECT IDENTIFIER ::= { internet 2 }
|
||||
experimental OBJECT IDENTIFIER ::= { internet 3 }
|
||||
private OBJECT IDENTIFIER ::= { internet 4 }
|
||||
enterprises OBJECT IDENTIFIER ::= { private 1 }
|
||||
security OBJECT IDENTIFIER ::= { internet 5 }
|
||||
snmpV2 OBJECT IDENTIFIER ::= { internet 6 }
|
||||
snmpDomains OBJECT IDENTIFIER ::= { snmpV2 1 }
|
||||
snmpProxys OBJECT IDENTIFIER ::= { snmpV2 2 }
|
||||
snmpModules OBJECT IDENTIFIER ::= { snmpV2 3 }
|
||||
|
||||
|
||||
END
|
||||
|
130
mibs/rfc1451.mi1
Normal file
130
mibs/rfc1451.mi1
Normal file
@@ -0,0 +1,130 @@
|
||||
-- MIB created 10/05/94 13:42:27, by
|
||||
-- SMIC (the next generation) version 1.6.15, October 3, 1994.
|
||||
|
||||
-- SNMPv2-SMI-v1 DEFINITIONS ::= BEGIN
|
||||
|
||||
-- From file: "rfc1442.sm2"
|
||||
-- Compile options "X A"
|
||||
|
||||
-- SMI Counter32
|
||||
-- SMI Counter64
|
||||
-- SMI Gauge32
|
||||
-- SMI Integer32
|
||||
-- SMI IpAddress
|
||||
-- SMI NsapAddress
|
||||
-- SMI Opaque
|
||||
-- SMI TimeTicks
|
||||
-- SMI UInteger32
|
||||
|
||||
-- internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
|
||||
-- directory OBJECT IDENTIFIER ::= { internet 1 }
|
||||
-- mgmt OBJECT IDENTIFIER ::= { internet 2 }
|
||||
-- experimental OBJECT IDENTIFIER ::= { internet 3 }
|
||||
-- private OBJECT IDENTIFIER ::= { internet 4 }
|
||||
-- enterprises OBJECT IDENTIFIER ::= { private 1 }
|
||||
-- security OBJECT IDENTIFIER ::= { internet 5 }
|
||||
-- snmpV2 OBJECT IDENTIFIER ::= { internet 6 }
|
||||
-- snmpDomains OBJECT IDENTIFIER ::= { snmpV2 1 }
|
||||
-- snmpProxys OBJECT IDENTIFIER ::= { snmpV2 2 }
|
||||
-- snmpModules OBJECT IDENTIFIER ::= { snmpV2 3 }
|
||||
|
||||
|
||||
-- END
|
||||
|
||||
|
||||
SNMPv2-TC-v1 DEFINITIONS ::= BEGIN
|
||||
|
||||
-- From file: "rfc1443.sm2"
|
||||
-- Compile options "X G A"
|
||||
|
||||
-- IMPORTS
|
||||
-- TimeTicks
|
||||
-- FROM SNMPv2-SMI-v1;
|
||||
IMPORTS
|
||||
TimeTicks
|
||||
FROM RFC1155-SMI;
|
||||
|
||||
DisplayString ::= OCTET STRING(SIZE(0..255))
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
PhysAddress ::= OCTET STRING
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
MacAddress ::= OCTET STRING(SIZE(6))
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
TruthValue ::= INTEGER {
|
||||
true(1),
|
||||
false(2)
|
||||
}
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
TestAndIncr ::= INTEGER(0..2147483647)
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
AutonomousType ::= OBJECT IDENTIFIER
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
InstancePointer ::= OBJECT IDENTIFIER
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
RowStatus ::= INTEGER {
|
||||
active(1),
|
||||
notInService(2),
|
||||
notReady(3),
|
||||
createAndGo(4),
|
||||
createAndWait(5),
|
||||
destroy(6)
|
||||
}
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
TimeStamp ::= TimeTicks
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
TimeInterval ::= INTEGER(0..2147483647)
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
DateAndTime ::= OCTET STRING(SIZE(8 | 11))
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
RowPointer ::= OBJECT IDENTIFIER
|
||||
-- TEXTUAL-CONVENTION
|
||||
-- Status
|
||||
-- mandatory
|
||||
|
||||
|
||||
END
|
||||
|
||||
|
||||
SNMPv2-CONF-v1 DEFINITIONS ::= BEGIN
|
||||
|
||||
-- From file: "rfc1444.sm2"
|
||||
-- Compile options "X A"
|
||||
|
||||
|
||||
END
|
||||
|
||||
|
||||
|
169
mibs/rlmng.mib
Normal file
169
mibs/rlmng.mib
Normal file
@@ -0,0 +1,169 @@
|
||||
RADLAN-rndMng DEFINITIONS ::= BEGIN
|
||||
|
||||
-- Title: RADLAN Management Private Extension
|
||||
-- Version: 7.45
|
||||
-- Date: 19 Dec 2006
|
||||
-- 28-Feb-2005 Added rlCpuUtilEnable
|
||||
-- 28-Feb-2005 Added rlCpuUtilDuringLastSecond
|
||||
-- 28-Feb-2005 Added rlCpuUtilDuringLastMinute
|
||||
-- 28-Feb-2005 Added rlCpuUtilDuringLast5Minutes
|
||||
-- 13-Jun-2006 Added value {none} of rndAction
|
||||
-- 20-Jun-2006 Added rlRebootDelay
|
||||
-- 19-Dec-2006 Added resetToFactoryDefaults
|
||||
|
||||
IMPORTS
|
||||
rnd FROM RADLAN-MIB
|
||||
DisplayString FROM SNMPv2-TC-v1
|
||||
Unsigned32,
|
||||
MODULE-IDENTITY, OBJECT-TYPE, TimeTicks FROM SNMPv2-SMI
|
||||
RowStatus, TruthValue,
|
||||
TEXTUAL-CONVENTION FROM SNMPv2-TC;
|
||||
|
||||
|
||||
rndMng MODULE-IDENTITY
|
||||
LAST-UPDATED "200606200000Z"
|
||||
ORGANIZATION "Radlan Computer Communications Ltd."
|
||||
CONTACT-INFO
|
||||
"radlan.com"
|
||||
DESCRIPTION
|
||||
"The private MIB module definition for RND general management MIB."
|
||||
REVISION "200606200000Z"
|
||||
DESCRIPTION
|
||||
"Added rlRebootDelay object"
|
||||
REVISION "200406010000Z"
|
||||
DESCRIPTION
|
||||
"Initial version of this MIB."
|
||||
::= { rnd 1 }
|
||||
|
||||
|
||||
rndSysId OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Identification of an RND device. The device type for each
|
||||
integer clarifies the sysObjectID in MIB - II."
|
||||
::= { rndMng 1 }
|
||||
|
||||
rndAction OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
reset(1),
|
||||
sendNetworkTab(2),
|
||||
deleteNetworkTab(3),
|
||||
sendRoutingTab(4), -- Level II
|
||||
deleteRoutingTab(5),
|
||||
sendLanTab(6),
|
||||
deleteLanTab(7),
|
||||
deleteArpTab(8),
|
||||
sendArpTab(9),
|
||||
deleteRouteTab(10), -- Level III
|
||||
sendRouteTab(11),
|
||||
backupSPFRoutingTab(12),
|
||||
backupIPRoutingTab(13),
|
||||
backupNetworkTab(14),
|
||||
backupLanTab(15),
|
||||
backupArpTab(16),
|
||||
backupIPXRipTab(17),
|
||||
backupIPXSAPTab(18),
|
||||
resetStartupCDB(19),
|
||||
eraseStartupCDB(20),
|
||||
deleteZeroHopRoutingAllocTab(21),
|
||||
slipDisconnect(22),
|
||||
deleteDynamicLanTab(23),
|
||||
eraseRunningCDB(24),
|
||||
copyStartupToRunning(25),
|
||||
none(26),
|
||||
resetToFactoryDefaults(27)
|
||||
}
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This variable enables the operator to perform one of the
|
||||
specified actions on the tables maintained by the network device.
|
||||
Send actions require support of proprietery File exchange
|
||||
protocol."
|
||||
::= { rndMng 2 }
|
||||
|
||||
rndFileName OBJECT-TYPE
|
||||
SYNTAX OCTET STRING -- SIZE 256
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The name of the file used internally by RND for transferring
|
||||
tables maintained by network devices, using a prorietary File
|
||||
exchange protocol."
|
||||
::= { rndMng 3 }
|
||||
|
||||
rlSnmpVersionSupported OBJECT-TYPE
|
||||
SYNTAX OCTET STRING (SIZE(1))
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Indicates the snmp versions that are supported by
|
||||
this device."
|
||||
::= { rndMng 4 }
|
||||
|
||||
rlSnmpMibVersion OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Indicates the snmp support version that is supported by
|
||||
this device."
|
||||
::= { rndMng 5 }
|
||||
|
||||
rlCpuUtilEnable OBJECT-TYPE
|
||||
SYNTAX TruthValue
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Enables measurement of the device CPU utilization.
|
||||
In order to get real values for rlCpuUtilDuringLastSecond, rlCpuUtilDuringLastMinute
|
||||
and rlCpuUtilDuringLast5Minutes, the value of this object must be true."
|
||||
DEFVAL { true }
|
||||
::= { rndMng 6 }
|
||||
|
||||
rlCpuUtilDuringLastSecond OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..101)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Percentage of the device CPU utilization during last second.
|
||||
The value 101 is a dummy value, indicating that the CPU utilization was
|
||||
not measured (since measurement is disabled or was disabled during last second)."
|
||||
::= { rndMng 7 }
|
||||
|
||||
rlCpuUtilDuringLastMinute OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..101)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Percentage of the device CPU utilization during last minute.
|
||||
The value 101 is a dummy value, indicating that the CPU utilization was
|
||||
not measured (since measurement is disabled or was disabled during last minute)."
|
||||
::= { rndMng 8 }
|
||||
|
||||
rlCpuUtilDuringLast5Minutes OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..101)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Percentage of the device CPU utilization during the last 5 minutes.
|
||||
The value 101 is a dummy value, indicating that the CPU utilization was
|
||||
not measured (since measurement is disabled or was disabled during last 5 minutes)."
|
||||
::= { rndMng 9 }
|
||||
|
||||
rlRebootDelay OBJECT-TYPE
|
||||
SYNTAX TimeTicks
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Setting the variable will cause the device to reboot rlRebootDelay timeticks
|
||||
from the moment this variable was set.
|
||||
If not set, the variable will return a value of 4294967295.
|
||||
If set to 4294967295, reboot action is cancelled.
|
||||
The maximum delay is set by the host parameter: reboot_delay_max"
|
||||
::= { rndMng 10 }
|
||||
|
||||
END
|
||||
|
Reference in New Issue
Block a user