added chrony information on the dashboard; lowered update frequency to 5 seconds
Costa Tsaousis (ktsaou) committed
Sep 13, 2017 at 22:38 UTC
5d588957122c3eede32631ed477dfd4d3a6d86a1
4 files changed
+78
-29
conf.d/python.d/chrony.conf
+1
-1
@@ -20,7 +20,7 @@
20
21
# update_every sets the default data collection frequency.
22
# If unset, the python.d.plugin default is used.
23
-update_every: 1
23
+update_every: 5
24
25
# priority controls the order of charts at the netdata dashboard.
26
# Lower numbers move the charts towards the top of the page.
python.d/chrony.chart.py
+24
-27
@@ -10,8 +10,7 @@ priority = 60000
10
retries = 10
11
12
# charts order (can be overridden if you want less charts, or different order)
13
-ORDER = ['timediff', 'lastoffset', 'rmsoffset', 'rootdelay',
14
- 'rootdispersion', 'skew', 'frequency', 'residualfreq']
13
+ORDER = ['system', 'offsets', 'stratum', 'root', 'frequency', 'residualfreq', 'skew']
14
15
CHARTS = {
16
# id: {
@@ -19,45 +18,42 @@ CHARTS = {
18
# 'lines': [
19
# [unique_dimension_name, name, algorithm, multiplier, divisor]
20
# ]}
22
- 'timediff': {
23
- 'options': [None, "Difference system time to NTP", "us", 'chrony', 'chrony.timediff', 'line'],
21
+ 'system': {
22
+ 'options': [None, "Chrony System Time Deltas", "microseconds", 'system', 'chrony.system', 'area'],
23
'lines': [
25
- ['timediff', None, 'absolute', 1, 1000]
24
+ ['timediff', 'system time', 'absolute', 1, 1000]
25
]},
27
- 'lastoffset': {
28
- 'options': [None, "Last offset", "us", 'chrony', 'chrony.lastoffset', 'line'],
26
+ 'offsets': {
27
+ 'options': [None, "Chrony System Time Offsets", "microseconds", 'system', 'chrony.offsets', 'area'],
28
'lines': [
30
- ['lastoffset', None, 'absolute', 1, 1000]
29
+ ['lastoffset', 'last offset', 'absolute', 1, 1000],
30
+ ['rmsoffset', 'RMS offset', 'absolute', 1, 1000]
31
]},
32
- 'rmsoffset': {
33
- 'options': [None, "RMS offset", "us", 'chrony', 'chrony.rmsoffset', 'line'],
32
+ 'stratum': {
33
+ 'options': [None, "Chrony Stratum", "stratum", 'root', 'chrony.stratum', 'line'],
34
'lines': [
35
- ['rmsoffset', None, 'absolute', 1, 1000]
35
+ ['stratum', None, 'absolute', 1, 1]
36
]},
37
- 'rootdelay': {
38
- 'options': [None, "Root delay", "us", 'chrony', 'chrony.rootdelay', 'line'],
37
+ 'root': {
38
+ 'options': [None, "Chrony Root Delays", "milliseconds", 'root', 'chrony.root', 'line'],
39
'lines': [
40
- ['rootdelay', None, 'absolute', 1, 1000]
41
- ]},
42
- 'rootdispersion': {
43
- 'options': [None, "Root dispersion", "us", 'chrony', 'chrony.rootdispersion', 'line'],
44
- 'lines': [
45
- ['rootdispersion', None, 'absolute', 1, 1000]
46
- ]},
47
- 'skew': {
48
- 'options': [None, "Skew, error bound on frequency", "ppm", 'chrony', 'chrony.skew', 'line'],
49
- 'lines': [
50
- ['skew', None, 'absolute', 1, 1000]
40
+ ['rootdelay', 'delay', 'absolute', 1, 1000000],
41
+ ['rootdispersion', 'dispersion', 'absolute', 1, 1000000]
42
]},
43
'frequency': {
53
- 'options': [None, "Frequency", "ppm", 'chrony', 'chrony.frequency', 'line'],
44
+ 'options': [None, "Chrony Frequency", "ppm", 'frequencies', 'chrony.frequency', 'area'],
45
'lines': [
46
['frequency', None, 'absolute', 1, 1000]
47
]},
48
'residualfreq': {
58
- 'options': [None, "Residual frequency", "ppm", 'chrony', 'chrony.residualfreq', 'line'],
49
+ 'options': [None, "Chrony Residual frequency", "ppm", 'frequencies', 'chrony.residualfreq', 'area'],
50
'lines': [
60
- ['residualfreq', None, 'absolute', 1, 1000]
51
+ ['residualfreq', 'residual frequency', 'absolute', 1, 1000]
52
+ ]},
53
+ 'skew': {
54
+ 'options': [None, "Chrony Skew, error bound on frequency", "ppm", 'frequencies', 'chrony.skew', 'area'],
55
+ 'lines': [
56
+ ['skew', None, 'absolute', 1, 1000]
57
]}
58
}
59
@@ -68,6 +64,7 @@ CHRONY = [('Frequency', 'frequency', 1e3),
64
('Root delay', 'rootdelay', 1e9),
65
('Root dispersion', 'rootdispersion', 1e9),
66
('Skew', 'skew', 1e3),
67
+ ('Stratum', 'stratum', 1),
68
('System time', 'timediff', 1e9)]
69
70
web/dashboard_info.js
+44
@@ -307,6 +307,11 @@ netdataDashboard.menu = {
307
title: 'Go - expvars',
308
icon: '<i class="fa fa-eye" aria-hidden="true"></i>',
309
info: 'Statistics about running Go applications exposed by the <a href="https://golang.org/pkg/expvar/" target="_blank">expvar package</a>.'
310
+ },
311
+
312
+ 'chrony': {
313
+ icon: '<i class="fa fa-clock-o" aria-hidden="true"></i>',
314
+ info: 'chronyd parameters about the system’s clock performance.'
315
}
316
};
317
@@ -1491,4 +1496,43 @@ netdataDashboard.context = {
1496
valueRange: "[0, null]"
1497
},
1498
1499
+ // ------------------------------------------------------------------------
1500
+
1501
+ 'chrony.system': {
1502
+ info: 'In normal operation, chronyd never steps the system clock, because any jump in the timescale can have adverse consequences for certain application programs. Instead, any error in the system clock is corrected by slightly speeding up or slowing down the system clock until the error has been removed, and then returning to the system clock’s normal speed. A consequence of this is that there will be a period when the system clock (as read by other programs using the <code>gettimeofday()</code> system call, or by the <code>date</code> command in the shell) will be different from chronyd\'s estimate of the current true time (which it reports to NTP clients when it is operating in server mode). The value reported on this line is the difference due to this effect.',
1503
+ colors: NETDATA.colors[3]
1504
+ },
1505
+
1506
+ 'chrony.offsets': {
1507
+ info: '<code>last offset</code> is the estimated local offset on the last clock update. <code>RMS offset</code> is a long-term average of the offset value.',
1508
+ height: 0.5
1509
+ },
1510
+
1511
+ 'chrony.stratum': {
1512
+ info: 'The <code>stratum</code> indicates how many hops away from a computer with an attached reference clock we are. Such a computer is a stratum-1 computer.',
1513
+ decimalDigits: 0,
1514
+ height: 0.5
1515
+ },
1516
+
1517
+ 'chrony.root': {
1518
+ info: 'Estimated delays against the root time server this system is synchronized with. <code>delay</code> is the total of the network path delays to the stratum-1 computer from which the computer is ultimately synchronised. <code>dispersion</code> is the total dispersion accumulated through all the computers back to the stratum-1 computer from which the computer is ultimately synchronised. Dispersion is due to system clock resolution, statistical measurement variations etc.'
1519
+ },
1520
+
1521
+ 'chrony.frequency': {
1522
+ info: 'The <code>frequency</code> is the rate by which the system\'s clock would be would be wrong if chronyd was not correcting it. It is expressed in ppm (parts per million). For example, a value of 1ppm would mean that when the system\'s clock thinks it has advanced 1 second, it has actually advanced by 1.000001 seconds relative to true time.',
1523
+ colors: NETDATA.colors[0]
1524
+ },
1525
+
1526
+ 'chrony.residualfreq': {
1527
+ info: 'This shows the <code>residual frequency</code> for the currently selected reference source. It reflects any difference between what the measurements from the reference source indicate the frequency should be and the frequency currently being used.' +
1528
+ 'The reason this is not always zero is that a smoothing procedure is applied to the frequency. Each time a measurement from the reference source is obtained and a new residual frequency computed, the estimated accuracy of this residual is compared with the estimated accuracy (see <code>skew</code>) of the existing frequency value. A weighted average is computed for the new frequency, with weights depending on these accuracies. If the measurements from the reference source follow a consistent trend, the residual will be driven to zero over time.',
1529
+ height: 0.5,
1530
+ colors: NETDATA.colors[3]
1531
+ },
1532
+
1533
+ 'chrony.skew': {
1534
+ info: 'The estimated error bound on the frequency.',
1535
+ height: 0.5,
1536
+ colors: NETDATA.colors[5]
1537
+ }
1538
};
web/index.html
+9
-1
@@ -1182,6 +1182,13 @@
1182
return def * this.context[id].height;
1183
else
1184
return def;
1185
+ },
1186
+
1187
+ contextDecimalDigits: function(id, def) {
1188
+ if(typeof this.context[id] !== 'undefined' && typeof this.context[id].decimalDigits !== 'undefined')
1189
+ return this.context[id].decimalDigits;
1190
+ else
1191
+ return def;
1192
}
1193
};
1194
@@ -1514,6 +1521,7 @@
1521
+ ' data-after="-' + duration.toString() + '"'
1522
+ ' data-id="' + NETDATA.name2id(options.hostname + '/' + chart.id) + '"'
1523
+ ' data-colors="' + netdataDashboard.anyAttribute(netdataDashboard.context, 'colors', chart.context, '') + '"'
1524
+ + ' data-decimal-digits="' + netdataDashboard.contextDecimalDigits(chart.context, -1) + '"'
1525
+ chartCommonMin(chart.family, chart.context, chart.units)
1526
+ chartCommonMax(chart.family, chart.context, chart.units)
1527
+ ' role="application"></div>';
@@ -2961,7 +2969,7 @@
2969
});
2970
2971
NETDATA.requiredJs.push({
2964
- url: NETDATA.serverDefault + 'dashboard_info.js?v20170731-8',
2972
+ url: NETDATA.serverDefault + 'dashboard_info.js?v20170913-9',
2973
async: false,
2974
isAlreadyLoaded: function() { return false; }
2975
});