Deploy Ganglia in container mode
Background: recently, according to the requirements of the company, we need a tool that can monitor the host CPU, memory, network and other resources, thus thinking of Ganglia. Then looked at the deployment mode, it is really big, the installation process is very tedious, and the dependency problem is also more annoying, so there is this article. Don't talk too much nonsense, just do it!
Step 1: search for available images
Docker search ganglia
Here we will choose the one with the most star.
Step 2: deploy the container
Pull the image directly (personal test is available) and run it directly.
Docker run-d-name ganglia-p 2080 wookietreiber/ganglia:latest
Note that port 80 is mapped out here (because my native 80 is occupied, so I use 2080) to facilitate external access to the web page. See the effect:
It has been successfully run!
Step 3: install the Gmond component of Ganglia on the machine to be monitored, which is responsible for collecting data
Yum install epel-release / / install source yum-y install ganglia-gmond / / install gmond
After the installation is complete, modify the configuration file, then set it to boot and start the service.
Vi / etc/ganglia/gmond.conf here mainly modify the name, change to what you like, the rest of the configuration can be defaulted!
Systemctl enable gmond.service / / set boot to start systemctl start gmond.service / / start gmond service
Step 4: enter the docker container, then modify the container's gmetad.conf file and add the data source, that is, the host you need to monitor
Vi / etc/ganglia/gmetad.conf
The port is 8649 by default, save after modification, and restart the container!
Step 5: get it done!