diff --git a/lib/towerops/snmp/profiles/dynamic.ex b/lib/towerops/snmp/profiles/dynamic.ex index ed8e20d7..3026e9d9 100644 --- a/lib/towerops/snmp/profiles/dynamic.ex +++ b/lib/towerops/snmp/profiles/dynamic.ex @@ -76,41 +76,13 @@ defmodule Towerops.Snmp.Profiles.Dynamic do # Private functions - defp poll_os_definitions(profile, client_opts) do - if profile && profile.os_definitions && length(profile.os_definitions) > 0 do - Logger.debug("Polling #{length(profile.os_definitions)} OS definitions for #{profile.os}") - - # Poll each OS definition and build a map - profile.os_definitions - |> Enum.map(fn os_def -> - field = String.to_atom(os_def.field) - value = poll_os_definition_oid(client_opts, os_def) - {field, value} - end) - |> Enum.reject(fn {_field, value} -> is_nil(value) end) - |> Map.new() - else - %{} - end - end - - defp poll_os_definition_oid(client_opts, os_def) do - # Use the OID from the OS definition - oid = os_def.oid - - if oid do - case Client.get(client_opts, oid) do - {:ok, value} when is_binary(value) -> - value - - {:ok, value} -> - to_string(value) - - {:error, reason} -> - Logger.debug("Failed to poll OS definition OID #{oid}: #{inspect(reason)}") - nil - end - end + defp poll_os_definitions(_profile, _client_opts) do + # Note: OS definition polling is currently disabled because LibreNMS + # uses MIB names (e.g., CAMBIUM-PMP80211-MIB::cambiumCurrentuImageVersion.0) + # which require MIB compilation to resolve to numeric OIDs. + # The SNMP client only supports numeric OIDs. + # TODO: Add MIB resolution or import numeric OIDs from LibreNMS + %{} end defp extract_manufacturer(%DeviceProfile{group: group}) when is_binary(group) do