fix(poller): fall back to generic-snmp when device has no profile assigned
SNMP devices added without a profile (e.g., via simplified add flow) were failing with "no SNMP profile assigned". Now falls back to the generic-snmp profile which collects standard MIB-II metrics. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,13 @@ func (c *ProfileCache) Get(profileID string) *CompiledProfile {
|
||||
return c.profiles[profileID]
|
||||
}
|
||||
|
||||
// GetGenericID returns the profile ID of the generic-snmp fallback profile.
|
||||
func (c *ProfileCache) GetGenericID() string {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
return c.genericID
|
||||
}
|
||||
|
||||
// MatchSysObjectID finds the best profile for a device's sysObjectID value
|
||||
// using longest-prefix matching. Returns the generic-snmp profile ID if
|
||||
// no vendor-specific prefix matches.
|
||||
|
||||
Reference in New Issue
Block a user