Logic Machine Forum
Syslog and SNMP - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2)
+--- Thread: Syslog and SNMP (/showthread.php?tid=146)



Syslog and SNMP - Matt - 24.11.2015

Is it possible to export alerts, logs or object logs in syslog ?
Is there a way to monitor the logicmachine in SNMP (standard or private MIBs)?

Matthieu


RE: Syslog and SNMP - admin - 25.11.2015

Do you mean to external syslog on the network? It has a fairly simple UDP-based protocol which can be implemented via a script.

For SNMP we can provide LuaSNMP library, but our clients have only used it to query other devices, not other way round.
http://luasnmp.luaforge.net/index.html


RE: Syslog and SNMP - Matt - 25.11.2015

(25.11.2015, 07:58)admin Wrote: Do you mean to external syslog on the network? It has a fairly simple UDP-based protocol which can be implemented via a script.

For SNMP we can provide LuaSNMP library, but our clients have only used it to query other devices, not other way round.
http://luasnmp.luaforge.net/index.html

My idea was just to monitor the system (cpu, memory, disk, ...) with a monitoring tool like a standard linux device.
Just the standard MIB2 would be enough.

For the syslog, is there a way to make a code executer on each call of alert() ?

Matt


RE: Syslog and SNMP - admin - 26.11.2015

You can override alert function in user function library, then all scripts will use new function instead of old. You just have to implement syslogsend.

Code:
oldalert = alert

alert = function(text, ...)
 text = tostring(text) or ''
 text = string.format(text, ...)

 syslogsend(text)

 oldalert(text)
end