1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
7
<year>1997</year><year>2009</year>
8
<holder>Ericsson AB. All Rights Reserved.</holder>
11
The contents of this file are subject to the Erlang Public License,
12
Version 1.1, (the "License"); you may not use this file except in
13
compliance with the License. You should have received a copy of the
14
Erlang Public License along with this software. If not, it can be
15
retrieved online at http://www.erlang.org/.
17
Software distributed under the License is distributed on an "AS IS"
18
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19
the License for the specific language governing rights and limitations
24
<title>Running the application</title>
26
<responsible></responsible>
32
<file>snmp_config.xml</file>
34
<p>The chapter <em>Running the application</em> describes how the
35
application is configured and started.
36
The topics include:</p>
37
<list type="bulleted">
38
<item>configuration directories and parameters</item>
39
<item>modifying the configuration files</item>
40
<item>starting the application (agent and/or manager)</item>
41
<item>debugging the application (agent and/or manager)</item>
43
<p>Refer also to the chapter(s)
44
<seealso marker="snmp_agent_config_files">Definition of Agent Configuration Files</seealso> and
45
<seealso marker="snmp_manager_config_files">Definition of Manager Configuration Files</seealso> which contains more detailed information
46
about the agent and manager configuration files.</p>
49
<marker id="configuration_params"></marker>
50
<title>Configuring the application</title>
51
<p>The following two directories must exist in the system
53
<list type="bulleted">
55
<p>the <em>configuration directory</em> stores all
56
configuration files used by the agent (refer to the chapter
57
<seealso marker="snmp_agent_config_files">Definition of Agent Configuration Files</seealso> for more information). </p>
59
<item>the <em>database directory</em> stores the internal
60
database files.</item>
62
<p>The following directory must exist in the system
63
to run the manager:</p>
64
<list type="bulleted">
66
<p>the <em>configuration directory</em> stores all
67
configuration files used by the manager (refer to the chapter
68
<seealso marker="snmp_manager_config_files">Definition of Manager Configuration Files</seealso> for more information). </p>
71
<p>the <em>database directory</em> stores the internal
76
<p>The agent and manager uses (application) configuration parameters to
77
find out where these directories are located. The parameters should be
78
defined in an Erlang system configuration file. The following
79
configuration parameters are defined for the SNMP application:</p>
82
agent_options() = [agent_option()]
83
agent_option() = {restart_type, restart_type()} |
84
{agent_type, agent_type()} |
85
{agent_verbosity, verbosity()} |
86
{versions, versions()} |
87
{priority, priority()} |
88
{multi_threaded, multi_threaded()} |
90
{db_init_error, db_init_error()} |
91
{local_db, local_db()} |
92
{net_if, agent_net_if()} |
94
{mib_storage, mib_storage()} |
95
{mib_server, mib_server()} |
96
{audit_trail_log, audit_trail_log()} |
97
{error_report_mod, error_report_mod()} |
98
{note_store, note_store()} |
99
{symbolic_store, symbolic_store()} |
100
{target_cache, target_cache()} |
101
{config, agent_config()}
102
manager_options() = [manager_option()]
103
manager_option() = {restart_type, restart_type()} |
104
{net_if, manager_net_if()} |
106
{note_store, note_store()} |
107
{config, manager_config()} |
108
{inform_request_behaviour, manager_irb()} |
109
{mibs, manager_mibs()} |
110
{priority, priority()} |
111
{audit_trail_log, audit_trail_log()} |
112
{versions, versions()} |
113
{def_user_mod, def_user_module() |
114
{def_user_data, def_user_data()}
117
<p>Agent specific config options and types:</p>
119
<tag><c><![CDATA[agent_type() = master | sub <optional>]]></c></tag>
121
<p>If <c>master</c>, one master agent is
122
started. Otherwise, no agents are started. </p>
123
<p>Default is <c>master</c>.</p>
125
<tag><c><![CDATA[multi_threaded() = bool() <optional>]]></c></tag>
127
<p>If <c>true</c>, the agent is multi-threaded, with one
128
thread for each get request. </p>
129
<p>Default is <c>false</c>.</p>
131
<tag><c><![CDATA[db_dir() = string() <mandatory>]]></c></tag>
133
<p>Defines where the SNMP agent internal db files are stored.</p>
135
<tag><c><![CDATA[local_db() = [local_db_opt()] <optional>]]></c></tag>
137
<p><c>local_db_opt() = {repair, agent_repair()} | {auto_save, agent_auto_save()} | {verbosity, verbosity()}</c></p>
138
<p>Defines options specific for the SNMP agent local database.</p>
139
<p>For defaults see the options in <c>local_db_opt()</c>.</p>
141
<tag><c><![CDATA[agent_repair() = false | true | force <optional>]]></c></tag>
143
<p>When starting snmpa_local_db it always tries to open an
144
existing database. If <c>false</c>, and some errors occur, a new
145
database is created instead. If <c>true</c>, an existing file
146
will be repaired. If <c>force</c>, the table will be repaired
147
even if it was properly closed. </p>
148
<p>Default is <c>true</c>.</p>
150
<tag><c><![CDATA[agent_auto_save() = integer() | infinity <optional>]]></c></tag>
152
<p>The auto save interval. The table is flushed to disk
153
whenever not accessed for this amount of time.</p>
154
<p>Default is <c>5000</c>.</p>
156
<tag><c><![CDATA[agent_net_if() = [agent_net_if_opt()] <optional>]]></c></tag>
158
<p><c>agent_net_if_option() = {module, agent_net_if_module()} |
159
{verbosity, verbosity()} |
160
{options, agent_net_if_options()}</c></p>
161
<p>Defines options specific for the SNMP agent network interface
163
<p>For defaults see the options in <c>agent_net_if_opt()</c>.</p>
165
<tag><c><![CDATA[agent_net_if_module() = atom() <optional>]]></c></tag>
167
<p>Module which handles the network interface part for the
168
SNMP agent. Must implement the
169
<seealso marker="snmpa_network_interface">snmpa_network_interface</seealso> behaviour.</p>
170
<p>Default is <c>snmpa_net_if</c>.</p>
173
<tag><c><![CDATA[agent_net_if_options() = [agent_net_if_option()] <optional>]]></c></tag>
175
<p><c>agent_net_if_option() = {bind_to, bind_to()} |
178
{no_reuse, no_reuse()} |
179
{req_limit, req_limit()} |
180
{filter, agent_net_if_filter_options()}</c></p>
181
<p>These options are actually specific to the used module.
182
The ones shown here are applicable to the default
183
<c>agent_net_if_module()</c>.</p>
184
<p>For defaults see the options in <c>agent_net_if_option()</c>.</p>
187
<tag><c><![CDATA[agent_net_if_filter_options() = [agent_net_if_filter_option()] <optional>]]></c></tag>
189
<p><c><![CDATA[agent_net_if_filter_option() = {module, agent_net_if_filter_module()}]]></c></p>
190
<p>These options are actually specific to the used module.
191
The ones shown here are applicable to the default
192
<c>agent_net_if_filter_module()</c>.</p>
193
<p>For defaults see the options in <c>agent_net_if_filter_option()</c>.</p>
196
<tag><c><![CDATA[agent_net_if_filter_module() = atom() <optional>]]></c></tag>
198
<p>Module which handles the network interface filter part for the
199
SNMP agent. Must implement the
200
<seealso marker="snmpa_network_interface_filter">snmpa_network_interface_filter
201
</seealso> behaviour.</p>
202
<p>Default is <c>snmpa_net_if_filter</c>.</p>
205
<tag><c><![CDATA[req_limit() = integer() | infinity <optional>]]></c></tag>
207
<p>Max number of simultaneous requests handled by the agent.</p>
208
<p>Default is <c>infinity</c>.</p>
211
<tag><c><![CDATA[agent_mibs() = [string()] <optional>]]></c></tag>
213
<p>Specifies a list of MIBs (including path) that defines which MIBs
214
are initially loaded into the SNMP master agent. </p>
215
<p>Note that the following will always be loaded:</p>
216
<list type="bulleted">
217
<item>version v1: <c>STANDARD-MIB</c></item>
218
<item>version v2: <c>SNMPv2</c></item>
219
<item>version v3: <c>SNMPv2</c>, <c>SNMP-FRAMEWORK-MIB</c>
220
and <c>SNMP-MPD-MIB</c></item>
222
<p>Default is <c>[]</c>.</p>
225
<tag><c><![CDATA[mib_storage() = ets | {ets, Dir} | {ets, Dir, Action} | dets | {dets, Dir} | {dets, Dir, Action} | mnesia | {mnesia, Nodes} | {mnesia, Nodes, Action} <optional>]]></c></tag>
227
<p>Specifies how info retrieved from the mibs will be stored.</p>
228
<p>If <c>mib_storage</c> is <c>{ets, Dir}</c>, the table will also be
229
stored on file. If <c>Dir</c> is <c>default</c>, then <c>db_dir</c>
231
<p>If <c>mib_storage</c> is <c>dets</c> or if <c>Dir</c> is
232
<c>default</c>, then <c>db_dir</c> will be used for <c>Dir</c>.</p>
233
<p>If <c>mib_storage</c> is <c>mnesia</c> then <c>erlang:nodes()</c>
234
will be used for <c>Nodes</c>.</p>
235
<p>Default is <c>ets</c>. </p>
236
<p><c>Dir = default | string()</c>. Dir is the directory where the
237
files will be stored. If <c>default</c>, then <c>db_dir</c> will be
239
<p><c>Nodes = visible | connected | [node()]</c>.
240
<c>Nodes = visible</c> is translated to
241
<c>erlang:nodes(visible)</c>.
242
<c>Nodes = connected</c> is translated to
243
<c>erlang:nodes(connected)</c>.
244
If <c>Nodes = []</c> then the own node is assumed.</p>
245
<p><c>Action = clear | keep</c>. Default is <c>keep</c>.
246
<c>Action</c> is used to specify what shall be done if the
247
mnesia/dets table already exist.</p>
250
<tag><c><![CDATA[mib_server() = [mib_server_opt()] <optional>]]></c></tag>
252
<p><c>mib_server_opt() = {mibentry_override, mibentry_override()} | {trapentry_override, trapentry_override()} | {verbosity, verbosity()} | {cache, mibs_cache()}</c></p>
253
<p>Defines options specific for the SNMP agent mib server. </p>
254
<p>For defaults see the options in <c>mib_server_opt()</c>.</p>
257
<tag><c><![CDATA[mibentry_override() = bool() <optional>]]></c></tag>
259
<p>If this value is false, then when loading a mib each mib-
260
entry is checked prior to installation of the mib.
261
The purpose of the check is to prevent that the same symbolic
262
mibentry name is used for different oid's.</p>
263
<p>Default is <c>false</c>.</p>
266
<tag><c><![CDATA[trapentry_override() = bool() <optional>]]></c></tag>
268
<p>If this value is false, then when loading a mib each trap
269
is checked prior to installation of the mib.
270
The purpose of the check is to prevent that the same symbolic
271
trap name is used for different trap's.</p>
272
<p>Default is <c>false</c>.</p>
275
<tag><c><![CDATA[mibs_cache() = bool() <optional>]]></c></tag>
277
<p>Shall the agent utilize the mib server lookup cache or not.</p>
278
<p>Default is <c>true</c>.</p>
281
<tag><c><![CDATA[error_report_mod() = atom() <optional>]]></c></tag>
283
<p>Defines an error report module, implementing the
284
<seealso marker="snmpa_error_report">snmpa_error_report</seealso>
285
behaviour. Two modules are provided with the toolkit:
286
<c>snmpa_error_logger</c> and <c>snmpa_error_io</c>.</p>
287
<p>Default is <c>snmpa_error_logger</c>.</p>
290
<tag><c>symbolic_store() = [symbolic_store_opt()]</c></tag>
292
<p><c>symbolic_store_opt() = {verbosity, verbosity()}</c></p>
293
<p>Defines options specific for the SNMP agent symbolic store. </p>
294
<p>For defaults see the options in <c>symbolic_store_opt()</c>.</p>
297
<tag><c>target_cache() = [target_cache_opt()]</c></tag>
299
<p><c>target_cache_opt() = {verbosity, verbosity()}</c></p>
300
<p>Defines options specific for the SNMP agent target cache. </p>
301
<p>For defaults see the options in <c>target_cache_opt()</c>.</p>
303
<tag><c><![CDATA[agent_config() = [agent_config_opt()] <mandatory>]]></c></tag>
305
<p><c>agent_config_opt() = {dir, agent_config_dir()} | {force_load, force_load()} | {verbosity, verbosity()}</c></p>
306
<p>Defines specific config related options for the SNMP agent. </p>
307
<p>For defaults see the options in <c>agent_config_opt()</c>.</p>
310
<tag><c><![CDATA[agent_config_dir = dir() <mandatory>]]></c></tag>
312
<p>Defines where the SNMP agent configuration files are stored.</p>
315
<tag><c><![CDATA[force_load() = bool() <optional>]]></c></tag>
317
<p>If <c>true</c> the configuration files are re-read
318
during start-up, and the contents of the configuration
319
database ignored. Thus, if <c>true</c>, changes to
320
the configuration database are lost upon reboot of the
322
<p>Default is <c>false</c>.</p>
326
<p>Manager specific config options and types:</p>
328
<tag><c><![CDATA[server() = [server_opt()] <optional>]]></c></tag>
330
<p><c>server_opt() = {timeout, server_timeout()} | {verbosity, verbosity()}</c></p>
331
<p>Specifies the options for the manager server process.</p>
332
<p>Default is <c>silence</c>.</p>
334
<tag><c><![CDATA[server_timeout() = integer() <optional>]]></c></tag>
336
<p>Asynchroneous request cleanup time. For every requests,
337
some info is stored internally, in order to be able to
338
deliver the reply (when it arrives) to the proper destination.
339
If the reply arrives, this info will be deleted. But if
340
there is no reply (in time), the info has to be deleted
341
after the <em>best before</em> time has been passed.
342
This cleanup will be performed at regular intervals, defined
343
by the <c>server_timeout()</c> time.
344
The information will have a <em>best before</em> time,
345
defined by the <c>Expire</c> time given when calling the
346
request function (see
347
<seealso marker="snmpm#async_get">async_get</seealso>,
348
<seealso marker="snmpm#async_get_next">async_get_next</seealso> and
349
<seealso marker="snmpm#async_set">async_set</seealso>).</p>
350
<p>Time in milli-seconds.</p>
351
<p>Default is <c>30000</c>.</p>
354
<tag><c><![CDATA[manager_config() = [manager_config_opt()] <mandatory>]]></c></tag>
356
<p><c>manager_config_opt() = {dir, manager_config_dir()} | {db_dir, manager_db_dir()} | {db_init_error, db_init_error()} | {repair, manager_repair()} | {auto_save, manager_auto_save()} | {verbosity, verbosity()}</c></p>
357
<p>Defines specific config related options for the SNMP manager. </p>
358
<p>For defaults see the options in <c>manager_config_opt()</c>.</p>
361
<tag><c><![CDATA[manager_config_dir = dir() <mandatory>]]></c></tag>
363
<p>Defines where the SNMP manager configuration files are stored.</p>
366
<tag><c><![CDATA[manager_db_dir = dir() <mandatory>]]></c></tag>
368
<p>Defines where the SNMP manager store persistent data.</p>
371
<tag><c><![CDATA[manager_repair() = false | true | force <optional>]]></c></tag>
373
<p>Defines the repair option for the persistent database (if
374
and how the table is repaired when opened). </p>
375
<p>Default is <c>true</c>.</p>
378
<tag><c><![CDATA[manager_auto_save() = integer() | infinity <optional>]]></c></tag>
380
<p>The auto save interval. The table is flushed to disk
381
whenever not accessed for this amount of time.</p>
382
<p>Default is <c>5000</c>.</p>
385
<tag><c><![CDATA[manager_irb() = auto | user | {user, integer()} <optional>]]></c></tag>
387
<p>This option defines how the manager will handle the sending of
388
response (acknowledgment) to received inform-requests. </p>
389
<list type="bulleted">
391
<p><c>auto</c> - The manager will autonomously send response
392
(acknowledgment> to inform-request messages.</p>
395
<p><c>{user, integer()}</c> - The manager will send response
396
(acknowledgment) to inform-request messages when the
397
<seealso marker="snmpm_user#handle_inform">handle_inform</seealso>
398
function completes. The integer is the time, in milli-seconds,
399
that the manager will consider the stored inform-request info
403
<p><c>user</c> - Same as <c>{user, integer()}</c>, except that
404
the default time, 15000 milli-seconds, is used.</p>
408
<seealso marker="snmpm_network_interface">snmpm_network_interface</seealso>,
409
<seealso marker="snmpm_user">handle_inform</seealso> and
410
<seealso marker="snmp_manager_netif">definition of the manager net if</seealso> for more info.</p>
411
<p>Default is <c>auto</c>.</p>
414
<tag><c><![CDATA[manager_mibs() = [string()] <optional>]]></c></tag>
416
<p>Specifies a list of MIBs (including path) and defines which MIBs
417
are initially loaded into the SNMP manager. </p>
418
<p>Default is <c>[]</c>.</p>
421
<tag><c><![CDATA[manager_net_if() = [manager_net_if_opt()] <optional>]]></c></tag>
423
<p><c>manager_net_if_opt() = {module, manager_net_if_module()} | {verbosity, verbosity()} | {options, manager_net_if_options()}</c></p>
424
<p>Defines options specific for the SNMP manager network interface
426
<p>For defaults see the options in <c>manager_net_if_opt()</c>.</p>
429
<tag><c><![CDATA[manager_net_if_options() = [manager_net_if_option()] <optional>]]></c></tag>
431
<p><c>manager_net_if_option() = {bind_to, bind_to()} | {sndbuf, sndbuf()} | {recbuf, recbuf()} | {no_reuse, no_reuse()}</c></p>
432
<p>These options are actually specific to the used module.
433
The ones shown here are applicable to the default
434
<c>manager_net_if_module()</c>.</p>
435
<p>For defaults see the options in <c>manager_net_if_option()</c>.</p>
438
<tag><c><![CDATA[manager_net_if_module() = atom() <optional>]]></c></tag>
440
<p>Module which handles the network interface part for the
441
SNMP manager. Must implement the
442
<seealso marker="snmpm_network_interface">snmpm_network_interface</seealso> behaviour.</p>
443
<p>Default is <c>snmpm_net_if</c>.</p>
446
<tag><c><![CDATA[def_user_module() = atom() <optional>]]></c></tag>
448
<p>The module implementing the default user. See the
449
<seealso marker="snmpm_user">snmpm_user</seealso> behaviour.</p>
450
<p>Default is <c>snmpm_user_default</c>.</p>
453
<tag><c><![CDATA[def_user_data() = term() <optional>]]></c></tag>
455
<p>Data for the default user. Passed to the user when calling
456
the callback functions.</p>
457
<p>Default is <c>undefined</c>.</p>
461
<p>Common config types:</p>
463
<tag><c>restart_type() = permanent | transient | temporary</c></tag>
465
<p>See <seealso marker="stdlib:supervisor#child_spec">supervisor</seealso>
466
documentation for more info.</p>
467
<p>Default is <c>permanent</c> for the agent and <c>transient</c>
470
<tag><c>db_init_error() = terminate | create</c></tag>
472
<p>Defines what to do if the agent is unable to open an
473
existing database file. <c>terminate</c> means that the
474
agent/manager will terminate and <c>create</c> means that the
475
agent/manager will remove the faulty file(s) and create new ones.</p>
476
<p>Default is <c>terminate</c>.</p>
478
<tag><c><![CDATA[priority() = atom() <optional>]]></c></tag>
480
<p>Defines the Erlang priority for all SNMP processes.</p>
481
<p>Default is <c>normal</c>.</p>
483
<tag><c><![CDATA[versions() = [version()] <optional>]]></c></tag>
485
<p><c>version() = v1 | v2 | v3</c></p>
486
<p>Which SNMP versions shall be accepted/used.</p>
487
<p>Default is <c>[v1,v2,v3]</c>.</p>
489
<tag><c><![CDATA[verbosity() = silence | info | log | debug | trace <optional>]]></c></tag>
491
<p>Verbosity for a SNMP process. This specifies now much debug info
493
<p>Default is <c>silence</c>.</p>
495
<tag><c><![CDATA[bind_to() = bool() <optional>]]></c></tag>
497
<p>If <c>true</c>, net_if binds to the IP address.
498
If <c>false</c>, net_if listens on any IP address on the host
499
where it is running. </p>
500
<p>Default is <c>false</c>.</p>
502
<tag><c><![CDATA[no_reuse() = bool() <optional>]]></c></tag>
504
<p>If <c>true</c>, net_if does not specify that the IP
505
and port address should be reusable. If <c>false</c>,
506
the address is set to reusable. </p>
507
<p>Default is <c>false</c>.</p>
509
<tag><c><![CDATA[recbuf() = integer() <optional>]]></c></tag>
511
<p>Receive buffer size. </p>
512
<p>Default value is defined by <c>gen_udp</c>.</p>
514
<tag><c><![CDATA[sndbuf() = integer() <optional>]]></c></tag>
516
<p>Send buffer size. </p>
517
<p>Default value is defined by <c>gen_udp</c>.</p>
519
<tag><c><![CDATA[note_store() = [note_store_opt()] <optional>]]></c></tag>
521
<p><c>note_store_opt() = {timeout, note_store_timeout()} | {verbosity, verbosity()}</c></p>
522
<p>Specifies the options for the SNMP note store.</p>
523
<p>For defaults see the options in <c>note_store_opt()</c>.</p>
525
<tag><c><![CDATA[note_store_timeout() = integer() <optional>]]></c></tag>
527
<p>Note cleanup time. When storing a note in the note store,
528
each note is given lifetime. Every <c>timeout</c> the note_store
529
process performs a GC to remove the expired note's. Time in
531
<p>Default is <c>30000</c>.</p>
533
<tag><c><![CDATA[audit_trail_log() [audit_trail_log_opt()] <optional>]]></c></tag>
535
<p><c>audit_trail_log_opt() = {type, atl_type()} | {dir, atl_dir()} | {size, atl_size()} | {repair, atl_repair()}</c></p>
536
<p>If present, this option specifies the options for the
537
<em>audit trail logging</em>. The <c>disk_log</c> module is used
538
to maintain a wrap log. If present, the <c>dir</c> and
539
<c>size</c> options are mandatory.</p>
540
<p>If not present, audit trail logging is not used.</p>
542
<tag><c><![CDATA[atl_type() = read | write | read_write <optional>]]></c></tag>
544
<p>Specifies what type of an audit trail log should be used.
545
The effect of the type is actually different for the the agent
546
and the manager. </p>
547
<p>For the agent:</p>
548
<list type="bulleted">
549
<item>If <c>write</c> is specified, only set requests are logged. </item>
550
<item>If <c>read</c> is specified, only get requests are logged. </item>
551
<item>If <c>read_write</c>, all requests are logged. </item>
553
<p>For the manager:</p>
554
<list type="bulleted">
555
<item>If <c>write</c> is specified, only sent messages are logged. </item>
556
<item>If <c>read</c> is specified, only received messages are logged. </item>
557
<item>If <c>read_write</c>, both outgoing and incoming messages are
560
<p>Default is <c>read_write</c>.</p>
562
<tag><c><![CDATA[atl_dir = dir() <mandatory>]]></c></tag>
564
<p>Specifies where the audit trail log should be stored.</p>
565
<p>If <c>audit_trail_log</c> specifies that logging should take
566
place, this parameter <em>must</em> be defined.</p>
568
<tag><c><![CDATA[atl_size() = {integer(), integer()} <mandatory>]]></c></tag>
570
<p>Specifies the size of the audit
571
trail log. This parameter is sent to <c>disk_log</c>. </p>
572
<p>If <c>audit_trail_log</c> specifies that logging should
573
take place, this parameter <em>must</em> be defined.</p>
575
<tag><c><![CDATA[atl_repair() = true | false | truncate | snmp_repair <optional>]]></c></tag>
577
<p>Specifies if and how the audit trail log shall be repaired
578
when opened. Unless this parameter has the value <c>snmp_repair</c>
579
it is sent to <c>disk_log</c>. If, on the other hand, the value is
580
<c>snmp_repair</c>, snmp attempts to handle certain faults on it's
581
own. And even if it cannot repair the file, it does not truncate it
582
directly, but instead <em>moves it aside</em> for later off-line
584
<p>Default is <c>true</c>.</p>
590
<title>Modifying the Configuration Files</title>
591
<p>To to start the application (agent and/or manager), the
592
configuration files must be modified and there are two ways
593
of doing this. Either edit the files manually, or run the
594
configuration tool as follows.</p>
595
<p>If authentication or encryption is used (SNMPv3 only), start
596
the <c>crypto</c> application.</p>
600
Simple SNMP configuration tool (version 4.0)
601
------------------------------------------------
602
Note: Non-trivial configurations still has to be
603
done manually. IP addresses may be entered
604
as dront.ericsson.se (UNIX only) or
606
------------------------------------------------
608
Configure an agent (y/n)? [y]
612
1. Agent process priority (low/normal/high) [normal]
613
2. What SNMP version(s) should be used (1,2,3,1&2,1&2&3,2&3)? [3] 1&2&3
614
3. Configuration directory (absolute path)? [/ldisk/snmp] /ldisk/snmp/agent/conf
615
4. Config verbosity (silence/info/log/debug/trace)? [silence]
616
5. Database directory (absolute path)? [/ldisk/snmp] /ldisk/snmp/agent/db
617
6. Mib storage type (ets/dets/mnesia)? [ets]
618
7. Target cache verbosity (silence/info/log/debug/trace)? [silence]
619
8. Symbolic store verbosity (silence/info/log/debug/trace)? [silence]
620
9. Local DB verbosity (silence/info/log/debug/trace)? [silence]
621
10. Local DB repair (true/false/force)? [true]
622
11. Local DB auto save (infinity/milli seconds)? [5000]
623
12. Error report module? [snmpa_error_logger]
624
13. Agent type (master/sub)? [master]
625
14. Master-agent verbosity (silence/info/log/debug/trace)? [silence] log
626
15. Shall the agent re-read the configuration files during startup
627
(and ignore the configuration database) (true/false)? [true]
628
16. Multi threaded agent (true/false)? [false] true
629
17. Check for duplicate mib entries when installing a mib (true/false)? [false]
630
18. Check for duplicate trap names when installing a mib (true/false)? [false]
631
19. Mib server verbosity (silence/info/log/debug/trace)? [silence]
632
20. Mib server cache (true/false)? [true]
633
21. Note store verbosity (silence/info/log/debug/trace)? [silence]
634
22. Note store GC timeout? [30000]
635
23. Shall the agent use an audit trail log (y/n)? [n] y
636
23b. Audit trail log type (write/read_write)? [read_write]
637
23c. Where to store the audit trail log? [/ldisk/snmp] /ldisk/snmp/agent/log
638
23d. Max number of files? [10]
639
23e. Max size (in bytes) of each file? [10240]
640
23f. Audit trail log repair (true/false/truncate)? [true]
641
24. Which network interface module shall be used? [snmpa_net_if]
642
25. Network interface verbosity (silence/info/log/debug/trace)? [silence] log
643
25a. Bind the agent IP address (true/false)? [false]
644
25b. Shall the agents IP address and port be not reusable (true/false)? [false]
645
25c. Agent request limit (used for flow control) (infinity/pos integer)? [infinity] 32
646
25d. Receive buffer size of the agent (in bytes) (default/pos integer)? [default]
647
25e. Send buffer size of the agent (in bytes) (default/pos integer)? [default]
648
25f. Do you wish to specify a network interface filter module (or use default) [default]
652
1. System name (sysName standard variable) [bmk's agent]
653
2. Engine ID (snmpEngineID standard variable) [bmk's engine]
654
3. Max message size? [484]
655
4. The UDP port the agent listens to. (standard 161) [4000]
656
5. IP address for the agent (only used as id
657
when sending traps) [127.0.0.1]
658
6. IP address for the manager (only this manager
659
will have access to the agent, traps are sent
660
to this one) [127.0.0.1]
661
7. To what UDP port at the manager should traps
662
be sent (standard 162)? [5000]
663
8. Do you want a none- minimum- or semi-secure configuration?
664
Note that if you chose v1 or v2, you won't get any security for these
665
requests (none, minimum, semi_des, semi_aes) [minimum]
666
making sure crypto server is started...
667
8b. Give a password of at least length 8. It is used to generate
668
private keys for the configuration: kalle-anka
669
9. Current configuration files will now be overwritten. Ok (y/n)? [y]
671
- - - - - - - - - - - - -
672
Info: 1. SecurityName "initial" has noAuthNoPriv read access
673
and authenticated write access to the "restricted"
675
2. SecurityName "all-rights" has noAuthNoPriv read/write
676
access to the "internet" subtree.
677
3. Standard traps are sent to the manager.
678
4. Community "public" is mapped to security name "initial".
679
5. Community "all-rights" is mapped to security name "all-rights".
680
The following agent files were written: agent.conf, community.conf,
681
standard.conf, target_addr.conf, target_params.conf,
682
notify.conf, vacm.conf and usm.conf
683
- - - - - - - - - - - - -
685
Configure a manager (y/n)? [y]
687
Manager system config:
688
----------------------
689
1. Manager process priority (low/normal/high) [normal]
690
2. What SNMP version(s) should be used (1,2,3,1&2,1&2&3,2&3)? [3] 1&2&3
691
3. Configuration directory (absolute path)? [/ldisk/snmp] /ldisk/snmp/manager/conf
692
4. Config verbosity (silence/info/log/debug/trace)? [silence] log
693
5. Database directory (absolute path)? [/ldisk/snmp] /ldisk/snmp/manager/db
694
6. Database repair (true/false/force)? [true]
695
7. Database auto save (infinity/milli seconds)? [5000]
696
8. Inform request behaviour (auto/user)? [auto]
697
9. Server verbosity (silence/info/log/debug/trace)? [silence] log
698
10. Server GC timeout? [30000]
699
11. Note store verbosity (silence/info/log/debug/trace)? [silence]
700
12. Note store GC timeout? [30000]
701
13. Which network interface module shall be used? [snmpm_net_if]
702
14. Network interface verbosity (silence/info/log/debug/trace)? [silence] log
703
15. Bind the manager IP address (true/false)? [false]
704
16. Shall the manager IP address and port be not reusable (true/false)? [false]
705
17. Receive buffer size of the manager (in bytes) (default/pos integer)? [default]
706
18. Send buffer size of the manager (in bytes) (default/pos integer)? [default]
707
19. Shall the manager use an audit trail log (y/n)? [n] y
708
19b. Where to store the audit trail log? [/ldisk/snmp] /ldisk/snmp/manager/log
709
19c. Max number of files? [10]
710
19d. Max size (in bytes) of each file? [10240]
711
19e. Audit trail log repair (true/false/truncate)? [true]
712
20. Do you wish to assign a default user [yes] or use
713
the default settings [no] (y/n)? [n]
717
1. Engine ID (snmpEngineID standard variable) [bmk's engine]
718
2. Max message size? [484]
719
3. IP address for the manager (only used as id
720
when sending requests) [127.0.0.1]
721
4. Port number (standard 162)? [5000]
722
5. Configure a user of this manager (y/n)? [y]
724
5c. User callback module? snmpm_user_default
725
5d. User (callback) data? [undefined]
726
5. Configure a user of this manager (y/n)? [y] n
727
6. Configure an agent handled by this manager (y/n)? [y]
729
6c. Target name? [bmk's agent]
730
6d. Version (1/2/3)? [1] 3
731
6e. Community string ? [public]
732
6f. Engine ID (snmpEngineID standard variable) [bmk's engine]
733
6g. IP address for the agent [127.0.0.1]
734
6h. The UDP port the agent listens to. (standard 161) [4000]
735
6i. Retransmission timeout (infinity/pos integer)? [infinity]
736
6j. Max message size? [484]
737
6k. Security model (any/v1/v2c/usm)? [any] usm
738
6l. Security name? ["initial"]
739
6m. Security level (noAuthNoPriv/authNoPriv/authPriv)? [noAuthNoPriv] authPriv
740
6. Configure an agent handled by this manager (y/n)? [y] n
741
7. Configure an usm user handled by this manager (y/n)? [y]
742
7a. Engine ID [bmk's engine]
743
7b. User name? hobbes
744
7c. Security name? [hobbes]
745
7d. Authentication protocol (no/sha/md5)? [no] sha
746
7e Authentication [sha] key (length 0 or 20)? [""] [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
747
7d. Priv protocol (no/des/aes)? [no] des
748
7f Priv [des] key (length 0 or 16)? [""] 10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
749
7. Configure an usm user handled by this manager (y/n)? [y] n
750
8. Current configuration files will now be overwritten. Ok (y/n)? [y]
752
- - - - - - - - - - - - -
753
The following manager files were written: manager.conf, agents.conf , users.conf and usm.conf
754
- - - - - - - - - - - - -
757
Configuration directory for system file (absolute path)? [/ldisk/snmp]
763
<title>Starting the application</title>
764
<p>Start Erlang with the command:</p>
766
erl -config /tmp/snmp/sys
768
<p>If authentication or encryption is used (SNMPv3 only), start
769
the <c>crypto</c> application. If this step is forgotten, the
770
agent will not start, but report a
771
<c>{config_error,{unsupported_crypto,_}}</c> error.</p>
773
1> <input>application:start(crypto).</input>
777
2> <input>application:start(snmp).</input>
783
<marker id="verbosity"></marker>
784
<title>Debugging the application</title>
785
<p>It is possible to debug every (non-supervisor) process of the
786
application (both agent and manager), possibly with the exception
787
of the net_if module(s), which could be supplied by a user of the
788
application). This is done by calling the
789
<c>snmpa:verbosity/2</c> and <c>snmpm:verbosity/2</c> function(s)
791
<seealso marker="#configuration_params">configuration parameters</seealso>.
792
The verbosity itself has several <em>levels</em>: <c>silence | info | log | debug | trace</c>. For the lowest verbosity <c>silence</c>,
793
nothing is printed. The higher the verbosity, the more is printed.
794
Default value is always <c>silence</c>.</p>
796
3> <input>snmpa:verbosity(master_agent, log).</input>
798
5> <input>snmpa:verbosity(net_if, log).</input>
801
%% Example of output from the agent when a get-next-request arrives:
803
got paket from {147,12,12,12}:5000
805
** SNMP NET-IF MPD LOG:
806
v1, community: all-rights
809
got pdu from {147,12,12,12}:5000 {pdu, 'get-next-request',
811
[{varbind,[1,1],'NULL','NULL',1}]}
813
** SNMP MASTER-AGENT LOG:
814
apply: snmp_generic,variable_func,[get,{sysDescr,persistent}]
816
** SNMP MASTER-AGENT LOG:
817
returned: {value,"Erlang SNMP agent"}
820
reply pdu: {pdu,'get-response',62612569,noError,0,
821
[{varbind,[1,3,6,1,2,1,1,1,0],
823
"Erlang SNMP agent",1}]}
825
** SNMP NET-IF INFO: time in agent: 19711 mysec
828
<p>Other useful function(s) for debugging the agent are: </p>
830
<tag><c><![CDATA[snmpa:info/0,1]]></c></tag>
832
<p><seealso marker="snmpa#info">info</seealso> is used to retreive a list of miscellaneous agent information.</p>
835
<tag><c><![CDATA[snmpa:which_aliasnames/0]]></c></tag>
837
<p><seealso marker="snmpa#which_aliasnames">which_aliasnames</seealso> is used to retreive a list of all alias-names known to the agent. </p>
840
<tag><c><![CDATA[snmpa:which_tables/0]]></c></tag>
842
<p><seealso marker="snmpa#which_tables">which_tables</seealso> is used to retreive a list of all (MIB) tables known to the agent. </p>
845
<tag><c><![CDATA[snmpa:which_variables/0]]></c></tag>
847
<p><seealso marker="snmpa#which_variables">which_variables</seealso> is used to retreive a list of all (MIB) variables known to the agent. </p>
850
<tag><c><![CDATA[snmpa:which_notifications/0]]></c></tag>
852
<p><seealso marker="snmpa#which_notifications">which_notifications</seealso> is used to retreive a list of all (MIB) notifications/traps known to the agent. </p>
855
<tag><c><![CDATA[snmpa:restart_worker/0,1]]></c></tag>
857
<p><seealso marker="snmpa#restart_worker">restart_worker</seealso> is used to restart the worker process of a multi-threaded agent. </p>
860
<tag><c><![CDATA[snmpa:restart_set_worker/0,1]]></c></tag>
862
<p><seealso marker="snmpa#restart_set_worker">restart_set_worker</seealso> is used to restart the set-worker process of a multi-threaded agent. </p>
865
<tag><c><![CDATA[snmpa_local_db:print/0,1,2]]></c></tag>
867
<p>For example, this function can show the counters
868
<c>snmpInPkts</c> and <c>snmpOutPkts</c>.</p>