How to monitor pod server

I am running a pod under
To ensure a good uptime, I would like to monitor the server with Webmin, so the server restarts or send me an email when the server is down.
I need the terminal command to get the server status. Any suggestions how I can config this?

How about just grabbing splash page and parse it for text?

I use the following for monitoring. Curl loads the front page and looks for a string typically found when Diaspora is online. If server is not found or doesn’t find the text, error recovery is performed.

if curl -s | grep "online social world"
    # actions to perform if pod is working
    echo "all is fine"
    # actions to perform if expected string is not found
    echo "Error"

Thanks Spc Cw for your suggestion.
I used your hint to grep the online status in systemctl status diaspora-web.service.
In the end it appears that I just needed to put in the active process name ‘unicorn’ in the Webmin monitor configuration.
Sometimes (or maybe most of the time) things are not as complicated as they look like!

Yep, there are lots of ways to check in this way.

I prefer to monitor my online projects with the way I described because presence of certain process running doesn’t always mean it works as intended. Perhaps it returns some error page or none :slight_smile:

It never happened for me with Diaspora though so maybe your method is just as fine.