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
#2
(03.09.2018, 13:30)Carlos Padilla Wrote: Good morning, the following message is to tell you that I have a monitor and manage the traps of several UPS and PDU that use the SNMP protocol. I read that with the logic Machine I can do this, but I can not find information about it, if I need some packages, if everything has to be done with Script or has menus like Modbus or other protocols. In addition to the above if I can monitor and also receive the traps of them, because going in a forum here, said that you could not receive traps, but I do not know if with the new version of the lite power firmware (20180822) if can do. Thanks and any information that you can give me, it would be very useful.

Hi, as I know, traps are still not supported
You need packages  luasnmp and libnetsnmp
you can download it for imx28 here https://dl.openrb.com/lm-17/pkg
for imx6 here https://dl.openrb.com/lm-17-imx6/pkg/

and here is example script
Code:
-- открытие сессии с snmp
require "snmp"

-- загрузка миб-файла для ибп
local mib, err = snmp.mib.load('/home/ftp/snmp/GESINGLEUPS.mib')
if not mib then
  log('Failed to load mib: ' .. err)
end

-- подклчюение к ибп
ups1, err = snmp.open{
 version = snmp.SNMPv1,
 community = "public",
 port = 161,
 peer = "10.100.3.21",
}
assert(ups1, err)

-- читаем температуру
vbind, err = ups1:get("upsBatteryTemperaturegen")
grp.write('1/1/7', vbind.value)

-- читаем нагрузку в % по фазам на выходе
vbind, err = ups1:get("upsOutputPercentLoadgen.1")
grp.write('1/1/8', vbind.value)
vbind, err = ups1:get("upsOutputPercentLoadgen.2")
grp.write('1/1/9', vbind.value)
vbind, err = ups1:get("upsOutputPercentLoadgen.3")
grp.write('1/1/10', vbind.value)
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 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: