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
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
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:
Output:
Version of the plugin:
centreon/centreon-pluginsdevelopsrc/centreon/common/cisco/standard/snmp/mode/vpc.pmTODO(paste commit hash or last commit date)Information about the monitored resource:
TODO(exact model, e.g., Nexus 9k/7k)TODO(NX-OS version)TODO(if known)Command line:
SNMP evidence (OctetString rendered as bytes):
Example output:
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
cVpcSystemOperMacAddressas 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
cVpcSystemOperMacAddress.1.3.6.1.4.1.9.9.807.1.2.1.1.5vpc.pm, the value is mapped tomacaddressand printed directly in the peer prefix output (no formatting step), e.g.:macaddress => { oid => '.1.3.6.1.4.1.9.9.807.1.2.1.1.5' }peer '<macaddress>'without normalization