⛑️ Prometheus Configuration
📝 Overview
After installing the Prometheus Server, you can view the install-info.txt to find the Grafana and Prometheus Server URL , and thier default admin Credential.
By default, the installation via script generated on EdgeHit Controller will automatically add the CP as a target of the Prometheus Server. You need to use the bash script in the machine to add Load Proxy node as target of the prometheus server
Below are several important file to take note in Prometheus Server
-
/usr/local/edgehit/prometheus/install-info.txtto find Grafana Dashboard URL and Default Admin Credential -
/usr/local/edgehit/prometheus/bin/edge-target.shto add Load Proxy as Scraping Target to the Prometheus server
Note
Node-Exporter are installed to EdgeHit Controller and Load Proxy with PSK Authentication using HTTP AUTH.
🔧 Add Load Proxy as Target
All action are performed by a bash script named edge-targets.sh at /usr/local/edgehit/prometheus/bin/edge-targets.sh the usage of the script is shown below:
| Command | Argument | Description |
|---|---|---|
add |
IP or domain | Add a Load Proxy as target into Prometheus config. |
remove |
IP or domain | Remove a Load Proxy target from Prometheus config. |
list |
(none) | List all target of Prometheus config. |
help |
(none) | Display help message. |
Note
The Script above reads EDGE_HTTP_AUTH_PASS value from the .env file of Prometheus Server. Make sure that this corespond to the same value in the Load Proxy Instance.
✂️ Add LoadUP as Target
Note
If you defined EDGE_HTTP_AUTH_PASS value in LoadUP-CP and LoadUP-Worker to be same as Load Proxy, you can use the above step to configure LoadUP as Target. Else, you need to follow the step below to add Prometheus Target
You need to manually configure the Promotheus.yml since the EDGE_HTTP_AUTH_PASS in LoadUP-CP and LoadUP-Worker is not defined in Prometheus Server.
The Prometheus Process is running on a docker image with config file mounted to /usr/local/edgehit/prometheus/storage/conf/prometheus/. Thus you can edit the file directly on Prometheus server
-
note down the value of
LOADUP_HTTP_AUTH_PASSin LoadUP-CP andloadup_worker_http_auth_passin LoadUP-Worker. You can refer to the command below:
-
On the prometheus Server, edit the file
/usr/local/edgehit/prometheus/storage/conf/prometheus/prometheus.ymland add following under the sectionscrape_configsOn prometheus.yml- job_name: LoadUP-CP scheme: https basic_auth: username: 'admin' password: '<LOADUP_HTTP_AUTH_PASS>' tls_config: insecure_skip_verify: true static_configs: - targets: - '<LoadUP-CP Domain>:9200/metrics' - job_name: LoadUP-Worker scheme: https basic_auth: username: 'admin' password: '<Loadup_worker_http_auth_pass>' tls_config: insecure_skip_verify: true static_configs: - targets: - '<LoadUP-Worker Domain>:9200/metrics'Note
You can also define the same key for both CP and Worker by editing the .env value and Restart the docker-compose stack, so you can define both under same job and it will be tidier.
🔨 Add Dashboard to Grafana
The grafana server is installed without any dashboard, So you can choose dashboard based on own preference. Below shows an example on how to configure grafana
- Login to the web console using default credential in
install-info.txt
- Navigate to
Home > Dashboardsection on the side panel
- Click on New dashboard

- Define you own dashboard or import the
node exporter-fullinstance using the ID1860. For more info, refer to Grafana Dashboards
-
Once the dashboard is added, you can view it at the Dashboard Section.
- There are 3 jobs which coresponds to the Node-Exporter metric from EdgeHit Controller , Load Proxy, Or the Prometheus Server. ( node coresponds to the Load Proxy nodes)
- There are 1 nodename under each job except the
nodejob which will show nodename that is added viaedge-targets.shscript.
Same output for job
edgesuiiteandprometheus-nodeif EdgeHit Controller and Prometheus Server is on same node, the two job actually output metric for the same server. As the the exporter itself is build into docker-image for each installation script.