mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
snmp__brocade_ifs: rename and update code to use the new name.
This commit is contained in:
parent
6201fbd9c3
commit
388823128d
1 changed files with 2 additions and 7 deletions
|
@ -30,7 +30,7 @@ bits: Number of bits transmitted(tx)/received(rx)
|
||||||
determining if the port is saturated.
|
determining if the port is saturated.
|
||||||
|
|
||||||
When symlinking to the plugin, indicate hostname like this:
|
When symlinking to the plugin, indicate hostname like this:
|
||||||
brocade_san_switch_ports_HOSTNAME
|
snmp_HOSTNAME_brocade_ifs
|
||||||
|
|
||||||
# Special requirements:
|
# Special requirements:
|
||||||
# - the pysnmp module; on RHEL 6 with EPEL 6, you may simply yum-
|
# - 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
|
import os, sys, re
|
||||||
from pysnmp.entity.rfc3413.oneliner import cmdgen
|
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:
|
# For reference:
|
||||||
# SW-MIB::swFCPortLinkState = .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.6
|
# 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
|
# 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
|
# Parse host_name and counter type from arg0
|
||||||
called_as = os.path.basename(sys.argv[0])
|
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)
|
match = re.match(regex_str, called_as)
|
||||||
if match:
|
if match:
|
||||||
host_name = match.group(1)
|
host_name = match.group(1)
|
Loading…
Add table
Add a link
Reference in a new issue