:snmp in Elixir - how to handle get and set commands?

I build simple SNMP agent Elixir app with :snmp erlang framework

I am not a very experienced developer and I had difficulty with how to configure the application to handle get and set commands something like this path

case input do
  {:get, @oid1} -> term()
  {:set, @oid2} -> term()
  etc -> etc
end

or handle_info or something else

Can anyone please help?

Hello and welcome to the forums!

You can start by reading SNMP guides. Elixir doesn’t provide any wrappers around snmp functionality, so all you need to do is read the OTP documentation and call the underlying erlang functions.

It would be also good to know what you are trying to do, because erlang provides functionality for implementing agents as well as managers (which also has guides, so start by reading them).

1 Like