diff --git a/plugins/san/fc-switch-ports b/plugins/snmp/snmp__brocade_ifs similarity index 97% rename from plugins/san/fc-switch-ports rename to plugins/snmp/snmp__brocade_ifs index 76d8046c..2b04de29 100755 --- a/plugins/san/fc-switch-ports +++ b/plugins/snmp/snmp__brocade_ifs @@ -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)