Monitoring a RAK7258 gateway

Hi thingpeople,

I have just started learning about TTN and LoraWAN and have started with a RAK7258 gateway.
Seems to be working well and connected to TTN but wondering how people monitor the operation of these sorts of gateways (Basically to make sure they are working normally). I use PRTG and Homeassistant at home.

Yes I can easily ping it… I can also query the web server is working but that does not really tell me if its healthy and passing packets.
Normally I use SNMP or REST API (JSON) to monitor my home network devices.

What is everyone else using to monitor their gateways like the RAK7258? (surely there is a proper way to do this as its sold as a business grade unit)

Regards
Ben

I monitor the uplink of my gateways by something like a beacon. A RAK7204, I switched ADR off, manually set it to SF7/125kHz and 3dBm power. It is in a fixed position and transmitts its values every 20 minutes.
To monitor the downlink is not as easy - you should not make more than 10 downloads a day and during the download your gateway does not receive signals of the nodes.

1 Like

I suspect you’ll be surprised how small a number of people actually monitor their gateways, particularly the home users! When something glitches somewhere on the interwebs, we can see posts of people nuking their infrastructure with random poking, restarts, reboots, cremations, re-flashing etc etc, rather than having something that tells them straight away where to start looking or if they should chill-ax whilst someone else fixes the problem out in the wider world.

Whilst I am a huge fan of the canary device exactly as suggested by @wolfp, there are other mechanisms but overall many of the branded mainstream gateways are pretty reliable so it’s not something that we get overly paranoid about. Once configured, if it ain’t broke, unless there is some major security issue (bearing in mind that gateways are out only, they don’t open a path in to your network), don’t fix it. And if you do want to tinker with the settings, take notes just in case you induce some instability!

But for other early notifications of issues you could have something running that taps in to the TTN MQTT feed and if nothing has occurred in a reasonable timescale, raise a flag. There are other API’s available for checking gateway status but they place an extra load on the TTN infrastructure so it’s preferable to do an end to end check.

But overall, a small device (or two, different brands) will tell you if the antenna is still attached, the gateway is on, has internet, is connected to the network server, the network server is OK, the application server is OK, the integration you are using is OK, your application / processor / dashboard is OK - and if anything breaks, it’s easy to trace the chain from antenna, check the gateway logs, check the TTN gateway console, check the TTN application console, check your own console and then mostly find out the checking software just felt like sending a text alert because it was bored :wink:

You may want to post your question on the RAK forum as their support people may have a off the shelf solution that didn’t get in to the documentation.

Heya @descartes @wolfp

Thanks for the suggestions. Good to know at least im not missing something really obvious.
I build big corporate networks for a living so monitoring is just part of the course (even at home) but this might be one of those devices I put into the too hard bucket and just check on it when im board :slight_smile:

Being new to LORAstuff… I also noticed the RAK has the ability to do MQTT. I assume its either MQTT to local server OR TTN integration not both. I did think about monitoring TTN somehow but as you indicate @descartes its a lot of hassle for little gain being a home play system and all.

Thanks for all the help
Brom

A natural instinct - please note, I’m not saying people don’t, I’m saying that it’s not got any spinning rust in it and as the RAK7258 is based on WRT, a favourite router OS that’s expected to keep on trucking, it’s normally the network & application server and your own app server that need closer scrutiny.

If you search on the forum(s) you will find people asking about putting some sort of daemon on to a gateway to send I’m alive messages. Mostly it’s pointed out that there are simpler ways, like the canary which gives more info and that you don’t want to burden the gateway with something extra after the manufacturer has created something considered stable.

The RAK can act as a ‘dumb’ gateway and just send radio packets to TTN. Or you can turn on the internal network & application server which does use MQTT internally between various parts (which usually causes people to break it until they stop configuring the internal comms) and provides MQTT that you can subscribe to. It’s called LoRa Server which is an older version of what is now called ChirpStack (trademark reasons). Or you can hook up your gateway to your own ChirpStack instance, or a copy of TTN v2, or if you like something to really get your teeth in to TTN v3 (coming soon here, available on GitHub). But any of these options will take your gateway off the community network which would be a shame :wink:

A small device sending simple temp/humidity/battery voltage with the chain all the way to something like IFTTT for alerts could be a nice maker project for the holidays.

Thanks for all the help @descartes
Building my own servers sounds interesting. If I was a teenager and had a heap of time on my hands I would jump in. Nowadays its nice to support the community and have someone else do the hard work to manage the servers.

Thanks for all the help.
Brom

Hi all,
I use this link to monitor all my gateways. It is’n 100% accurate, but works fine:
https://www.thethingsnetwork.org/gateway-data/gateway/eui-xxxxxxxxxxxxx

This service sometimes fails, and I get a message from my app that ALL my gateways are off-line for more than x minutes. We build an application that polls this URL and check “Last seen”.

But if a get an alert form online ONE gateway, I know I have to check that gateway.

BTW: I have 8 * 7249, 2 * 7258 and one brand new 7269 online.

Suc6
Marc

2 Likes

Ah, so it’s you that drains the life out of the status infrastructure! :wink:

But seriously, how often do you check?

Brilliant… thank you @MarcVanBracht
Do you know if this API’s is documented anywhere?
ie what other functions are available? (ie. is it possible to just get the “connected / disconnected” state)

Brom

Let’s check in with TTN/TTI, paging @laurens - there may be a reason it’s not documented, let’s find out if we are all collectively about to kill the servers with this feature.

Personally I like to add something that reports status independently.

Eg add another service/daemon to OpenWRT which hits your own server periodically as a health report.

And having a VPN or SSH reverse tunnel in is great for field-deployed gateways, too.

If I’m not mistaken this link also works with Gateway ID instead of Gateway EUI, right?

Hi @brom, it is not documented. And if I am right, when TTN is on stack V3 (or something like that) there will be an official API to check your gateways
Marc

it’s the gateway EUI. Best Marc

it’s the gateway EUI. Best Marc

I do not know. I use the service of www.datacake.co. You can ask them how often.

Furthermore a friend of my build also a check, but this one checks by 14 gateways every 15 minutes. So if this drains the TTN… wow :wink:

Presumably this is something you setup & can control - it would be rather unusual for a IoT dashboard provider to just decide on a period of checking.

This isn’t a community friendly way of looking at things - how many free servers do you think TTI can afford to deploy to service this API request? What happens if we all start doing this? What if I choose to run Data Storage, HTTP Integration & MQTT on all applications all the time just because I can? How long will the application servers last? How about I reboot my devices every day to make sure they are getting the best data rate, hitting the join server?

I think maybe I should ask TTN to protect my investment in community gateways and devices and rate limit the API or make it a paid service only. This won’t affect me as I don’t use that unless I am doing diagnostics as I just monitor gateway traffic at my end point of just application MQTT, the least load on the whole infrastructure.

I would be very surprised if this is an “expensive” operation. It’s pretty normal infrastructure engineering that it not be.

To put it another way, if it were expensive, then it shouldn’t just be sitting there the way it is - the concern with such things isn’t really intense legitimate use, but targeted abuse intended to make it fail.

If for some reason it is expensive, it should require an API key or token and rate limiting should be applied to the instance of that.

ttn monitor

The Things Industries advised to use the Datacake Gateway Monitoring systems based on the provided URL.

So no worries I think
Marc

I too have the RAK7258 and I have syslog server to receive system logs:syslog

and I also have setup the watchdog in case I am not home:
watchdog