Simple HTTP Status Monitor Using Curl
Using some output redirection and the --write-out parameter we can produce a script that simply outputs the status code of a curl request.
This script can then be used as the basis for a simple monitoring of a URL.
#! /bin/bash # Description: Returns the HTTP response code obtained by curl on the URL using the specified HTTP method # Usage: script.sh GET https://example.org # Usage: scripts.sh POST https://example.org # Author: marco@kamner.
[Read More]