BLOG     |     FORUM
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

Name Parameters Access Description
Init

Initialize the manager after creating. Use this if you want to write to the object (eg creating new agents, editing etc).

The Unbrowse UI must not be running when you call this.

InitReadOnly Initialize for reading agent information. Use this if you only want to pass the agent object around for SNMP walking, setting values, etc.  The Unbrowse UI can be running when you call this.
NewAgent SnmpAgent object - return value Create a new agent object. You can then set the properties of this object
AddToRepository SnmpAgent object Add this agent to the database
RemoveFromRepository SnmpAgent object Remove this agent
FindAgent String - 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 }
FindAgentForAddress String - 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

Name Parameters Access Purpose
IPAddress String Read
Write
The IP Address of the SNMP agent (can be an IPv6 address)
Name String Read
Write
Name of agent
SNMPVersion Numeric Read
Write
Version used to communicate (0=v1, 1=v2c, 3=v3)
ReadComm String Read
Write
The community used for reading from agent (v2 only)
WriteComm String Read
Write
The community used for SET requests (v2 only)
SecurityName String Read
Write
The v3 USM user name
ContextName String Read
Write
The v3 context name
SecurityLevel Numeric Read
Write
The type of v3 security (0 = noAuthNoPriv, 1 = authNoPriv, 2= authPriv)
AuthProtocol Numeric Read
Write
v3 authentication protocol (0=MD5, 1=SHA)
PrivProtocol Numeric Read
Write
v3 privacy protocol (0=DES, 1=AES)
Port Numeric Read
Write
The UDP port to which requests are sent
Timeout Numeric Read
Write
Timeout in milliseconds
Retries Numeric Read
Write
Number of times to retry communication before declaring error
AuthPassPhrase String Read
Write
The Auth Passphrase (read/write)
PrivPassPhrase String Read
Write
The Priv Passphrase
ContextEngineID String Read
Write
Context Engine ID in hex without the leading 0x
ContextName String Read
Write
Context Name
SnmpEngineID String Read
Write
SNMP Engine ID in hex without the leading 0x