Read info from log

Hello,

I need some script to read info from System Log and sent to value and use to other scripts.

I need to read this parameters: RSSI and HCSQ. For example: /log get… not work.
Maybe other solution?

Thanks

You can setup an external syslog server and process the data there.

:foreach log in=[log print where message~“RSSI”] do={:put [:log get $log message]}

You can also parse log message if needed

:global rssi2 [:foreach log in=[log print where message~"RSSI"] do={:put [:log get $log message]}]

This script not work.

Pauls did show how to print out only those lines which you want. That was an example. You want to merge all log entries where you see “RSSI” message?

{
:local message “RSSI -”
:local x
foreach i in=([/log find where message~“RSSI”]) do={
:set $x [/log get $i message]
:set $message ($message . " " . $x)
}
:put $message
}

You can not simply assign to variable result of a loop. If you want to get single variable, then you have to merge loop results.