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

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
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
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
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127089 1222
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement