I need to store/send to log, the the output of:
Code:Select all
/工具snmp-walk社区=公众中on=2c address=127.0.0.1 oid=1.3.6.1.2.1.1
Code:Select all
{ :local test [/tool snmp-walk community=public version=2c address=127.0.0.1 oid=1.3.6.1.2.1.1] :put $test }
Code:Select all
{ :local test [/tool snmp-walk community=public version=2c address=127.0.0.1 oid=1.3.6.1.2.1.1] :log info message="$test" }
Code:Select all
snmp MikroTik: getnext 1.3.6.1.2.1.1.7.0 snmp MikroTik: getnext 1.3.6.1.2.1.1.6.0 snmp MikroTik: getnext 1.3.6.1.2.1.1.5.0 snmp MikroTik: getnext 1.3.6.1.2.1.1.4.0 snmp MikroTik: getnext 1.3.6.1.2.1.1.3.0 snmp MikroTik: getnext 1.3.6.1.2.1.1.2.0 snmp MikroTik: getnext 1.3.6.1.2.1.1.1.0 snmp MikroTik: getnext 1.3.6.1.2.1.1
PS from the manual:
Return value to a variable
Since RouterOS v6.43 it is possible to save the result of fetch command to a variable
So add it to alltools