umair-iftikhar

umair-iftikhar

SNMP Agent Implementation in Elixir

We are developing a simple application in Elixir and Phoenix Framework. This is a hardware-based application and we have done with all stuff. Now we have to write SNMP Agent software in our application, so the clients SNMP Manager can read data from our device.

We are looking for libraries or any help materials. I just found 3 things on google:

  1. https://github.com/jonnystorm/mib-2-elixir
  2. https://gitlab.com/jonnystorm/snmp-elixir
  3. https://github.com/jonnystorm/net-snmp-elixir

The problem is the bad documentation that is not suitable for beginners like me.

We need help to deploy SNMP Agent in our application. This is our focus task.

Marked As Solved

hauleth

hauleth

Usage of Erlang modules is pretty simple: :module_name.function_name(arguments) as this is exactly how all functions are called (Elixir’s Foo.Bar module is in reality alias for :'Elixir.Foo.Bar' atom). There are few differences how to write some things in Elixir and Erlang, but this is not part of this discussion. So in the end the usage is almost the same.

About SNMP there is more detailed guide about using it.

Also Liked

jmitchell

jmitchell

Elixir and Erlang both run on the same virtual machine (BEAM), and it’s possible to call Erlang functions from Elixir.

For example, here’s the syntax for calling the date/0 (0-argument function, date) in the erlang module.

iex(1)> :erlang.date()
{2019, 5, 23}

Similarly, to run Erlang’s interactive SNMP configuration generator, config/0 in the snmp module you’d type:

iex(2)> :snmp.config()

Simple SNMP configuration tool (version 5.2.11)
------------------------------------------------
Note: Non-trivial configurations still has to be
      done manually. IP addresses may be entered 
      as dront.ericsson.se (UNIX only) or
      123.12.13.23
------------------------------------------------

Configure an agent (y/n)? [y]

Erlang ships with a lot of SNMP-related modules and functions, so looking through the docs I linked and tinkering around in iex should give you a sense whether it supports what you need.

hauleth

hauleth

Where Next?

Popular in Questions Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
New
Kagamiiiii
Student & New to elixir. Nice language. I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New

We're in Beta

About us Mission Statement