Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring with snmp does not work #401

Open
ehansmair opened this issue Apr 5, 2023 · 0 comments
Open

Monitoring with snmp does not work #401

ehansmair opened this issue Apr 5, 2023 · 0 comments

Comments

@ehansmair
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant