For those you that may be interested, here is a workaround I hacked
together last night, to get Network Appliance filer OID's to be have
under Cricket.
The file "netapp" belongs under cricket/util. The file "Default" is the
default file from my installation. It is provided as a sample of what
can be done.
Note: By using the "netapp" script, I also eliminated my BER.pm hack,
since I am now getting the cputime counter directly, rather than through
the SNMP_sessions package.
-- Matthew Lee Stier * Fujitsu Network Communications Unix Systems Administrator | Two Blue Hill Plaza Ph: 914-731-2097 Fx: 914-731-2011 | Sixth Floor Matthew.Stier@fnc.fujitsu.com * Pearl River, NY 10965
#!/opt/local/bin/perl -w # -*- perl -*-
# Cricket: a configuration, polling and data display wrapper for RRD files # # Copyright (C) 1998 Jeff R. Allen and WebTV Networks, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
BEGIN { $gInstallRoot = (($0 =~ m:^(.*/):)[0] || "./") . ".."; }
use lib "$gInstallRoot/lib"; use strict;
use snmpUtils;
if ($#ARGV+1 < 1 || $#ARGV+1 > 2) { print STDERR "usage: $0 hostname [community]\n"; print STDERR "\tcommunity will default to public if you don't give it.\n"; exit 1; }
my($filer) = $ARGV[0]; my($community) = "public"; $community = $ARGV[1] unless (! defined($ARGV[1])); my($snmp) = "$community\@$filer";
my($cpuusage) = "1.3.6.1.4.1.789.1.2.1.2.0"; my($netsent) = "1.3.6.1.4.1.789.1.2.2.2.0"; my($netrcvd) = "1.3.6.1.4.1.789.1.2.2.3.0";
my(@ret) = snmpUtils::get($snmp, $cpuusage, $netsent, $netrcvd);
print $ret[0] . "\n"; print $ret[1] * 1024 . "\n"; print $ret[2] * 1024 . "\n";
# filer sub-tree # # This is where we collect stats on the chassis of our filers # (i.e. memory, CPU, temperature). These are kept separate from # the interfaces themselves since they have quite different # configuration needs.
# All the root target defaults are appropriate here, except # that we want an entry named "filer" available to make things more # readable. This also shows an example of using "forward # references" to the domain variable, which gets set in # each of the target files.
Target --default-- directory-desc = "Network Appliance filers" filer = %auto-target-name% snmp-host = %filer%.%domain% target-type = undef util-dir = %auto-base%/../cricket/util
# OID's we'll be using in this tree OID cpuusage 1.3.6.1.4.1.789.1.2.1.2.0 OID nfsops 1.3.6.1.4.1.789.1.2.2.1.0 OID netsent 1.3.6.1.4.1.789.1.2.2.2.0 OID netrcvd 1.3.6.1.4.1.789.1.2.2.3.0 OID volume0 1.3.6.1.4.1.789.1.5.4.1.6.1 OID snapshot0 1.3.6.1.4.1.789.1.5.4.1.6.2 OID volume1 1.3.6.1.4.1.789.1.5.4.1.6.3 OID snapshot1 1.3.6.1.4.1.789.1.5.4.1.6.4 OID cifsread 1.3.6.1.4.1.789.1.1000.1.2.3.0 OID cifswrite 1.3.6.1.4.1.789.1.1000.1.2.4.0
datasource --default-- rrd-ds-type = GAUGE rrd-heartbeat = 1800 rrd-min = undef rrd-max = undef datasource cpuusage ds-source = "exec:0:%util-dir%/netapp %snmp-host%" rrd-ds-type = COUNTER
datasource nfsops ds-source = snmp://%snmp%/nfsops rrd-ds-type = COUNTER
datasource netsent ds-source = "exec:1:%util-dir%/netapp %snmp-host%" rrd-ds-type = COUNTER
datasource netrcvd ds-source = "exec:2:%util-dir%/netapp %snmp-host%" rrd-ds-type = COUNTER
datasource cifsread ds-source = snmp://%snmp%/cifsread rrd-ds-type = COUNTER
datasource cifswrite ds-source = snmp://%snmp%/cifswrite rrd-ds-type = COUNTER
datasource volume0 ds-source = snmp://%snmp%/volume0 rrd-ds-type = GAUGE
datasource snapshot0 ds-source = snmp://%snmp%/snapshot0 rrd-ds-type = GAUGE
datasource volume1 ds-source = snmp://%snmp%/volume1 rrd-ds-type = GAUGE
datasource snapshot1 ds-source = snmp://%snmp%/snapshot1 rrd-ds-type = GAUGE
targetType NetApp-F330 ds = "cpuusage, netrcvd, netsent, nfsops, cifsread, cifswrite, volume0, snapshot0" view = "cpu: cpuusage, network: netrcvd netsent, nfs: nfsops, cifs: cifsread cifswrite, volume0: volume0 snapshot0" targetType NetApp-F740 ds = "cpuusage, netsent, netrcvd, nfsops, cifsread, cifswrite, volume0, snapshot0, volume1, snapshot1" view = "cpu: cpuusage, network: netrcvd netsent, nfs: nfsops, cifs: cifsread cifswrite, volume0: volume0 snapshot0, volume1: volume1 snapshot1"
# CPU graph cpuusage units = "%" color = dark-green draw-as = AREA legend = "Percent CPU utilization" y-axis = "Percent CPU utilization"
# Network Data graph netrcvd units = "bytes per second" color = "dark-green" draw-as = AREA y-axis = "Network Data" legend = "Network Data received"
graph netsent units = "bytes per second" color = "blue" draw-as = LINE2 legend = "Network Data sent"
# NFS graph nfsops units = "operations per second" color = "dark-green" draw-as = AREA y-axis = "NFS operations" legend = "NFS operations"
# CIFS graph cifsread units = "operations per second" color = "dark-green" draw-as = AREA y-axis = "CIFS operations" legend = "CIFS Data received"
graph cifswrite units = "operations per second" color = "blue" draw-as = LINE2 legend = "CIFS Data sent"
# Disk Volume0 graph volume0 units = "%" color = dark-green draw-as = AREA legend = "volume0" y-axis = "Percent Disk utilization"
graph snapshot0 units = "%" color = blue draw-as = LINE2 legend = "snapshot0"
# Disk Volume1 graph volume1 units = "%" color = dark-green draw-as = AREA y-axis = "Percent Disk utilization" legend = "volume1"
graph snapshot1 units = "%" color = blue draw-as = LINE2 legend = "snapshot1"
This archive was generated by hypermail 2b29 : Mon Mar 06 2000 - 19:00:57 PST