Customize configuration files
Before you can use Grafana and Prometheus you have to configure in the Prometheus configuration how to reach the SwyxWare Core HealthMonitor.
The directory "Monitoring" is part of the SwyxWare Core HealthMonitor file package.
1 Copy the contents of the "Monitoring" directory to the Linux VM where you have set up Docker.
2 Open "Monitoring/prometheus/prometheus.yml" in a text editor and search for the "SwyxWare Job":
 
# Swyx.Core.HealthMonitor
- job_name: "SwyxWare"
static_configs:
- targets:
- <swyxware ip>:5000
 
3 Replace <swyxware ip> with the IP address of the SwyxServer.
4 If you have configured the HealthMonitor on a port other than 5000, adjust it accordingly.
5 If you want to monitor multiple SwyxWare systems, add each in a separate line below "targets".
Example:
# Swyx.Core.HealthMonitor
- job_name: "SwyxWare"
static_configs:
- targets:
- 10.0.0.1:5000
- 10.0.0.2:5000
 
6 If you want to monitor Windows performance counters and therefore install "sonar-perfmon" (see below), remove the comment characters of the "sonar" job and enter the IP address and the "sonar-perfmon" port of the SwyxWare system there as well:
 
# sonar-perfmon windows performance counter
- job_name: sonar
static_configs:
- targets:
- 10.0.0.1:5001
 
7 Save the file.
The supplied configuration sets Port 3000 for Grafana. If you want to use a different port, change "docker-compose.yml" as follows:
8 Open "Monitoring/docker-compose.yml" with a text editor.
9 For example, to set the port to 8080, change the port configuration for the Grafana service from
 
- "3000:3000"
to
- "8080:3000"
 
10 In the default state of the docker-compose.yml file, the Prometheus service is configured to be accessible only from the Grafana Container, not from the host and not from other systems.
11 If you want to access the Prometheus web interface e.g. for troubleshooting, add a "Ports:" definition in the file.
Example
ports:
 
- "9090:9090"
 
Last modified date: 01/24/2024