File: faqs.html

package info (click to toggle)
snmptt 1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,496 kB
  • sloc: perl: 6,822; sh: 184; python: 31; makefile: 12
file content (602 lines) | stat: -rw-r--r-- 29,606 bytes parent folder | download | duplicates (2)
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
<!DOCTYPE doctype PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.6.0" />
<title>SNMP Trap Translator FAQ</title>
</head>
<body>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.4.0" />
<meta content="text/html; charset=utf-8" http-equiv=
"Content-Type" />
<meta content="Alex Burger" name="Author" />
<meta content="Mozilla/4.78 [en] (Windows NT 5.0; U) [Netscape]"
name="GENERATOR" />
<link rel="StyleSheet" type="text/css" href="layout1.css" />
<h1>SNMPTT FAQ / Troubleshooting</h1>
<p><strong>(<a href=
"http://www.snmptt.org">www.snmptt.org</a>)</strong><br />
This file was last updated on: March 25th, 2021</p>
<h1>Table of Contents</h1>
<h2>Installation</h2>
<ul>
<li><a href="#What_version_of_NET-SNMP_should_I_run">What version
of Net-SNMP should I run?</a></li>
<li><a href="#Do_I_need_the_UCD-SNMP_Net-SNMP_Perl_module">Do I
need the UCD-SNMP / Net-SNMP Perl module?</a></li>
<li><a href="#I_want_to_enable_the_Perl_support_for_UCD-SNMP">I
want to enable the Perl support for UCD-SNMP / Net-SNMP under
Linux, but I installed UCD-SNMP / Net-SNMP using RPMs. What is the
easiest way to install the module without recompiling
everything?</a></li>
<li><a href="#I_want_to_use_Net-SNMP_under_Windows">I want to use
Net-SNMP under Windows. What should I do?</a></li>
<li><a href="#How_to_I_enable_the_Perl_support_for_UCD-SNMP">How to
I enable the Perl support for UCD-SNMP / Net-SNMP under
Windows</a></li>
<li><a href="#Which_trap_handler_should_I_use"><strong>Which trap
handler should I use? snmptthandler or
snmptthandler-embedded?</strong></a></li>
<li><a href="#Are_there_any_sample_files_to_get_me_started">Are
there any sample files to get me started?</a></li>
<li><a href=
"#Why_doesnt_the_snmptt-init.d_script_work_with_Debian">Why doesn't
the snmptt-init.d script work with Debian?</a></li>
</ul>
<h2>General</h2>
<ul>
<li><a href=
"#I_have_enabled_net_snmp_perl_enable_but_the_variable">I have
enabled net_snmp_perl_enable but the variable names are not being
translated into text using $vn, $-n, $+n, $-* or $+*. How do I
troubleshoot it?</a></li>
<li><a href=
"#I_have_enabled_net_snmp_perl_enable_but_the_variable">I have
enabled translate_integers but the integer values are not being
translated into text. How do I troubleshoot it?</a></li>
<li><a href="#SNMPTT_is_not_working">SNMPTT is not working! How do
I troubleshoot it?</a></li>
<li><a href="#I_have_configured_SNMPTT_correctly_with_an_snmptt">I
have configured SNMPTT correctly with an snmptt.ini file,
snmptt.conf file(s) etc and it still does not process traps.
Everything appears in the snmpttunknowntrap.log file. What did I do
wrong?</a></li>
<li><a href="#I_have_disabled_syslog_support_in_SNMPTT">I have
disabled syslog support in SNMPTT, but my syslog (or NT Event Log)
is still filling up with trap messages. How do I disable
them?</a></li>
<li><a href="#I_have_disabled_syslog_support_in_SNMPTT">I am using
syslog (or NT Event Log) to log trap messages, but there are two
log entries for each trap received. How do I prevent it?</a></li>
<li><a href="#I_set_translate_oids_or_translate_trap_oid">I set
translate_oids or translate_trap_oid, but the trap is being logged
in numerical form. Why?</a></li>
<li><a href=
"#I_converted_a_MIB_using_snmpttconvertmib_but_the_OIDs">I
converted a MIB using snmpttconvertmib but the OIDs are appearing
as text instead of being numerical. Why?</a></li>
<li><a href="#Does_SNMPTT_use_DNS">Does SNMPTT use DNS?</a></li>
<li><a href=
"#Is_there_a_front-end_alarm_browser_available_for_SNMPTT">Is there
a front-end alarm browser available for SNMPTT?</a></li>
<li><a href=
"#When_I_convert_a_MIB_file_using_snmpttconvertmib">When I convert
a MIB file using snmpttconvertmib I get 'Bad operator (_)
errors</a></li>
<li><a href="#Double_quotation_marks">Double quotation marks (")
are being logged with a \ in front of them. How can this be
disabled?</a></li>
<li><a href="#Each_trap_received_is_being_logged_multiple">Each
trap received is being logged multiple times. Why?</a></li>
</ul>
<p><strong><a name="What_version_of_NET-SNMP_should_I_run" id=
"What_version_of_NET-SNMP_should_I_run"></a>Q: What version of
Net-SNMP should I run?</strong></p>
<p>A: If you have no plans on using the Net-SNMP Perl module (see
the next question), then any recent version of Net-SNMP should be
sufficient with the exception of Net-SNMP 5.1. Net-SNMP 5.1.1 and
higher can be used. If you plan on using UCD-SNMP 4.2.3 (provided
by Compaq for RedHat 7.2), then you must at least use a newer
version of snmptrapd.</p>
<p>If you plan on enabling the Net-SNMP Perl module,
<strong>Net-SNMP v5.1.1 or higher is recommended.</strong> This
will allow you to use all the features of snmptt. Net-SNMP 5.0.8
and 5.0.9 can also be patched with <a href=
"http://sourceforge.net/tracker/index.php?func=detail&amp;aid=722075&amp;group_id=12694&amp;atid=312694">
patch 722075</a> to provide similar functionality. The patch is
available from the <a href=
"http://sourceforge.net/tracker/index.php?func=detail&amp;aid=722075&amp;group_id=12694&amp;atid=312694">
Net-SNMP patch page</a>.</p>
<p>The standard way to apply the patch is to follow these
steps:</p>
<ol>
<li>Download a fresh copy of Net-SNMP 5.0.9 or 5.0.8</li>
<li>Uncompress the archive (tar xvf net-snmp-5.0.9.tar.gz)</li>
<li>cd net-snmp-5.0.x</li>
<li>patch -p0 &lt; /path/to/patch.net-snmp-722075</li>
<li>Compile Net-SNMP as per Net-SNMP documentation</li>
</ol>
<p>If you run freebsd, you can simply copy the patch file into
/usr/ports/net/net-snmp/files and rename it to patch-snmp-72205.
When you rebuild Net-SNMP, the patch will be included.</p>
<p><strong><a name="Do_I_need_the_UCD-SNMP_Net-SNMP_Perl_module"
id="Do_I_need_the_UCD-SNMP_Net-SNMP_Perl_module"></a>Q: Do I need
the UCD-SNMP / Net-SNMP Perl module?</strong></p>
<p>A: SNMPTT does not REQUIRE the Perl module, but it is
recommended. By enabling the Perl module, you will get the
following benefits:</p>
<ul>
<li>Proper $v, $E, $O, $-n, $+n, $-*, $+* (and others that use
textual names) variable substitution</li>
<li>Conversion of numerical OIDs to text form</li>
<li>Conversion of INTEGER values to enumeration tags (for example:
<strong>Status is now OK</strong> instead of <strong>Status is now
1</strong>)</li>
<li>Conversion of the enterprise into textual form for logging to
SQL databases</li>
<li>Ability for traps passed from <strong>snmptrapd</strong> or
loaded from the <strong>snmptt.conf</strong> files to contain
symbolic OIDs such as <strong>linkDown</strong> and
<strong>IF-MIB::linkUp</strong></li>
<li>Variable syntax, description and enums when converting a MIB
file using snmpttconvertmib</li>
</ul>
<p>Unless Net-SNMP 5.1.1 or higher or 5.0.8 / 5.0.9 with patch
72205 is used, some Perl features may not work correctly. The use
of Net-SNMP 5.1.1 or higher or 5.0.8 / 5.0.9 with patch 72205 is
<strong>highly recommended</strong>.</p>
<p>Note1: In addition to the regular Perl modules, Net-SNMP allows
Perl to be embedded into the SNMP agent (snmpd) and trap receiver
(snmptrapd) by specifying --enable-embedded-perl during
compilation. This is <strong>only</strong> required by SNMPTT if
you plan on using the embedded trap handler
(snmptthandler-embedded).</p>
<p>Note2: Do not confuse the CPAN module Net::SNMP (use Net::SNMP;)
with the Net-SNMP Perl module (use SNMP;). They are two completely
unrelated programs. Net::SNMP is a stand-alone SNMP module for
Perl, while the Net-SNMP Perl module is a Perl extension of the
<a href="http://www.net-snmp.org">Net-SNMP</a> software and is
included with <a href="http://www.net-snmp.org">Net-SNMP</a>.
Distributions such as RedHat provide the Perl modules in a separate
RPM package called 'net-snmp-perl'.</p>
<p><strong><a name="I_want_to_enable_the_Perl_support_for_UCD-SNMP"
id="I_want_to_enable_the_Perl_support_for_UCD-SNMP"></a>Q: I want
to enable the Perl support for under Linux, but I installed
<em>Net-SNMP</em> using RPMs. What is the easiest way to install
the module without recompiling everything?</strong></p>
<p>A: There are two Perl components for Net-SNMP:</p>
<blockquote>
<p>1) The Perl modules which allow you to create stand-alone Perl
programs that use the 'SNMP' module (use SNMP;)</p>
<p>2) Embedded Perl for snmpd and snmptrapd which allow you to
write Perl programs that are loaded and run from inside of snmpd
and snmptrapd.</p>
</blockquote>
<p>The Perl modules (1) are optional but recommended. See <a href=
"Do_I_need_the_UCD-SNMP_Net-SNMP_Perl_module"><strong>Do I need the
UCD-SNMP / Net-SNMP Perl module?</strong></a> for the benefits of
enabling the Perl modules.</p>
<p>Embedded Perl (2) is only needed if you want to use the embedded
trap handler (snmptthandler-embedded).See xxxxx for the benefits of
using the embedded handler.</p>
<p>For the Perl modules (1), most Linux distributions provide RPMs.
For RedHat, install the net-snmp-perl RPM package using yum.</p>
<p>If you compiled Net-SNMP from source, then the Perl module
should be enabled by default. Typing the following is an easy test
to see if the Perl module has been installed:</p>
<pre><code>perl
use SNMP;
</code></pre>
<p>If you get an error message starting with 'Can't locate SNMP.pm
in @INC....' then the Perl module has not been installed. Press
control-C to exit Perl if there was no error.</p>
<p>For embedded Perl support (2), you may have to compile Net-SNMP
yourself using the '--enable-embedded-perl' configuration option.
To test to see if you already have embedded Perl enabled:</p>
<ul>
<li>
<p>Type <strong>snmptrapd -H 2&gt;&amp;1 | grep perl</strong>. It
should give <strong>perl PERLCODE</strong> if embedded Perl is
enabled.</p>
</li>
<li>
<p>If it's not available, you need to compile and install Net-SNMP
using the <strong>--enable-embedded-perl</strong> configure option.
Use the net-snmp-users mail list for assistance.</p>
</li>
</ul>
<p>If you are using UCD-SNMP, you should not have to re-compile the
entire package. Try the following:</p>
<ol>
<li>Download the source RPM that matches the binary RPM you
downloaded. For example: ucd-snmp-4.2.3-1.src.rpm</li>
<li>Install the RPM</li>
<li>Locate the installed source code. For Mandrake, it should be in
/usr/src/RPM/SOURCES</li>
<li>Go into the sub directory perl/SNMP</li>
<li>Follow the instructions in the README file</li>
</ol>
<p>Note: If you have installed Net-SNMP 5.0.9 or 5.0.8 using RPM
packages, and want to apply patch 722075, you will need to
re-compile the entire package and re-install. Patch 722075 makes
modifications to both the Perl source files, and the main snmp
libraries so the above steps will not work.</p>
<p><strong><a name="I_want_to_use_Net-SNMP_under_Windows" id=
"I_want_to_use_Net-SNMP_under_Windows"></a>Q: I want to use
Net-SNMP under Windows. What should I do?</strong></p>
<p>A: You have at least three options:</p>
<ol>
<li>
<p>Download the Net-SNMP 5.1.2+ binary from the Net-SNMP home page
and install.</p>
</li>
<li>
<p>Download the Net-SNMP 5.1.2+ source and compile using MSVC++,
MinGW or Cygwin as described in the Net-SNMP README.WIN32 file.
This should create a working snmptrapd. See the question:
<strong>How to I enable the Perl support for UCD-SNMP / Net-SNMP
under Windows</strong>? Note: Net-SNMP 5.1.2 or higher is
recommended if compiling under Windows as it contains the latest
Windows specific compiling improvements.</p>
</li>
</ol>
<p><strong><a name="How_to_I_enable_the_Perl_support_for_UCD-SNMP"
id="How_to_I_enable_the_Perl_support_for_UCD-SNMP"></a>Q: How to I
enable the Perl support for UCD-SNMP / Net-SNMP under
Windows</strong></p>
<p>A: There are two Perl components for Net-SNMP:</p>
<ol>
<li>The Perl modules which allow you to create stand-alone Perl
programs that use the 'SNMP' module (use SNMP;)</li>
<li>Embedded Perl for snmpd and snmptrapd which allow you to write
Perl programs that are loaded and run from inside of snmpd and
snmptrapd.</li>
</ol>
<p>The Perl modules (1) are optional but recommended. See <a href=
"Do_I_need_the_UCD-SNMP_Net-SNMP_Perl_module"><strong>Do I need the
UCD-SNMP / Net-SNMP Perl module?</strong></a> for the benefits of
enabling the Perl modules.</p>
<p>As of July 2009, embedded Perl (2) is not currently supported
under Windows.</p>
<p><strong><em>Native Windows:</em></strong></p>
<blockquote>
<p>Install ActiveState ActivePerl and then the ActivePerl
<strong>.ppm</strong> module included in the Net-SNMP binary
available from the <a href="http://www.net-snmp.org">Net-SNMP web
site</a>.</p>
<p>If you compiled your own version of Net-SNMP, see the
perl/README document for instructions on compiling the Perl
modules.</p>
</blockquote>
<p><strong><em>Cygwin:</em></strong></p>
<blockquote>
<p>Download the Net-SNMP 5.1.2+ source and compile using Cygwin as
described in the Net-SNMP README.WIN32 file.</p>
<p>Compile the Perl modules as described in the perl\SNMP\README
file.</p>
<p>The program <strong>snmptt-net-snmp-test</strong> can be used to
perform various translations to test the functionality of the
installed UCD-SNMP / Net-SNMP Perl module. The value of
<strong>best_guess</strong> can be specified on the command line to
determine how translations should occur. If you are using 5.0.8+
with patch 722075 or 5.1.1+, use: <strong>snmptt-net-snmp-test
--best_guess=2</strong>.</p>
</blockquote>
<p><strong><a name="Which_trap_handler_should_I_use" id=
"Which_trap_handler_should_I_use"></a>Q: Which trap handler should
I use? snmptthandler or snmptthandler-embedded?</strong></p>
<p>A: The standard handler is fine for most installations. The
embedded handler was introduced in snmptt 1.3 and is recommended if
there is a high volume of traps being received.</p>
<p><em>Standard Handler:</em></p>
<p>The standard handler is a small Perl program that is called each
time a trap is received by snmptrapd when using daemon mode. The
limitations of this handler are:</p>
<ul>
<li>Each time a trap is received, a process must be created to run
the snmptthandler program and snmptt.ini is read each time.</li>
<li>SNMPv3 EngineID and names are not passed by snmptrapd to
snmptthandler</li>
</ul>
<p>The benefits of using this handler are:</p>
<ul>
<li>Does not require embedded Perl for snmptrapd</li>
<li>Has been around since v0.1 if snmptt.</li>
<li>Sufficient for most installations</li>
</ul>
<p><em>Embedded Handler:</em></p>
<p>The embedded handler is a small Perl program that is loaded
directly into snmptrapd when snmptrapd is started. The limitations
of this handler are:</p>
<ul>
<li>Requires embedded Perl for snmptrapd</li>
<li>Only works with daemon mode</li>
</ul>
<p>The benefits of using this handler are:</p>
<ul>
<li>The handler is loaded and initialized when snmptrapd is
started, so there is less overhead as a new process does not need
to be created and initialization is done only once (loading of
snmptt.ini).</li>
<li>SNMPv3 EngineID and names variables are available in snmptt (B*
variables)</li>
</ul>
<p><strong><a name="Are_there_any_sample_files_to_get_me_started"
id="Are_there_any_sample_files_to_get_me_started"></a>Q: Are there
any sample files to get me started?</strong></p>
<p>A: Yes, the examples folder contains a sample snmptt.conf file,
and a sample trap file for testing.</p>
<ol>
<li>Install SNMPTT as described in this document</li>
<li>Copy the <strong>snmptt.conf.generic</strong> file to the
location specified in the snmptt.ini file (probably
<strong>/etc/snmp/</strong> or <strong>c:\snmp</strong>)</li>
<li>Add <strong>snmptt.conf.generic</strong> to the
<strong>snmptt_conf_files</strong> section of
<strong>snmptt.ini</strong>.</li>
<li>For standalong mode, test SNMPTT by typing: <strong>snmptt &lt;
sample-trap.generic</strong><br />
For daemon mode, test SNMPTT by copying sample-trap.generic.daemon
to the spool folder</li>
<li>Check the logs files etc for a sample linkDown trap</li>
</ol>
<p><strong><a name=
"Why_doesnt_the_snmptt-init.d_script_work_with_Debian" id=
"Why_doesnt_the_snmptt-init.d_script_work_with_Debian"></a>Q: Why
doesn't the snmptt-init.d script work with Debian?</strong></p>
<p>The snmptt-init.d script provided with SNMPTT was written for
Mandrake and RedHat. To make the script work with Debian without
requiring any re-writing of the script, copy
<strong>/etc/init.d/skeleton</strong> to
<strong>/etc/init.d/functions</strong>.</p>
<p><strong><a name=
"I_have_enabled_net_snmp_perl_enable_but_the_variable" id=
"I_have_enabled_net_snmp_perl_enable_but_the_variable"></a>Q: I
have enabled net_snmp_perl_enable but the variable names are not
being translated into text using $v_n, $-n, $+n, $-* or $+*_. How
do I troubleshoot it?</strong></p>
<p><strong><a name=
"I_have_enabled_net_snmp_perl_enable_but_the_variable" id=
"I_have_enabled_net_snmp_perl_enable_but_the_variable"></a>Q: I
have enabled translate_integers but the integer values are not
being translated into text. How do I troubleshoot it?</strong></p>
<p>A: You must have the UCD-SNMP / Net-SNMP Perl module installed
and working, and must ensure UCD-SNMP / Net-SNMP is configured
correctly with all the required MIBS.</p>
<p>For starters, make sure the SNMP module is working. Type:</p>
<pre><code>perl
use SNMP;
</code></pre>
<p>If you get an error after typing 'use SNMP', then the module is
not installed correctly. Re-install the module and make sure you
execute the tests while building.</p>
<p>If the MIB files are present, but translations do not occur,
ensure UCD-SNMP / Net-SNMP is correctly configured to process all
the required mibs. This is configured in the snmp.conf file.
Alternatively, you can try setting the
<strong>mibs_enviroment</strong> variable in snmptt.ini to
<strong>ALL</strong> (no quotes) to force all MIBS to be
initialized at SNMPTT startup.</p>
<p>If everything appears to be fine, try translating the variable
name by hand by using snmptranslate. Get the variable name OID from
the snmptt.debug file from the second Value 0+ section, and
type:</p>
<pre><code>snmptranslate -Td _oid_
</code></pre>
<p>This should return the OBJECT-TYPE for the variable if it exists
in a MIB file</p>
<p>If you are using UCD-SNMP v4.2.3, then the variables will not
translate properly because SNMPTRAPD does not pass them correctly
to SNMPTT. Upgrade to a newer version of snmptrapd.</p>
<p><strong><a name="SNMPTT_is_not_working" id=
"SNMPTT_is_not_working"></a>Q: SNMPTT is not working! How do I
troubleshoot it?</strong></p>
<p>A: Start by enabling <strong>enable_unknown_trap_log</strong> in
the <strong>snmptt.ini</strong> file. Look inside this file to see
if the traps are being passed correctly to SNMPTT but not being
handled correctly. Next, enable debug mode of 2 and specify a debug
text file to log to in the snmptt.ini file. After a trap is
received, take a look at the file to try to determine what is going
wrong. Disable both logs when you are finished.</p>
<p>To make troubleshooting a particular trap easier when working in
daemon mode, try the following. This will prevent you have having
to continuously generate the trap on the host.</p>
<ol>
<li>Shut down SNMPTT</li>
<li>Generate the trap</li>
<li>Copy the resulting # file from the spool directory
(/var/spool/snmptt) to the /tmp directory as /tmp/test-trap</li>
<li>Edit the file, removing the first line (which is a large number
that contains the date / time)</li>
<li>Run SNMPTT in standalone method using: <strong>snmptt &lt;
test-trap</strong></li>
<li>Troubleshoot by using the log files etc</li>
</ol>
<p><strong><a name=
"I_have_configured_SNMPTT_correctly_with_an_snmptt" id=
"I_have_configured_SNMPTT_correctly_with_an_snmptt"></a>Q: I have
configured SNMPTT correctly with an snmptt.ini file, snmptt.conf
file(s) etc and it still does not process traps. Everything appears
in the snmpttunknowntrap.log file. What did I do
wrong?</strong></p>
<p>A: You probably didn't start snmptrapd correctly. Make sure it
is started using:</p>
<pre><code>snmptrapd -On
</code></pre>
<p>If it is not started with <strong>-On</strong>, then it will not
pass traps using numeric OIDs and SNMPTT will not process them.</p>
<p>As an alternative, you can edit your <strong>snmp.conf</strong>
file to include the line: <strong>printNumericOids 1</strong>. This
setting will take effect no matter what is used on the command
line.</p>
<p>Note: If the UCD-SNMP / Net-SNMP Perl module is installed and
enabled, then SNMPTT should be able to handle traps passed using
symbolic form. The Perl module (used by SNMPTT) in Net-SNMP 5.0.8
and previous versions should be able to handle single symbolic
names (eg: coldTrap). UCD-SNMP may not properly convert symbolic
names to numeric OIDs which could result in traps not being
matched. A patch is available from the Net-SNMP web site for 5.0.8+
to allow it to handle other symbolic names such as module::symbolic
name (eg: SNMPv2-MIB::coldTrap) etc. The patch is available from
the contrib folder, or it can be downloaded from the <a href=
"http://sourceforge.net/tracker/index.php?func=detail&amp;aid=722075&amp;group_id=12694&amp;atid=312694">
Net-SNMP patch page</a>. Net-SNMP 5.1.1 and higher contain this
patch.</p>
<p><strong><a name="I_have_disabled_syslog_support_in_SNMPTT" id=
"I_have_disabled_syslog_support_in_SNMPTT"></a>Q: I have disabled
syslog support in SNMPTT, but my syslog (or NT Event Log) is still
filling up with trap messages. How do I disable them?</strong></p>
<p><strong>Q: I am using syslog (or NT Event Log) to log trap
messages, but there are two log entries for each trap received. How
do I prevent it?</strong></p>
<p>A: What you are seeing are <strong>snmptrapd</strong> trap
messages, not SNMPTT messages. SNMPTT trap messages start with
'<strong>snmptt[pid]:</strong>' while snmptrapd messages start with
'<strong>snmptrapd[pid]:</strong>'. If you do not start snmptrapd
with either the <strong>-P</strong> or <strong>-o</strong>
(lowercase o) switches, syslog support will be forced on. Snmptrapd
should be started using '<strong>snmptrapd -On</strong>' and this
results in syslog being forced on. The reason for this is the
original design of snmptrapd assumed that if you are not going to
display messages on the screen or log to a file, then you must want
syslog output.</p>
<p>A workaround is to have snmptrapd log all messages to /dev/null,
or to a text file that can be regularily purged if needed. To log
to a text file, start snmptrapd using:</p>
<pre><code>snmptrapd -On -o /var/log/snmptrapd.log
</code></pre>
<p>This will cause <strong>ALL</strong> snmptrapd messages to be
logged to the file which means all snmptrapd 'system' messages such
as startup and shutdown will not be logged to syslog.</p>
<p>A patch for Net-SNMP 5.0.7 is available that adds a new switch
(-t) to prevent TRAP messages from being logged to syslog, but
allowing system messages to continue to be logged. The patch is
available from the <a href=
"http://sourceforge.net/tracker/?func=detail&amp;atid=312694&amp;aid=695312&amp;group_id=12694">
Net-SNMP patch section</a>. This patch is available in Net-SNMP
5.1.1 and higher. With this patch, snmptrapd should be started
using:</p>
<pre><code>snmptrapd -On -t
</code></pre>
<p><strong><a name="I_set_translate_oids_or_translate_trap_oid" id=
"I_set_translate_oids_or_translate_trap_oid"></a>Q: I set
translate_oids or translate_trap_oid, but the trap is being logged
in numerical form. Why?</strong> <strong>**Q: I set translate_oids
or translate_trap_oid to 1 or 3 in snmptt.ini, but the trap is not
being logged with a long symbolic name. Why?</strong></p>
<p>A: The current version of Net-SNMP (5.0.9 at the time of this
writing) and everything before it does not support including the
module name (eg: IF-MIB::) when translating an OID and most of the
5.0.x versions do not properly tranlsate numeric OIDs to long
symbolic names. A patch is available for 5.0.8+ that will appear in
later releases of Net-SNMP (5.1.1+). The patch is available from
the contrib folder, or it can be downloaded from the <a href=
"http://sourceforge.net/tracker/index.php?func=detail&amp;aid=722075&amp;group_id=12694&amp;atid=312694">
Net-SNMP patch page</a>.</p>
<p>The program <strong>snmptt-net-snmp-test</strong> can be used to
perform various translations to test the functionality of the
installed UCD-SNMP / NE-SNMP Perl module. The value of
<strong>best_guess</strong> can be specified on the command line to
determine how translations should occur.</p>
<p><strong><a name=
"I_converted_a_MIB_using_snmpttconvertmib_but_the_OIDs" id=
"I_converted_a_MIB_using_snmpttconvertmib_but_the_OIDs"></a>Q: I
converted a MIB using snmpttconvertmib but the OIDs are appearing
as text instead of being numerical. Why?</strong></p>
<p><strong>For example:</strong></p>
<pre><code>EVENT linkUp .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB.snmpMIBObjects.snmpTraps.linkUp "Status Events" Normal
</code></pre>
<p>instead of</p>
<pre><code>EVENT linkUp .1.3.6.1.6.3.1.1.5.4 "Status Events" Normal
</code></pre>
<p>A: <strong>Snmpttconvertmib</strong> uses the
<strong>snmptranslate</strong> command to convert MIB files. With
Net-SNMP v5.0.2 and newer, setting the <strong>-On</strong> switch
on the <strong>snmptranslate</strong> command causes the output to
be in numerical format, which is what is needed for
<strong>snmpttconvertmib</strong>.</p>
<p>With Net-SNMP v5.0.1 and all versions of UCD-SNMP, setting the
-On switch will TOGGLE the setting of using numerical output. With
Net-SNMP v5.0.2 and newer, setting the -On switch will FORCE the
output to be numerical.</p>
<p><strong>Snmpttconvermib</strong> will use the
<strong>-On</strong> switch for snmptranslate <strong>only</strong>
if it detects anything but UCD-SNMP or Net-SNMP v5.0.1.</p>
<p>If you are using UCD-SNMP, or Net-SNMP v5.0.1, the best option
is to modify your <strong>snmp.conf</strong> file (for UCD-SNMP /
Net-SNMP), and add or modify the line:</p>
<pre><code>printNumericOids 1
</code></pre>
<p>This will cause all applications to output in numerical format
including <strong>snmptranslate</strong>. Note: This will affect
other UCD-SNMP / Net-SNMP programs you are using, if any.</p>
<p><strong><a name="Does_SNMPTT_use_DNS" id=
"Does_SNMPTT_use_DNS"></a>Q: Does SNMPTT use DNS?</strong></p>
<p>Only if it is enabled. See the <a href="#DNS">Name Resolution /
DNS</a> section.</p>
<p><strong><a name=
"Is_there_a_front-end_alarm_browser_available_for_SNMPTT" id=
"Is_there_a_front-end_alarm_browser_available_for_SNMPTT"></a>Q: Is
there a front-end alarm browser available for SNMPTT?</strong></p>
<p>A: Take a look at <a href=
"http://sourceforge.net/projects/snmptt-gui">SNMPTT-GUI</a>.
SNMPTT-GUI aims to provide a web based frontend for SNMPTT. The GUI
is made up of server side perl cgi scripts with client side
javascripts which interfaces to a SQL database using DBI::ODBC.</p>
<p>SNMPTT-GUI questions should be directed to the project admins on
the <a href=
"http://sourceforge.net/projects/snmptt-gui/">SNMPTT-GUI
Sourceforge page</a>.</p>
<p><strong><a name=
"When_I_convert_a_MIB_file_using_snmpttconvertmib" id=
"When_I_convert_a_MIB_file_using_snmpttconvertmib"></a>Q: When I
convert a MIB file using snmpttconvertmib I get 'Bad operator (_)
errors.</strong></p>
<p>A: You need to enable support for underlines / underscores in
MIB files. See the snmp.conf man page. Support can be enabled by
adding this line to your main snmp.conf file:</p>
<pre><code>mibAllowUnderline 1
</code></pre>
<p><strong><a name="Double_quotation_marks" id=
"Double_quotation_marks"></a>Q: Double quotation marks (") are
being logged with a \ in front of them. How can this be
disabled?</strong></p>
<p>A: Set <strong>remove_backslash_from_quotes = 1</strong> in the
<strong>snmptt.ini</strong> to have the \ removed from double
quotes (").</p>
<p><strong><a name="Each_trap_received_is_being_logged_multiple"
id="Each_trap_received_is_being_logged_multiple"></a>Q: Each trap
received is being logged multiple times. Why?</strong></p>
<p>A: There are a few possible reasons for this.</p>
<ul>
<li>The device is sending the trap multiple times. If the device is
running Net-SNMP's agent (snmpd), make sure there is only ONE
trapsink, trap2sink or informsink line in
<strong>snmpd.conf</strong>. If you are sending the trap using SNMP
V1, use <strong>trapsink</strong>. For SNMP V2, use
<strong>trap2sink</strong>. For SNMP V3, use
<strong>informsink</strong>. Having both a trapsink and a trap2sink
for example will cause snmpd to send the trap
<strong>twice</strong>. Once using SNMP V1 and once using SNMP V2.
It is possible that snmpd is loading multiple
<strong>snmp.conf</strong> files. Start <strong>snmpd</strong>
using <strong>snmpd -f -Dread_config</strong> to see what
configuration files are being loaded.</li>
<li>Snmptrapd is passing the trap to SNMPTT multiple times. Ensure
there is only one <strong>traphandle</strong> statement in
<strong>snmptrapd.conf</strong>. It is possible that snmpdtrapd is
loading multiple <strong>snmptrapd.conf</strong> files. Start
<strong>snmpdtrapd</strong> using <strong>snmpd -f
-Dread_config</strong> to see what configuration files are being
loaded.</li>
<li>There is more than one <strong>EVENT</strong> line defined in
one or more <strong>snmptt.conf</strong> files for the trap and
<strong>multiple_event</strong> is enabled in
<strong>snmptt.ini</strong>. To find all duplicate
<strong>EVENT</strong> entries, run <strong>snmptt
--dump</strong></li>
</ul>
</body>
</html>