Community discussions

MikroTik App
 
aliqadir
just joined
Topic Author
Posts: 4
Joined: Wed Apr 15, 2020 11:26 am

Dude

Sat Dec 31, 2022 5:52 pm

If anyone can help me in, dude Mikrotik.
if any sector have more than 15 client I wanna change color directly to another color
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Dude

Sat Dec 31, 2022 7:12 pm

The quick answer is you need a "custom probe type" (on left in Dude, under "Probes") to the count the clients. So you treat >15 as "unavailable".

The appearance settings (which can come from device or type), control the colors. The color is based on the number of ok/fail/etc state of all probes for the device. So if you add your new "connected client >15" probe, it either be success/fail, and the colors follow the usual logic.

The tricky part is the "custom probe type" – that you're own your own. ;) If there is a single SNMP variable to read to know if you have >15 clients, then creating a probe is easier (docs explain how to read SNMP var for probe). Otherwise, you'd need a function, perhaps several, to find the number of clients. But "Dude Functions" are not anything standard – more like excel formulas (but without an help and old/poor doc and limited examples), but there is theoretically a lot you an do in the Function to get the probe the right data to decide if okay/fail.

Basically for dude to help you here, you need to express it in a probe first. I did something similar to track RSRQ/SINR/etc from LTE modems (and fail in dude if singal below my threshold) – works great/flawless – but was a painful, day-long process to figure it out several years ago because "Functions" to do make the Probe work. Thus the disclaimer.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Dude

Sat Dec 31, 2022 10:38 pm

I'd meant to write up my approach for LTE for a long while... Please see, viewtopic.php?t=192103 for at least an example of how to use Probe and Functions.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Dude

Sun Jan 01, 2023 12:51 am

This one from 2009 had this example to the "number of clients" (you might have to adapt the OIDs as needed):
This will return how many wireless stations are registered against an AP
Hopefully somebody can use this, I think I borrowed some code from somewhere else, credit given where credit is due.

if(oid("1.3.6.1.4.1.14988.1.1.4.4.0")>0,concatenate(array_size(oid_column("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrWireless.mtxrWlRtabTable.mtxrWlRtabEntry.mtxrWlRtabStrength"))," Wireless Clients"),"")
From what has to be one of the oldest thread I've seen (started in 2006): "Probe Thread" - viewtopic.php?f=8&t=12402#p142737

Who is online

Users browsing this forum: No registered users and 4 guests