Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  OTP SNMP Manager & Community string

tellivais
Posted: Sun Jan 31, 2010 8:04 pm Reply with quote
Joined: 31 Jan 2010 Posts: 1
Hi guys!

Could you please explain me if there are any ways to set community string for SNMP GET request? It is easy to do with Net-SNMP, but I don't see the possible solutions in OTP.

BR,
// Andrey
View user's profile Send private message
bouba
Posted: Wed Feb 03, 2010 7:46 pm Reply with quote
Joined: 03 Feb 2010 Posts: 2
I am currently looking at snmp with erlang, so I am no expert. ^^
I would use snmpm:update_agent_info to change the community name like in this example:

Code:

1> application:start(snmp).
ok
2> snmpm:start().
ok
3> snmpm:register_user(the_user, snmpm_user_default, undefined).
ok
4> snmpm:register_agent(the_user, "myrmidon", [{address, [127,0,0,1]}, {community, "private"}, {engine_id, "the engine"}]).
ok
5> snmpm:load_mib("SNMPv2-MIB").
ok
6> snmpm:sync_get(the_user, "myrmidon", [[sysName, 0]]).
{error,{timeout,1055001784}}
7> snmpm:update_agent_info(the_user, "myrmidon", community, "public").
ok
8> snmpm:sync_get(the_user, "myrmidon", [[sysName, 0]]).
{ok,{noError,0,
             [{varbind,[1,3,6,1,2,1,1,5,0],'OCTET STRING',"myrmidon",1}]},
    4999}


Hope this helps.
Regards

Bouba
View user's profile Send private message
spawn.think
Posted: Fri Feb 05, 2010 1:15 pm Reply with quote
User Joined: 29 Sep 2009 Posts: 21
Hello there,
It's easy to set in the configurations in community.conf file
I suggest you have a look at this tutorial it's really helpful
http://www.trapexit.org/SNMP_Quick_Start
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum