Hi all,
is there any possible way to get the rx signal-strength in a script?
I've tested the attributes in the [ /interface wireless registration-table get ], but couldn't find it.
Thanks
Yes you right - my mistake ... sorryYou mean like /interface wireless registration-table get value-name=signal-strength?
You are right, the signal-strength is exactly what I need!Yes you right - my mistake ... sorryYou mean like /interface wireless registration-table get value-name=signal-strength?
paste this in the terminalWhere can you read the result?
put [/interface wireless registration-table get value-name=signal-strength 0 ]this read the signal strength for the station 0
:global dbm [/interface wireless registration-table get value-name=signal-strength 0]
paste this in the terminalWhere can you read the result?
ros code
put [/interface wireless registration-table get value-name=signal-strength 0 ]this read the signal strength for the station 0
{
:if ([:len [/interface wireless find ]]>0) do={
:foreach logline in=[/interface wireless registration-table find] do={
:local output "$[/interface wireless registration-table print as-value from=$logline]"
:set ( "$output"->"script" ) "wifi"
:put "$output"
}
}
}
.id=*8;ap=false;comment=;interface=wlan-2g;mac-address=04:79:70:xx:xx:B3;signal-strength=-52dBm@5.5Mbps;tx-rate=1Mbps;uptime=00:00:08;script=wifi
To get better detail about the field, use as-value. Try cut/past this script.
Its part of my Splunk script to monitor all wifi clients. (see signature)
Code: Select all{ :if ([:len [/interface wireless find ]]>0) do={ :foreach logline in=[/interface wireless registration-table find] do={ :local output "$[/interface wireless registration-table print as-value from=$logline]" :set ( "$output"->"script" ) "wifi" :put "$output" } } }
it would be great if you can make it work from system script. which it does not at the moment
Output.id=*8;ap=false;comment=;interface=wlan-2g;mac-address=04:79:70:xx:xx:B3;signal-strength=-52dBm@5.5Mbps;tx-rate=1Mbps;uptime=00:00:08;script=wifi