Repository navigation
feat(network::cisco::standard::snmp): new port-security and list-port-security modes - #6542
Open
rmorandell-pgum wants to merge 3 commits into
Open
rmorandell-pgum wants to merge 3 commits into
rmorandell-pgum wants to merge 3 commits into
Conversation
…-security modes Port security monitoring for Catalyst switches (CISCO-PORT-SECURITY-MIB, tested with a C9200L on IOS-XE 17.15). - port-security: per interface, port security state (enabled/disabled) compared with --expected-port-security (CRITICAL when different, no comparison when empty), port security status (WARNING on shutdown), violation action, secure MAC addresses (current/max) and security violations since the last check (statefile). Interfaces selected with --include-interface/--exclude-interface on ifName, ifDescr or ifAlias (--oid-display). - list-port-security: interfaces of cpsIfConfigTable with their port security state, for service discovery (the discovered state becomes the reference value of the service). - Robot tests with an anonymized walk and a fault variant (17 cases).
…me with an empty --oid-display
rmorandell-pgum
requested review from
lucie-tirand and
sdepassio
and removed request for
a team
November 13, 2026 14:10
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Community contributors
Description
Port security monitoring for Cisco Catalyst switches (CISCO-PORT-SECURITY-MIB
cpsIfConfigTable), tested with a C9200L on IOS-XE 17.15.port-security(centreon::common::cisco::standard::snmp::mode::portsecurity), per interface:enabled/disabled) compared with a reference value given with--expected-port-security: CRITICAL by default when the state differs, no comparison when the option is empty. This lets a service store the state found when it was created (e.g. by a service discovery) and alarm when it changes; to accept a new state, the reference value is updated.secureup/securedown/shutdown): WARNING by default onshutdown(port err-disabled by a violation).interface.portsecurity.secure.mac.addresses.count.sha256_hex):interface.portsecurity.violations.count.--include-interface/--exclude-interfaceon the name chosen with--oid-display(ifNameby default,ifDescrorifAlias).list-port-security(centreon::common::cisco::standard::snmp::mode::listportsecurity): interfaces of the port security table with name, description, alias, index, port security state, status, violation action, admin and operational status; supports--disco-format/--disco-showfor service discovery.network::cisco::standard::snmp::plugin.Type of change
How this pull request can be tested ?
Robot tests with an anonymized walk of a C9200L and a fault variant (one port in
shutdownwith violations, one port whose port security was disabled):port-security.robot(13 cases, they share a statefile and must run in order): default output, violations delta between two runs (buffer creation, then delta, then counter reset),--critical-violations, reference value matching and differing in both directions, custom--critical-status,--oid-display=ifDescr, include/exclude filters, secure MAC addresses threshold, no interface found, invalid--expected-port-security.list-port-security.robot(4 cases): list with include and exclude filters,--disco-show,--disco-format.Example:
Checklist
Centreon team (internal PR)
Description
PLEASE MAKE SURE THAT THE BRANCH PR INCLUDES JIRA TICKET ID
Please include a short resume of the changes and what is the purpose of this pull request.
Any relevant information should be added to help reviewers to understand what are the stakes
of the pull request.
Fixes # (issue)
If you are fixing a github Issue already existing, mention it here.
If you are fixing one or more JIRA ticket, mention it here too.
Type of change
How this pull request can be tested ?
Please describe the procedure to verify that the goal of the PR is matched.
Provide clear instructions so that it can be correctly tested.
Mention the automated tests included in this FOR (what they test like mode/option combinations).
Checklist