cAdvisor monitors the dockerised endpoints information such as CPU, memory usage, filesystem, and network statistics.
Perform the following steps on the OES server (UMC or CIS):
Download the cAdvisor docker image from the docker hub.
docker pull google/cadvisor
Run the script to configure cAdvisor service. See, cadvisor.sh.
cadvisor.sh
cAdvisor metrics is available on port 8080 to view individual server metrics.
After the installation of the cAdvisor on a target, update the static Prometheus server configuration and restart the Prometheus service.
On the Prometheus (Monitoring) server edit the Prometheus configuration file.
/etc/prometheus/exporter-config.yml.
Update the IP address and port details of the cAdvisor in the targets section (highlighted in the example below).
global:
scrape_interval: 15s
scrape_configs:
- job_name: Docker Servers
static_configs:
- targets: ['localhost:8080'. '<cadvisor installed server>:8080']
- job_name: OES Servers
static_configs:
- targets: ['localhost:9100','oesnode01:9100','oesnode02:9100']
Restart the service after the configuration file is updated.
systemctl daemon-reload systemctl restart prometheus.service