Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/netapp/snmp__netapp_cifs | ||
|---|---|---|
| 4 | 4 |
""" |
| 5 | 5 |
|
| 6 | 6 |
# The SNMP traps for the NetApp filer can be found in |
| 7 |
# /net/netappfiler/vol0/etc/mib/traps.dat if the filer is
|
|
| 7 |
# /net/netappfiler/vol0/etc/mib/traps.dat if the filer is |
|
| 8 | 8 |
# NFS automounted mounted on server. |
| 9 | 9 |
# Example: the SNMP id for cpuBusyTimePerCent is |
| 10 |
# snmp.1.3.6.1.4.1.789.1.2.1.3.0
|
|
| 11 |
# and retrival of this value is done by
|
|
| 10 |
# snmp.1.3.6.1.4.1.789.1.2.1.3.0 |
|
| 11 |
# and retrival of this value is done by |
|
| 12 | 12 |
# snmpget -v 1 -c public netappfiler 1.3.6.1.4.1.789.1.2.1.3.0 |
| 13 | 13 |
# |
| 14 |
# Requires snmpget and assumes public community.
|
|
| 14 |
# Requires snmpget and assumes public community. |
|
| 15 | 15 |
|
| 16 | 16 |
import commands |
| 17 | 17 |
import sys |
| 18 | 18 |
|
| 19 | 19 |
# Provided a servername and a snmpid it returns the value stripped of bogus information. |
| 20 | 20 |
def snmpget(iservername,isnmpid): |
| 21 |
runcmd = 'snmpget -v 1 -c public ' + iservername + ' ' + isnmpid
|
|
| 21 |
runcmd = 'snmpget -v 1 -c public ' + iservername + ' ' + isnmpid |
|
| 22 | 22 |
output = commands.getoutput(runcmd) |
| 23 | 23 |
return output.split()[3] |
| 24 | 24 |
|
| ... | ... | |
| 34 | 34 |
print 'graph_args --base 1000 -l 0' |
| 35 | 35 |
print 'graph_vlabel number' |
| 36 | 36 |
print 'graph_category fs' |
| 37 |
print 'graph_info This graph shows CIFS usage on '+servername
|
|
| 37 |
print 'graph_info This graph shows CIFS usage on '+servername |
|
| 38 | 38 |
|
| 39 | 39 |
print 'cifsConnectedUsers.label ConnectedUsers' |
| 40 | 40 |
print 'cifsConnectedUsers.info The current number of CIFS users on the filer' |
| 41 |
|
|
| 41 |
|
|
| 42 | 42 |
print 'cifsNSessions.label NumberOfSessions' |
| 43 | 43 |
print 'cifsNSessions.info The current number of active CIFS session on the filer' |
| 44 |
|
|
| 44 |
|
|
| 45 | 45 |
print 'cifsNOpenFiles.label NumberOfOpenfiles' |
| 46 | 46 |
print 'cifsNOpenFiles.info The number of open CIFS files and directories on the filer' |
| 47 | 47 |
sys.exit(0) |
Formats disponibles : Unified diff