File: snmp_manager_config_files.html

package info (click to toggle)
erlang-doc-html 1%3A11.b.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 23,284 kB
  • ctags: 10,724
  • sloc: erlang: 505; ansic: 323; makefile: 62; perl: 61; sh: 45
file content (375 lines) | stat: -rw-r--r-- 7,450 bytes parent folder | download
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
  <TITLE>Definition of Manager Configuration Files</TITLE>
  <SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
      ALINK="#FF0000">
<CENTER>
<A HREF="http://www.erlang.se"><IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif"></A>
</CENTER>
<A NAME="7"><!-- Empty --></A>
<H2>7 Definition of Manager Configuration Files</H2>

<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 <CODE>config_dir</CODE> configuration
parameter. These files are read at start-up.


<P>The directory where the configuration files are found is given as
a parameter to the manager.


<P>The entry format in all files are Erlang terms, separated by a
'<STRONG>.</STRONG>' and a <STRONG>newline</STRONG>. In the following sections, the
formats of these terms are described. Comments may be specified as
ordinary Erlang comments.


<P>Syntax errors in these files are discovered and reported with the
function <CODE>config_err/2</CODE> of the 
<A HREF="snmpa_error_report.html">error report module</A> 
at start-up.

<A NAME="manager"><!-- Empty --></A><A NAME="7.1"><!-- Empty --></A>
<H3>7.1 Manager Information</H3>

<P>The manager information should be stored in a file called
<CODE>manager.conf</CODE>.


<P>Each entry is a tuple of size two:


<P><CODE>{Variable, Value}.</CODE>


<P>
<UL>

<LI>
        <CODE>Variable</CODE> is one of the following:
        <BR>

<UL>

<LI>
         <CODE>address</CODE> - which defines the IP address of the 
         manager. Default is local host.<BR>

         
</LI>


<LI>
         <CODE>port</CODE> - which defines which UDP port the manager uses
         for communicating with agents. <STRONG>Mandatory</STRONG>.<BR>

         
</LI>


<LI>
         <CODE>engine_id</CODE> - The <CODE>SnmpEngineID</CODE> as defined in 
         SNMP-FRAMEWORK-MIB. <STRONG>Mandatory</STRONG>.<BR>

         
</LI>


<LI>
         <CODE>max_message_size</CODE> - The <CODE>snmpEngineMaxMessageSize</CODE> as
         defined in SNMP-FRAMEWORK-MIB. <STRONG>Mandatory</STRONG>.<BR>

         
</LI>


</UL>



</LI>


<LI>
<CODE>Value</CODE> is the value for the variable.

<BR>

</LI>


</UL>

<P>The following example shows a <CODE>manager.conf</CODE> file: 


<PRE>
{address,          [141,213,11,24]}.
{port,             5000}.
{engine_id,        &#34;mgrEngine&#34;}.
{max_message_size, 484}.
    
</PRE>

<P>The value of <CODE>engine_id</CODE> is a string, which should have a 
very specific structure. See RFC 2271/2571 for details.

<A NAME="users"><!-- Empty --></A><A NAME="7.2"><!-- Empty --></A>
<H3>7.2 Users</H3>

<P>For each <STRONG>manager user</STRONG>, the manager needs some information.
This information is either added in the <CODE>users.conf</CODE> config 
file or by calling the 
<A HREF="snmpm.html#register_user">register_user</A> 
function in runtime.


<P>Each row defines a <STRONG>manager user</STRONG> of the manager. 


<P>Each entry is a tuple of size three:


<P><CODE>{UserId, UserMod, UserData}.</CODE>


<P>
<UL>

<LI>
        <CODE>UserId</CODE> is any term (used to uniquely identify the user).
<BR>

</LI>


<LI>
        <CODE>UserMod</CODE> is the user callback module (atom).
<BR>

</LI>


<LI>
        <CODE>UserData</CODE> is any term (passed on to the user when calling the
         <CODE>UserMod</CODE>.
         
<BR>

</LI>


</UL>
<A NAME="agents"><!-- Empty --></A><A NAME="7.3"><!-- Empty --></A>
<H3>7.3 Agents</H3>

<P>The information needed to handle agents should be stored in a 
file called <CODE>agents.conf</CODE>. It is also possible to add agents
in runtime by calling the 
<A HREF="snmpm.html#register_agent">register_agent</A>.


<P>Each entry is a tuple of size thirteen:


<P><CODE>{UserId, 
        TargetName, Comm, Ip, Port, EngineID, Timeout, 
        MaxMessageSize, Version, SecModel, SecName, SecLevel}.</CODE>


<P>
<UL>

<LI>
        <CODE>UserId</CODE> is the identity of the <STRONG>manager user</STRONG>
         responsible for this agent (term).

<BR>

</LI>


<LI>
        <CODE>TargetName</CODE> is a string.
<BR>

</LI>


<LI>
        <CODE>Comm</CODE> is the community string (string).
<BR>

</LI>


<LI>
        <CODE>Ip</CODE> is the ip address of the agent (a list of four integers).
<BR>

</LI>


<LI>
        <CODE>Port</CODE> is the port number of the agent (integer).
<BR>

</LI>


<LI>
        <CODE>EngineID</CODE> is the engine-id of the agent (string).
<BR>

</LI>


<LI>
        <CODE>Timeout</CODE> is re-transmission timeout 
         (<CODE>infinity</CODE> | integer).
<BR>

</LI>


<LI>
        <CODE>MaxMessageSize</CODE> is the max message size for outgoing messages 
         to this agent (integer).
<BR>

</LI>


<LI>
        <CODE>Version</CODE> is the version (v1 | v2 | v3).
<BR>

</LI>


<LI>
        <CODE>SecModel</CODE> is the security model (any | v1 | v2c | usm).
<BR>

</LI>


<LI>
        <CODE>SecName</CODE> is the security name (string).
<BR>

</LI>


<LI>
        <CODE>SecLevel</CODE> is security level (noAuthNoPriv | authNoPriv | 
         authPriv).
<BR>

</LI>


</UL>
<A NAME="usm_user"><!-- Empty --></A><A NAME="7.4"><!-- Empty --></A>
<H3>7.4 Security data for USM</H3>

<P>The information about Security data for USM should be stored in a 
file called <CODE>usm.conf</CODE>, which must be present if the manager
wishes to use SNMPv3 when commuincating with agents. It is also 
possible to add usm data in runtime by calling the 
<A HREF="snmpm.html#register_usm_user">register_usm_user</A>.


<P>The corresponding table is <CODE>usmUserTable</CODE> in the
SNMP-USER-BASED-SM-MIB.


<P>Each entry is a term:


<P><CODE>{EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}.</CODE>
<BR>
<CODE>{EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey}.</CODE>


<P>The first case is when we have the identity-function 
(<CODE>SecName</CODE> = <CODE>UserName</CODE>).


<P>
<UL>

<LI>
        <CODE>EngineID</CODE> is a string.
<BR>

</LI>


<LI>
        <CODE>UserName</CODE> is a string.
<BR>

</LI>


<LI>
        <CODE>SecName</CODE> is a string.
<BR>

</LI>


<LI>
        <CODE>AuthP</CODE> is a <CODE>usmNoAuthProtocol</CODE>,
         <CODE>usmHMACMD5AuthProtocol</CODE>, or <CODE>usmHMACSHAAuthProtocol</CODE>.
<BR>

</LI>


<LI>
        <CODE>AuthKey</CODE> is a list (of integer). This is the User's 
         secretlocalized authentication key. It is not visible in the MIB. 
         The length of this key needs to be 16 if 
         <CODE>usmHMACMD5AuthProtocol</CODE> is used, and 20 if 
         <CODE>usmHMACSHAAuthProtocol</CODE> is used.
<BR>

</LI>


<LI>
        <CODE>PrivP</CODE> is a <CODE>usmNoPrivProtocol</CODE>, 
         <CODE>usmDESPrivProtocol</CODE> or <CODE>usmAesCfb128Protocol</CODE>.
<BR>

</LI>


<LI>
        <CODE>PrivKey</CODE> 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 <CODE>usmDESPrivProtocol</CODE> 
or <CODE>usmAesCfb128Protocol</CODE> is used.
<BR>

</LI>


</UL>
<CENTER>
<HR>
<SMALL>
Copyright &copy; 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>