Skip to content

SNMP: route Catalyst 1300 / CBS350 to cisco-sb with serial_number metadata#23939

Open
ian28223 wants to merge 1 commit into
masterfrom
ian.bucad/cisco-sb-serial-number-metadata
Open

SNMP: route Catalyst 1300 / CBS350 to cisco-sb with serial_number metadata#23939
ian28223 wants to merge 1 commit into
masterfrom
ian.bucad/cisco-sb-serial-number-metadata

Conversation

@ian28223
Copy link
Copy Markdown
Contributor

@ian28223 ian28223 commented Jun 5, 2026

What does this PR do?

Routes Catalyst 1200/1300 and Cisco Business 350 (CBS350) devices to the cisco-sb profile and adds a serial_number metadata source for them.

cisco-sb.yaml:

  • Adds sysobjectid 1.3.6.1.4.1.9.6.1.1004.52.5 (CBS350-48P-4G).
  • Adds sysobjectid 1.3.6.1.4.1.9.1.3233 (ciscoC130024P4G, Catalyst 1300 24-port).
  • Adds serial_number metadata reading entPhysicalSerialNum.67109120 (1.3.6.1.2.1.47.1.1.1.1.11.67109120), the documented chassis index for these devices per Cisco's SMB switching OID reference.

cisco-catalyst.yaml:

  • Adds sysobjectid 1.3.6.1.4.1.9.1.3079 (ciscoC9200CX12P2X2G). No serial_number metadata change — see Motivation.

Motivation

AGENT-15682. A customer reported missing serial_number device metadata for Cisco Catalyst 1300 and CBS350 switches.

Catalyst 1200/1300 (e.g. C1300-24P-4G) and CBS350 do not run IOS-XE — they ship with Cisco's SMB software stack and share the OID layout of the rest of the Cisco Small Business switch family. The cisco-catalyst profile targets IOS-XE Catalyst chassis (which read serial from CISCO-STACK-MIB::chassisSerialNumberString), so these SMB-stack devices belong in cisco-sb instead.

For the Catalyst 9200CX (ciscoC9200CX12P2X2G, 9.1.3079), the device matches cisco-catalyst but does not populate chassisSerialNumberString and its chassis serial lives at a non-deterministic entPhysicalIndex. Per AGENT-15682 a generic index-based fallback was rejected as unsafe (entPhysicalIndex is arbitrary; index .1 is not guaranteed to be the chassis). The correct fix is dynamic chassis-row resolution — walking the entPhysical table and selecting the row where entPhysicalClass = chassis(3) — which the SNMP profile schema does not currently support. An FR will be opened to add that capability; until then the 9.1.3079 sysobjectid is added so the profile matches and all other metrics/metadata collect, while serial_number remains unset.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Catalyst 1200/1300 (e.g. C1300-24P-4G) and Cisco Business 350 (CBS350) run
the SMB software stack rather than IOS-XE, so they belong in cisco-sb.yaml
alongside the rest of the Cisco Small Business switch family. Their chassis
serial lives at the documented ENTITY-MIB index 67109120
(entPhysicalSerialNum.67109120) per Cisco's SMB switching guide.

- cisco-sb: add sysobjectid 1.3.6.1.4.1.9.6.1.1004.52.5 (CBS350-48P-4G)
  and 1.3.6.1.4.1.9.1.3233 (ciscoC130024P4G); add serial_number metadata
  pointing at entPhysicalSerialNum.67109120.
- cisco-catalyst: add sysobjectid 1.3.6.1.4.1.9.1.3079 (ciscoC9200CX12P2X2G).
  Serial collection for this device requires dynamic chassis-row resolution
  (entPhysicalClass = chassis) which is not yet supported; tracked as an FR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@datadog-prod-us1-5
Copy link
Copy Markdown

datadog-prod-us1-5 Bot commented Jun 5, 2026

Code Coverage  Pipelines  Tests

Fix all issues with BitsAI

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Total coverage percentage gate may be blocking this PR.

Overall coverage for service snmp: 26.22% (threshold: 30.00%)

⚠️ Warnings

🚦 6 Pipeline jobs failed

Check PR | run / Check PR changelog   View in Datadog   GitHub Actions

PR | test / check   View in Datadog   GitHub Actions

PR | test / test (linux, ubuntu-22.04, snmp, SNMP (py3.13-false), py3.13-false) / SNMP (py3.13-false)-py3.13-false   View in Datadog   GitHub Actions

View all 6 failed jobs.

🧪 20 Tests failed in 1 job

PR | run   GitHub Actions

test_bulk_table from test_check.py   View in Datadog (Fix with Cursor)
HTTPSConnectionPool(host=&#39;ddintegrations.blob.core.windows.net&#39;, port=443): Max retries exceeded with url: /snmp/cisco-3850.snmprec (Caused by NameResolutionError(&#34;HTTPSConnection(host=&#39;ddintegrations.blob.core.windows.net&#39;, port=443): Failed to resolve &#39;ddintegrations.blob.core.windows.net&#39; ([Errno -2] Name or service not known)&#34;))
test_cast_metrics from test_check.py   View in Datadog (Fix with Cursor)
HTTPSConnectionPool(host=&#39;ddintegrations.blob.core.windows.net&#39;, port=443): Max retries exceeded with url: /snmp/cisco-3850.snmprec (Caused by NameResolutionError(&#34;HTTPSConnection(host=&#39;ddintegrations.blob.core.windows.net&#39;, port=443): Failed to resolve &#39;ddintegrations.blob.core.windows.net&#39; ([Errno -2] Name or service not known)&#34;))

View all 20 test failures

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 18.30% (-69.25%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 84df31d | Docs | Datadog PR Page | Give us feedback!

@ian28223 ian28223 added the qa/skip-qa Automatically skip this PR for the next QA label Jun 5, 2026
@ian28223 ian28223 marked this pull request as ready for review June 5, 2026 15:35
@ian28223 ian28223 requested review from a team as code owners June 5, 2026 15:35
@ian28223 ian28223 requested review from alpatriciodd and removed request for a team June 5, 2026 15:35
@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Jun 5, 2026

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84df31d240

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

# Catalyst 1200/1300 (e.g. C1300-24P-4G) and Cisco Business 350 (CBS350)
# run the SMB software stack — not IOS-XE — so they belong here rather
# than in cisco-catalyst.yaml, which targets IOS-XE Catalyst chassis.
- 1.3.6.1.4.1.9.1.3233 # ciscoC130024P4G (Catalyst 1300 24-port)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cover the rest of the Catalyst 1200/1300 OIDs

For Catalyst 1200/1300 models other than C1300-24P-4G, this exact sysObjectID leaves them on the generic Cisco profile instead of cisco-sb; the resolver only does exact/fnmatch pattern matching in _profile_for_sysobject_oid, and the CISCO-PRODUCTS-MIB has many adjacent C1200/C1300 IDs such as .3210-.3225 and .3226-.3253. In those environments the new SMB metrics and serial-number metadata still won't be collected, despite the comment saying the whole Catalyst 1200/1300 family belongs here.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant