Good catch!
On this version of the script, I indeed did not add dlgs.so module.
Meanwhile I added the module, restarted.... but I still can't see anything
different on logs....
Atenciosamente / Kind Regards / Cordialement / Un saludo,
*Sérgio Charrua*
On Tue, Nov 5, 2024 at 5:44 PM Henning Westerholt <hw(a)gilawa.com> wrote:
Hello,
Not sure if this is really the problem, but one thing I noticed:
You want to operate a stateless server but configured dialog values in the
module. This will not work (according to the documentation) without the
dialog module, which will not work on a stateless server.
Try to remove the dialog values.
Cheers,
Henning
*From:* Sergio Charrua via sr-users <sr-users(a)lists.kamailio.org>
*Sent:* Dienstag, 5. November 2024 17:16
*To:* Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
*Cc:* Sergio Charrua <sergio.charrua(a)voip.pt>
*Subject:* [SR-Users] SNMP setup
Hi all!
I am having difficulties setting up SNMP, and mostly to figure out if what
I have setup is correctly configured.
This is what I have on Kamailio (5.8.2), which is set as stateless and as
a redirect server (simply put, it receives INVITE from SBC, gets a route
from routing services, modifies Contact header, and replies to SBC with 300
Multi Choice with new contact header):
loadmodule "db_mysql.so"
loadmodule "db_cluster.so"
loadmodule "http_client.so"
loadmodule "jsonrpcs.so"
loadmodule "kex.so"
loadmodule "corex.so"
loadmodule "sl.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "textops.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "jansson.so"
loadmodule "snmpstats.so"
loadmodule "file_out.so"
loadmodule "ctl.so"
loadmodule "permissions.so"
loadmodule "xhttp.so"
loadmodule "xhttp_rpc.so"
# ---- SNMP Stats params ----
modparam("snmpstats", "sipEntityType", "proxyServer")
modparam("snmpstats", "sipEntityType", "redirectServer")
modparam("snmpstats", "sipEntityType", "other")
modparam("snmpstats", "snmpgetPath", "/usr/bin/")
modparam("snmpstats", "MsgQueueMinorThreshold", 1)
modparam("snmpstats", "MsgQueueMajorThreshold", 1)
modparam("snmpstats", "dlg_minor_threshold", 1)
modparam("snmpstats", "dlg_major_threshold", 1)
modparam("snmpstats", "snmpCommunity", "kamailio")
I have set the *_minor_threshold values to bear minimum. Should I add
anything else?
The logs show the following messages:
DEBUG: <core> [core/mem/q_malloc.c:402]: qm_malloc():
qm_malloc(0x7f03af1ff010, 60) called from snmpstats: snmp_statistics.c:
get_socket_list_from_proto_and_family(185)
DEBUG: <core> [core/mem/q_malloc.c:449]: qm_malloc():
qm_malloc(0x7f03af1ff010, 64) returns address 0x7f03af3bcc50 frag.
0x7f03af3bcc10 (size=64) on 1 -th hit
DEBUG: <core> [core/mem/q_malloc.c:402]: qm_malloc():
qm_malloc(0x7f03af1ff010, 20) called from snmpstats: snmp_statistics.c:
get_socket_list_from_proto_and_family(185)
DEBUG: <core> [core/mem/q_malloc.c:449]: qm_malloc():
qm_malloc(0x7f03af1ff010, 32) returns address 0x7f03af3bcd00 frag.
0x7f03af3bccc0 (size=32) on 1 -th hit
DEBUG: <core> [core/mem/q_malloc.c:515]: qm_free():
qm_free(0x7f03af1ff010, 0x7f03af3bcc50), called from snmpstats:
snmp_statistics.c: get_total_bytes_waiting(464)
DEBUG: <core> [core/mem/q_malloc.c:562]: qm_free(): freeing frag.
0x7f03af3bcc10 alloc'ed from snmpstats: snmp_statistics.c:
get_socket_list_from_proto_and_family(185)
DEBUG: <core> [core/mem/q_malloc.c:515]: qm_free():
qm_free(0x7f03af1ff010, 0x7f03af3bcd00), called from snmpstats:
snmp_statistics.c: get_total_bytes_waiting(471)
DEBUG: <core> [core/mem/q_malloc.c:562]: qm_free(): freeing frag.
0x7f03af3bccc0 alloc'ed from snmpstats: snmp_statistics.c:
get_socket_list_from_proto_and_family(185)
DEBUG: <core> [core/mem/q_malloc.c:402]: qm_malloc():
qm_malloc(0x7f03af1ff010, 60) called from snmpstats: snmp_statistics.c:
get_socket_list_from_proto_and_family(185)
DEBUG: <core> [core/mem/q_malloc.c:449]: qm_malloc():
qm_malloc(0x7f03af1ff010, 64) returns address 0x7f03af3bcc50 frag.
0x7f03af3bcc10 (size=64) on 1 -th hit
DEBUG: <core> [core/mem/q_malloc.c:402]: qm_malloc():
qm_malloc(0x7f03af1ff010, 20) called from snmpstats: snmp_statistics.c:
get_socket_list_from_proto_and_family(185)
DEBUG: <core> [core/mem/q_malloc.c:449]: qm_malloc():
qm_malloc(0x7f03af1ff010, 32) returns address 0x7f03af3bcd00 frag.
0x7f03af3bccc0 (size=32) on 1 -th hit
DEBUG: <core> [core/mem/q_malloc.c:515]: qm_free():
qm_free(0x7f03af1ff010, 0x7f03af3bcc50), called from snmpstats:
snmp_statistics.c: get_total_bytes_waiting(464)
DEBUG: <core> [core/mem/q_malloc.c:562]: qm_free(): freeing frag.
0x7f03af3bcc10 alloc'ed from snmpstats: snmp_statistics.c:
get_socket_list_from_proto_and_family(185)
DEBUG: <core> [core/mem/q_malloc.c:515]: qm_free():
qm_free(0x7f03af1ff010, 0x7f03af3bcd00), called from snmpstats:
snmp_statistics.c: get_total_bytes_waiting(471)
DEBUG: <core> [core/mem/q_malloc.c:562]: qm_free(): freeing frag.
0x7f03af3bccc0 alloc'ed from snmpstats: snmp_statistics.c:
get_socket_list_from_proto_and_family(185)
INFO: snmpstats [utilities.c:116]: get_statistic(): failed to retrieve
statistics for active_dialogs
INFO: snmpstats [utilities.c:116]: get_statistic(): failed to retrieve
statistics for active_dialogs
The SNMP daemon is set as follows:
- /etc/snmp]$ cat snmptrapd.conf
# Example configuration file for snmptrapd
#
# No traps are handled by default, you must edit this file!
#
# authCommunity log,execute,net public
# traphandle SNMPv2-MIB::coldStart /usr/bin/bin/my_great_script cold
and on /etc/snmp/snmpd.conf:
###############################################################################
# Further Information
#
# See the snmpd.conf manual page, and the output of "snmpd -H".
agentaddress udp:161
rocommunity kamailio
master agentx
agentXSocket tcp:localhost:705
trap2sink 10.X.Y.Z netcool 162
When running tcpdump and listening on port 162, no traffic is
captured....it seems to me that Kamailio is not sending anything to SNMP
Any clue, anyone? What am I doing wrong?
Atenciosamente / Kind Regards / Cordialement / Un saludo,
*Sérgio Charrua*