1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 10:39:53 +00:00

snmp__brocade_ifs: rename and update code to use the new name.

This commit is contained in:
Diego Elio Pettenò 2012-08-28 17:17:12 -07:00
parent 6201fbd9c3
commit 388823128d

View file

@ -30,7 +30,7 @@ bits: Number of bits transmitted(tx)/received(rx)
determining if the port is saturated.
When symlinking to the plugin, indicate hostname like this:
brocade_san_switch_ports_HOSTNAME
snmp_HOSTNAME_brocade_ifs
# Special requirements:
# - the pysnmp module; on RHEL 6 with EPEL 6, you may simply yum-
@ -95,11 +95,6 @@ brocade_san_switch_ports_HOSTNAME
import os, sys, re
from pysnmp.entity.rfc3413.oneliner import cmdgen
my_canonical_name = 'brocade_san_switch_ports_' # If called as - e.g. -
# brocade_san_switch_ports_sansw1,then
# sansw1 will be interpreted as
# the host_name
# For reference:
# SW-MIB::swFCPortLinkState = .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.6
# SW-MIB::swFCPortTxWords = .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11
@ -274,7 +269,7 @@ if 'MUNIN_CAP_MULTIGRAPH' not in os.environ:
# Parse host_name and counter type from arg0
called_as = os.path.basename(sys.argv[0])
regex_str = '^'+my_canonical_name+'(.+)'
regex_str = '^snmp_'(.+)'_brocade_ifs'
match = re.match(regex_str, called_as)
if match:
host_name = match.group(1)