Monitoring external website

CheckMK RAW 2.0.0p29
Ubuntu 20.04

Good morning CheckMK community,

I’m trying to monitoring our NGINX reverse web proxy that lives within our DMZ, one idea I had was to use a custom script that would check if the HTTP status always comes back with ‘200’, but wanted to see how others handled this?

Since it lives in our DMZ, I think monitoring the traditional method may be limited as I don’t want to open our firewall up just for this purpose, but believe using a custom script may be the best course of action.

For reference, this was the script I used in Nagios and was thinking of applying to my CheckMK server:

#!/bin/bash
result=curl -Is $1 (<--website external URL) | grep HTTP | cut -d ' ' -f2
if [ $result = 200 ]; then
echo “OK”
exit 0
else
echo “bad”
exit 4
fi :q

Any help is always greatly appreciated!

Br,

Justin

The question is more what do you actually want to monitor? Your Proxy? Your Website? Do you want to know if the actual Website is up and/or if the Website is accessible for your external customers?

For this task you can simply use check_http or check_curl. If you want the queries to be a bit more sophisticated, Robotmk would be something that could to the Job (End-to-End-Monitoring mit Checkmk – Robotmk konfigurieren | Checkmk).

1 Like

In my case regarding monitoring an external Linux host (VPS):

  • Agent is available via SSH /key-based auth, limited in what it can /allowed to run.
  • Webserver up ( available from) is done via a HTTP-check , where i retrieve the root

This is done as probing for the (webserver)-process only verifies that its running, but it does not guarantee access to the delivered content.

This is why i (next to checking if a httpd/nginx process is running) i also added the checks for HTTP(s)

  • Glowsome
1 Like

Thank you for the quick reply @LaSoe - I mainly want to monitor that the website is up and running for our external customers.

Also, appreciate you pointing me in the right direction, it sounds like the ‘check_http’ or ‘check_curl’ is definitely the route I want to go as I was only tasked with seeing if the website was up and running and coming back with an HTTP response 200.

Hmm, definitely going to read up tonight on that end-to-end monitoring, seems very interesting going down the yaml file route with variables as that may come in handy, thanks again for this!

Thank you for the helpful feedback, it’s greatly appreciated!

To be honest, this request put in by one of our Backend Systems folks was only to monitor if the website was up and running, but definitely saving this configuration setup in my back pocket. :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.