aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/doc/src/snmp_manager_config_files.xml
blob: c2ef3cd2c7d5070fb0007f13d7d65c58e77c4b09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>2004</year><year>2009</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>Definition of Manager Configuration Files</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev></rev>
    <file>snmp_manager_config_files.xml</file>
  </header>
  <p>Configuration data may be included in configuration files
    that is located in the configuration directory. The name of this
    directory is given in the <c>config_dir</c> configuration
    parameter. These files are read at start-up.
    </p>
  <p>The directory where the configuration files are found is given as
    a parameter to the manager.
    </p>
  <p>The entry format in all files are Erlang terms, separated by a
    '<em>.</em>' and a <em>newline</em>. In the following sections, the
    formats of these terms are described. Comments may be specified as
    ordinary Erlang comments.
    </p>
  <p>If syntax errors are discovered in these files they are reported with the
    function <c>config_err/2</c> of the 
    <seealso marker="snmpa_error_report">error report module</seealso>  
    at start-up.
    </p>

  <section>
    <marker id="manager"></marker>
    <marker id="manager_information"></marker>
    <title>Manager Information</title>
    <p>The manager information should be stored in a file called
      <c>manager.conf</c>.
      </p>
    <p>Each entry is a tuple of size two:
      </p>
    <p><c>{Variable, Value}.</c></p>
    <list type="bulleted">
      <item>
        <p><c>Variable</c> is one of the following:</p>
        <list type="bulleted">
          <item>
            <p><c>address</c> - which defines the IP address of the 
              manager. Default is local host.</p>
          </item>
          <item>
            <p><c>port</c> - which defines which UDP port the manager uses
              for communicating with agents. <em>Mandatory</em>.</p>
          </item>
          <item>
            <p><c>engine_id</c> - The <c>SnmpEngineID</c> as defined in 
              SNMP-FRAMEWORK-MIB. <em>Mandatory</em>.</p>
          </item>
          <item>
            <p><c>max_message_size</c> - The <c>snmpEngineMaxMessageSize</c> as
              defined in SNMP-FRAMEWORK-MIB. <em>Mandatory</em>.</p>
          </item>
        </list>
      </item>
      <item>
        <p><c>Value</c> is the value for the variable.
          </p>
      </item>
    </list>
    <p>The following example shows a <c>manager.conf</c> file: 
      </p>
    <pre>
{address,          [141,213,11,24]}.
{port,             5000}.
{engine_id,        "mgrEngine"}.
{max_message_size, 484}.
    </pre>
    <p>The value of <c>engine_id</c> is a string, which should have a 
      very specific structure. See RFC 2271/2571 for details.
      </p>
  </section>

  <section>
    <marker id="users"></marker>
    <title>Users</title>
    <p>For each <em>manager user</em>, the manager needs some information.
      This information is either added in the <c>users.conf</c> config 
      file or by calling the 
      <seealso marker="snmpm#register_user">register_user</seealso> 
      function in run-time.
      </p>
    <p>Each row defines a <em>manager user</em> of the manager. 
      </p>
    <p>Each entry is a tuple of size four:
      </p>
    <!-- <p><c>{UserId, UserMod, UserData}.</c></p> -->
    <p><c>{UserId, UserMod, UserData, DefaultAgentConfig}.</c></p>
    <list type="bulleted">
      <item>
        <p><c>UserId</c> is any term (used to uniquely identify the user).</p>
      </item>
      <item>
        <p><c>UserMod</c> is the user callback module (atom).</p>
      </item>
      <item>
        <p><c>UserData</c> is any term (passed on to the user when calling the
          <c>UserMod</c>.
          </p>
      </item>
      <item>
        <p><c>DefaultAgentConfig</c> is a list of default agent config's. 
          These values are used as default values when this user registers 
          agents.
          </p>
      </item>
    </list>
  </section>

  <section>
    <marker id="agents"></marker>
    <title>Agents</title>
    <p>The information needed to handle agents should be stored in a 
      file called <c>agents.conf</c>. It is also possible to add agents
      in run-time by calling the 
      <seealso marker="snmpm#register_agent">register_agent</seealso>.
      </p>
    <p>Each entry is a tuple:
      </p>
    <p><c>{UserId,  TargetName, Comm, Ip, Port, EngineID, Timeout,  MaxMessageSize, Version, SecModel, SecName, SecLevel}.</c></p>
    <list type="bulleted">
      <item>
        <p><c>UserId</c> is the identity of the <em>manager user</em>
          responsible for this agent (term).
          </p>
      </item>
      <item>
        <p><c>TargetName</c> is a <em>unique</em> <em>non-empty</em> string.</p>
      </item>
      <item>
        <p><c>Comm</c> is the community string (string).</p>
      </item>
      <item>
        <p><c>Ip</c> is the ip address of the agent (a list of four integers).</p>
      </item>
      <item>
        <p><c>Port</c> is the port number of the agent (integer).</p>
      </item>
      <item>
        <p><c>EngineID</c> is the engine-id of the agent (string).</p>
      </item>
      <item>
        <p><c>Timeout</c> is re-transmission timeout 
          (<c>infinity</c> | integer).</p>
      </item>
      <item>
        <p><c>MaxMessageSize</c> is the max message size for outgoing messages 
          to this agent (integer).</p>
      </item>
      <item>
        <p><c>Version</c> is the version (v1 | v2 | v3).</p>
      </item>
      <item>
        <p><c>SecModel</c> is the security model (any | v1 | v2c | usm).</p>
      </item>
      <item>
        <p><c>SecName</c> is the security name (string).</p>
      </item>
      <item>
        <p><c>SecLevel</c> is security level (noAuthNoPriv | authNoPriv | 
          authPriv).</p>
      </item>
    </list>
  </section>

  <section>
    <marker id="usm"></marker>
    <marker id="usm_user"></marker>
    <title>Security data for USM</title>
    <p>The information about Security data for USM should be stored in a 
      file called <c>usm.conf</c>, which must be present if the manager
      wishes to use SNMPv3 when communicating with agents. It is also 
      possible to add usm data in run-time by calling the 
      <seealso marker="snmpm#register_usm_user">register_usm_user</seealso>.
      </p>
    <p>The corresponding table is <c>usmUserTable</c> in the
      SNMP-USER-BASED-SM-MIB.
      </p>
    <p>Each entry is a term:
      </p>
    <p><c>{EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}.</c>      <br></br>
<c>{EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey}.</c></p>
    <p>The first case is when we have the identity-function 
      (<c>SecName</c> = <c>UserName</c>).
      </p>
    <list type="bulleted">
      <item>
        <p><c>EngineID</c> is a string.</p>
      </item>
      <item>
        <p><c>UserName</c> is a string.</p>
      </item>
      <item>
        <p><c>SecName</c> is a string.</p>
      </item>
      <item>
        <p><c>AuthP</c> is a <c>usmNoAuthProtocol</c>,
          <c>usmHMACMD5AuthProtocol</c> or <c>usmHMACSHAAuthProtocol</c>.</p>
      </item>
      <item>
        <p><c>AuthKey</c> is a list (of integer). This is the User's 
          secret localized authentication key. It is not visible in the MIB. 
          The length of this key needs to be 16 if 
          <c>usmHMACMD5AuthProtocol</c> is used and 20 if 
          <c>usmHMACSHAAuthProtocol</c> is used.</p>
      </item>
      <item>
        <p><c>PrivP</c> is a <c>usmNoPrivProtocol</c>, 
          <c>usmDESPrivProtocol</c> or <c>usmAesCfb128Protocol</c>.</p>
      </item>
      <item>
        <p><c>PrivKey</c> is a list (of integer). This is the User's secret
          localized encryption key.  It is not visible in the MIB. The length
          of this key needs to be 16 if <c>usmDESPrivProtocol</c> 
          or <c>usmAesCfb128Protocol</c> is used.</p>
      </item>
    </list>
  </section>
</chapter>