Skip to content

Commit

Permalink
check_netappfiler.py is now up2date
Browse files Browse the repository at this point in the history
Some clean up and adjustments also done.

Signed-off-by: Sven Velt <[email protected]>
  • Loading branch information
wAmpIre committed Jan 11, 2011
1 parent 250587a commit 063cf67
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 47 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2011-01-11:
===========
- Move old scripts "check_netappfiler(|_netsnmp).py" to old/
- Rename "check_naf.py" to "check_netappfiler.py"
- Adjust test scripts "testall*.sh"

2009-03-19:
===========
- Re-Added "version" subsystem due to user request
Expand Down
19 changes: 13 additions & 6 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Quick guide to get SNMPv1 up and running on ONTAP:

- Set up some things on the FAS:
- Set up SNMP on the FAS/ONTAP:

toaster> snmp contact Toaster Master <[email protected]>
toaster> snmp location Somewhere in the basement
Expand All @@ -9,8 +7,17 @@ Quick guide to get SNMPv1 up and running on ONTAP:

- On your UNIX box:

+ You need "snmpget" as "/usr/bin/snmpget".
+ Either (recommended) ...

* Install NET-SNMP Python bindings

On Debian/Ubuntu: sudo apt-get install libsnmp-python

+ ... or

* You need "snmp(get|walk)" as "/usr/bin/snmp(get|walk)"
or specify path with "--path /PATH/TO/"

+ root@monitor:~> .../check_netappfiler.py -H toaster
NETAPP(global) OK - FAS2020: The system's global status is normal.
- nagios@monitor:~> .../check_netappfiler.py -H toaster
NETAPP(global) OK - FAS2020: The system's global status is normal.

2 changes: 1 addition & 1 deletion check_naf.py → check_netappfiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RETURNSTRINGS = { 0: "OK", 1: "WARNING", 2: "CRITICAL", 3: "UNKNOWN", 127: "UNKNOWN" }
RETURNCODE = { 'OK': 0, 'WARNING': 1, 'CRITICAL': 2, 'UNKNOWN': 3 }

available_subsys = ['global', 'version', 'cpu', 'environment', 'nvram', 'disk', 'sparedisk', 'faileddisk', 'fs', 'vol', 'cifs-users', 'cifs-stats', 'cluster', 'snapmirror', 'cacheage', 'cp', 'ifstat', 'diskio', 'tapeio', 'ops']
available_subsys = ['global', 'version', 'cpu', 'environment', 'nvram', 'disk', 'sparedisk', 'faileddisk', 'fs', 'vol', 'cifs-users', 'cifs-stats', 'cluster', 'snapmirror', 'snapvault', 'cacheage', 'cp', 'ifstat', 'diskio', 'tapeio', 'ops']

OIDs = {
'Uptime': '.1.3.6.1.2.1.1.3.0',
Expand Down
7 changes: 6 additions & 1 deletion testall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ then
exit 1
fi

for TEST in global cpu environment nvram sparedisk faileddisk cifs-users cifs-stats cluster snapmirror cacheage
for TEST in global version cpu environment nvram sparedisk faileddisk cifs-users cifs-stats cluster snapmirror snapvault cacheage cp diskio tapeio ops
do
./check_netappfiler.py -H $1 -s $TEST
done

for NIC in lo e0a e0b e1a e1b
do
./check_netappfiler.py -H $1 -s ifstat -V $NIC
done

for FSIDX in aggr0 /vol/vol0
do
./check_netappfiler.py -H $1 -s fs -f $FSIDX -w 50 -c 75
Expand Down
33 changes: 0 additions & 33 deletions testall_netsnmp.sh

This file was deleted.

17 changes: 11 additions & 6 deletions testallv3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,33 @@ then
exit 1
fi

for TEST in global cpu environment nvram sparedisk faileddisk cifs-users cifs-stats cluster snapmirror cacheage
for TEST in global version cpu environment nvram sparedisk faileddisk cifs-users cifs-stats cluster snapmirror snapvault cacheage cp diskio tapeio ops
do
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s $TEST
done

for NIC in lo e0a e0b e1a e1b
do
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s ifstat -V $NIC
done

for FSIDX in aggr0 /vol/vol0
do
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s fs -f $FSIDX -w 50 -c 75
done

for FSIDX in `seq 1 12`
for FSIDX in `seq 1 8`
do
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s fs -f $FSIDX -w 50% -c 75%
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s fs -f $FSIDX -w 50 -c 75
done

for FSIDX in aggr0 /vol/vol0
do
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s vol -f $FSIDX -w 40% -c 20%
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s vol -f $FSIDX -w 50% -c 75%
done

for FSIDX in `seq 1 12`
for FSIDX in 3 5 7
do
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s vol -f $FSIDX -w 40% -c 20%
./check_netappfiler.py -H $1 -P3 -U $SECNAME -A $AUTHKEY -s vol -f $FSIDX -w 50% -c 75%
done

0 comments on commit 063cf67

Please sign in to comment.