Agent Manager

Agent Manager Reference

Agent Manager Objects
Links

AgentManager (top level object)

Provides scripting access to add, remove, or modify snmp agents.
The top level object to access the agent manager  is called "UnbrowseSNMP.AgentManager"

Creating the top level object 

VBScript

Set Mgr = CreateObject("UnbrowseSNMP.AgentManager")

Ruby

agentMgr = WIN32OLE.New("UnbrowseSNMP.AgentManager")

Events

None

Properties and Methods

NameParametersAccessDescription
Init  Initialize the manager (not necessary to call this)
NewAgentSnmpAgent object - return value Create a new agent object. You can then set the properties of this object
AddToRepositorySnmpAgent object Add this agent to the database
RemoveFromRepositorySnmpAgent object Remove this agent
FindAgentString - agent name Find an agent by name. Returns the SnmpAgent object or null
 Agents

 

Collection of agents - return value

 

Used to iterate over all defined agents

VBScript :

 For Each Agent in AgentMgr.Agents  
   WScript.Stdout.WriteLine "Name " & Agent.Name
Next
Ruby :
 AgentMgr.Agents.each { |a| p "Name " + a.Name }
 FindAgentForAddressString - IP Address
 Searches defined agents and returns the first agent found for the given IP Address
 FindAgentForSecurityName

String - IP Address

String - SNMPv3 username

 Searches defined agents and returns the first agent with the matching IP Address and Security Name

The SnmpAgent object

Access to properties of an SNMP  agent.

Events

None

Properties and Methods

NameParametersAccessPurpose
IPAddressStringRead
Write
The IP Address of the SNMP agent (can be an IPv6 address)
NameStringRead
Write
Name of agent
SNMPVersionNumericRead
Write
Version used to communicate (0=v1, 1=v2c, 3=v3)
ReadCommStringRead
Write
The community used for reading from agent (v2 only)
WriteCommStringRead
Write
The community used for SET requests (v2 only)
SecurityNameStringRead
Write
The v3 USM user name
ContextNameStringRead
Write
The v3 context name
SecurityLevelNumericRead
Write
The type of v3 security (0 = noAuthNoPriv, 1 = authNoPriv, 2= authPriv)
AuthProtocolNumericRead
Write
v3 authentication protocol (0=MD5, 1=SHA)
PrivProtocolNumericRead
Write
v3 privacy protocol (0=DES, 1=AES)
PortNumericRead
Write
The UDP port to which requests are sent
TimeoutNumericRead
Write
Timeout in milliseconds
RetriesNumericRead
Write
Number of times to retry communication before declaring error
 AuthPassPhraseStringRead
Write
 The Auth Passphrase (read/write)
 PrivPassPhraseStringRead
Write
 The Priv Passphrase
 ContextEngineIDStringRead
Write
 Context Engine ID in hex without the leading 0x
 ContextNameStringRead
Write
 Context Name
 SnmpEngineIDStringRead
Write
 SNMP Engine ID in hex without the leading 0x