Skip to content

🩺 Install DNS health-check

πŸ“ Overview

Important

The following Section Requires LoadUP-CP and Load Proxy to be installed before Proceed. Ensure that LoadUP-CP is deployed and the User Account API token is recorded from Web Dashboard.

Info

DNS Healthcheck can be deployed on exisiting LoadProxy server or on clean VPS, as long as other EdgeHit DNS can reach the IP of the DNS health-check and could CURL the health-dns.txt hosted on a web instance of DNS Healthcheck

Tip

As DNS Health-check does not Contain Node-Exporter installation as other standalone installation, it is recommended to download it in a Load Proxy instance

DNS healthcheck is a module to pull data from LoadUP-CP and present it in a health-dns.txt. It act as a middleware between EdgeHit DNS and LoadUP as EdgeHit DNS can only understand data format of LoadUP presented by DNS health-check.

Below show the step to Install DNS healthcheck and configure EdgeHit DNS to connect to DNS healthcheck and thus the Healthcheck UUID on LoadUP.



πŸ“¦ Install DNS health-check

  1. Set Environment Variables & Secrets

    • Make sure these variables are set correctly in your environment before proceeding with the installation. You can refer to the command below:
    export REGISTRY_PASSWORD='<SECRET>'
    export health_check_api_url='<domain name of LoadUP-CP>'
    export health_check_api_key='<Admin Account API Token of LoadUP-CP>'
    

    Info

    The HTTP_AUTH_PASS is for defining the PSK of Node-Exporter on LoadUP-Worker and will be randomly generated if not configured. It is optional to define it before installation.

    Configuring it as same value as Load Proxy will ease the process of adding LoadUp-Worker into Prometheus Target, but it will result in LoadUP-Worker metric be placed under tha same job: node , along with Load Proxy instaces


  2. CURL & Run the Installation Script

    bash -c "$(==**`CURL`**== -fsSL https://files.ops2.net/edgehit/prod/health-check/deploy/install.sh)"
    
    • Once the installation is done, installation info and administrative tools will be stored in /usr/local/loadproxy/health-check/ the directory content will be similiar as below:

          health-check/
          β”œβ”€β”€.env
          β”œβ”€β”€install-info.txt
          β”œβ”€β”€compose.yml
          β”œβ”€β”€bin/
          β”‚ β”œβ”€β”€ bash Scripts
          β”‚ └── more bash Scripts 
          β”‚ └── .....
      
    • .env contain secrets and config value

    • install-info.txt contain installation info

    • bin/ directory contain bash script for administative action such as update and backup actions.

You can verify the installation by entering the URL <DNS HealthCheck Domain>:16666/health-dns.txt on your browser. You shoud able to see something similiar as below

Pic

Once the installation of DNS Health-check is done, you can proceed to connect EdgeHit DNS to rDNS health-check.


πŸ› οΈ Edit EdgeHit DNS Env. Variable

  1. Edit the .env file

    • Add the EdgeHit DNS_health_check_url value to the .env file of EdgeHit DNS by running the command below

    cat >> /usr/local/loadproxy/EdgeHit-DNS/.env <<EOF
    EdgeHit DNS_health_check_url=<DNS HealthCheck Domain>:16666/health-dns.txt
    EOF  
    

  2. reload the docker-compose stack

    /usr/local/loadproxy/EdgeHit-DNS/bin/docker-compose.sh down
    /usr/local/loadproxy/EdgeHit-DNS/bin/docker-compose.sh up -d  
    

    Note

    you need to use the /usr/local/loadproxy/EdgeHit-DNS/bin/docker-compose.sh script instead of the native docker-compose binary as some .env value will be loaded from other predefined directroy by the script

Once the installation is done, you can add DNS record in EdgeHit Controller and Create Uptime Tracking Task that corespond to the DNS record.

Then, you will need to bind the Task's UUID to the DNS Record's Healthcheck ID. Details will be discussed in Configure DNS Health Check section.