In order to add alarm functions to the ganglia monitoring data, a timed job was added to Jenkins to run the alarm script. The script needs to analyze the data of the ganglia record, the following is a superficial understanding.
The essence of RRDtool is used for drawing, so when I run RRDtool fetch/var/lib/ganglia/rrds/myapp/__summaryinfo__/mycount.rrd average, the results come out
1454465040:1.7000000000e+01 3.0000000000e+001454465055:1.7000000000e+01 3.0000000000e+001454465070:1.7666666667e+01 3.0000000000e+001454465085:1.7400000000e+01 3.0000000000e+001454465100:1.4333333333e+01 3.0000000000e+001454465115:1.9066666667e+01 3.0000000000e+001454465130:2.1466666667e+01 3.0000000000e+001454465145:1.7866666667e+01 3.0000000000e+001454465160:1.3600000000e+01 3.0000000000e+001454465175:2.0400000000e+01 3.0000000000e+001454465190:2.4400000000e+01 3.0000000000e+001454465205:3.9600000000e+01 3.0000000000e+001454465220:4.0800000000e+01 3.0000000000e+001454465235:4.7200000000e+01 3.0000000000e+001454465250:2.7000000000e+01 3.0000000000e+001454465265:-nan-nan
Represents the point on the graph, that is, every 15 second step, draw a point with a value of 20
Well, when it runs RRDtool fetch/var/lib/ganglia/rrds/myapp/__summaryinfo__/mycount.rrd average-r 60 o'clock, which means 60 seconds of data is counted, This is called aggregation. The aggregation degree has only a few fixed values, so the R parameter is not necessarily the aggregation degree, but depends on how many seconds the resulting step is displayed. I can count the data for a certain amount of time by multiplying the average by the frequency of the escalation.
Ganglia notes: RRD database