forked from wAmpIre/check_netappfiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 10ed325
Showing
10 changed files
with
2,026 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
2008-12-02: | ||
=========== | ||
- Added some caching (with "shelve") for FSIDs | ||
+ "--cache FILENAME" option added | ||
+ Reduce SNMPGETs on target, (much) faster now!!1! | ||
+ verifies cached fsid | ||
+ Use one cache file per host, e.g.: | ||
... --cache /var/tmp/nafscache_$HOSTADDRESS$ ... | ||
|
||
2008-11-21: | ||
=========== | ||
- Some code cleanup | ||
- New subsystem "vol" | ||
+ More accurate check of volume incl. snapshot | ||
+ Same parameter as "fs", see testall*.s | ||
+ You *must* provide "-w" and "-c"! | ||
+ PNP-Template (colors WILL change in the future) | ||
- New "plugin": check_netappfiler_netsnmp.py | ||
You need the Python bindings of net-snmp! | ||
Debian: Use Lenny or ... | ||
deb http://people.teamix.net/~svelt/debian/etch/net-snmp/ ./ | ||
in /etc/apt/sources.list for Etch | ||
|
||
2008-10-15: | ||
=========== | ||
- Fix for cluster check (Rico Glöckner, thanks!) | ||
|
||
2008-09-17: | ||
=========== | ||
- Heavy code cleaning | ||
- Long options no more available! | ||
- Initial support for ONTAP 7.3: | ||
+ SNMP v2c and v3! w00t! Counter64! | ||
+ New file: README.v3 | ||
- Last fix for >2TB volumes only works for volumes <4TB | ||
+ fix for the fix, 2 additional SNMPGETs, more calculating :-/ or | ||
+ just use SNMP v2c or v3 - if you have ONTAP 7.3 :-) | ||
|
||
2008-07-29: | ||
=========== | ||
- Fix for volumes > 2TB. Thank god for 32 bit signed integers :-/ | ||
|
||
2008-04-22: | ||
=========== | ||
- Subsystem "fs" now accepts path names to "-f" | ||
- New subsystem "faileddisk" | ||
- Subsystem "sparedisk" alias to (old) "disk" | ||
- New Subsystems "cifs-users" and "cifs-stats" | ||
Thanks to Jochen Bartl! | ||
|
||
2008-04-23: | ||
=========== | ||
- New EXPERIMENTAL subsystem "cluster", please test and send feedback | ||
- Start of new subsystem "snapmirror", more work to do! | ||
|
||
2008-04-24: | ||
=========== | ||
- more work on "snapmirror", testing needed! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
$opt[1] = " --slope-mode --vertical-label \"Count\" -b 1000 --title \"CIFS Statistics for $hostname\" "; | ||
$def[1] = "DEF:total_ops=$rrdfile:$DS[1]:AVERAGE " ; | ||
$def[1] .= "DEF:total_calls=$rrdfile:$DS[2]:AVERAGE " ; | ||
$def[1] .= "DEF:bad_calls=$rrdfile:$DS[3]:AVERAGE " ; | ||
$def[1] .= "DEF:get_attrs=$rrdfile:$DS[4]:AVERAGE " ; | ||
$def[1] .= "DEF:reads=$rrdfile:$DS[5]:AVERAGE " ; | ||
$def[1] .= "DEF:writes=$rrdfile:$DS[6]:AVERAGE " ; | ||
$def[1] .= "DEF:locks=$rrdfile:$DS[7]:AVERAGE " ; | ||
$def[1] .= "DEF:opens=$rrdfile:$DS[8]:AVERAGE " ; | ||
$def[1] .= "DEF:dirops=$rrdfile:$DS[9]:AVERAGE " ; | ||
$def[1] .= "DEF:others=$rrdfile:$DS[10]:AVERAGE " ; | ||
# Total Ops | ||
$def[1] .= "LINE1:total_ops#003300:\"total ops\\t\\t\" " ; | ||
$def[1] .= "GPRINT:total_ops:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:total_ops:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:total_ops:MAX:\"%7.2lf %S max\\n\" "; | ||
# Total Calls | ||
$def[1] .= "LINE1:total_calls#ff309b:\"total calls\\t\" " ; | ||
$def[1] .= "GPRINT:total_calls:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:total_calls:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:total_calls:MAX:\"%7.2lf %S max\\n\" "; | ||
# Bad Calls | ||
$def[1] .= "LINE1:bad_calls#ff0000:\"bad calls\\t\\t\" " ; | ||
$def[1] .= "GPRINT:bad_calls:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:bad_calls:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:bad_calls:MAX:\"%7.2lf %S max\\n\" "; | ||
# Get Attrs | ||
$def[1] .= "LINE1:get_attrs#00803b:\"get attrs\\t\\t\" " ; | ||
$def[1] .= "GPRINT:get_attrs:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:get_attrs:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:get_attrs:MAX:\"%7.2lf %S max\\n\" "; | ||
# Reads | ||
$def[1] .= "LINE1:reads#003bff:\"reads\\t\\t\" " ; | ||
$def[1] .= "GPRINT:reads:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:reads:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:reads:MAX:\"%7.2lf %S max\\n\" "; | ||
# Writes | ||
$def[1] .= "LINE1:writes#00ff04:\"writes\\t\\t\" " ; | ||
$def[1] .= "GPRINT:writes:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:writes:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:writes:MAX:\"%7.2lf %S max\\n\" "; | ||
# Locks | ||
$def[1] .= "LINE1:locks#ff8c00:\"locks\\t\\t\" " ; | ||
$def[1] .= "GPRINT:locks:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:locks:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:locks:MAX:\"%7.2lf %S max\\n\" "; | ||
# Opens | ||
$def[1] .= "LINE1:opens#c0c600:\"opens\\t\\t\" " ; | ||
$def[1] .= "GPRINT:opens:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:opens:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:opens:MAX:\"%7.2lf %S max\\n\" "; | ||
# Dirops | ||
$def[1] .= "LINE1:dirops#bf2bff:\"dirops\\t\\t\" " ; | ||
$def[1] .= "GPRINT:dirops:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:dirops:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:dirops:MAX:\"%7.2lf %S max\\n\" "; | ||
# Others | ||
$def[1] .= "LINE1:others#6dacff:\"others\\t\\t\" " ; | ||
$def[1] .= "GPRINT:others:LAST:\"%7.2lf %S last\\t\" " ; | ||
$def[1] .= "GPRINT:others:AVERAGE:\"%7.2lf %S avg\\t\" " ; | ||
$def[1] .= "GPRINT:others:MAX:\"%7.2lf %S max\\n\" "; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
# | ||
# check_netappfiler -s vol | ||
# | ||
# RRDtool Options | ||
# $opt[1] = "--vertical-label By -l 0 -u $MAX[1] --title \"Volume $hostname / $servicedesc\" "; | ||
$opt[1] = "--vertical-label By -l 0 -r --title \"Volume $hostname / $servicedesc\" --height=200 -b 1024 "; | ||
# | ||
# | ||
# Graphen Definitions | ||
$def[1] = "DEF:data=$rrdfile:$DS[1]:AVERAGE "; | ||
$def[1] .= "DEF:snap=$rrdfile:$DS[2]:AVERAGE "; | ||
$def[1] .= "DEF:datatotal=$rrdfile:$DS[3]:AVERAGE "; | ||
$def[1] .= "DEF:snaptotal=$rrdfile:$DS[4]:AVERAGE "; | ||
|
||
$def[1] .= "CDEF:snapsnap=snap,snaptotal,GT,snaptotal,snap,IF "; | ||
$def[1] .= "CDEF:snapfree=snap,snaptotal,GT,0,snaptotal,snap,-,IF "; | ||
$def[1] .= "CDEF:snapover=snap,snaptotal,GT,snaptotal,snap,-,0,IF "; | ||
$def[1] .= "CDEF:datafree=datatotal,data,- "; | ||
|
||
$def[1] .= "CDEF:warn=data,0,*,$WARN[1],+ "; | ||
$def[1] .= "CDEF:crit=data,0,*,$CRIT[1],+ "; | ||
|
||
$def[1] .= "AREA:data#aaaaaa:\"Data\: Used space\" "; | ||
$def[1] .= "GPRINT:data:LAST:\"%6.2lf%S\\n\" "; | ||
$def[1] .= "AREA:datafree#00ff00:\"Data\: Free space\":STACK "; | ||
$def[1] .= "GPRINT:datafree:LAST:\"%6.2lf%S\\n\" "; | ||
$def[1] .= "AREA:snapover#aa0000:\"Snap\: Over resv.\":STACK "; | ||
$def[1] .= "GPRINT:snapover:LAST:\"%6.2lf%S\\n\" "; | ||
$def[1] .= "AREA:snapfree#00ffff:\"Snap\: Free space\":STACK "; | ||
$def[1] .= "GPRINT:snapfree:LAST:\"%6.2lf%S\\n\" "; | ||
$def[1] .= "AREA:snap#0000cc:\"Snap\: Used space\":STACK "; | ||
$def[1] .= "GPRINT:snap:LAST:\"%6.2lf%S\\n\" "; | ||
|
||
$def[1] .= "LINE1:datatotal#000000 "; | ||
|
||
$def[1] .= "LINE2:datafree#ffffff:\"Available space \": "; | ||
$def[1] .= "GPRINT:datafree:LAST:\"%6.2lf%S\\n\" "; | ||
|
||
if ($WARN[1] != "") { | ||
$def[1] .= "LINE1:warn#ffff00:\"Warning at \" "; | ||
$def[1] .= "GPRINT:warn:LAST:\"%6.2lf%S\\n\" "; | ||
} | ||
if ($CRIT[1] != "") { | ||
$def[1] .= "LINE1:crit#ff0000:\"Critical at \" "; | ||
$def[1] .= "GPRINT:crit:LAST:\"%6.2lf%S\\n\" "; | ||
} | ||
|
||
#$def[1] .= "LINE1:$MAX[1]#000000: "; | ||
#$def[1] .= "LINE1:var1#00cc00: "; | ||
#$def[1] .= "HRULE:$MAX[1]#003300:\"Size $MAX[1] By \" "; | ||
# $def[1] .= "HRULE:$WARN[1]#ffff00:\"Warning on $WARN[1] By \" "; | ||
# $def[1] .= "HRULE:$CRIT[1]#ff0000:\"Critical on $CRIT[1] By \\n\" "; | ||
#$def[1] .= "GPRINT:var1:LAST:\"%6.2lf By of $MAX[1] By used \\n\" "; | ||
#$def[1] .= "GPRINT:var1:MAX:\"%6.2lf By max used \\n\" "; | ||
#$def[1] .= "GPRINT:var1:AVERAGE:\"%6.2lf By avg used\" "; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Quick guide to get SNMPv1 up and running on ONTAP: | ||
|
||
- Set up some things on the FAS: | ||
|
||
toaster> snmp contact Toaster Master <[email protected]> | ||
toaster> snmp location Somewhere in the basement | ||
toaster> options snmp.enable on | ||
toaster> snmp init 1 | ||
|
||
- On your UNIX box: | ||
|
||
+ You need "snmpget" as "/usr/bin/snmpget". | ||
|
||
+ root@monitor:~> .../check_netappfiler.py -H toaster | ||
NETAPP(global) OK - FAS2020: The system's global status is normal. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Fast introduction to ONTAP 7.3 / SNMPv3: | ||
|
||
- Add a new role with "login-snmp" capability: | ||
|
||
toaster> useradmin role add my-snmp-role -a login-snmp | ||
|
||
|
||
- Add a new group which gets this role: | ||
|
||
toaster> useradmin group add my-snmp-group -r my-snmp-role | ||
|
||
|
||
- Add a new user in group "my-snmp-group" | ||
|
||
toaster> useradmin user add my-snmp-user -g my-snmp-group | ||
|
||
Password MUST have at least 8 characters and 1 numeric character | ||
|
||
|
||
- Switch to your UNIX box: | ||
|
||
root@monitor:~> .../check_netappfiler.py -P 3 -U my-snmp-user -A P4ssw0rd -H toaster | ||
NETAPP(global) OK - FAS2020: The system's global status is normal. | ||
|
Oops, something went wrong.