Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
4.  Configuring Enterprise Agents 4.2 Agents Resource Configuration Files 4.2.2 Resource Group  Previous   Contents   Next 
   
 

4.3 Agents Registration File

Each agent has its own agent registration file. This provides the Master Agent and each subagent file with its own file version. The registration file contains information pertinent to each agent. It also includes the name of the agent, the subtree OIDs managed by the respective agent, request time out, and the preferred port number. The following example shows the format of each entry in this file.

<Config> : <Macro> <Agents>
<Macro> : "macros" "=" "{" <MacrosList>"}"
<MacrosList> : <MacrosList> <MacroItem> | empty
<MacroItem> : label "=" <SubidList>
<SubidsLis> : <SubidsList> "." <Subid> | <Subid>
<Subid> : "mib2" | "sun" | "enterprise" | identifier | number
<Agents> : "agents" "=" "{" <AgentList> "}"
<AgentList> : <AgentList> <AgentItem> | <AgentItem>
<AgentItem> : "{" <Name> <SubtreesTables> <TimeOut> <WatchDogTimer> <Port>"}"
<Name> : label "=" quotestring
<SubtreesTables> : <SubtreesTables> | <Subtrees> | <Tables>
<Subtrees> : "subtrees" "=" "{" <SubtreesList> "}"
<SubtreesList> : <SubtreesList> "," <SubtreeItem> | <SubtreeItem> | empty
<SubtreeItem> : <SubidsList>
<Tables> : "tables" "=" "{" <TableList>"}"
<TableList> : <TableList> <TableItem> | empty|
<TableItem> : "{" <Table> <Columns> <Indexs> "}"
<Table> : "table" "=" <SubidsList>
<Columns> : "column" "=" <Range>
<Range> : "[" number "]" | number
<Index>s : "indexs" "=" <Range>
<TimeOut> : "timeout" "=" number
<WatchDogTimer>: "watch-dog-time" "=" number
<Port> : "port" = number

The registration file name may have any extension. The reg extension is recommended. The following is an example of an actual subtree file.

macros = {
applicationTable = mib-2.27
sun = enterprise.42
}
agents = {
{
name = "ExampleAgent"
subtrees = { mib-2, sun }
tables = {
{ #begin table
table = applicationTable
columns = [ 2 -15 ]
indexes = [ 2 -3 ]
} #end table
} #end of tables
timeout = 20000 # Optional. Each SNMP request time out. This is
in microseconds.
watch_dog_time = 300 # This is in seconds
port = 4000 # Optional
}
} #end of agents

This configuration file consists of two groups of information:

  • macros - contains macros for use in the agents group.

  • agents - contains a number of variables and further groups tabled within its definition.

The variables used in the agents group are as follows:

  • name - this variable names the subagent. Agent names must be unique, though multiple agents invoked as separate processes may have the same executable. The Master Agent uses the agent name as a key in the agent table MIB.

  • subtrees - Subtrees contain a list of the subtree OIDs that are managed by this particular agent. A subagent may manage multiple trees. In the previous example of an actual subtree file in use, the agent named ExampleAgent manages subtrees mib-2 and sun.

  • tables - the subagent registration files may be configured to manage full or partial MIB tables. The tables group contains the table name, the column numbers, and particular row numbers (indexes). In the previous actual subtree file example, the ExampleAgent manages columns 2-15 of rows 2-3 of the application table in addition to subtrees mib-2 and sun.

  • timeout - the timeout variable is registered with the Master Agent. The Master Agent waits for the timeout microseconds to receive a response to its SNMP requests. Each agent specifies its own timeout, though this timeout may not be greater than the max_agent_time_out defined in the Master Agent resource configuration file previously defined.

  • watch_dog_time - the Master Agent uses this timeout to determine if the subagent is active. The Master Agent polls the subagent only if there has been no activity between the Master Agent and the subagent for the watch_dog_time interval.

  • port - the port is the number that the subagent is waiting for in order to receive SNMP requests from the Master Agent. This variable is optional. Normally, the subagents do not assign a value to this variable. If this variable is missing from the configuration file, the Master Agent attempts to find an unopened port, then invokes the respective subagent with this port number. If the port is assigned a value, the Master Agent invokes the subagent with this particular port number. The subagent is invoked according to the command variable mentioned in the Master Agent resource file.


Note - Dynamic agents developed using Solstice Enterprise Agents libraries do not need to be invoked by the Master Agent. For such agents, there may not be any entry in the Master Agent resource file. Such agents open any available port by themselves.


4.4 Agents Access Control File

The agents access control file is a configuration file that stores SNMP-related community information. Every subagent and the Master Agent may have its own access control file. This file name may have any extension, although the extension acl is recommended. This file must be stored in the /etc/snmp/conf directory.

The following is an example of the grammar for the access control configuration file.

<snmp_security> : <acls> <trap_block>
<acls> : /*empty*/ | "acl" "=" {<acls_list> }
<acls_list> : /*empty*/ | <acls_list> <acl_item>
<acl_item> : {<communities_stmt> <acl_access> <hosts> }
<communities_stmt> : "communities" "=" <communities_set>
<communities_set> : <communities_set> , <community_elem> |
<community_elem>
<community_elem>: alphanumeric_string
<acl_access> : "access" "=" <acl_access_type>
<acl_access_type> : read-only | read-write
<hosts> : "managers" "=" <hosts_list>
<hosts_list> : <hosts_list> , <host_item> | <host_item>
<host_item> : alphanumeric_string
<trap_block> : "trap" "=" { <traps_list> }
<traps_list> : /*empty*/ | <trap_list> < trap_item>
<trap_item> : { <trap_community_string> <trap_interest_hosts>
<enterprise_list> }
<trap_community_string> : "trap-community" "=" alphanumeric_string
<trap_interest_hosts_list> : <trap_interest_hosts_list> ,
<trap_interest_host_item> |
<trap_interest_host_item>
<trap_interest_host_item> : alphanumeric_string
<enterprise_list> : /*empty*/ | <enterprise_list> <enterprise_item>
<enterprise_item> : { <enterprise_stmt> <trap_number_stmt> }
<enterprise_stmt> : "enterprise" "=" quouted_alphanumeric_string
<trap_number_stmt> : "trap-num" "=" <trap_number_list>
<trap_number_list> : <trap_number_item>
<trap_number_item> : <trap_range>
<trap_range> : integer - integer | integer

The following is an example of the access control list file.

acl = {
{
communities = public, private
access = read-only
managers = hubble, snowbell, nanak
}
{
communities = jerry
access = read-write
managers = hubble, telescope
}
}
trap = {
  {
        trap-community = SNMP-trap
        hosts = hubble, snowbell
        { enterprise = "Sun"
          trap-num = 1, 2-5
        }
        {
          enterprise = "3Com"
          trap-num = 4 }
        }
        {
        trap-community = competitor-trap
        hosts = hp_server, ibm_server, sgi
        {
        enterprise = "sun"
        trap-num = 1,3 }
        {
        enterprise = "snmp"
        trap-num = 1-32
        }

    }

}
 
 
 
  Previous   Contents   Next