Community discussions

MikroTik App
 
User avatar
Amm0
Forum Guru
Forum Guru
Topic Author
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

How To: Track LTE Signal using The Dude

Sat Dec 31, 2022 10:37 pm

One thing I use "The Dude" for is tracking LTE signals over time. This has worked for a long while for me, but I guess I never posted it in the forum.

While convoluted to setup, if you map the various LTE signal measurements to Dude probes, you can track RSRP, RSRQ, etc over time. This has been very useful since I can go back-in-time to see what the LTE signal level to correlate with any reported problems. e.g. you can see a graph the LTE signal, zoom in as needed.

Since I've defined each signal measure (for each LTE modem, if multiple modems) as a unique probe (e.g. lte1_rsrp, lte1_resq, lte2_rsrp, ...) in the "Probes" view in Dude...when you add a new device with LTE to Dude, the LTE measurement probes below should automatically be found and added for monitoring. Now, the LTE device needs SNMP enabled for this work, and right SNMP profile must be configured in the Dude for the device – as LTE signals here are read via SNMP. The following describe what I did to set this up.


1. Add Functions to find LTE interface's SNMP index

The critical element is some functions, which is what took a while to figure out... You need an "index number" for LTE modem to read the right signal level, but typically have a name like "lte1". Since the index number can vary, we need a function to get this index from the LTE interface's name in RouterOS.

In the "Functions" view in Dude, add (+) new function named indexLTE1, and use the following code with it:
array_element(oid_column("iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifIndex"), array_find(oid_column("iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr"),"lte1"))


If you changed the LTE interface's name to something other than "lte1" change that in the function above - but best use default "lte1" name on your router. If you have multiple LTE interfaces, you need to add a 2nd function called "indexLTE2" – same code just at the very end use "lte2".


Image


2. Add multiple Functions to read the various LTE signal values

Probes are what use these functions. Since a probe tracks one single piece of data, we break up each signal value into a different function. We need a different function (and different probe later) for each signal value. If you have two modems, you repeat the all the function again, replacing the "indexLTE1" with "indexLTE2". Since we use SNMP, what's exposed by the MIB is what's available. I show RSRP and RSRQ below, but if you look at the SNMP values for your particular modem/device/version, there may be more to track – just more functions, with slightly different OID# and friendly name.


In same "Functions" view, add (+) a new function called lte1_rsrp – this reads the RSRP from SNMP using the index found by indexLTE1 – so use this as the code for the function:
oid(concatenate("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrLTEModem.mtxrLTEModemTable.mtxrLTEModemEntry.mtxrLTEModemSignalRSRP.",indexLTE1()))


And, also add (+) another function called lte1_rsrq – this one is RSRQ, for "lte1", similar code just one "Q" instead of "P"
oid(concatenate("iso.org.dod.internet.private.enterprises.mikrotik.mikrotikExperimentalModule.mtXRouterOs.mtxrLTEModem.mtxrLTEModemTable.mtxrLTEModemEntry.mtxrLTEModemSignalRSRQ.",indexLTE1()))


If you had multiple modems, or different LTE signal levels available in SNMP, you keep adding new functions for those. Basically code "concatenate" the index for the particular modem with the "base" OID string for the signal data point – old() builtin function the read the value when the function is called.


Image


3. Add Probes that use the LTE signal functions

As explained, you need a probe to use with a device's service monitor so LTE can be track. And since probes track one thing, we need to create as many probes as we create functions in the above. So two in my example, but used more function, add another probe.

We'll start with "RSRP" for "lte1".... Navigate to "Probes" on left in Dude, and add (+) a new probe. In the dialog, use:
Name = RSRP 1 (or whatever you want - but it's used in graphing so short is better )
Type = Function (from drop-down)
Agent = default (if using agents, set accordingly)
Available =
if(lte1_rsrp() < 0, 1, 0)
Error = "" (the two double-quotes are CRITICAL, so use explicitly "")
Value =
lte1_rsrp() 
Unit = dBm
And we can add (+) a another probe, for "RSRQ 1" (lte1's RSRQ):
Name = RSRQ 1 (again, short is better )
Type = Function (from drop-down)
Agent = default (if using agents, set accordingly)
Available =
if(lte1_rsrq() < 0, 1, 0)
Error = "" (the two double-quotes are CRITICAL, so use explicitly "")
Value =
lte1_rsrq() 
Unit = dB
If you had more "LTE signal functions", add them as probes too. The probe "Name" (RSRQ 1 etc), "Units" and only the particular function name need to change for new ones – thus not repeating more here...

Image


4. Use them for Devices with LTE...

Once the above are setup, we use to any device if desired – we just defined possible probes above – but not using them...


1. Define an LTE-based RouterOS Device in the Dude – if you haven't already – AND make sure it's working for SNMP. The docs describe this part well enough. But you should be able do a "snmpwalk" on the device from tools and/or the SNMP tab for the device should be populated with stuff. If not, you can't read LTE using the probes above – SNMP from Dude to device has to work first!

2. Find the new/existing "LTE devices" in Dude, and double-click to open the dialog. Goto to the Services tab.

3. Hit the add (+) to add a service, one for each probe. And change Probe to "RSRP 1". You can adjust the "Probe Interval" etc. to get more granular data (but these are better set at a "higher level" like the device type or the main Dude setting). Hit OK to save.

4. It should show green flag if all works (it may take a minute). You can also open the RSRP 1 service for the device, then go the History tab to see the value it's reading.

5. Assuming 4 is reading data. Repeat 3 for "RSRQ 1". And keep repeating more for each additional "probe function" created in section above.

6. If you have more existing LTE devices in the dude already... Go the Service tab for each, and hit "Discover". Assuming SNMP works, it should automatically detect the LTE probe and use them – no need to add them by hand.

Image


5. Optional, create a Chart to show

This is up the reader. The docs explain charts, but as a result of using Probe per signal metric, you can use the LTE signal data collected in a chart that show MULTIPLE devices and/or multiple LTE metrics on SAME chart. (Otherwise, each device will show the various LTE data on the "History" tab for the device).

This is pretty simple. Goto the Charts from left in Dude. Pick a name. Then Add (+) an Element. The Source in the "New Chart Line" dialog should let you pick LTE metric you want to chart. Hit OK, and repeat adding Element (Chart Lines) as needed.

edit 1: remove imgBB url tags
edit 2: add "How To" to title to be clearer
edit 3: typo
edit 4: add links to the related "Map Approach" so changed title
Last edited by Amm0 on Mon Jan 02, 2023 4:02 pm, edited 4 times in total.
 
User avatar
Amm0
Forum Guru
Forum Guru
Topic Author
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Tracking LTE Signal using Dude Probes

Sat Dec 31, 2022 10:43 pm

Show LTE Data on "Map"

This article describes how to show the LTE data on the "Network Maps" view:
viewtopic.php?p=868056&hilit=lte#p868056

Image

The difference is one does the Map display of current signal (link in this post), while the "Probes" (post above) will store the all retrieved values for later Graph, History, or exporting either over time.

In theory, the functions could also be used in Map, like the article. Or you can use the actual OID numbers instead of the MIB path I used above, doesn't matter as long they refer to same SNMP data.
Last edited by Amm0 on Mon Jan 02, 2023 4:00 pm, edited 1 time in total.
 
User avatar
Amm0
Forum Guru
Forum Guru
Topic Author
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: How To: Track LTE Signal using Dude Probes

Mon Jan 02, 2023 3:46 pm

Note on Dude Map "Colors" using LTE Probes...

The setup of each probe in the first posting suggests don't use the "Error" field.
But the downside is a "poor LTE signal" is NOT an error (nor is reading no data) – but things like the Dude "Map" will not "change colors" without some "Error" condition being defined, if that's desired.

I didn't bother with error since it's complex (and semi-subjective) to define what exact point be an "error" on something like RSRP, SINR, etc. Instead I just use "ping", etc. probes on a device – since working LTE is needed to even contact the Dude in our cases. But wanted to highlight, you CAN define an ERROR condition in the probe – just don't have any examples to share.
 
nemke
Member Candidate
Member Candidate
Posts: 160
Joined: Thu Jul 31, 2014 2:52 am

Re: Tracking LTE Signal using Dude Probes

Sat Jan 28, 2023 10:28 pm

Show LTE Data on "Map"

This article describes how to show the LTE data on the "Network Maps" view:
viewtopic.php?p=868056&hilit=lte#p868056

Image

The difference is one does the Map display of current signal (link in this post), while the "Probes" (post above) will store the all retrieved values for later Graph, History, or exporting either over time.

In theory, the functions could also be used in Map, like the article. Or you can use the actual OID numbers instead of the MIB path I used above, doesn't matter as long they refer to same SNMP data.
Great. How you settup Lte data usage in map ? I like to collect LTE data (Total MB usage) of device and see it on dude and in chart.
I like to collect data from 01 to 31 in mounth and after that to be reset on 0M. Also I like dude to do all data colecting and Math, so reboot/power on/off/update of device don't make problem of collecting
 
User avatar
Amm0
Forum Guru
Forum Guru
Topic Author
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: How To: Track LTE Signal using The Dude

Sun Jan 29, 2023 1:17 am

You can use add (+) a Link to collect the current data rate and that can be shown on a Network Map and super useful to see current LTE speeds. But you're looking more for an "fool-proof odometer" for the LTE data usage

Some aggregate usage by period isn't something that's readily possible AFAIK. Dude probes (and associated function) don't have access to the history or other data, so while can create a probe to store the LTE TX and RX Bytes – as you point out they reset to 0 after reboot. Dude could track that value over time, but you'd be stuck "doing the math by hand" to determine usage by any sort of period, which is made even more complex to do reboots (or extended lose of connectivity).
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: How To: Track LTE Signal using The Dude

Tue Mar 21, 2023 9:29 pm

The LTELimiter counting script for the SXT LTE was in the other posts, as referrenced .

Here a lazy modification for updating 2 counter files, one for each SIM card "a" and "b", with different limits and reset dates. The counter files are read by DUDE to show in the SXT label.
Decision on switching "a" or "b" based on the counter exceeded is separate.
MDR_dual_sim_calculator_v2.txt
You do not have the required permissions to view the files attached to this post.
 
User avatar
Amm0
Forum Guru
Forum Guru
Topic Author
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: How To: Track LTE Signal using The Dude

Tue Mar 21, 2023 10:56 pm

Thanks @bpwl.
And the router is the right place to do this kinda thing vs the Dude. Since the Dude might lose contact with LTE...

I did borrow your great example of the RSRP/Q/etc labels just to keep the topic together – thanks for that – I use that myself now! What I don't track today is the primary/CA bands, so if you had some example of that... I saw this thread today, that suggest some carrier (I guess LMT in Latvia at least) cut high band at night: viewtopic.php?t=189912#p991217
Realized it be good to monitor the band selection (while I guess you'd see artifact in RSRP...knowing the band make that issue trivial to spot with Dude).

Who is online

Users browsing this forum: the44inc and 13 guests