################################################################################ #### Configuration Section ################################################################################ # Title for the status page MY_STATUS_TITLE="Status Page" # Link for the homepage button MY_HOMEPAGE_URL="https://github.com/Cyclenerd/static_status" # Text for the homepage button MY_HOMEPAGE_TITLE="Homepage" # Auto refresh interval in seconds 0 is no refresh MY_AUTOREFRESH="0" # Shortcut to place the configuration file in a folder. # Save it without / at the end. MY_STATUS_CONFIG_DIR="$HOME/status" # List with the configuration. What do we want to monitor? MY_HOSTNAME_FILE="$MY_STATUS_CONFIG_DIR/status_hostname_list.txt" # Where should the HTML status page be stored? MY_STATUS_HTML="$HOME/status_index.html" # Where should the SVG status icon be stored? MY_STATUS_ICON="$HOME/status.svg" # Icon colors MY_STATUS_ICON_COLOR_SUCCESS="lime" MY_STATUS_ICON_COLOR_WARNING="orange" MY_STATUS_ICON_COLOR_DANGER="red" # Where should the JSON status page be stored? Set to "" to disable JSON output MY_STATUS_JSON="$HOME/status.json" # Text file in which you can place a status message. # If the file exists and has a content, all errors on the status page are overwritten. MY_MAINTENANCE_TEXT_FILE="$MY_STATUS_CONFIG_DIR/status_maintenance_text.txt" # Duration we wait for response (nc, curl and traceroute). MY_TIMEOUT="2" # Duration we wait for response (only ping). MY_PING_TIMEOUT="4" MY_PING_COUNT="2" # Duration we wait for response (only script). MY_SCRIPT_TIMEOUT="20" # Route to host MY_TRACEROUTE_HOST="1.1.1.1" # Cloudflare DNS # Sets the number of probe packets per hop MY_TRACEROUTE_NQUERIES="1" # Location for the status files. Please do not edit created files. MY_HOSTNAME_STATUS_OK="$MY_STATUS_CONFIG_DIR/status_hostname_ok.txt" MY_HOSTNAME_STATUS_DOWN="$MY_STATUS_CONFIG_DIR/status_hostname_down.txt" MY_HOSTNAME_STATUS_LASTRUN="$MY_STATUS_CONFIG_DIR/status_hostname_last.txt" MY_HOSTNAME_STATUS_DEGRADE="$MY_STATUS_CONFIG_DIR/status_hostname_degrade.txt" MY_HOSTNAME_STATUS_LASTRUN_DEGRADE="$MY_STATUS_CONFIG_DIR/status_hostname_last_degrade.txt" MY_HOSTNAME_STATUS_HISTORY="$MY_STATUS_CONFIG_DIR/status_hostname_history.txt" MY_HOSTNAME_STATUS_HISTORY_TEMP_SORT="/tmp/status_hostname_history_sort.txt" # Minimum downtime in seconds to display in past incidents MY_MIN_DOWN_TIME="60" # CSS Stylesheet for the status page MY_STATUS_STYLESHEET="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" # FontAwesome for the status page MY_STATUS_FONTAWESOME="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" # A footer MY_STATUS_FOOTER='Powered by static_status' # Lock file to prevent duplicate execution. # If this file exists, status.sh script is terminated. # If something has gone wrong and the file has not been deleted automatically, you can delete it. MY_STATUS_LOCKFILE="/tmp/STATUS_SH_IS_RUNNING.lock" # Hook to call when a hostname status changes # The hook script must be executable and receives three arguments: # 1. New status, either up, down or degraded # 2. Command used # 3. Hostname MY_HOOK_STATUS="" # Date format for the web page. # UTC (`-u`) is the default. # Example: 2021-12-23 12:34:55 UTC # More details can be found in `man date`. # Avoid semicolons. MY_DATE_TIME=$(date -u "+%Y-%m-%d %H:%M:%S %Z") # Tip: You can tweak curl parameters via .curlrc config file. # The default curl config file is checked for in the following places in this order: # 1. "$CURL_HOME/.curlrc" # 2. "$HOME/.curlrc" # # ~~~ Example .curlrc file ~~~ # # this is a comment # # change the useragent string # -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0" # # ok if certification validation fails # --insecure # ~~~ End of example file ~~~