This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SNMP protocol in Logic Machine
#8
Thank you for responding, I was able to upload a file to you via ftp with the help of winscp, as you can see in the images that I will show you. I am testing the SNMP communication with a Mikrotik router with the resident function of the example that AEK shows me, but it does not work for me. In the log I see that the message appears:

SNMP Mikrotik 10.09.2018 17:09:25
* string: Failed to load mib: mib: can not add mib

The script I use is the following:


Code:
--Abrir una sesión con snmp
require "snmp"

local mib, err = snmp.mib.load('/home/ftp/snmp/Mikrotik.mib')
if not mib then
  log('Failed to load mib: ' .. err)
end


ups1, err = snmp.open{
 version = snmp.SNMPv1,
 community = "ZennioCo",
 port = 161,
 peer = "192.168.0.191",
}
assert(ups1, err)

--Lee los OID del Mib
vbind, err = ups1:get("mtxrHlVoltage")
grp.write('8/0/0', vbind.value)
vbind, err = ups1:get("mtxrHlTemperature")
grp.write('8/0/1', vbind.value)

It should be noted that when configuring the ftp server of the logic machine only had username ftp and apps and in both mount the MIB but none worked and even mount the folder as is the example route ('/ home / ftp / snmp /*.*) since when I accessed the user I only showed "/" and apps (the daemon, daemon, data, lib and user folders), but the reading of the file does not work for me. In addition to the above, also install the 2 SNMP packets that I commented and that are necessary for the SNMP part to work. Thank you and I will be attentive to your comments.

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: SNMP protocol in Logic Machine - by AEK - 04.09.2018, 09:17
RE: SNMP protocol in Logic Machine - by AEK - 06.09.2018, 06:59
RE: SNMP protocol in Logic Machine - by admin - 06.09.2018, 07:57
RE: SNMP protocol in Logic Machine - by admin - 07.09.2018, 07:00
RE: SNMP protocol in Logic Machine - by Carlos Padilla - 10.09.2018, 22:30
RE: SNMP protocol in Logic Machine - by admin - 11.09.2018, 06:41
RE: SNMP protocol in Logic Machine - by AEK - 11.09.2018, 09:26
RE: SNMP protocol in Logic Machine - by admin - 12.09.2018, 05:58
RE: SNMP protocol in Logic Machine - by admin - 15.10.2018, 18:10
RE: SNMP protocol in Logic Machine - by admin - 16.10.2018, 10:30
RE: SNMP protocol in Logic Machine - by admin - 16.10.2018, 17:50
RE: SNMP protocol in Logic Machine - by admin - 11.04.2019, 09:52
RE: SNMP protocol in Logic Machine - by admin - 17.06.2019, 07:34
RE: SNMP protocol in Logic Machine - by admin - 17.06.2019, 08:34
RE: SNMP protocol in Logic Machine - by admin - 18.06.2019, 08:05
RE: SNMP protocol in Logic Machine - by admin - 11.07.2019, 08:48
RE: SNMP protocol in Logic Machine - by admin - 12.07.2019, 06:15
RE: SNMP protocol in Logic Machine - by admin - 04.11.2019, 12:12
RE: SNMP protocol in Logic Machine - by admin - 21.02.2020, 08:22
RE: SNMP protocol in Logic Machine - by admin - 06.03.2020, 12:26
RE: SNMP protocol in Logic Machine - by admin - 06.03.2020, 18:47
RE: SNMP protocol in Logic Machine - by admin - 07.03.2020, 13:20
RE: SNMP protocol in Logic Machine - by admin - 09.03.2020, 09:21
RE: SNMP protocol in Logic Machine - by admin - 28.03.2020, 15:06
RE: SNMP protocol in Logic Machine - by admin - 12.04.2020, 12:12
RE: SNMP protocol in Logic Machine - by admin - 15.04.2020, 06:08
RE: SNMP protocol in Logic Machine - by admin - 09.12.2020, 07:07
RE: SNMP protocol in Logic Machine - by admin - 11.03.2021, 13:15
RE: SNMP protocol in Logic Machine - by admin - 11.03.2021, 13:34
RE: SNMP protocol in Logic Machine - by admin - 11.03.2021, 14:22
RE: SNMP protocol in Logic Machine - by admin - 19.09.2022, 13:00

Forum Jump: