Server Configuration (gmetad
)
Ganglia’s metadata monitor gmetad
can be installed in the master node by executing:
yum install ganglia-gmetad
After the installation is complete, edit the configuration file in /etc/ganglia/gmetad.conf
:
# data_source "my cluster" [polling interval (seconds)] address1:port [address2 ]
data_source "Master 7" 1 localhost 192.168.16.1 127.0.0.1
The polling interval is given in seconds. In this example, gmetad
will try to pull information from the nodes every second. If the pull is successful, a single data point (SDP) will be stored to be consolidated in the RRA (Round-Robin Archives). To define the RRAs use:
# RRA:CF:xff:steps:rows (24h at 1s res. 2 weeks at 1min res)
RRAs "RRA:AVERAGE:0.5:1:86400" "RRA:AVERAGE:0.5:60:20160"
In this declaration RRA:CF:xff:steps:rows
:
steps
are the number of SDP used to create one consolidated data point (CDP). It is also known as the resolution of the RRA. In our two RRAs, one and 60 SDP respectively.
xff
(the x files factor) refers to the minimum of valid SDP required to write a valid CDP. It can be set from 0 (0%) to 1 (100%). In this example, 0.5 (50%) means that for the second RRA, at least 30 SDP are required to create one CDP.
CF
(the consolidation function) is used to create the CDPs. It can be set toAVERAGE
,MIN
,MAX
orLAST
. In our case,AVERAGE
.
rows
are the amount of CDPs the RRA can hold. In this example, 86400 one second CDPs for a total of 24 hours, and 20160 CDPs consolidated every 60 times the polling interval (one minute) for a total of two weeks.
Additional variables to be set:
setuid_username ganglia
case_sensitive_hostnames 0
Once the configuration is done, enable and start the gmetad
service:
[root@master ~]# systemctl enable gmetad
[root@master ~]# systemctl start gmetad
Note
A polling interval of one second is extreme and can affect the network in the cluster. It was chosen to show the short-term results of the demonstration. A 60-second polling interval can be a good start point in production systems.
Task
Calculate the resolution and capacity (in time) for the following RRAs: RRAs "RRA:AVERAGE:0.5:1:5856"
"RRA:AVERAGE:0.5:4:20160"
"RRA:AVERAGE:0.5:40:52704"
"RRA:AVERAGE:0.5:1440:14600"
for a polling interval of 60.