Python script to monitor gateways and send status to Twitter and Slack

For those who are on a quest to find a solution to monitor their TTN gateway, this script might be a solution. It monitors a gateway and sends a status update on Twitter or Slack when the gateway goes down or comes back online.

Tweet when a gateway goes down:
afbeelding

You are all invited to test the script and share your experiences.

Please note: This script is work-in-progress! Not all functions are implemented (yet).

8 Likes

cool !

1 Like

This might also come in handy for some:

It monitors a list of gateways, applications (via MQTT), and HTTP services and pushes all state to an InfluxDB. This can then be put into a grafana dashboard like this one: http://iotstatus.switch.ch:3000/

3 Likes

including email notification?

The desciption does not mention it, so: No.
I did not need it (read the readme at github) but it can be build in easily!

Monitoring gateway great, but tweeting gateway status is spamming Twitter.

Too much spam on Twitter already like hobbyists tweeting temperature and humidity of their Raspberry Pi, companies tweeting bridge open/closed status spamming popular common hashtags, really?!

You enjoy pictures of what people are having for lunch better?

3 Likes

What’s your point?
You promote tweeting of TTN gateway status messages?

I don’t mind people using twitter for what they find useful. For some people that’s tweeting pictures of their food and telling everyone every single thing they do (or so it seems). For others it is tweeting the status of whatever. As long as I’m not forced to follow that I account I don’t mind.

1 Like

For personal tweets that’s fine, as long as automated status messages are not used to spam popular hastags (which unfortunately can be frequently observed).

Examples of such spam:
Frequent automated tweets about bridge(s) being open or closed, using general hashtags like #thethingsnetwork, #IoT and many more which just causes a lot of spam in other people’s feeds.
Similar are numerous frequent tweets reporting temperature and humidity of whatever person’s Raspberry Pi from wherever, polluting the #raspberrypi hashtag.

Spamming a hashtag is similar to being forced to follow such a person. You don’t want to see such tweets but you get them because following some hashtag (not that person).

So your objection is people are abusing hashtags, not them using twitter…

And I agree, automated feeds should not include popular (if any) hashtags. Those should be reserved for relevant posts.

Yes, that’s correct.

The issue with automated messages is that once setup they are automatically generated again and again. Hashtag abuse can happen unintentional (not thinking about the consequences) but the messages will be automatically sent without human intervention and without (re)consideration.

I am happy that the default message in the script at github is using #TTNGWMonitor which is by no means popular to the general audience using Twitter.

I could make a note for consideration on this #discussion in the readme.

2 Likes