Answer the question
In order to leave comments, you need to log in
Tracking the state of a web server on Linux?
You need to monitor the web server for 502, 504 and other errors, say once a minute with email notification. Are there any standard Debian packages for this purpose?
Answer the question
In order to leave comments, you need to log in
write a shell script with curl and sendmail in an infinite loop
the console curl has an option
suitable for getting the HTTP response code
-w/--write-out <format>
Defines what to display on stdout after a completed and successful operation. The format is a string that may contain plain text mixed with any number of variables. The string can be specified as "string", to get read from a particular file you specify it "@filename" and to tell curl to read the format from stdin you write "@-".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question