Skip to content

Commit

Permalink
[snmpstats]more hints for setting up in the docs
Browse files Browse the repository at this point in the history
Conflicts:
	modules/snmpstats/README
	modules/snmpstats/doc/snmpstats_admin.xml

(cherry-picked from 6e7535207d5531e0fc2562d05b874acd30488368)
  • Loading branch information
ionutrazvanionita committed Jan 13, 2016
1 parent 0dfb46d commit a533e72
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 44 deletions.
8 changes: 7 additions & 1 deletion modules/snmpstats/README
Expand Up @@ -380,6 +380,10 @@ snmp
avoid bringing in excessive dependencies to the SNMPStats
module.

IMPORTANT: By default, SNMP loads mibs from
/var/lib/mibs/ietf/.Keep in mind that you have to copy OpenSIPS
mibs wherevere your mibs folder is.

1.6.2. Configuring NetSNMP to allow connections from the SNMPStats
module.

Expand Down Expand Up @@ -484,7 +488,9 @@ Chapter 2. Frequently Asked Questions
nitty gritty details of the protocol, then please look at RFC
3410. RFC 3410 maps out the many other RFCs that define SNMP,
and can be found at
http://www.rfc-archive.org/getrfc.php?rfc=3410
http://www.rfc-archive.org/getrfc.php?rfc=3410 INFO: Also if
you want a nice tutorial for setting up snmpstats with OpenSIPS
try this one.

2.2.

Expand Down
43 changes: 24 additions & 19 deletions modules/snmpstats/doc/snmpstats_admin.xml
@@ -1,9 +1,9 @@
<!-- Module User's Guide -->

<chapter>

<title>&adminguide;</title>

<section>
<title>Overview</title>

Expand All @@ -24,21 +24,20 @@
openserSIPProtocolVersion, openserSIPServiceStartTime, openserSIPEntityType,
openserSIPSummaryInRequests, openserSIPSummaryOutRequest,
openserSIPSummaryInResponses, openserSIPSummaryOutResponses,
openserSIPSummaryTotalTransactions, openserSIPCurrentTransactions,
openserSIPNumUnsupportedUris, openserSIPNumUnsupportedMethods,
openserSIPSummaryTotalTransactions, openserSIPCurrentTransactions,
openserSIPNumUnsupportedUris, openserSIPNumUnsupportedMethods,
openserSIPOtherwiseDiscardedMsgs, openserSIPProxyStatefulness
openserSIPProxyRecordRoute, openserSIPProxyAuthMethod,
openserSIPNumProxyRequireFailures, openserSIPRegMaxContactExpiryDuration,
openserSIPRegMaxUsers, openserSIPRegCurrentUsers,
openserSIPRegDfltRegActiveInterval, openserSIPRegAcceptedRegistrations,
openserSIPRegRejectedRegistrations, openserMsgQueueDepth.
openserCurNumDialogs, openserCurNumDialogsInProgress,
openserCurNumDialogs, openserCurNumDialogsInProgress,
openserCurNumDialogsInSetup, openserTotalNumFailedDialogSetups
</para>
<para>
There are also scalars associated with alarms. They are as follows:
</para>

<para>
openserMsgQueueMinorThreshold, openserMsgQueueMajorThreshold,
openserMsgQueueDepthAlarmStatus, openserMsgQueueDepthMinorAlarm,
Expand Down Expand Up @@ -67,7 +66,7 @@
If enabled, the SNMPStats module will monitor for alarm conditions.
Currently, there are two alarm types defined.
</para>

<orderedlist numeration="arabic">
<listitem>
<para>
Expand All @@ -77,9 +76,9 @@
check for this condition.
</para>
<para>
If a minor or major condition has occured, then a
openserDialogLimitMinorEvent trap or a
openserDialogLimitMajorEvent trap will be generated,
If a minor or major condition has occured, then a
openserDialogLimitMinorEvent trap or a
openserDialogLimitMajorEvent trap will be generated,
respectively. The minor and major thresholds are
described in the parameters section below.
</para>
Expand Down Expand Up @@ -107,7 +106,7 @@
</section>
</section>


<section>
<title>How it works</title>

Expand All @@ -134,7 +133,7 @@
providing the proc file system).
</para>
</listitem>
</orderedlist>
</orderedlist>
</para>
</section>
<section>
Expand Down Expand Up @@ -179,15 +178,15 @@
<emphasis>hard/mandatory</emphasis> dependencies on other modules. There are however,
<emphasis>soft</emphasis> dependencies, as follows:
<itemizedlist>

<listitem>
<para>
<emphasis>usrloc</emphasis> - all scalars and tables relating to users and contacts are
dependent on the usrloc module. If the module is not loaded, the respective tables
will be empty.
</para>
</listitem>

<listitem>
<para>
<emphasis>dialog</emphasis> - all scalars relating to the number of dialogs are
Expand All @@ -196,7 +195,7 @@
alarm will be disabled.
</para>
</listitem>

</itemizedlist>
The contents of the openserSIPMethodSupportedTable change depending on which modules
are loaded.
Expand Down Expand Up @@ -280,7 +279,7 @@ modparam("snmpstats", "MsgQueueMinorThreshold", 2000)
If this parameter is not set, then there will be no minor alarm monitoring.
</para>
</section>

<section>
<title><varname>MsgQueueMajorThreshold</varname> (Integer)</title>

Expand Down Expand Up @@ -379,7 +378,7 @@ modparam("snmpstats", "snmpgetPath", "/my/custom/path/")
</programlisting>
</example>
</section>

<section>
<title><varname>snmpCommunity</varname> (String)</title>

Expand Down Expand Up @@ -452,6 +451,12 @@ modparam("snmpstats", "snmpCommunity", "customCommunityString")
from source to avoid bringing in excessive dependencies to the SNMPStats
module.
</para>

<para>
IMPORTANT: By default, SNMP loads <emphasis>mibs</emphasis> from
<emphasis>/var/lib/mibs/ietf/</emphasis>.Keep in mind that you have to copy &osips;
<emphasis>mibs</emphasis> wherevere your mibs folder is.
</para>
</section>

<section>
Expand Down Expand Up @@ -505,7 +510,7 @@ modparam("snmpstats", "snmpCommunity", "customCommunityString")
interface at port 705.
</para>
</section>

<section>
<title>
Configuring the SNMPStats module for communication with a Master Agent
Expand Down Expand Up @@ -535,7 +540,7 @@ modparam("snmpstats", "snmpCommunity", "customCommunityString")
machine as OpenSIPS. localhost could be replaced with any other machine.
</para>
</section>

<section>
<title>
Testing for a proper Configuration
Expand Down
51 changes: 27 additions & 24 deletions modules/snmpstats/doc/snmpstats_faq.xml
@@ -1,7 +1,7 @@
<!-- Module FAQ -->

<chapter>

<title>&faqguide;</title>
<qandaset defaultlabel="number">
<qandaentry>
Expand All @@ -13,9 +13,12 @@
There are many websites that explain SNMP at all levels of detail.
A great general introduction can be found at http://en.wikipedia.org/wiki/SNMP

If you are interested in the nitty gritty details of the protocol,
If you are interested in the nitty gritty details of the protocol,
then please look at RFC 3410. RFC 3410 maps out the many other RFCs
that define SNMP, and can be found at http://www.rfc-archive.org/getrfc.php?rfc=3410

INFO: Also if you want a nice tutorial for setting up snmpstats with &osips; try
<ulink url="http://saevolgo.blogspot.ro/2012/09/opensips-monitoring-using-snmp-part-i.html">this one</ulink>.
</para>
</answer>
</qandaentry>
Expand All @@ -36,7 +39,7 @@
</question>
<answer>
<para>
The full details of the AgentX protocol are explained in RFC 2741,
The full details of the AgentX protocol are explained in RFC 2741,
available at: http://www.rfc-archive.org/getrfc.php?rfc=2741
</para>
</answer>
Expand Down Expand Up @@ -69,7 +72,7 @@

<para>
The -f tells the NetSNMP process to not daemonize, and the -Dtrap enables trap
debug logs. You should see something similar to the following:
debug logs. You should see something similar to the following:
</para>

<programlisting format="linespecific">
Expand All @@ -86,7 +89,7 @@
If the two lines above did not appear, then you probably have not included
the following in your snmpd.conf file.
</para>

<programlisting format="linespecific">
trap2sink machineToSendTrapsTo:machinesPortNumber.
</programlisting>
Expand All @@ -105,7 +108,7 @@
You'll also need a program to collect the traps and do something with them
(such as sending them to syslog). NetSNMP provides snmptrapd for this. Other
solutions exist as well. Google is your friend.
</para>
</para>
</answer>
</qandaentry>
<qandaentry>
Expand All @@ -116,18 +119,18 @@
<answer>
<para>
On some systems, you may receive the following error at stdout or the log files
depending on the configuration.
depending on the configuration.
</para>

<programlisting format="linespecific">
ERROR: load_module: could not open module &lt;/usr/local/lib/opensips/modules/snmpstats.so&gt;:
ERROR: load_module: could not open module &lt;/usr/local/lib/opensips/modules/snmpstats.so&gt;:
libnetsnmpmibs.so.10: cannot open shared object file: No such file or directory.
</programlisting>
<para>

<para>
This means one of two things:
</para>

<orderedlist numeration="arabic">
<listitem>
<para>
Expand All @@ -136,12 +139,12 @@
</listitem>
<listitem>
<para>
The dynamic linker cannot find the necessary libraries.
The dynamic linker cannot find the necessary libraries.
</para>
</listitem>
</orderedlist>
<para>

<para>
In the second case, the fix is as follows:
</para>

Expand Down Expand Up @@ -219,27 +222,27 @@

<programlisting format="linespecific">
snmptranslate -TBd openserSIPEntityType
</programlisting>
</programlisting>

Which would result in something similar to the following:

<programlisting format="linespecific">
-- FROM OPENSER-SIP-COMMON-MIB
-- TEXTUAL CONVENTION OpenSIPSSIPEntityRole
SYNTAX BITS {other(0), userAgent(1), proxyServer(2), redirectServer(3), registrarServer(4)}
SYNTAX BITS {other(0), userAgent(1), proxyServer(2), redirectServer(3), registrarServer(4)}
MAX-ACCESS read-only
STATUS current
DESCRIPTION " This object identifies the list of SIP entities this
row is related to. It is defined as a bit map. Each
bit represents a type of SIP entity.
If a bit has value 1, the SIP entity represented by
this row plays the role of this entity type.

If a bit has value 0, the SIP entity represented by
this row does not act as this entity type
Combinations of bits can be set when the SIP entity
plays multiple SIP roles."
</programlisting>
</programlisting>

</para>
</answer>
Expand All @@ -253,7 +256,7 @@
If your snmp operations are always returning with: "Timeout: No Response
from localhost", then chances are that you are making the query with the wrong
community string. Default installs will most likely use "public" as their
default community strings. Grep your snmpd.conf file for the string
default community strings. Grep your snmpd.conf file for the string
"rocommunity", and use the result as your community string in your queries.
</para>
</answer>
Expand All @@ -270,7 +273,7 @@
snmpget -v 2c -c theCommunityString machineToSendTheMachineTo scalarElement.0
</programlisting>

For example, consider an snmpget on the openserSIPEntityType scalar,
For example, consider an snmpget on the openserSIPEntityType scalar,
run on the same machine running the OpenSIPS instance, with the default
"public" community string. The command would be:

Expand All @@ -283,7 +286,7 @@
<programlisting format="linespecific">
OPENSER-SIP-COMMON-MIB::openserSIPEntityType.0 = BITS: F8 \
other(0) userAgent(1) proxyServer(2) \
redirectServer(3) registrarServer(4)
redirectServer(3) registrarServer(4)
</programlisting>

</para>
Expand Down Expand Up @@ -338,7 +341,7 @@
<answer>
<para>
First at all check if your question was already answered on one of
our mailing lists:
our mailing lists:
</para>
<itemizedlist>
<listitem>
Expand All @@ -349,12 +352,12 @@
</listitem>
</itemizedlist>
<para>
E-mails regarding any stable &osips; release should be sent to
E-mails regarding any stable &osips; release should be sent to
&osipsusersmail; and e-mails regarding development versions
should be sent to &osipsdevmail;.
</para>
<para>
If you want to keep the mail private, send it to
If you want to keep the mail private, send it to
&osipshelpmail;.
</para>
</answer>
Expand Down

0 comments on commit a533e72

Please sign in to comment.