| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
When enabled, the collector collects only ICMP round-trip time metrics during Collect(). SNMP is still used during initialization to query sysInfo and profile metadata for Virtual Node creation and labeling.
There was a problem hiding this comment.
No issues found across 7 files
Confidence score: 5/5
sequenceDiagram
participant Agent as Netdata Agent
participant Coll as SNMP Collector
participant Device as SNMP Agent (Device)
participant Prober as Ping Prober (ICMP)
Note over Coll,Device: Initialization Phase
Coll->>Device: Get sysInfo (sysDescr, sysObjectID, etc.)
Device-->>Coll: Metadata & Virtual Node Info
alt NEW: ping_only == true OR ping.enabled == true
Coll->>Coll: CHANGED: initProber()
Coll->>Agent: NEW: Create ICMP RTT Charts
end
Note over Agent,Prober: Runtime Collection Loop
Agent->>Coll: Collect()
alt NEW: ping_only == true
Coll->>Prober: Ping(host)
Prober-->>Coll: RTT Statistics (min/max/avg/stddev)
Note right of Coll: Skips all SNMP profile metrics
else standard flow (ping_only == false)
Coll->>Device: SNMP Get/BulkWalk (Profile OIDs)
Device-->>Coll: Device Metrics
opt ping.enabled == true
Coll->>Prober: Ping(host)
Prober-->>Coll: RTT Statistics
end
end
Coll-->>Agent: Return metrics map (map[string]int64)
Sorry, something went wrong.
There was a problem hiding this comment.
Adds a ping_only mode to the go.d/snmp collector to allow collecting only ICMP RTT metrics during Collect(), while still performing SNMP sysInfo/profile initialization needed for labeling/vnode metadata.
Changes:
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file| File | Description |
|---|---|
| src/go/plugin/go.d/collector/snmp/testdata/config.yaml | Adds ping_only to YAML serialization test fixture. |
| src/go/plugin/go.d/collector/snmp/testdata/config.json | Adds ping_only to JSON serialization test fixture. |
| src/go/plugin/go.d/collector/snmp/config.go | Adds PingOnly to the SNMP collector config struct. |
| src/go/plugin/go.d/collector/snmp/config_schema.json | Adds ping_only to schema + UI schema. |
| src/go/plugin/go.d/collector/snmp/collector.go | Initializes ping prober when ping_only is enabled. |
| src/go/plugin/go.d/collector/snmp/collect.go | Routes collection to ping-only path when enabled; adjusts initialization checks. |
| src/go/plugin/go.d/collector/snmp/collector_test.go | Adds a ping-only collection test and a mock prober. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Document that ping_only implies ping is enabled regardless of ping.enabled. Fix ui:help to reflect that SNMP sysInfo runs at startup for device identification, not only during vnode setup.
Fail Check() early when ping_only is enabled and ping returns an unrecoverable error (EPERM/EACCES). Transient errors are allowed through since the device may be temporarily unreachable.
There was a problem hiding this comment.
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When enabled, the collector collects only ICMP round-trip time metrics during Collect(). SNMP is still used during initialization to query sysInfo and profile metadata for Virtual Node creation and labeling.
Summary
Test Plan
Additional Information
For users: How does this change affect me?Summary by cubic
Adds ping_only to the go.d/snmp collector. When enabled, it collects only ICMP RTT and skips SNMP polling; a minimal SNMP sysInfo runs once at startup for device identification, profile matching, and metadata. Also validates reachability during Check and fails on unrecoverable ping errors.
New Features
Migration
Written for commit e2f7a1e. Summary will update on new commits.