<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
Did you check that the 'rocommunity' parameter in your
snmpd.conf file<br>
is the same with the 'snmpCommunity' parameter in SNMPStats module<br>
configuration<br>
(modparam("snmpstats", "snmpCommunity", "...")<br>
and the one you are giving as a parameter to snmpbulkwalk as '-c'?<br>
I tried to configure snmpstats, used public as community in the
beginning,<br>
didn't set this parameter in OpenSIPS config file and had it set to<br>
voip_monitoring in my snmpd.conf . After setting the community
everywhere to<br>
voip_monitoring the query<br>
<i><br>
snmpwalk -O s -v 2c -c  public localhost
OPENSER-SIP-COMMON-MIB::openserSIPCommonObjects<br>
<br>
</i>returned<br>
<br>
openserSIPProtocolVersion.0 = STRING: SIP/2.0<br>
openserSIPServiceStartTime.0 = Timeticks: (0) 0:00:00.00<br>
openserSIPEntityType.0 = BITS: 20 proxyServer(2) <br>
openserSIPTransportRcv.ipv4."172.16.36.163".5060 = BITS: 40 udp(1) <br>
openserSIPMethodName.1 = STRING: METHOD_INVITE<br>
openserSIPMethodName.2 = STRING: METHOD_CANCEL<br>
openserSIPMethodName.3 = STRING: METHOD_ACK<br>
openserSIPMethodName.4 = STRING: METHOD_BYE<br>
openserSIPMethodName.5 = STRING: METHOD_INFO<br>
openserSIPMethodName.9 = STRING: METHOD_MESSAGE<br>
openserSIPMethodName.12 = STRING: METHOD_PRACK<br>
openserSIPMethodName.13 = STRING: METHOD_REFER<br>
openserSIPMethodName.14 = STRING: METHOD_PUBLISH<br>
openserSIPSummaryInRequests.0 = Counter32: 0<br>
openserSIPSummaryOutRequests.0 = Counter32: 0<br>
openserSIPSummaryInResponses.0 = Counter32: 0<br>
openserSIPSummaryOutResponses.0 = Counter32: 0<br>
openserSIPSummaryTotalTransactions.0 = Counter32: 0<br>
openserSIPCurrentTransactions.0 = Gauge32: 0<br>
openserSIPNumUnsupportedUris.0 = Counter32: 0<br>
openserSIPNumUnsupportedMethods.0 = Counter32: 0<br>
openserSIPOtherwiseDiscardedMsgs.0 = Counter32: 0<br>
<br>
<br>
which I guess it's ok.<br>
<br>
<pre class="moz-signature" cols="72">
--
Ionut Ionita
OpenSIPS Developer</pre>
<div class="moz-cite-prefix">On 02/09/2016 17:17 PM, Husnain Taseer
wrote:<br>
</div>
<blockquote cite="mid:56D0529A.9080602@opensips.org" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div class="moz-forward-container">Dear Users,
<div dir="ltr">
<div>I am trying to fetch SNMP stats from opensips and getting
general failure error, I have configured snmpstats module in
opensips and have also configured snmpd service on CentOS.
System Packaging details are as follows:</div>
<div><br>
</div>
<div>OS Version: Â CentOS Linux release 7.1.1503 (Core)</div>
<div>Opensips Version:Â Server:: OpenSIPS (2.1.1
(x86_64/linux))</div>
<div>SNMP Version:Â NET-SNMP version 5.7.2</div>
<div><br>
</div>
<div>Configuration Details and logs are as follows:</div>
<div><br>
</div>
<div><b>snmpstats.so configuration:</b></div>
<div>
<div>loadmodule "snmpstats.so"</div>
<div>modparam("snmpstats", "sipEntityType",
"registrarServer")</div>
<div>modparam("snmpstats", "snmpgetPath", "/usr/bin/")</div>
</div>
<div><br>
</div>
<div><b>snmpd.conf :</b></div>
<div>
<div><i>rocommunity  public</i></div>
<div><i>syslocation  "VM, Virtual DataCenter"</i></div>
<div><i>syscontact  XXXX</i></div>
<div><i>master agentx</i></div>
<div><i>agentXSocket   tcp:localhost:705</i></div>
</div>
<div><br>
</div>
<div><b>snmp.conf:</b></div>
<div>
<div><i>defVersion    2c</i></div>
<div><i>defCommunity   public</i></div>
</div>
<div><br>
</div>
<div><b>snmpstats.conf</b></div>
<div>agentXSocket tcp:localhost:705<br>
</div>
<div><br>
</div>
<div><b>Output of netstat:</b></div>
<div>
<div>[root@VoIPDevSys ~]# netstat -nlp | grep snmpd</div>
<div>tcp     0    0 <a moz-do-not-send="true"
href="http://127.0.0.1:705">127.0.0.1:705</a> Â Â Â
  0.0.0.0:*        LISTEN  Â
 28461/snmpd</div>
<div>udp     0    0 <a moz-do-not-send="true"
href="http://0.0.0.0:161">0.0.0.0:161</a> Â Â Â Â Â
 0.0.0.0:*             Â
28461/snmpd</div>
</div>
<div><br>
</div>
<div>in snmpd.log AgentX master support enabled can be seen:</div>
<div><br>
</div>
<div><b>snmpd.log</b></div>
<div>
<div><i>Feb  9 16:49:45 VoIPDevSys systemd: Starting Simple
Network Management Protocol (SNMP) Daemon....</i></div>
<div><i>Feb  9 16:49:45 VoIPDevSys snmpd[28461]: Turning on
<b>AgentX master</b> support.</i></div>
<div><i>Feb  9 16:49:45 VoIPDevSys snmpd[28461]: Turning on
<b>AgentX master </b>support.</i></div>
<div><i>Feb  9 16:49:45 VoIPDevSys snmpd[28461]: NET-SNMP
version 5.7.2</i></div>
<div><i>Feb  9 16:49:45 VoIPDevSys systemd: Started Simple
Network Management Protocol (SNMP) Daemon..</i></div>
<div><i><br>
</i></div>
<div><br>
</div>
<div style="font-weight:bold">Output of different commands:</div>
</div>
<div><br>
</div>
<div>Basic command sysLocation.0 works:</div>
<div>
<div><i>[root@VoIPDevSys opensips]# snmpbulkwalk -O s -v 2c
-c  public localhost sysLocation.0</i></div>
<div><i>sysLocation.0 = STRING: \"VM, Virtual DataCenter\"</i></div>
<div style="font-weight:bold"><br>
</div>
</div>
<div style="font-weight:bold"><span style="font-weight:normal">Command
openserSIPProtocolVersion.0 also works using snmpget:</span></div>
<div>
<div>
<div>[root@VoIPDevSys opensips]# snmpget -O s -v 2c -c
 public localhost
OPENSER-SIP-COMMON-MIB::openserSIPProtocolVersion.0</div>
<div>openserSIPProtocolVersion.0 = STRING: SIP/2.0</div>
</div>
</div>
<div><b><br>
</b></div>
<div><b>But when I try to fetch common objects i am getting
following error:</b></div>
<div><br>
</div>
<div>
<div><i>[root@VoIPDevSys opensips]# snmpwalk -O s -v 2c -c
 public localhost
OPENSER-SIP-COMMON-MIB::openserSIPCommonObjects</i></div>
<div><i>openserSIPProtocolVersion.0 = STRING: SIP/2.0</i></div>
<div><i>Error in packet.</i></div>
<div><i>Reason: (genError) A general failure occured</i></div>
<div><i>Failed object: openserSIPProtocolVersion.0</i></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>[root@VoIPDevSys opensips]# snmpbulkwalk -v2c -Os -c
public localhost OPENSER-REG-MIB::openser</div>
<div>Error in packet.</div>
<div>Reason: (genError) A general failure occured</div>
<div>Failed object: openserSIPCommonMIB.1.1.1.0</div>
<div><br>
</div>
<div>openser = No Such Object available on this agent at
this OID.</div>
</div>
<div><br>
</div>
<div>Please advice where I am doing wrong, or is it a bug in
getting the complete object from snmpstats module.</div>
<div><br>
</div>
<div><br>
</div>
<div><b>Regards,</b></div>
<div><b>Husnain Taseer</b></div>
<div><b>VoIP Developer</b></div>
<div><br>
</div>
</div>
<br>
</div>
<br>
</blockquote>
<br>
</body>
</html>