While I can see some Lua modules available for this online, (nothing via Luarocks it seems ?) all I want to do is retrieve a oid / variable value (or two) via SNMP.
I’m currently using os.execute with SNMPGet.
Does anyone have, or know where I can find a standalone block of Lua code (with no require call) that can do that ?
Many thanks
Lua does not know anything about SNMP. You either use os.execute to run some external software, provide that access through your host application or you use a C module that provides that data.
There is no "standalone block of Lua code" that can do what you want.