Skip to content

fix: Cisco collector should ignore zero counters#4205

Merged
cgrinds merged 3 commits into
mainfrom
cbg-cisco-reset
Mar 25, 2026
Merged

fix: Cisco collector should ignore zero counters#4205
cgrinds merged 3 commits into
mainfrom
cbg-cisco-reset

Conversation

@cgrinds
Copy link
Copy Markdown
Collaborator

@cgrinds cgrinds commented Mar 25, 2026

No description provided.

@cgrinds cgrinds requested a review from rahulguptajss as a code owner March 25, 2026 12:26
Copilot AI review requested due to automatic review settings March 25, 2026 12:26
@cgrinds cgrinds requested a review from Hardikl as a code owner March 25, 2026 12:26
@cla-bot cla-bot Bot added the cla-signed label Mar 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Cisco networkinterface collector to suppress exporting interface samples when byte counters appear to be invalid zeros, using the eth_clear_counters field as a signal, and removes prior ad-hoc debug logging/file writes.

Changes:

  • Parse eth_clear_counters from NX-OS show interface JSON output.
  • Mark interfaces as non-exportable when byte counters are 0 and eth_clear_counters is "never".
  • Remove temporary debug code (and related imports) that wrote raw output to /tmp.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/collectors/cisco/plugins/networkinterface/networkinterface.go Outdated
Comment thread cmd/collectors/cisco/plugins/networkinterface/networkinterface.go
Comment thread cmd/collectors/cisco/plugins/networkinterface/networkinterface.go Outdated
Comment thread cmd/collectors/cisco/plugins/networkinterface/networkinterface.go Outdated
rahulguptajss
rahulguptajss previously approved these changes Mar 25, 2026
Comment thread cmd/collectors/cisco/plugins/networkinterface/networkinterface.go Outdated
Hardikl
Hardikl previously approved these changes Mar 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/collectors/cisco/plugins/networkinterface/networkinterface.go
@cgrinds cgrinds merged commit 7a4aad2 into main Mar 25, 2026
14 checks passed
@cgrinds cgrinds deleted the cbg-cisco-reset branch March 25, 2026 14:11
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.

4 participants