Browse code

- README file generated from SGML

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1427 689a6050-402a-0410-94f2-e92a70836424

Bogdan-Andrei Iancu authored on 19/12/2006 09:01:52
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,725 @@
1
+
2
+SNMPStats Module (Simple Network Management Protocal Statistic
3
+Module)
4
+
5
+Jeffrey Magder
6
+
7
+   SOMA Networks, Inc.
8
+
9
+Edited by
10
+
11
+Jeffrey Magder
12
+
13
+   Copyright � 2006 SOMA Networks, Inc.
14
+     _________________________________________________________
15
+
16
+   Table of Contents
17
+   1. User's Guide
18
+
19
+        1.1. Overview
20
+
21
+              1.1.1. General Scalar Statistics
22
+              1.1.2. SNMP Tables
23
+              1.1.3. Alarm Monitoring
24
+
25
+        1.2. How it works
26
+
27
+              1.2.1. How the SNMPStats module gets its data
28
+              1.2.2. How data is moved from the SNMPStats module
29
+                      to a NOC
30
+
31
+        1.3. Dependencies
32
+
33
+              1.3.1. OpenSER Modules
34
+              1.3.2. External Libraries or Applications
35
+
36
+        1.4. Exported Parameters
37
+
38
+              1.4.1. sipEntityType (String)
39
+              1.4.2. MsgQueueMinorThreshold (Integer)
40
+              1.4.3. MsgQueueMajorThreshold (Integer)
41
+              1.4.4. dlg_minor_threshold (Integer)
42
+              1.4.5. dlg_major_threshold (Integer)
43
+              1.4.6. snmpgetPath (String)
44
+              1.4.7. snmpCommunity (String)
45
+
46
+        1.5. Exported Functions
47
+        1.6. Installation & Running
48
+
49
+              1.6.1. Compiling the SNMPStats Module
50
+              1.6.2. Configuring NetSNMP to allow connections
51
+                      from the SNMPStats module.
52
+
53
+              1.6.3. Configuring the SNMPStats module for
54
+                      communication with a Master Agent
55
+
56
+              1.6.4. Testing for a proper Configuration
57
+
58
+   2. Developer's Guide
59
+   3. Frequently Asked Questions
60
+
61
+   List of Examples
62
+   1-1. Setting the sipEntityType parameter
63
+   1-2. Setting the MsgQueueMinorThreshold parameter
64
+   1-3. Setting the MsgQueueMajorThreshold parameter
65
+   1-4. Setting the dlg_minor_threshold parameter
66
+   1-5. Setting the dlg_major_threshold parameter
67
+   1-6. Setting the snmpgetPath parameter
68
+   1-7. Setting the snmpCommunity parameter
69
+     _________________________________________________________
70
+
71
+Chapter 1. User's Guide
72
+
73
+1.1. Overview
74
+
75
+   The SNMPStats module provides an SNMP management interface to
76
+   OpenSER. Specifically, it provides general SNMP queryable
77
+   scalar statistics, table representations of more complicated
78
+   data such as user and contact information, and alarm
79
+   monitoring capabilities.
80
+     _________________________________________________________
81
+
82
+1.1.1. General Scalar Statistics
83
+
84
+   The SNMPStats module provides a number of general scalar
85
+   statistics. Details are available in OPENSER-MIB,
86
+   OPENSER-REG-MIB, OPENSER-SIP-COMMON-MIB, and
87
+   OPENSER-SIP-SERVER-MIB. But briefly, these scalars are:
88
+
89
+   openserSIPProtocolVersion, openserSIPServiceStartTime,
90
+   openserSIPEntityType, openserSIPSummaryInRequests,
91
+   openserSIPSummaryOutRequest, openserSIPSummaryInResponses,
92
+   openserSIPSummaryOutResponses,
93
+   openserSIPSummaryTotalTransactions,
94
+   openserSIPCurrentTransactions, openserSIPNumUnsupportedUris,
95
+   openserSIPNumUnsupportedMethods,
96
+   openserSIPOtherwiseDiscardedMsgs, openserSIPProxyStatefulness
97
+   openserSIPProxyRecordRoute, openserSIPProxyAuthMethod,
98
+   openserSIPNumProxyRequireFailures,
99
+   openserSIPRegMaxContactExpiryDuration, openserSIPRegMaxUsers,
100
+   openserSIPRegCurrentUsers, openserSIPRegDfltRegActiveInterval,
101
+   openserSIPRegAcceptedRegistrations,
102
+   openserSIPRegRejectedRegistrations, openserMsgQueueDepth.
103
+   openserCurNumDialogs, openserCurNumDialogsInProgress,
104
+   openserCurNumDialogsInSetup, openserTotalNumFailedDialogSetups
105
+
106
+   There are also scalars associated with alarms. They are as
107
+   follows:
108
+
109
+   openserMsgQueueMinorThreshold, openserMsgQueueMajorThreshold,
110
+   openserMsgQueueDepthAlarmStatus,
111
+   openserMsgQueueDepthMinorAlarm,
112
+   openserMsgQueueDepthMajorAlarm,
113
+   openserDialogLimitMinorThreshold,
114
+   openserDialogLimitMajorThreshold, openserDialogUsageState,
115
+   openserDialogLimitAlarmStatus, openserDialogLimitMinorAlarm,
116
+   openserDialogLimitMajorAlarm
117
+     _________________________________________________________
118
+
119
+1.1.2. SNMP Tables
120
+
121
+   The SNMPStats module provides several tables, containing more
122
+   complicated data. The current available tables are:
123
+
124
+   openserSIPPortTable, openserSIPMethodSupportedTable,
125
+   openserSIPStatusCodesTable, openserSIPRegUserTable,
126
+   openserSIPContactTable, openserSIPRegUserLookupTable
127
+     _________________________________________________________
128
+
129
+1.1.3. Alarm Monitoring
130
+
131
+   If enabled, the SNMPStats module will monitor for alarm
132
+   conditions. Currently, there are two alarm types defined.
133
+
134
+    1. The number of active dialogs has passed a minor or major
135
+       threshold. The idea is that a network operation centre can
136
+       be made aware that their SIP servers may be overloaded,
137
+       without having to explicitly check for this condition.
138
+       If a minor or major condition has occured, then a
139
+       openserDialogLimitMinorEvent trap or a
140
+       openserDialogLimitMajorEvent trap will be generated,
141
+       respectively. The minor and major thresholds are described
142
+       in the parameters section below.
143
+    2. The number of bytes waiting to be consumed across all of
144
+       OpenSERs listening ports has passed a minor or major
145
+       threshold. The idea is that a network operation centre can
146
+       be made aware that a machine hosting a SIP server may be
147
+       entering a degraded state, and to investigate why this is
148
+       so.
149
+       If the number of bytes to be consumed passes a minor or
150
+       major threshold, then a openserMsgQueueDepthMinorEvent or
151
+       openserMsgQueueDepthMajorEvent trap will be sent out,
152
+       respectively.
153
+
154
+   Full details of these traps can be found in the distributions
155
+   OPENSER-MIB file.
156
+     _________________________________________________________
157
+
158
+1.2. How it works
159
+
160
+1.2.1. How the SNMPStats module gets its data
161
+
162
+   The SNMPStats module uses OpenSERs internal statistic
163
+   framework to collect most of its data. However, there are two
164
+   exceptions.
165
+
166
+    1. The openserSIPRegUserTable and openserSIPContactTable rely
167
+       on the usrloc modules callback system. Specifically, the
168
+       SNMPStats module will receive callbacks whenever a
169
+       user/contact is added to the system.
170
+    2. The SNMPStats modules openserSIPMsgQueueDepthMinorEvent
171
+       and openserSIPMsgQueueDepthMajorEvent alarms rely on the
172
+       OpenSER core to find out what interfaces, ports, and
173
+       transports OpenSER is listening on. However, the module
174
+       will actually query the proc file system to find out the
175
+       number of bytes waiting to be consumed. (Currently, this
176
+       will only work on systems providing the proc file system).
177
+     _________________________________________________________
178
+
179
+1.2.2. How data is moved from the SNMPStats module to a NOC
180
+
181
+   We have now explained how the SNMPStats module gathers its
182
+   data. We still have not explained how it exports this data to
183
+   a NOC (Network Operations Centre), or administrator.
184
+
185
+   The SNMPStats module expects to connect to a Master Agent.
186
+   This would be a NetSNMP daemon running either on the same
187
+   system as the OpenSER instance, or on another system.
188
+   (Communication can take place over TCP, so there is no
189
+   restriction that this daemon need be on the same system as
190
+   OpenSER).
191
+
192
+   If the master agent is unavailable when OpenSER first starts
193
+   up, the SNMPStats module will continue to run. However, you
194
+   will not be able to query it. Thankfully, the SNMPStats module
195
+   continually looks for its master agent. So even if the master
196
+   agent is started late, or if the link to the SNMPStats module
197
+   is severed due to a temporary hardware failure or crashed and
198
+   restarted master agent, the link will eventually be
199
+   re-established. No data should be lost, and querying can begin
200
+   again.
201
+
202
+   To request for this data, you will need to query the master
203
+   agent. The master agent will then redirect the request to the
204
+   SNMPStats module, which will respond to the master agent,
205
+   which will in turn respond to your request.
206
+     _________________________________________________________
207
+
208
+1.3. Dependencies
209
+
210
+1.3.1. OpenSER Modules
211
+
212
+   The SNMPStats module provides a plethora of statistics, some
213
+   of which are collected by other modules. If the dependent
214
+   modules are not loaded then those specific statistics will
215
+   still be returned, but with zeroed values. All other
216
+   statistics will continue to function normally. This means that
217
+   the SNMPStats module has no hard/mandatory dependencies on
218
+   other modules. There are however, soft dependencies, as
219
+   follows:
220
+
221
+     * usrloc - all scalars and tables relating to users and
222
+       contacts are dependent on the usrloc module. If the module
223
+       is not loaded, the respective tables will be empty.
224
+     * dialog - all scalars relating to the number of dialogs are
225
+       dependent on the presence of the dialog module.
226
+       Furthermore, if the module is not loaded, then the
227
+       openserDialogLimitMinorEvent, and
228
+       openserDialogLimitMajorEvent alarm will be disabled.
229
+
230
+   The contents of the openserSIPMethodSupportedTable change
231
+   depending on which modules are loaded.
232
+     _________________________________________________________
233
+
234
+1.3.2. External Libraries or Applications
235
+
236
+   The following libraries or applications must be installed
237
+   before running OpenSER with this module loaded:
238
+
239
+     * NetSNMP v5.3 or greater - NetSNMP must be around at the
240
+       time of compilation. Furthermore, there are several shared
241
+       objects that must be loadable at the time SNMPStats is
242
+       loaded. This means that NetSNMP must be installed (but not
243
+       necessarily running) on the system that has loaded the
244
+       SNMPStats module. (Details can be found in the compilation
245
+       section below).
246
+     _________________________________________________________
247
+
248
+1.4. Exported Parameters
249
+
250
+1.4.1. sipEntityType (String)
251
+
252
+   This parameter describes the entity type for this OpenSER
253
+   instance, and will be used in determining what is returned for
254
+   the openserSIPEntityType scalar. Valid parameters are:
255
+
256
+   registrarServer, redirectServer, proxyServer, userAgent, other
257
+   
258
+   Example 1-1. Setting the sipEntityType parameter
259
+...
260
+modparam("snmpstats", "sipEntityType", "registrarServer")
261
+modparam("snmpstats", "sipEntityType", "proxyServer")
262
+...
263
+
264
+   Note that as the above example shows, you can define this
265
+   parameter more than once. This is of course because a given
266
+   OpenSER instance can take on more than one role.
267
+     _________________________________________________________
268
+
269
+1.4.2. MsgQueueMinorThreshold (Integer)
270
+
271
+   The SNMPStats module monitors the number of bytes waiting to
272
+   be consumed by OpenSER. If the number of bytes waiting to be
273
+   consumed exceeds a minor threshold, the SNMPStats module will
274
+   send out an openserMsgQueueDepthMinorEvent trap to signal that
275
+   an alarm condition has occured. The minor threshold is set
276
+   with the MsgQueueMinorThreshold parameter.
277
+
278
+   Example 1-2. Setting the MsgQueueMinorThreshold parameter
279
+...
280
+modparam("snmpstats", "MsgQueueMinorThreshold", 2000)
281
+...
282
+
283
+   If this parameter is not set, then there will be no minor
284
+   alarm monitoring.
285
+     _________________________________________________________
286
+
287
+1.4.3. MsgQueueMajorThreshold (Integer)
288
+
289
+   The SNMPStats module monitors the number of bytes waiting to
290
+   be consumed by OpenSER. If the number of bytes waiting to be
291
+   consumed exceeds a major threshold, the SNMPStats module will
292
+   send out an openserMsgQueueDepthMajorEvent trap to signal that
293
+   an alarm condition has occured. The major threshold is set
294
+   with the MsgQueueMajorThreshold parameter.
295
+
296
+   Example 1-3. Setting the MsgQueueMajorThreshold parameter
297
+...
298
+modparam("snmpstats", "MsgQueueMajorThreshold", 5000)
299
+...
300
+
301
+   If this parameter is not set, then there will be no major
302
+   alarm monitoring.
303
+     _________________________________________________________
304
+
305
+1.4.4. dlg_minor_threshold (Integer)
306
+
307
+   The SNMPStats module monitors the number of active dialogs. If
308
+   the number of active dialogs exceeds a minor threshold, the
309
+   SNMPStats module will send out an openserDialogLimitMinorEvent
310
+   trap to signal that an alarm condition has occured. The minor
311
+   threshold is set with the dlg_minor_threshold parameter.
312
+
313
+   Example 1-4. Setting the dlg_minor_threshold parameter
314
+...
315
+  modparam("snmpstats", "dlg_minor_threshold", 500)
316
+...
317
+
318
+   If this parameter is not set, then there will be no minor
319
+   alarm monitoring.
320
+     _________________________________________________________
321
+
322
+1.4.5. dlg_major_threshold (Integer)
323
+
324
+   The SNMPStats module monitors the number of active dialogs. If
325
+   the number of active dialogs exceeds a major threshold, the
326
+   SNMPStats module will send out an openserDialogLimitMajorEvent
327
+   trap to signal that an alarm condition has occured. The major
328
+   threshold is set with the dlg_major_threshold parameter.
329
+
330
+   Example 1-5. Setting the dlg_major_threshold parameter
331
+...
332
+  modparam("snmpstats", "dlg_major_threshold", 750)
333
+...
334
+
335
+   If this parameter is not set, then there will be no major
336
+   alarm monitoring.
337
+     _________________________________________________________
338
+
339
+1.4.6. snmpgetPath (String)
340
+
341
+   The SNMPStats module provides the openserSIPServiceStartTime
342
+   scalar. This scalar requires the SNMPStats module to perform a
343
+   snmpget query to the master agent. You can use this parameter
344
+   to set the path to your instance of NetSNMP's snmpget program.
345
+
346
+   Default value is "/usr/local/bin/". 
347
+
348
+   Example 1-6. Setting the snmpgetPath parameter
349
+...
350
+modparam("snmpstats", "snmpgetPath",     "/my/custom/path/")
351
+...
352
+     _________________________________________________________
353
+
354
+1.4.7. snmpCommunity (String)
355
+
356
+   The SNMPStats module provides the openserSIPServiceStartTime
357
+   scalar. This scalar requires the SNMPStats module to perform a
358
+   snmpget query to the master agent. If you have defined a
359
+   custom community string for the snmp daemon, you need to
360
+   specify it with this parameter.
361
+
362
+   Default value is "public". 
363
+
364
+   Example 1-7. Setting the snmpCommunity parameter
365
+...
366
+modparam("snmpstats", "snmpCommunity", "customCommunityString")
367
+...
368
+     _________________________________________________________
369
+
370
+1.5. Exported Functions
371
+
372
+   Currently, there are no exported functions.
373
+     _________________________________________________________
374
+
375
+1.6. Installation & Running
376
+
377
+   There are several things that need to be done to get the
378
+   SNMPStats module compiled and up and running.
379
+     _________________________________________________________
380
+
381
+1.6.1. Compiling the SNMPStats Module
382
+
383
+   In order for the SNMPStats module to compile, you will need at
384
+   least version 5.3 of the NetSNMP source code. The source can
385
+   be found at:
386
+    http://net-snmp.sourceforge.net/
387
+
388
+   For the specifics of installing NetSNMP, please see the
389
+   INSTALL document in the root of the NetSNMP source package.
390
+
391
+   The SNMPStats modules makefile requires that the NetSNMP
392
+   script "net-snmp-config" can run. At a minimum, running
393
+   "net-snmp-config --agent-libs" from the OpenSER source
394
+   directory should return something similar to:
395
+    -L/usr/local/lib -lnetsnmpmibs -lnetsnmpagent -lnetsnmphelpers -lne
396
+tsnmp
397
+
398
+   The specifics of what is returned depends on how the system
399
+   was configured. If your NetSNMP installation was installed
400
+   from an RPM (or another packaged version), then there is a
401
+   good chance that net-snmp-config will return something
402
+   unecessarily longer. It is highly recommended you install
403
+   NetSNMP from source to avoid bringing in excessive
404
+   dependencies to the SNMPStats module.
405
+     _________________________________________________________
406
+
407
+1.6.2. Configuring NetSNMP to allow connections from the SNMPStats
408
+module.
409
+
410
+   The SNMPStats module will communicate with the NetSNMP Master
411
+   Agent. This communication happens over a protocol known as
412
+   AgentX. This means that NetSNMP must have been compiled with
413
+   AgentX support. This will always be the case when you are
414
+   compiling from source unless you explicitly removed AgentX
415
+   support with ./configure.
416
+
417
+   After AgentX support has been compiled into NetSNMP, its
418
+   configuration file needs to be changed to turn on AgentX
419
+   support. The exact location of the configuration file
420
+   (snmpd.conf) may vary depending on your system. On my system,
421
+   it is located in:
422
+    /usr/local/share/snmp/snmpd.conf.
423
+
424
+
425
+   At the very end of the file add the following line:
426
+    master agentx
427
+
428
+   The line tells NetSNMP to act as an AgentX master agent, so
429
+   that it can accept connections from sub-agents such as the
430
+   SNMPStats module.
431
+
432
+   There is still one last step. Even though we have compiled and
433
+   configured NetSNMP to have AgentX support, we still need to
434
+   tell the daemon which interface and port to listen to for
435
+   AgentX connections. This is done when the daemon is started as
436
+   follows:
437
+    snmpd -x mySystemName:PortNumber
438
+
439
+   On my system, I start the NetSNMP daemon with:
440
+    snmpd -x localhost:705
441
+
442
+   This tells NetSNMP to act as a master agent, listening on the
443
+   localhost interface at port 705.
444
+     _________________________________________________________
445
+
446
+1.6.3. Configuring the SNMPStats module for communication with a
447
+Master Agent
448
+
449
+   The previous section explained how to set up a NetSNMP master
450
+   agent to accept AgentX connections. We now need to tell the
451
+   SNMPStats module how to communicate with this master agent.
452
+   This is done by giving the SNMPStats module its own NetSNMP
453
+   configuration file. The file must be named snmpstats.conf, and
454
+   must be in the same folder as the snmpd.conf file that was
455
+   configured above. On my system this would be:
456
+    /usr/local/share/snmp/snmpstats.conf
457
+
458
+   The default configuration file included with the distribution
459
+   can be used, and contains the following:
460
+    agentXSocket tcp:localhost:705
461
+
462
+   The above line tells the SNMPStats module to register with the
463
+   master agent on the localhost, port 705. The parameters should
464
+   match up with the snmpd process. Note that the master agent
465
+   (snmpd) does not need to be present on the same machine as
466
+   OpenSER. localhost could be replaced with any other machine.
467
+     _________________________________________________________
468
+
469
+1.6.4. Testing for a proper Configuration
470
+
471
+   As a quick test to make sure that the SNMPStats module
472
+   sub-agent can succesfully connect to the NetSNMP Master agent,
473
+   start snmpd with the following:
474
+    snmpd -f -Dagentx -x localhost:705 2>&1 | less
475
+
476
+   You should see something similar to the following:
477
+    No log handling enabled - turning on stderr logging
478
+    registered debug token agentx, 1
479
+    ...
480
+    Turning on AgentX master support.
481
+    agentx/master: initializing...
482
+    agentx/master: initializing...   DONE
483
+    NET-SNMP version 5.3.1
484
+
485
+   Now, start up OpenSER in another window. In the snmpd window,
486
+   you should see a bunch of:
487
+    agentx/master: handle pdu (req=0x2c58ebd4,trans=0x0,sess=0x0)
488
+    agentx/master: open 0x81137c0
489
+    agentx/master: opened 0x814bbe0 = 6 with flags = a0
490
+    agentx/master: send response, stat 0 (req=0x2c58ebd4,trans=0x0,sess
491
+=0x0)
492
+    agentx_build: packet built okay
493
+
494
+   The messages beginning with "agentx" are debug messages
495
+   stating that something is happening with an AgentX sub-agent,
496
+   appearing because of the -Dagentx snmpd switch. The large
497
+   number of debug messages appear at startup as the SNMPStats
498
+   module registers all of its scalars and tables with the Master
499
+   Agent. If you receive these messages, then SNMPStats module
500
+   and NetSNMP daemon have both been configured correctly.
501
+     _________________________________________________________
502
+
503
+Chapter 2. Developer's Guide
504
+
505
+   The module does not provide any external API.
506
+     _________________________________________________________
507
+
508
+Chapter 3. Frequently Asked Questions
509
+
510
+   3.1. Where can I find more about SNMP?
511
+   3.2. Where can I find more about NetSNMP?
512
+   3.3. Where can I find out more about AgentX?
513
+   3.4. Why am I not receiving any SNMP Traps?
514
+   3.5. OpenSER refuses to load the SNMPStats module. Why is it
515
+          displaying "load_module: could not open module
516
+          snmpstats.so"? 
517
+
518
+   3.6. How can I learn what all the scalars and tables are?
519
+   3.7. Why do snmpget, snmpwalk, and snmptable always time out?
520
+   3.8. How do I use snmpget?
521
+   3.9. How do I use snmptable?
522
+   3.10. Where can I find more about OpenSER?
523
+   3.11. Where can I post a question about this module?
524
+   3.12. How can I report a bug?
525
+
526
+   3.1. Where can I find more about SNMP?
527
+
528
+   There are many websites that explain SNMP at all levels of
529
+   detail. A great general introduction can be found at
530
+   http://en.wikipedia.org/wiki/SNMP If you are interested in the
531
+   nitty gritty details of the protocol, then please look at RFC
532
+   3410. RFC 3410 maps out the many other RFCs that define SNMP,
533
+   and can be found at
534
+   http://www.rfc-archive.org/getrfc.php?rfc=3410
535
+
536
+   3.2. Where can I find more about NetSNMP?
537
+
538
+   NetSNMP source code, documentation, FAQs, and tutorials can
539
+   all be found at http://net-snmp.sourceforge.net/.
540
+
541
+   3.3. Where can I find out more about AgentX?
542
+
543
+   The full details of the AgentX protocol are explained in RFC
544
+   2741, available at:
545
+   http://www.rfc-archive.org/getrfc.php?rfc=2741
546
+
547
+   3.4. Why am I not receiving any SNMP Traps?
548
+
549
+   Assuming you've configured the trap thresholds in openser.cfg
550
+   with something similar to:
551
+    modparam("snmpstats", "MsgQueueMinorThreshold", 1234)
552
+    modparam("snmpstats", "MsgQueueMajorThreshold", 5678)
553
+
554
+    modparam("snmpstats", "dlg_minor_threshold", 500)
555
+    modparam("snmpstats", "dlg_minor_threshold", 600)
556
+
557
+   Then either OpenSER is not reaching these thresholds (which is
558
+   a good thing), or you haven't set up the trap monitor
559
+   correctly. To prove this to yourself, you can start NetSNMP
560
+   with:
561
+    snmpd -f -Dtrap -x localhost:705
562
+
563
+   The -f tells the NetSNMP process to not daemonize, and the
564
+   -Dtrap enables trap debug logs. You should see something
565
+   similar to the following:
566
+    registered debug token trap, 1
567
+    trap: adding callback trap sink            ----- You should see bot
568
+h
569
+    trapsess: adding to trap table             ----- of these lines.
570
+    Turning on AgentX master support.
571
+    trap: send_trap 0 0 NET-SNMP-TC::linux
572
+    trap: sending trap type=167, version=1
573
+    NET-SNMP version 5.3.1
574
+
575
+   If the two lines above did not appear, then you probably have
576
+   not included the following in your snmpd.conf file.
577
+    trap2sink machineToSendTrapsTo:machinesPortNumber.
578
+
579
+   When a trap has been received by snmpd, the following will
580
+   appear in the above output:
581
+    sent_trap -1 -1 NET-SNMP-TC::linus
582
+    sending trap type=167, version=1
583
+
584
+   You'll also need a program to collect the traps and do
585
+   something with them (such as sending them to syslog). NetSNMP
586
+   provides snmptrapd for this. Other solutions exist as well.
587
+   Google is your friend.
588
+
589
+   3.5. OpenSER refuses to load the SNMPStats module. Why is it
590
+   displaying "load_module: could not open module snmpstats.so"?
591
+
592
+   On some systems, you may receive the following error at stdout
593
+   or the log files depending on the configuration.
594
+    ERROR: load_module: could not open module </usr/local/lib/openser/m
595
+odules/snmpstats.so>:
596
+           libnetsnmpmibs.so.10: cannot open shared object file: No suc
597
+h file or directory.
598
+
599
+   This means one of two things:
600
+
601
+    1. You did not install NetSNMP. ("make install" if building
602
+       from source)
603
+    2. The dynamic linker cannot find the necessary libraries.
604
+
605
+   In the second case, the fix is as follows:
606
+
607
+    1. find / -name "libnetsnmpmibs*"
608
+          + You will find a copy unless you haven't installed
609
+            NetSNMP. Make note of the path.
610
+    2. less /etc/ld.so.conf
611
+          + If the file is missing the path from step 1, then add
612
+            the path to ld.so.conf
613
+    3. ldconfig
614
+    4. Try starting OpenSER again.
615
+
616
+   Alternatively, you may prefix your startup command with:
617
+    LD_LIBRARY_PATH=/path/noted/in/step/one/above
618
+
619
+   For example, on my system I ran:
620
+    LD_LIBRARY_PATH=/usr/local/lib openserctl start
621
+
622
+   3.6. How can I learn what all the scalars and tables are?
623
+
624
+   All scalars and tables are named in the SNMPStats module
625
+   overview. The files OPENSER-MIB, OPENSER-REG-MIB,
626
+   OPENSER-SIP-COMMON-MIB and OPENSER-SIP-SERVER-MIB contain the
627
+   full definitions and descriptions. Note however, that the MIBs
628
+   may actually contain scalars and tables which are currently
629
+   not provided by the SNMPStats module. Therefore, it is better
630
+   to use NetSNMP's snmptranslate as an alternative. Take the
631
+   openserSIPEntityType scalar as an example. You can invoke
632
+   snmptranslate as follows:
633
+    snmptranslate -TBd openserSIPEntityType
634
+
635
+   Which would result in something similar to the following:
636
+    -- FROM       OPENSER-SIP-COMMON-MIB
637
+    -- TEXTUAL CONVENTION OpenSERSIPEntityRole
638
+    SYNTAX        BITS {other(0), userAgent(1), proxyServer(2), redirec
639
+tServer(3), registrarServer(4)}
640
+    MAX-ACCESS    read-only
641
+    STATUS        current
642
+    DESCRIPTION   " This object identifies the list of SIP entities thi
643
+s
644
+                   row is related to. It is defined as a bit map.  Each
645
+                   bit represents a type of SIP entity.
646
+                   If a bit has value 1, the SIP entity represented by
647
+                   this row plays the role of this entity type.
648
+
649
+                   If a bit has value 0, the SIP entity represented by
650
+                   this row does not act as this entity type
651
+                   Combinations of bits can be set when the SIP entity
652
+                   plays multiple SIP roles."
653
+
654
+   3.7. Why do snmpget, snmpwalk, and snmptable always time out?
655
+
656
+   If your snmp operations are always returning with: "Timeout:
657
+   No Response from localhost", then chances are that you are
658
+   making the query with the wrong community string. Default
659
+   installs will most likely use "public" as their default
660
+   community strings. Grep your snmpd.conf file for the string
661
+   "rocommunity", and use the result as your community string in
662
+   your queries.
663
+
664
+   3.8. How do I use snmpget?
665
+
666
+   NetSNMP's snmpget is used as follows:
667
+    snmpget -v 2c -c theCommunityString machineToSendTheMachineTo scala
668
+rElement.0
669
+
670
+
671
+   For example, consider an snmpget on the openserSIPEntityType
672
+   scalar, run on the same machine running the OpenSER instance,
673
+   with the default "public" community string. The command would
674
+   be:
675
+    snmpget -v2c -c public localhost openserSIPEntityType.0
676
+
677
+   Which would result in something similar to:
678
+    OPENSER-SIP-COMMON-MIB::openserSIPEntityType.0 = BITS: F8 \
679
+                other(0) userAgent(1) proxyServer(2)          \
680
+                redirectServer(3) registrarServer(4)
681
+
682
+   3.9. How do I use snmptable?
683
+
684
+   NetSNMP's snmptable is used as follows:
685
+    snmptable -Ci -v 2c -c theCommunityString machineToSendTheMachineTo
686
+ theTableName
687
+
688
+
689
+   For example, consider the openserSIPRegUserTable. If we run
690
+   the snmptable command on the same machine as the running
691
+   OpenSER instance, configured with the default "public"
692
+   community string. The command would be:
693
+    snmptable -Ci -v 2c -c public localhost openserSIPRegUserTable
694
+
695
+   Which would result in something similar to:
696
+    index openserSIPUserUri openserSIPUserAuthenticationFailures
697
+        1       DefaultUser                                    0
698
+        2            bogdan                                    0
699
+        3    jeffrey.magder                                    0
700
+
701
+   3.10. Where can I find more about OpenSER?
702
+
703
+   Take a look at http://openser.org/.
704
+
705
+   3.11. Where can I post a question about this module?
706
+
707
+   First at all check if your question was already answered on
708
+   one of our mailing lists:
709
+
710
+     * User Mailing List -
711
+       http://openser.org/cgi-bin/mailman/listinfo/users
712
+     * Developer Mailing List -
713
+       http://openser.org/cgi-bin/mailman/listinfo/devel
714
+
715
+   E-mails regarding any stable OpenSER release should be sent to
716
+   <users@openser.org> and e-mails regarding development versions
717
+   should be sent to <devel@openser.org>.
718
+
719
+   If you want to keep the mail private, send it to
720
+   <team@openser.org>.
721
+
722
+   3.12. How can I report a bug?
723
+
724
+   Please follow the guidelines provided at:
725
+   http://sourceforge.net/tracker/?group_id=139143.