Monitoring with snmp does not work
ehansmair opened this issue · 0 comments
ehansmair commented
Hi,
I am trying to monitor the servers with snmp:
<monitoring>
<monitor host="192.168.197.87" type="snmp">
<snmp version="v1" community="public" port="161"/>
</monitor>
</monitoring>
The snmpwalk works well, but Tsung produces errors - regardless of the snmp version (v1, v2):
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_config_server:(4:<0.135.0>) SYSINFO:Tsung version: 1.8.0
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_config_server:(4:<0.135.0>) SYSINFO:Erlang version: Erlang/OTP 25 [erts-13.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:8] [jit:ns]
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_config_server:(4:<0.135.0>) SYSINFO:System architecture x86_64-redhat-linux-gnu
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_config_server:(4:<0.135.0>) SYSINFO:Current path: /usr/lib/tsung/tsung-1.8.0/ebin/tsung.beam
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_os_mon_snmp:(5:<0.154.0>) starting os_mon_snmp with args {"192.168.197.87",
{161,
"public",
v1,[]},
10000,
{global,
ts_mon}}
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_os_mon_snmp:(5:<0.157.0>) Initialize SNMP application
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_os_mon_snmp:(5:<0.157.0>) Initialize SNMP manager: ok
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_os_mon_snmp:(5:<0.157.0>) Register SNMP manager: ok
=INFO REPORT==== 5-Apr-2023::23:13:00 ===
ts_os_mon_snmp:(5:<0.157.0>) SNMP initialization: ok
...
=ERROR REPORT==== 5-Apr-2023::23:13:10 ===
** Generic server <0.157.0> terminating
** Last message in was {timeout,#Ref<0.3636501632.2333081607.216382>,
send_request}
** When Server state == {state,
{global,ts_mon},
[],10000,undefined,"snmp://192.168.197.87:161",
"192.168.197.87",
[[1,3,6,1,4,1,2021,11,52,0],
[1,3,6,1,4,1,2021,11,50,0],
[1,3,6,1,4,1,2021,4,6,0],
[1,3,6,1,4,1,2021,10,1,5,1]],
{dict,4,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],[],[],[],[],[],
[[[1,3,6,1,4,1,2021,11,52,0]|
{cpu_system,sample_counter,
#Fun<ts_os_mon_snmp.0.104503733>}]],
[],
[[[1,3,6,1,4,1,2021,10,1,5,1]|
{load,sample,#Fun<ts_os_mon_snmp.3.104503733>}]],
[],[],[],
[[[1,3,6,1,4,1,2021,11,50,0]|
{cpu_user,sample_counter,
#Fun<ts_os_mon_snmp.1.104503733>}]],
[[[1,3,6,1,4,1,2021,4,6,0]|
{freemem,sample,
#Fun<ts_os_mon_snmp.2.104503733>}]],
[],[]}}},
v1,161,"public",
{192,168,197,87}}
** Reason for termination ==
** {'function not exported',
[{snmpm,sync_get,
["tsung","snmp://192.168.197.87:161",
[[1,3,6,1,4,1,2021,11,52,0],
[1,3,6,1,4,1,2021,11,50,0],
[1,3,6,1,4,1,2021,4,6,0],
[1,3,6,1,4,1,2021,10,1,5,1]],
5000],
[]},
{ts_os_mon_snmp,snmp_get,5,
[{file,"src/tsung_controller/ts_os_mon_snmp.erl"},{line,245}]},
{ts_os_mon_snmp,handle_info,2,
[{file,"src/tsung_controller/ts_os_mon_snmp.erl"},{line,164}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,1123}]},
{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,1200}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
Any idea what is going wrong? I am not a Erlang programmer and need some help.
Thank you in advance.