Page 1 of 1

Raspberry Pi port monitor from uptimerobot

Posted: Wed Jun 12, 2019 9:57 am
by PeterK2
Hi

I want monitor my Raspberry from (free) service uptimerobot.com Among others this service is using "port monitoring". I do not want expose on public IP SSH access or any other service running on my Pi, so I want to just open some port and forward it on public IP for monitoring.

Does anyone know a low resource way how to open a port? I'm not sure how the monitor is working exactly, probably it just need any response, so like HELLO text will be fine.

thanks

Re: Raspberry Pi port monitor from uptimerobot

Posted: Wed Jun 12, 2019 10:04 am
by B.Goode
Port Forwarding is a configuration change to the router that sits between your own local network and the public global Internet.

In most common cases this will be the device provided by your domestic broadband Internet service provider.

The specific details are proprietary to each make and model of router.

Re: Raspberry Pi port monitor from uptimerobot

Posted: Wed Jun 12, 2019 10:07 am
by Andyroo
Uptimes monitoring options are described as
Here are short details about monitor types:
http(s): that's perfect for website monitoring. The service regularly sends requests (which are the same as if a visitor is browsing your website) to the URL and decides if it is up or down depending on the HTTP statuses returned from the website (200-success, 404-not found, etc.)
ping: this is good for monitoring a server. Ping (ICMP) requests are sent and up/down status is decided according to the "if responses are received or not". Ping is not a good fit for monitoring websites as a website (its IP) can respond to ping requests while it is down (which means that the site is down but the server hosting the site is up)
keyword: checks if a keyword exists or not exists in a web page
port: good for monitoring services like smtp, dns, pop as all these services run from a specific port and Uptime Robot decides their statuses if they respond to the requests or not.
This shows that the ports the monitor are expected to have the relevant service.

I would just use ping and allow ICMP requests through your router. Often these are allowed through by default, sometimes they need any other port opened to the Pi and sometimes they have a specific entry for forwarding but that depends on you kit.

You could create a small monitoring Python script that checks temp, SD / Disk space and memory and if any are low use Flask to put an error on a web page for monitoring...

Re: Raspberry Pi port monitor from uptimerobot

Posted: Wed Jun 12, 2019 9:24 pm
by PeterK2
B.Goode wrote:
I don't understand why you wrote what you wrote, it is totally out of my question.
Andyroo wrote: This shows that the ports the monitor are expected to have the relevant service.
you are wrong... after some testing I found out just this command need to be added to rc.local and uptimerobot can detect it:

Code: Select all

netcat -lk [port] &

Re: Raspberry Pi port monitor from uptimerobot

Posted: Wed Jun 12, 2019 10:42 pm
by Andyroo
Do you want to tell their tech support? :lol:

Re: Raspberry Pi port monitor from uptimerobot

Posted: Fri Jun 14, 2019 2:28 pm
by PeterK2
Andyroo wrote:
Wed Jun 12, 2019 10:42 pm
Do you want to tell their tech support? :lol:
actually, I'm waiting for answer from their tech support for 5 days BUT, hey they are great - web site looks nice and it's dynamic, they have almost perfect App for smartphones and with 50 x 5min free monitors per account... As I read their blog this start as community project and I like it :)
Who cares tech support need a week to answer :D