TTN Gateway Monitoring NOC

Hello all,

I am looking for a way to monitor my TTN gateways, so that I can receive a notification if one of them has gone down.
The way in which I would like to do this is to use, using cURL in a PHP script which would run every hour to monitor the timestamp.

When I use a GET request in Postman I receive the JSON data OK, but when I call my PHP script which uses cURL I get cURL Error #:Failed connect to; Connection timed out

Does anybody know what is causing this? Thank you

While not an answer to your specific API question I’d strongly recommend building your own monitoring / remote administration solution that runs by a channel that doesn’t go through TTN.

That not only lets you send more data about the gateways state than fits in the backhaul protocol, and connect in to update software and settings, it also means that when something goes wrong you have an ability to tell if it’s a gateway issue or a TTN infrastructure issue.

Of course the data collector end of such a system would also probably want to get TTN’s view of the gateway status for comparison, too as you seem to be trying to do. It’s not that TTN’s view is unimportant, but that it’s not enough.

In terms of debugging, I’d try running the curl attempt from the command line… it’s been a while but I almost had the sense that postman would export a curl command line for you? Another useful way to debug such things is to run your own fake server (possibly netcat in listen mode?) point the client attempts at that and see how what you get differs. Or packet sniff your own outbound traffic to the server.

You can see some good job done here: I use it, and it works very well!