10.09.2018, 22:30
(This post was last modified: 10.09.2018, 22:38 by Carlos Padilla.)
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:
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.
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.