2008 Nov 03 - Mon
Multiple Switch Interfaces
Acktomic's genDevConfig creates it's Default files with one interface per view. For
switches, it would be nice to see all interfaces presented on one page. To do this, I
manually create a file to show these interfaces on one page. Here is a sample config:
target --default--
devicename = sw35
directory-desc = ""
interface-name = ""
long-desc = %short-desc%
short-desc = ""
target-type = cisco-interface
target sw35-ports
targets = "/switches/sw35/FastEthernet0_1;
/switches/sw35/FastEthernet0_2;
/switches/sw35/FastEthernet0_3;
/switches/sw35/FastEthernet0_4;
/switches/sw35/FastEthernet0_5;
/switches/sw35/FastEthernet0_6;
/switches/sw35/FastEthernet0_7;
/switches/sw35/FastEthernet0_8;
/switches/sw35/FastEthernet0_9;
/switches/sw35/FastEthernet0_10;
/switches/sw35/FastEthernet0_11;
/switches/sw35/FastEthernet0_12;
/switches/sw35/FastEthernet0_13;
/switches/sw35/FastEthernet0_14;
/switches/sw35/FastEthernet0_15;
/switches/sw35/FastEthernet0_16;
/switches/sw35/FastEthernet0_17;
/switches/sw35/FastEthernet0_18;
/switches/sw35/FastEthernet0_19;
/switches/sw35/FastEthernet0_20;
/switches/sw35/FastEthernet0_21;
/switches/sw35/FastEthernet0_22;
/switches/sw35/FastEthernet0_23;
/switches/sw35/FastEthernet0_24;
/switches/sw35/GigabitEthernet0_1;
/switches/sw35/GigabitEthernet0_2"
short-desc = "Sw35 ports"
[/OpenSource/Debian/Monitoring/Cricket]
permanent link
Cricket Summation
I have a number of routers, each with an interface to an upstream provider. I'd like to
show a graph with the three providers aggregated. This is a config I did to do so:
target --default--
devicename = statistics
directory-desc = ""
interface-name = ""
long-desc = %short-desc%
short-desc = ""
target-type = standard-interface
target ProviderAggregate
mtargets = "/routers/router1/fastethernet2_0;
/routers/router2/serial1_0;
/routers/router3/atm2_0.1-aal5_layer"
mtargets-ops = "sum()"
short-desc "sum(Prov1, Prov2, Prov3)"
The above is the content of a file located in the /routers subdirectory. This turned out
to be easier than I thought. The file needs the target --default-- section to start. Then
one or more of the aggregate targets can be present. The 'mtargets' simply needs to know
the directory and interface. The basic Default configurations in each subdirectory were
created with devConfig tool from Acktomic.
[/OpenSource/Debian/Monitoring/Cricket]
permanent link
2007 May 29 - Tue
Cricket: Combining Three Graphs Into One
In 2007/05/29's Cricket-User mailing list, there was a useful configuration file snippet
for charting and summing selected sources:
target Net
mtargets ="/Ethernet_To_Building/NSW/52GDC76F02/vlan231;
/Ethernet_To_Building/ACT/12NOC76FF/vlan201;
/Ethernet_To_Building/QLD/14VRC76F06/vlan439;
/Ethernet_To_Building/VIC/O3MLC76F05/vlan436;
/Ethernet_To_Building/SA/55DRC76FG/vlan467;
/Ethernet_To_Building/WA/O6SSC76FE/vlan469;"
mtargets-ops = "sum()"
short-desc = "desc"
filename = " Net Aggregate"
combinationgraph = 1
unknown-is-zero = true
order = 899
Courtesy of Naveen Baldeo.
[/OpenSource/Debian/Monitoring/Cricket]
permanent link
2006 Dec 28 - Thu
Interim getDevConfig Files for Cricket
I've made some further modifications to the Acktomic's genDevConfig files. One fix was to get the H.323 dial-peers to show with current
versions of Cisco's IOS. I've also added some target-type code so that the various errored-second counters on
the T1 interfaces in Cisco's VWIC modules can be displayed.
On the T1 controllers, the following counters are available from the 'current counter' set, and are shown as
guages:
- dsx1CurrentESs: Errored Seconds
- dsx1CurrentSESs: Severely Errored Seconds
- dsx1CurrentSEFSs: Severely Errored Framing Seconds
- dsx1CurrentUASs: Unavailable Seconds
- dsx1CurrentCSSs: Controlled Slip Seconds
- dsx1CurrentPCVs: Path Coding Violations
- dsx1CurrentLESs: Line Errored Seconds
- dsx1CurrentBESs: Bursty Errored Seconds
- dsx1CurrentDMs: Degraded Minutes
- dsx1CurrentLCVs: Line Code Violations
My earlier instructions have a section on replacing various lines. Rather than go through that
again, here are the files that need to be replaced:
Francois from Acktomic will be incorporating these changes into his version. I'll post an update when his
collection has been updated.
Here is a slightly revised command line for scanning voice gateways. There are two additional interace types
that are ignored. The line also shows how to turn on some debugging statements to see what else is performed.
/usr/share/cricket/util/genDevConfig -2 -c snmpro --vendorint --loglevel debug --voip -d 22,81,101 vgw01
[/OpenSource/Debian/Monitoring/Cricket]
permanent link
2006 Nov 18 - Sat
Cricket/Acktomic Installation & Configuration on Debian Etch 2
Introduction
This set of instructions guides you through configuring Cricket for monitoring QoS and SLA statistics on Cisco devices. Modified
versions of Acktomic's template file builders are used for accessing QoS and SLA settings. Cisco has changed some of the RTT MIB
settings. These settings have been tested on IOS 12.4.
Cricket Installation
Install the Cricket package:
apt-get install cricket
Modify permissions so the config file can
be accessed by customized Apache processes:
cd /etc/cricket
chmod 754 config
chown -R cricket.www-data /etc/cricket
In '/etc/cricket/config/Defaults', around line 12, put in the default community string in place of 'public'.
Acktomic Installation
Download and expand the utility archive:
wget http://www.acktomic.com/cricket/genDevConfig_2_0_0beta12d.tar.gz
tar -zxvf genDevConfig_2_0_0beta12d.tar.gz
cd genDevConfig
Remove the CVS directories, and copy the remaining files
and directories to assigned locations:
rm -rf plugins/CVS
rm -rf plugins/genConfig/CVS
cp -r plugins /usr/share/cricket/
rm -rf lib/CVS
rm -rf lib/genConfig/CVS
cp -r lib/genConfig /usr/share/cricket/lib
cp lib/monitorConfig /usr/share/cricket/lib
cp util/genDevConfig /usr/share/cricket/util/
Make the main module executable:
chmod 755 /usr/share/cricket/util/genDevConfig
Acktomic Code Fixups
To be compatible with the new Policy-Map configurations, the file '/usr/share/cricket/plugins/genConfig/CiscoIOS.pm' needs to be
modified.
Around line 54, replace the following lines:
my (%rttAgentType) = ( '2' => 'saa-rtt',
'3' => 'saa-udpecho',
'25' => 'saa-http',
'27' => 'saa-jitter',
'30' => 'saa-ftp'
);
With the following lines:
my (%rttAgentType) = ( '1' => 'notApplicable',
'2' => 'ipIcmpEcho',
'3' => 'ipUdpEchoAppl',
'4' => 'snaRUEcho',
'5' => 'snaLU0EchoAppl',
'6' => 'snaLU2EchoAppl',
'7' => 'snaLU62Echo',
'8' => 'snaLU62EchoAppl',
'9' => 'appleTalkEcho',
'10' => 'appleTalkEchoAppl',
'11' => 'decNetEcho',
'12' => 'decNetEchoAppl',
'13' => 'ipxEcho',
'14' => 'ipxEchoAppl',
'15' => 'isoClnsEcho',
'16' => 'isoClnsEchoAppl',
'17' => 'vinesEcho',
'18' => 'vinesEchoAppl',
'19' => 'xnsEcho',
'20' => 'xnsEchoAppl',
'21' => 'apolloEcho',
'22' => 'apolloEchoAppl',
'23' => 'netbiosEchoAppl',
'24' => 'ipTcpConn',
'25' => 'httpAppl',
'26' => 'dnsAppl',
'27' => 'jitterAppl',
'28' => 'dlswAppl',
'29' => 'dhcpAppl',
'30' => 'ftpAppl',
'31' => 'mplsLspPingAppl',
'32' => 'voipAppl',
'33' => 'rtpAppl',
'34' => 'icmpJitterAppl'
);
Around line 119, replace the following line:
'30' => 'ftpAppl');
With the following lines:
'30' => 'ftpAppl',
'31' => 'mplsLspPingAppl',
'32' => 'voipAppl',
'33' => 'rtpAppl',
'34' => 'icmpJitterAppl'
);
Around line 341, replace the following lines:
} elsif ($opts->{model} =~ /3600/) {
$opts->{chassisttype} = 'Cisco-3600-Router';
$opts->{chassisname} = 'Chassis';
} elsif ($opts->{model} =~ /2600/) {
$opts->{chassisttype} = 'Cisco-2600-Router';
$opts->{chassisname} = 'Chassis';
With the following lines:
} elsif ($opts->{model} =~ /3600/) {
$opts->{chassisttype} = 'Cisco-3600-Router';
$opts->{chassisname} = 'Chassis';
} elsif ($opts->{model} =~ /2800/) {
$opts->{chassisttype} = 'Cisco-2800-Router';
$opts->{chassisname} = 'Chassis';
} elsif ($opts->{model} eq "C1200") {
$opts->{chassisttype} = 'Cisco-1200-AP';
$opts->{chassisname} = 'Chassis';
} elsif ($opts->{model} =~ /2600/) {
$opts->{chassisttype} = 'Cisco-2600-Router';
$opts->{chassisname} = 'Chassis';
Around line 605, replace the following line:
$ifdescr = $ifdescr{$ifindex} . "." . $ifindex;
With the following lines:
#print "ifindex=$ifindex, policydirection=$policydirection, pol_id_cell=$pol_id_cell\n";
$ifdescr = ( 0 != $ifindex ) ? $ifdescr{$ifindex} . "." . $ifindex : "";
# $ifdescr = $ifdescr{$ifindex} . "." . $ifindex;
#print "ifdesc=$ifdescr\n";
Around line 725, replace the following lines:
$ldesc = 'SAA(RTR) Performance agent for round-trip time using ' . $protocol .
' for destination <B>'. $address . " - " . $rttMonCtrlAdminTag{$key} .
'</B><BR>Operational values: 1(Ok) 2(Disconnct) 4(Timeout) 5(Busy)" .
' 6(NoConnection) 7(LackIntRes) 8(BadSeqID) 9(BadData) 16(Error)' ;
$sdesc = 'SAA(RTR) Performance agent for round-trip time using ' . $protocol .
' for destination ip: ' . $address . ' tag: ' . $rttMonCtrlAdminTag{$key};
With the following lines:
$ldesc = 'Cisco SLA (RTR) using ' . $protocol .
' for destination <B>'. $address . " - " . $rttMonCtrlAdminTag{$key} . '</B>' ;
$sdesc = 'Cisco SLA (RTR) using ' . $protocol .
' for destination ip: ' . $address . ' tag: ' . $rttMonCtrlAdminTag{$key};
In the file '/usr/share/cricket/lib/genConfig/Utils.pm', near the end of the file, replace the following lines:
sub translateRttTargetAddr {
my ($type, $value) = @_;
return ("unknown") if (($type ne "saa-rtt") &&
($type ne "saa-udpecho") &&
($type ne "saa-jitter"));
$value = inet_ntoa($value);
Debug("TranslateRttTarget: $value");
return ( $value );
}
With the following lines:
sub translateRttTargetAddr {
my ($type, $value) = @_;
my $bCheck = 0;
$bCheck ||= ( $type eq "ipIcmpEcho" );
$bCheck ||= ( $type eq "ipUdpEchoAppl" );
$bCheck ||= ( $type eq "jitterAppl" );
return ("unknown") if ( !$bCheck );
$value = inet_ntoa($value);
Debug("TranslateRttTarget: $value");
return ( $value );
}
In file /usr/share/cricket/util/genDevConfig, after about line 397, add:
'209' => 'Wireless BVI',
Configuration
Create sub-directories for each device type. Standard directories are usually:
mkdir /etc/cricket/config/routers
mkdir /etc/cricket/config/switches
The file '/etc/cricket/subtree-sets' should therefore have the following configuration:
set normal:
/routers
/switches
Copy default configuration files into each of the two sub-directories:
cp /usr/src/genDevConfig/sample-config/genConfig/Defaults /etc/cricket/config/Defaults.genDev
cp /usr/src/genDevConfig/sample-config/genConfig/Defaults.cisco /etc/cricket/config/Defaults.cisco
cp /usr/src/genDevConfig/sample-config/genConfig/Defaults.netsnmp /etc/cricket/config/Defaults.netsnmp
Place the content of Defaults.cisco.oneunified into /etc/cricket/config. If it exists, remove Defaults.cisco. The various graphs and
such that I've added to the file could be tuned a bit for
color and such. If you have some suggestions, pass them onto me and I'll get them updated.
Here is a sample router configuration:
ip sla monitor responder
ip sla monitor logging traps
ip sla monitor 400101
type jitter dest-ipaddr 172.20.5.74 dest-port 16390 source-ipaddr 172.20.5.73 source-port 16390 codec g729a
tos 184
vrf vrfVoice
tag jitter tun 400101 nrbmin0401 nrbmac0201
frequency 150
ip sla monitor 400111
type jitter dest-ipaddr 172.20.5.90 dest-port 16391 source-ipaddr 172.20.5.89 source-port 16391 codec g729a
tos 184
vrf vrfVoice
tag jitter tun 400111 nrbmin0401 nrcabc0101
frequency 150
ip sla monitor group schedule 1 400101,400111 schedule-period 150 frequency 150 start-time now life forever
I've found that for Tunnels and such, you may need to reload the router so that the Tunnels have been 'created' from NVRAM rather
than the command line. Do a 'sho ip int br' and look at the Method column and compare that with the interfaces and QOS settings that
get collected in the next section. As part of your configuration, you may also want to issue the 'snmp-server ifindex persist'
command to make sure snmp interface indexes persist across reboots.
To create a sample router template, follow this example:
cd /etc/cricket/config/routers
/usr/share/cricket/util/genDevConfig -c snmpro --rtragents --loglevel debug -2 --vendorint --vlans router01
To configure switches, follow this template:
cd /etc/cricket/config/switches
/usr/share/cricket/util/genDevConfig -c snmpro --loglevel debug -2 --vendorint switch01
to configure voice gateways, follow this template (the -d 22 prevents the serial port sub-interfaces from being
listed on the voice interface):
cd /etc/cricket/config/vgw
/usr/share/cricket/util/genDevConfig -2 --vendorint -c snmpro --vendorint -d 22 vgw01
For Cisco Access Points, in the AP Defaults file in the device directory, cisco-interface needs to be changed
to cisco-ap-interface.
Once all devices have been configured, run the following to compile the files. The devices will then be automatically scanned once
every five minutes.
cricket-compile
Operation
To view the graphs:
http://localhost/cgi-bin/cricket/grapher.cgi
Troubleshooting
Before troubleshooting, you should:
su - cricket
This ensures that .rrd files are created in /var/lib/cricket with the correct permissions.
To run the collector manuall to see what errors there are (logLevel command is optional):
/usr/share/cricket/collector -logLevel debug /routers
Debug logs are found in /var/log/cricket. grapher.cgi errors can be found in /var/log/apache2/error.log. Master
debugging flag can be set in /etc/cricket/cricket-conf.pl, with the following statement:
$gLogLevel = "debug";
Future
Based upon the following MIB, CISCO-DOT11-ASSOCIATION-MIB, the following statistics can be collected:
snmpwalk -v2c -c snmpro -m ALL device01 ciscoDot11AssocMIBObjects
Modifications to the following files will be required:
/usr/share/cricket/plugins/genConfig/CiscoIOS.pm
/etc/cricket/config/Defaults.cisco
[/OpenSource/Debian/Monitoring/Cricket]
permanent link
|