Closed workgena closed 1 year ago
Hi, @workgena ! Thanks for contributing.
First, let's look at the application configuration, found here:
mib_sources: [
"/usr/share/snmp/mibs",
],
By default, we copy and compile, in order of ascending dependence (via topological sort), whatever MIBs we can find in /usr/share/snmp/mibs
. Unfortunately, it is exceedingly common for MIBs to contain syntax errors and obsolete references, and it is also common for installations to leave out some MIBs altogether. These problems inevitably must be dealt with manually.
That said, we do not strictly rely on object name resolution, so it is quite reasonable to do without MIBs, entirely; instead, you can simply point :snmp_ex
to an empty directory (to which we have read/execute permissions), then use only OIDs in your application. One way to do this would be to configure :mib_sources
with the empty priv/snmp/mibs
directory. In this case, your config/config.exs
would contain the following.
import Config
config :snmp_ex, mib_sources: ["priv/snmp/mibs"]
Feel free to rm -rf priv/snmp
, as it will simply be rebuilt during compilation.
And in the other direction, if you'd like to supplement the missing MIBs, here is a good source.
I hope the above helps. Please let me know if you still have trouble!
Thanks for quick and detailed response.
import Config
config :snmp_ex, mib_sources: ["priv/snmp/mibs"]
By adding this line to config/test.exs
the warning message disappeared. And everything works well.
Thank you! 🙏 Ticket can be closed.
I'm glad to hear it, @workgena. Thanks again for contributing!
Hi,
In 0.4.0, 0.6.0 and even in master I see this weird warning, which does not impact application.
It is visible during compilation and during
mix test
, polluting output.The application is built inside Docker container from image
debian-bullseye elixir-1.15.2 erlang-25.3.2.3