Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to check if my website returns HTTP 200

I'm running NEMS version 1.5 build 8 on a Raspberry Pi3b+ to monitor a few websites. I am checking if the server is UP and if the Let's Encrypt certificates are renewed in time. I did the configuration of NEMS according the following document: https://magazine.odroid.com/article/intr...ems-linux/ and this works fantastic. 

The only thing i do not know how t implement a check if the website returns HTTP 200 status so to be sure that the website is running fine.

When i check on the command line with http_check, the host returns a HTTP 301.
When i add -f follow on the command line, the website returns HTTP 200 if okay and HTTP 500 when i crash the website Wink

It would be great if someone could help me with some hints and tips how to use the status from the website itself.

Any help would be appriciated.
I created a second Advanced Service based on check_http with the parameter '-f sticky' for the hostgroup.
Works great at least for me ;)
Forum Jump:

Users browsing this thread: 1 Guest(s)