Skip to content

Plugin(centreon::common::cisco::standard::snmp) - Mode(vpc): peer MAC (cVpcSystemOperMacAddress) not normalized, may output non-UTF8 bytes #6007

@DanielVdWP

Description

@DanielVdWP

Quick description

The Cisco vPC SNMP mode prints cVpcSystemOperMacAddress (OctetString) raw in the output without normalization/sanitization. When the value is returned as non-UTF8/binary bytes (e.g., hex/octet dump), it can produce garbled characters and break monitoring UIs/pipelines (e.g., Icinga) that expect UTF-8 clean plugin output.

How to reproduce

  • Environment:

    uname -a
    cat /etc/redhat-release /etc/debian_version

    Output:

    # uname -a
    Linux REDACTED 4.18.0-553.97.1.el8_10.x86_64 #1 SMP Tue Jan 20 00:58:00 EST 2026 x86_64 x86_64 x86_64 GNU/Linux
    # cat /etc/redhat-release
    Red Hat Enterprise Linux release 8.10 (Ootpa)
  • Version of the plugin:

    • Repository: centreon/centreon-plugins
    • Branch: develop
    • File: src/centreon/common/cisco/standard/snmp/mode/vpc.pm
    • Commit/date: TODO (paste commit hash or last commit date)
  • Information about the monitored resource:

    • Device: TODO (exact model, e.g., Nexus 9k/7k)
    • OS: TODO (NX-OS version)
    • vPC domain id: TODO (if known)
  • Command line:

    centreon_plugins.pl \
      --plugin=centreon::common::cisco::standard::snmp::plugin \
      --mode=vpc \
      --hostname=<IP> \
      --snmp-version=2c \
      --community=<COMMUNITY>

    SNMP evidence (OctetString rendered as bytes):

    snmpget -v2c -c <COMMUNITY> -On -OQevx <IP> 1.3.6.1.4.1.9.9.807.1.2.1.1.5.<domain_id>

    Example output:

    "00 23 04 EE BE 50 "
    

Expected result

Plugin output should be UTF-8 safe and display the vPC peer MAC in a normalized format (e.g., 00:23:04:ee:be:50), or at least sanitize/escape non-printable bytes so the output is safe for monitoring UIs and storage backends.

Actual result

The plugin prints the MAC address raw (without normalization/sanitization). With some SNMP stacks/devices returning cVpcSystemOperMacAddress as an octet/hex dump (binary bytes), the plugin output contains non-printable/non-UTF8 characters or “strange” rendering, causing garbled output and issues in systems expecting clean UTF-8 (observed with Icinga).

Code reference

  • OID used: cVpcSystemOperMacAddress .1.3.6.1.4.1.9.9.807.1.2.1.1.5
  • In vpc.pm, the value is mapped to macaddress and printed directly in the peer prefix output (no formatting step), e.g.:
    • mapping: macaddress => { oid => '.1.3.6.1.4.1.9.9.807.1.2.1.1.5' }
    • output prefix uses peer '<macaddress>' without normalization

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions