4 Commits

Author SHA1 Message Date
sam
c285810c68 Two-phase focused neighbor walk and fix status/optics bugs
- Restructure neighbor walk into Phase 1 (discovery: ifDescr + ifName +
  ifStackTable) and Phase 2 (targeted snmpget for matched interfaces only).
  Reduces NCS 5500 walk from ~150k OIDs to ~20k discovery + ~600 targeted.
- Rename cisco-parse.py to cisco_parse.py for Python import compatibility.
- Add parse_walk_text() for in-process parsing without file I/O.
- Fix interface status showing DOWN/ADMIN DOWN: use isUp() instead of
  hardcoded === '1' checks, add -Oe flag to snmpget for numeric enums.
- Fix optics showing raw sensor values: apply entSensorPrecision scaling
  (e.g., -95122 with precision 4 → -9.5122 dBm).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:58:34 -07:00
sam
c64a80810f Add LLDP neighbor device polling (Cisco C3850 support)
Follow the LLDP breadcrumb back to the connected router/switch:
- New cisco-parse.py: standalone parser for Cisco SNMP walk data
  with interface matching, subinterface/SVI discovery, BDI/BVI
  correlation, and optics extraction
- New /api/neighbor-walk and /api/neighbor-data endpoints
- "Poll Neighbor" button in LLDP topology cards
- Connected Neighbor Devices card showing interface status,
  counters, SVIs, and subinterface mappings
- Platform-aware: handles IOS-XE (SVIs) and IOS-XR (subinterfaces)
- Tested against lab C3850-04 (172.16.50.4) — 4,288 OIDs in 1.1s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:48:44 -07:00
sam
d6bf394297 Add optional policy MIB toggle and pre-walk ping check
- Add SNMP_WALK_POLICIES env var and UI checkbox to skip ACD-POLICY-MIB
  (~73% of all OIDs), cutting walk time from ~25s to ~11s
- Add /api/ping endpoint with reachability check before walk starts
- Show "NID Management is UP" (green) or "NID is DOWN" (red) status
- Block walk if target is unreachable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 10:02:52 -07:00
sam
2b10edbb7b Add live SNMP walk server, UI controls, and viewer enhancements
- Add nid-server.py: Python web server (stdlib) with live walk API,
  SSE progress streaming, and clear/archive endpoints
- Add snmp-walk.sh: CLI wrapper for walk pipeline with .env config
- Add walk control card to viewer UI with IP input, mode selector,
  walk/clear buttons, and real-time progress bar
- Make cards collapsible, add management IP to header
- Add dynamic port type rendering (SFP vs RJ45 from connector table)
- Add SFF-8024 connector type labels for SFP detail cards
- Fix ifOperStatus numeric vs text comparisons for live walk data
- Add alarm config-only fallback when device lacks status table
- Use snmpbulkwalk for faster walks with parallel subtree execution
- Add .env/.env.example for secrets and config, gitignore walks/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 15:20:27 -07:00