SNMP Client example?

Pete Kazmier pete-expires-20060401@REDACTED
Mon Feb 13 15:26:37 CET 2006


Torbjorn Tornkvist <tobbe@REDACTED> writes:

> Pete Kazmier wrote:
>
>> Could someone post or send me a simple example erlang program that is
>> able to query an agent for its system.sysDescr.0?  I am having a
>> difficult time finding examples of how to use the Erlang snmp code in
>> such a manner.  I want to write a tool to help manage a large number
>> (approximately 2000) of Cisco routers.  This may be my way to get
>> Erlang at my workplace.
>>
>
> Have you tried the HowTo at:
>
>   http://www.trapexit.org/docs/howto/snmp_howto.html

To be honest, I missed that one.  A cursory glance seems to indicate
that one must statically configure all of the agents that might be
queried ahead of time in a local configuration file.

I'm searching for a simple client API that would be equivalent to
using net-snmp's 'snmpget' command-line utility?  Ideally, such an API
call would take a hostname, community, and oid as arguments, and then
return the result.

If such an interface does not exist, would it be easy for me to
implement using the existing code?  Or should I simply resort to
calling out to the OS to invoke the command-line 'snmpget'?  

And finally, does the Erlang SNMP library support the placing of SNMP
GETBULK requests?  This is important in my case as I need to query
some large tables on my Cisco routers.

Thanks,
Pete



More information about the erlang-questions mailing list