mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
improve poller (refresh $device array when we start a new device, so we don't get issues with overlap) remove old crap from catos poller, add CISCO-CEF mibs
git-svn-id: http://www.observium.org/svn/observer/trunk@1619 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -147,7 +147,7 @@ $config['rancid_ignorecomments'] = 0; # Ignore lines starting with #
|
||||
### Ignores & Allows
|
||||
|
||||
$config['bad_if'] = array("voip-null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0",
|
||||
"-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm", "container",
|
||||
"-atm layer", "-atm subif", "-shdsl", "-aal5", "-atm", "container",
|
||||
"async", "plip", "-physical", "-signalling", "control", "container", "unrouted",
|
||||
"bri", "-bearer", "bluetooth", "isatap", "ras", "qos", "miniport", "sonet/sdh",
|
||||
"span rp", "span sp", "sslvpn");
|
||||
|
@@ -1,15 +1,5 @@
|
||||
<?php
|
||||
|
||||
$community = $device['community'];
|
||||
$id = $device['device_id'];
|
||||
$hostname = $device['hostname'];
|
||||
$port = $device['port'];
|
||||
$snmpver = $device['snmpver'];
|
||||
|
||||
$temprrd = $config['rrd_dir'] . "/" . $hostname . "/temp.rrd";
|
||||
$cpurrd = $config['rrd_dir'] . "/" . $hostname . "/cpu.rrd";
|
||||
$memrrd = $config['rrd_dir'] . "/" . $hostname . "/mem.rrd";
|
||||
|
||||
if(strstr($ciscomodel, "OID")){ unset($ciscomodel); }
|
||||
if(!strstr($ciscomodel, " ") && strlen($ciscomodel) >= '3') {
|
||||
$hardware = $ciscomodel;
|
||||
@@ -23,32 +13,4 @@
|
||||
list(,$features) = explode("-", $features);
|
||||
|
||||
|
||||
|
||||
|
||||
list ($cpu5m, $cpu5s) = explode("\n", shell_exec($config['snmpget'] . " -M ".$config['mibdir'] . " -m OLD-CISCO-CPU-MIB -O qv -$snmpver -c $community $hostname:$port 1.3.6.1.4.1.9.2.1.58.0 1.3.6.1.4.1.9.2.1.56.0"));
|
||||
$cpu5m = $cpu5m + 0;
|
||||
$cpu5s = $cpu5s + 0;
|
||||
|
||||
echo("$hostname\n");
|
||||
|
||||
if (!is_file($cpurrd)) {
|
||||
$rrdcreate = `rrdtool create $cpurrd --step 300 \
|
||||
DS:LOAD5S:GAUGE:600:-1:100 \
|
||||
DS:LOAD5M:GAUGE:600:-1:100 \
|
||||
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`;
|
||||
}
|
||||
|
||||
rrdtool_update($cpurrd, "N:$cpu5s:$cpu5m");
|
||||
|
||||
include("includes/polling/cisco-processors.inc.php");
|
||||
include("includes/polling/cisco-mempool.inc.php");
|
||||
include("includes/polling/cisco-entity-sensors.inc.php");
|
||||
|
||||
?>
|
||||
|
2965
mibs/CISCO-CEF-MIB
Normal file
2965
mibs/CISCO-CEF-MIB
Normal file
File diff suppressed because it is too large
Load Diff
453
mibs/CISCO-CEF-TC
Normal file
453
mibs/CISCO-CEF-TC
Normal file
@@ -0,0 +1,453 @@
|
||||
-- *------------------------------------------------------------------
|
||||
-- * CISCO-CEF-TC.my: Cisco CEF TC.
|
||||
-- *
|
||||
-- * Sep 2005, Rohit Mendiratta
|
||||
-- *
|
||||
-- * This MIB module is used to define Textual Conventions
|
||||
-- * for Cisco Express Forwarding (CEF).
|
||||
-- *
|
||||
-- * Copyright (c) 2005 by Cisco Systems, Inc.
|
||||
-- * All rights reserved.
|
||||
-- *
|
||||
-- *------------------------------------------------------------------
|
||||
CISCO-CEF-TC DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY
|
||||
FROM SNMPv2-SMI
|
||||
TEXTUAL-CONVENTION
|
||||
FROM SNMPv2-TC
|
||||
ciscoMgmt
|
||||
FROM CISCO-SMI;
|
||||
|
||||
ciscoCefTextualConventions MODULE-IDENTITY
|
||||
LAST-UPDATED "200509300000Z"
|
||||
ORGANIZATION "Cisco Systems, Inc."
|
||||
CONTACT-INFO
|
||||
"Postal: Cisco Systems, Inc.
|
||||
170 West Tasman Drive
|
||||
San Jose, CA 95134-1706
|
||||
USA
|
||||
|
||||
Tel: +1 800 553-NETS
|
||||
|
||||
E-mail: cs-cef@cisco.com"
|
||||
|
||||
DESCRIPTION
|
||||
"This MIB module defines Textual Conventions and
|
||||
OBJECT-IDENTITIES for use in documents defining
|
||||
management information base (MIBs) modules for
|
||||
managing Cisco Express Forwarding (CEF)."
|
||||
REVISION "200509300000Z"
|
||||
DESCRIPTION
|
||||
"Initial version of this MIB module."
|
||||
::= { ciscoMgmt 493 }
|
||||
|
||||
-- +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
-- Textual Conventions
|
||||
-- +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
CefIpVersion ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The version of CEF IP forwarding."
|
||||
SYNTAX INTEGER {
|
||||
ipv4(1),
|
||||
ipv6(2)
|
||||
}
|
||||
|
||||
CefAdjLinkType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Link type for the adjacency. The adjacency link type
|
||||
identifies protocol stack on neighbour device which will
|
||||
process packets fed through adjacency."
|
||||
SYNTAX INTEGER {
|
||||
ipv4 (1),
|
||||
ipv6 (2),
|
||||
mpls (3), -- For MPLS Label
|
||||
raw (4), -- For bridging etc
|
||||
unknown (5)
|
||||
}
|
||||
|
||||
CefAdjacencySource ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The mechanism by which the adjacency is learned.
|
||||
As the mechanism of learning the adjacency can be
|
||||
multiple (e.g. 'arp' and 'atmPVC'), hence the
|
||||
value of this object represents the bit mask of
|
||||
adjacency sources."
|
||||
SYNTAX BITS {
|
||||
atom (0), -- Any Transport over MPLS
|
||||
linkRawAdj (1), -- Raw Link
|
||||
ipPseudowireAdj (2), -- IP Pseudowire
|
||||
arp (3),
|
||||
p2pAdj (4),
|
||||
frMap (5), -- Frame Relay Map
|
||||
atmPVC (6), -- ATM PVC
|
||||
atmSVC (7), -- ATM SVC
|
||||
atmTVC (8), -- ATM Tag VC
|
||||
nbma (9), -- Non-Broadcast Multiple
|
||||
-- Access Media
|
||||
mpoa (10), -- Multi-Protocol Over ATM
|
||||
atmBundle (11), -- ATM Bundle
|
||||
lec (12), -- LAN Emulation Client
|
||||
nhrp (13), -- NBMA Next Hop
|
||||
-- Resolution Protocol
|
||||
ipv6ND (14), -- IPv6 Neighbour Discovery
|
||||
cmcc (15), -- Cisco Mainframe Channel
|
||||
-- Connection
|
||||
ipv6SixtoFourTunnel (16), -- IPv6 6to4 Tunnel
|
||||
ipv6IsaTapTunnel (17), -- IPv6 ISATAP Tunnel
|
||||
ipv6AutoTunnel (18), -- IPv6 Auto Tunnel
|
||||
fibLc (19), -- Linecard FIB
|
||||
virtual (20),
|
||||
multicast (21),
|
||||
unknown (22)
|
||||
}
|
||||
|
||||
CefPathType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Type of the CEF Path.
|
||||
receive(1) : path for the address
|
||||
configured on any of the
|
||||
interface in the device.
|
||||
|
||||
connectedPrefix(2) : connected prefix path
|
||||
|
||||
attachedPrefix(3) : attached prefix path
|
||||
|
||||
attachedHost(4) : attached host path
|
||||
|
||||
attachedNexthop(5) : attached next hop path
|
||||
|
||||
recursiveNexthop(6) : recursive next hop path
|
||||
|
||||
adjacencyPrefix(7) : adjacency prefix path
|
||||
|
||||
specialPrefix(8) : special prefix path
|
||||
|
||||
unknown(9): : unknown path
|
||||
."
|
||||
SYNTAX INTEGER {
|
||||
receive (1),
|
||||
connectedPrefix (2),
|
||||
attachedPrefix (3),
|
||||
attachedHost (4),
|
||||
attachedNexthop (5),
|
||||
recursiveNexthop (6),
|
||||
adjacencyPrefix (7),
|
||||
specialPrefix (8),
|
||||
unknown (9)
|
||||
}
|
||||
|
||||
CefPrefixSearchState ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The state of prefix search operation.
|
||||
The description of each state is given below:
|
||||
|
||||
running(1) : this state signifies that a prefix
|
||||
search request is running.
|
||||
|
||||
matchFound(2) : this state signifies that a prefix
|
||||
search request is completed and a prefix
|
||||
match has been found.
|
||||
|
||||
noMatchFound(3) : this state signifies that a prefix
|
||||
search request is completed and a prefix
|
||||
match has not been found.
|
||||
"
|
||||
SYNTAX INTEGER {
|
||||
running (1),
|
||||
matchFound (2),
|
||||
noMatchFound (3)
|
||||
}
|
||||
|
||||
CefForwardingElementSpecialType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Type of special forwarding element
|
||||
|
||||
illegal(1) : illegal special forwarding element.
|
||||
the packet will be dropped.
|
||||
|
||||
punt(2) : the packet will be punted to the
|
||||
next switching path
|
||||
|
||||
drop(3) : not supported for Destination IP to next hop
|
||||
interface and the packet will be dropped
|
||||
|
||||
discard(4) : the packet is for Destination IP through
|
||||
next hop interface and it will be discarded
|
||||
|
||||
null(5) : the packet is for Destination IP to null0,
|
||||
it will be dropped
|
||||
|
||||
glean(6) : an attempt will be made to complete the
|
||||
encapsulation string through address
|
||||
resolution
|
||||
|
||||
unResolved(7): unresolved forwarding element.
|
||||
the packet will be dropped unconditionally.
|
||||
|
||||
noRoute(8) : no route forwarding element.
|
||||
This forwarding element will result
|
||||
in rate limited punts to the next
|
||||
switching path(to generate ICMP
|
||||
no route message)
|
||||
|
||||
none(9) : not a special forwarding element and
|
||||
the value of this object should be
|
||||
ignored
|
||||
|
||||
|
||||
"
|
||||
SYNTAX INTEGER {
|
||||
illegal (1),
|
||||
punt (2),
|
||||
drop (3),
|
||||
discard (4),
|
||||
null (5),
|
||||
glean (6),
|
||||
unresolved (7),
|
||||
noRoute (8),
|
||||
none (9)
|
||||
}
|
||||
|
||||
CefMplsLabelList ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This contains a list of MPLS Labels,
|
||||
each separated by the ';' (semi-colon) character.
|
||||
|
||||
MPLS Label values are in accordance with the
|
||||
MplsLabel TEXTUAL-CONVENTION defined in the
|
||||
MPLS-TC-MIB.
|
||||
|
||||
The following is en example containing two MPLS labels:
|
||||
|
||||
4294;100
|
||||
|
||||
An empty string value for this object indicates
|
||||
no MPLS Labels in this list.
|
||||
"
|
||||
SYNTAX OCTET STRING (SIZE (0..255))
|
||||
|
||||
CefAdminStatus ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Admin status of CEF. The admin status of CEF
|
||||
may differ from the oper status of CEF depending
|
||||
upon the success of the admin operation."
|
||||
SYNTAX INTEGER {
|
||||
enabled (1),
|
||||
disabled (2)
|
||||
}
|
||||
|
||||
CefOperStatus ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Operational status of CEF."
|
||||
SYNTAX INTEGER {
|
||||
up (1), -- running
|
||||
down (2) -- not running
|
||||
}
|
||||
|
||||
CefFailureReason ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Reason of CEF Failure:
|
||||
|
||||
none(1) : no failure
|
||||
|
||||
mallocFailure(2) : memory allocation failed for CEF
|
||||
|
||||
hwFailure(3) : hardware interface failure
|
||||
for CEF
|
||||
|
||||
keepaliveFailure(4) : keepalive was not received from
|
||||
the CEF peer entity
|
||||
|
||||
noMsgBuffer(5) : message buffers were exhausted
|
||||
while preparing IPC message to be
|
||||
sent to the CEF peer entity
|
||||
|
||||
invalidMsgSize(6) : IPC message was received with
|
||||
invalid size from the
|
||||
CEF peer entity
|
||||
|
||||
internalError(7) : Some other internal error was
|
||||
detected for CEF
|
||||
"
|
||||
SYNTAX INTEGER {
|
||||
none (1),
|
||||
mallocFailure (2),
|
||||
hwFailure (3),
|
||||
keepaliveFailure (4),
|
||||
noMsgBuffer (5),
|
||||
invalidMsgSize (6),
|
||||
internalError (7)
|
||||
}
|
||||
|
||||
CefCCType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Type of the consistency checker.
|
||||
|
||||
lcDetect : This is an active consistency checker
|
||||
which is triggered when a packet cannot
|
||||
be forwarded because the prefix is not
|
||||
in the forwarding table. It Detects
|
||||
missing prefixes on the linecard CEF
|
||||
database by sending the missing prefixes
|
||||
to the RP.
|
||||
|
||||
scanFibLcRp : This is an passive consistency checker
|
||||
which performs a passive scan check of
|
||||
the table on the line card.
|
||||
|
||||
This consistency checker operates on
|
||||
the line card by examining the FIB table
|
||||
for a configurable time period and sending
|
||||
the next n prefixes to the RP.
|
||||
|
||||
scanFibRpLc : This is an passive consistency checker
|
||||
which performs a passive scan check of
|
||||
RP by examining the FIB table for
|
||||
a configurable period and
|
||||
sending the next n prefixes to the
|
||||
line card.
|
||||
|
||||
scanRibFib : This is an passive consistency checker
|
||||
which compares routing information base
|
||||
(RIB) to the FIB table at a configurable
|
||||
interval and provides the number of
|
||||
entries missing from the FIB table.
|
||||
|
||||
scanFibRib : This is an passive consistency checker
|
||||
which compares FIB Tables to the
|
||||
routing information base (RIB)
|
||||
at a configurable interval and provides
|
||||
the number of entries missing from the
|
||||
FIB table.
|
||||
|
||||
scanFibHwSw : This is an passive consistency checker
|
||||
which compares FIB Tables in hardware
|
||||
to the FIB Tables in RP.
|
||||
|
||||
scanFibSwHw : This is an passive consistency checker
|
||||
which compares FIB Tables in RP
|
||||
to the FIB Tables in hardware.
|
||||
|
||||
fullScanRibFib : This is an active consistency checker
|
||||
which is triggered by Management Station
|
||||
request. It compares the entire routing
|
||||
information base (RIB) to the FIB table
|
||||
and provide the number of entries missing
|
||||
from the FIB Table.
|
||||
|
||||
fullScanFibRib : This is an active consistency checker
|
||||
which is triggered by Management Station
|
||||
request. It compares the FIB table to the
|
||||
routing information base (RIB)
|
||||
and provide the number of entries missing
|
||||
from the FIB Table.
|
||||
|
||||
fullScanFibRpLc : This is an active consistency checker
|
||||
which is triggered by Management Station
|
||||
request. It compares the RP FIB Table
|
||||
with FIB Table on each LC and report
|
||||
inconsistencies.
|
||||
|
||||
fullScanFibLcRp : This is an active consistency checker
|
||||
which is triggered by Management Station
|
||||
request. It compares the Fib Table on LC
|
||||
with FIB table on RP and report
|
||||
inconsistencies.
|
||||
|
||||
fullScanFibHwSw : This is an active consistency checker
|
||||
which is triggered by Management Station
|
||||
request. It compares the Fib Table in
|
||||
hardware with FIB table in RP and report
|
||||
inconsistencies.
|
||||
|
||||
fullScanFibSwHw : This is an active consistency checker
|
||||
which is triggered by Management Station
|
||||
request. It compares the Fib Table in RP
|
||||
with FIB table in hardware and report
|
||||
inconsistencies."
|
||||
SYNTAX INTEGER {
|
||||
lcDetect (1),
|
||||
scanFibLcRp (2),
|
||||
scanFibRpLc (3),
|
||||
scanRibFib (4),
|
||||
scanFibRib (5),
|
||||
scanFibHwSw (6),
|
||||
scanFibSwHw (7),
|
||||
fullScanRibFib (8),
|
||||
fullScanFibRib (9),
|
||||
fullScanFibRpLc (10),
|
||||
fullScanFibLcRp (11),
|
||||
fullScanFibHwSw (12),
|
||||
fullScanFibSwHw (13)
|
||||
}
|
||||
|
||||
CefCCAction ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The action to be performed for the consistency
|
||||
checkers.
|
||||
|
||||
ccActionStart(1) : start the Consistency checker
|
||||
operation.
|
||||
|
||||
ccActionAbort(2) : abort the Consistency checker
|
||||
operation. After aborting, the
|
||||
active process must recover.
|
||||
This can take some time, and
|
||||
during this period, the scan
|
||||
cannot be restarted.
|
||||
|
||||
ccActionNone(3) : no operation is being performed
|
||||
on consistency checkers.
|
||||
|
||||
"
|
||||
SYNTAX INTEGER {
|
||||
ccActionStart (1),
|
||||
ccActionAbort (2),
|
||||
ccActionNone (3)
|
||||
}
|
||||
|
||||
CefCCStatus ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The status of consistency checker operation.
|
||||
The description of each state is given below:
|
||||
|
||||
ccStatusIdle(1) : this state signifies that
|
||||
no consistency checker request
|
||||
is being performed.
|
||||
|
||||
ccStatusRunning(2) : this state signifies that
|
||||
consistency checker request is
|
||||
in progress.
|
||||
|
||||
ccStatusDone(3) : this state signifies that
|
||||
consistency checker request is
|
||||
over.
|
||||
|
||||
"
|
||||
SYNTAX INTEGER {
|
||||
ccStatusIdle (1),
|
||||
ccStatusRunning (2),
|
||||
ccStatusDone (3)
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
|
||||
|
||||
|
@@ -51,9 +51,10 @@ if (isset($options['d'])) { echo("DEBUG!\n"); $debug = 1; }
|
||||
|
||||
echo("Starting polling run:\n\n");
|
||||
$polled_devices = 0;
|
||||
$device_query = mysql_query("SELECT * FROM `devices` WHERE `ignore` = 0 AND `disabled` = 0 $where ORDER BY `device_id` ASC");
|
||||
while ($device = mysql_fetch_array($device_query))
|
||||
$device_query = mysql_query("SELECT `device_id` FROM `devices` WHERE `ignore` = 0 AND `disabled` = 0 $where ORDER BY `device_id` ASC");
|
||||
while ($device = mysql_fetch_assoc($device_query))
|
||||
{
|
||||
$device = mysql_fetch_assoc(mysql_query("SELECT * FROM `devices` WHERE `device_id` = '".$device['device_id']."'"));
|
||||
$status = 0; unset($array);
|
||||
$device_start = utime(); // Start counting device poll time
|
||||
|
||||
|
Reference in New Issue
Block a user