fixes identified by LGTM (#4209)
* fixes identified by LGTM * popen fixes about STDIN_FILENO * minor C code fixes identified by LGTM * commented unused variable
Costa Tsaousis committed
Sep 17, 2018 at 04:06 UTC
b9fff3b7b5f2dc1f3aab11bd47e460ce54da755f
10 files changed
+257
-229
src/apps_plugin.c
+9
-9
@@ -345,11 +345,11 @@ struct pid_stat {
345
int fds_size; // the size of the fds array
346
347
int children_count; // number of processes directly referencing this
348
- char keep:1; // 1 when we need to keep this process in memory even after it exited
348
+ unsigned char keep:1; // 1 when we need to keep this process in memory even after it exited
349
int keeploops; // increases by 1 every time keep is 1 and updated 0
350
- char updated:1; // 1 when the process is currently running
351
- char merged:1; // 1 when it has been merged to its parent
352
- char read:1; // 1 when we have already read this process for this iteration
350
+ unsigned char updated:1; // 1 when the process is currently running
351
+ unsigned char merged:1; // 1 when it has been merged to its parent
352
+ unsigned char read:1; // 1 when we have already read this process for this iteration
353
354
int sortlist; // higher numbers = top on the process tree
355
// each process gets a unique number
@@ -2856,7 +2856,7 @@ static void normalize_utilization(struct target *root) {
2856
// here we try to eliminate them by disabling childs processing either for specific dimensions
2857
// or entirely. Of course, either way, we disable it just a single iteration.
2858
2859
- kernel_uint_t max_time = processors * hz * RATES_DETAIL;
2859
+ kernel_uint_t max_time = processors * system_hz * RATES_DETAIL;
2860
kernel_uint_t utime = 0, cutime = 0, stime = 0, cstime = 0, gtime = 0, cgtime = 0, minflt = 0, cminflt = 0, majflt = 0, cmajflt = 0;
2861
2862
if(global_utime > max_time) global_utime = max_time;
@@ -3163,7 +3163,7 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type
3163
fprintf(stdout, "CHART %s.cpu '' '%s CPU Time (%d%% = %d core%s)' 'cpu time %%' cpu %s.cpu stacked 20001 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every);
3164
for (w = root; w ; w = w->next) {
3165
if(unlikely(w->exposed))
3166
- fprintf(stdout, "DIMENSION %s '' absolute 1 %llu %s\n", w->name, hz * RATES_DETAIL / 100, w->hidden ? "hidden" : "");
3166
+ fprintf(stdout, "DIMENSION %s '' absolute 1 %llu %s\n", w->name, system_hz * RATES_DETAIL / 100, w->hidden ? "hidden" : "");
3167
}
3168
3169
fprintf(stdout, "CHART %s.mem '' '%s Real Memory (w/o shared)' 'MB' mem %s.mem stacked 20003 %d\n", type, title, type, update_every);
@@ -3193,20 +3193,20 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type
3193
fprintf(stdout, "CHART %s.cpu_user '' '%s CPU User Time (%d%% = %d core%s)' 'cpu time %%' cpu %s.cpu_user stacked 20020 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every);
3194
for (w = root; w ; w = w->next) {
3195
if(unlikely(w->exposed))
3196
- fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, hz * RATES_DETAIL / 100LLU);
3196
+ fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, system_hz * RATES_DETAIL / 100LLU);
3197
}
3198
3199
fprintf(stdout, "CHART %s.cpu_system '' '%s CPU System Time (%d%% = %d core%s)' 'cpu time %%' cpu %s.cpu_system stacked 20021 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every);
3200
for (w = root; w ; w = w->next) {
3201
if(unlikely(w->exposed))
3202
- fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, hz * RATES_DETAIL / 100LLU);
3202
+ fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, system_hz * RATES_DETAIL / 100LLU);
3203
}
3204
3205
if(show_guest_time) {
3206
fprintf(stdout, "CHART %s.cpu_guest '' '%s CPU Guest Time (%d%% = %d core%s)' 'cpu time %%' cpu %s.cpu_system stacked 20022 %d\n", type, title, (processors * 100), processors, (processors > 1) ? "s" : "", type, update_every);
3207
for (w = root; w; w = w->next) {
3208
if(unlikely(w->exposed))
3209
- fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, hz * RATES_DETAIL / 100LLU);
3209
+ fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, system_hz * RATES_DETAIL / 100LLU);
3210
}
3211
}
3212
src/common.c
+2
-2
@@ -1291,7 +1291,7 @@ pid_t get_system_pid_max(void) {
1291
#endif /* __APPLE__, __FreeBSD__ */
1292
}
1293
1294
-unsigned int hz;
1294
+unsigned int system_hz;
1295
void get_system_HZ(void) {
1296
long ticks;
1297
@@ -1299,7 +1299,7 @@ void get_system_HZ(void) {
1299
error("Cannot get system clock ticks");
1300
}
1301
1302
- hz = (unsigned int) ticks;
1302
+ system_hz = (unsigned int) ticks;
1303
}
1304
1305
/*
src/common.h
+1
-1
@@ -400,7 +400,7 @@ extern pid_t pid_max;
400
extern pid_t get_system_pid_max(void);
401
402
/* Number of ticks per second */
403
-extern unsigned int hz;
403
+extern unsigned int system_hz;
404
extern void get_system_HZ(void);
405
406
extern int recursively_delete_dir(const char *path, const char *reason);
src/popen.c
+2
-2
@@ -68,7 +68,7 @@ FILE *mypopen(const char *command, volatile pid_t *pidptr)
68
69
// close all files
70
int i;
71
- for(i = (int) (sysconf(_SC_OPEN_MAX) - 1); i > 0; i--)
71
+ for(i = (int) (sysconf(_SC_OPEN_MAX) - 1); i >= 0; i--)
72
if(i != STDIN_FILENO && i != STDERR_FILENO && i != pipefd[PIPE_WRITE]) close(i);
73
74
// move the pipe to stdout
@@ -137,7 +137,7 @@ FILE *mypopene(const char *command, volatile pid_t *pidptr, char **env) {
137
138
// close all files
139
int i;
140
- for(i = (int) (sysconf(_SC_OPEN_MAX) - 1); i > 0; i--)
140
+ for(i = (int) (sysconf(_SC_OPEN_MAX) - 1); i >= 0; i--)
141
if(i != STDIN_FILENO && i != STDERR_FILENO && i != pipefd[PIPE_WRITE]) close(i);
142
143
// move the pipe to stdout
src/proc_stat.c
+1
-1
@@ -2,7 +2,7 @@
2
#include "common.h"
3
4
struct per_core_single_number_file {
5
- char found:1;
5
+ unsigned char found:1;
6
const char *filename;
7
int fd;
8
collected_number value;
src/rrd.h
+8
-8
@@ -160,8 +160,8 @@ struct rrddim {
160
size_t collections_counter; // the number of times we added values to this rrdim
161
size_t unused[10];
162
163
- int updated:1; // 1 when the dimension has been updated since the last processing
164
- int exposed:1; // 1 when set what have sent this dimension to the central netdata
163
+ unsigned int updated:1; // 1 when the dimension has been updated since the last processing
164
+ unsigned int exposed:1; // 1 when set what have sent this dimension to the central netdata
165
166
struct timeval last_collected_time; // when was this dimension last updated
167
// this is actual date time we updated the last_collected_value
@@ -441,20 +441,20 @@ struct rrdhost {
441
// ------------------------------------------------------------------------
442
// streaming of data to remote hosts - rrdpush
443
444
- int rrdpush_send_enabled:1; // 1 when this host sends metrics to another netdata
444
+ unsigned int rrdpush_send_enabled:1; // 1 when this host sends metrics to another netdata
445
char *rrdpush_send_destination; // where to send metrics to
446
char *rrdpush_send_api_key; // the api key at the receiving netdata
447
448
// the following are state information for the threading
449
// streaming metrics from this netdata to an upstream netdata
450
- volatile int rrdpush_sender_spawn:1; // 1 when the sender thread has been spawn
450
+ volatile unsigned int rrdpush_sender_spawn:1; // 1 when the sender thread has been spawn
451
netdata_thread_t rrdpush_sender_thread; // the sender thread
452
453
- volatile int rrdpush_sender_connected:1; // 1 when the sender is ready to push metrics
453
+ volatile unsigned int rrdpush_sender_connected:1; // 1 when the sender is ready to push metrics
454
int rrdpush_sender_socket; // the fd of the socket to the remote host, or -1
455
456
- volatile int rrdpush_sender_error_shown:1; // 1 when we have logged a communication error
457
- volatile int rrdpush_sender_join:1; // 1 when we have to join the sending thread
456
+ volatile unsigned int rrdpush_sender_error_shown:1; // 1 when we have logged a communication error
457
+ volatile unsigned int rrdpush_sender_join:1; // 1 when we have to join the sending thread
458
459
// metrics may be collected asynchronously
460
// these synchronize all the threads willing the write to our sending buffer
@@ -474,7 +474,7 @@ struct rrdhost {
474
// ------------------------------------------------------------------------
475
// health monitoring options
476
477
- int health_enabled:1; // 1 when this host has health enabled
477
+ unsigned int health_enabled:1; // 1 when this host has health enabled
478
time_t health_delay_up_to; // a timestamp to delay alarms processing up to
479
char *health_default_exec; // the full path of the alarms notifications program
480
char *health_default_recipient; // the default recipient for all alarms
src/sys_fs_cgroup.c
+3
-3
@@ -1984,7 +1984,7 @@ void update_systemd_services_charts(
1984
1985
if(likely(do_cpu && cg->cpuacct_stat.updated)) {
1986
if(unlikely(!cg->rd_cpu))
1987
- cg->rd_cpu = rrddim_add(st_cpu, cg->chart_id, cg->chart_title, 100, hz, RRD_ALGORITHM_INCREMENTAL);
1987
+ cg->rd_cpu = rrddim_add(st_cpu, cg->chart_id, cg->chart_title, 100, system_hz, RRD_ALGORITHM_INCREMENTAL);
1988
1989
rrddim_set_by_pointer(st_cpu, cg->rd_cpu, cg->cpuacct_stat.user + cg->cpuacct_stat.system);
1990
}
@@ -2253,8 +2253,8 @@ void update_cgroup_charts(int update_every) {
2253
, RRDSET_TYPE_STACKED
2254
);
2255
2256
- rrddim_add(cg->st_cpu, "user", NULL, 100, hz, RRD_ALGORITHM_INCREMENTAL);
2257
- rrddim_add(cg->st_cpu, "system", NULL, 100, hz, RRD_ALGORITHM_INCREMENTAL);
2256
+ rrddim_add(cg->st_cpu, "user", NULL, 100, system_hz, RRD_ALGORITHM_INCREMENTAL);
2257
+ rrddim_add(cg->st_cpu, "system", NULL, 100, system_hz, RRD_ALGORITHM_INCREMENTAL);
2258
}
2259
else
2260
rrdset_next(cg->st_cpu);
web/dashboard.js
+8
-11
@@ -213,7 +213,7 @@ var NETDATA = window.NETDATA || {};
213
NETDATA.serverDefault = netdataServer;
214
else {
215
var s = NETDATA._scriptSource();
216
- if(s) NETDATA.serverDefault = s.replace(/\/dashboard.js(\?.*)*$/g, "");
216
+ if(s) NETDATA.serverDefault = s.replace(/\/dashboard.js\?.*$/g, "");
217
else {
218
console.log('WARNING: Cannot detect the URL of the netdata server.');
219
NETDATA.serverDefault = null;
@@ -2080,8 +2080,8 @@ var NETDATA = window.NETDATA || {};
2080
return this.xAxisFormat.format(d);
2081
};
2082
2083
- var d = new Date();
2084
- var t = this.dateFormat.format(d) + ' ' + this.timeFormat.format(d) + ' ' + this.xAxisFormat.format(d);
2083
+ //var d = new Date();
2084
+ //var t = this.dateFormat.format(d) + ' ' + this.timeFormat.format(d) + ' ' + this.xAxisFormat.format(d);
2085
2086
ret = true;
2087
}
@@ -2212,7 +2212,7 @@ var NETDATA = window.NETDATA || {};
2212
'milliseconds': {
2213
check: function (max) { return NETDATA.options.current.seconds_as_time && max < 1000; },
2214
convert: function(milliseconds) {
2215
- tms = Math.round(milliseconds * 10);
2215
+ var tms = Math.round(milliseconds * 10);
2216
milliseconds = Math.floor(tms / 10);
2217
2218
tms -= milliseconds * 10;
@@ -2404,7 +2404,7 @@ var NETDATA = window.NETDATA || {};
2404
}
2405
2406
return value / tdivider;
2407
- }
2407
+ };
2408
}
2409
else {
2410
// the caller did not give data-common-units
@@ -3081,7 +3081,7 @@ var NETDATA = window.NETDATA || {};
3081
3082
var invisibleSearchableText = function() {
3083
return '<span style="position:absolute; opacity: 0; width: 0px;">' + that.id + '</span>';
3084
- }
3084
+ };
3085
3086
/* init() private
3087
* initialize state variables
@@ -4079,10 +4079,7 @@ var NETDATA = window.NETDATA || {};
4079
if(typeof label === 'undefined') continue;
4080
if(typeof this.element_legend_childs.series[label] === 'undefined') continue;
4081
4082
- if(show_undefined)
4083
- this.legendSetLabelValue(label, null);
4084
- else
4085
- this.legendSetLabelValue(label, this.data.view_latest_values[i]);
4082
+ this.legendSetLabelValue(label, this.data.view_latest_values[i]);
4083
}
4084
};
4085
@@ -4882,7 +4879,7 @@ var NETDATA = window.NETDATA || {};
4879
this.__redraw_on_unhide = true;
4880
4881
if(this.debug === true)
4885
- this.log("drawn while not visible")
4882
+ this.log("drawn while not visible");
4883
}
4884
4885
if(this.selected === true)
web/dashboard_info.js
+195
-175
@@ -17,7 +17,8 @@ netdataDashboard.menu = {
17
'services': {
18
title: 'systemd Services',
19
icon: '<i class="fas fa-cogs"></i>',
20
- info: 'Resources utilization of systemd services. netdata monitors all systemd services via cgroups (the resources accounting used by containers). '
20
+ info: 'Resources utilization of systemd services. netdata monitors all systemd services via CGROUPS ' +
21
+ '(the resources accounting used by containers). '
22
},
23
24
'ap': {
@@ -29,7 +30,15 @@ netdataDashboard.menu = {
30
'tc': {
31
title: 'Quality of Service',
32
icon: '<i class="fas fa-globe"></i>',
32
- info: 'Netdata collects and visualizes <code>tc</code> class utilization using its <a href="https://github.com/firehol/netdata/blob/master/plugins.d/tc-qos-helper.sh" target="_blank">tc-helper plugin</a>. If you also use <a href="http://firehol.org/#fireqos" target="_blank">FireQOS</a> for setting up QoS, netdata automatically collects interface and class names. If your QoS configuration includes overheads calculation, the values shown here will include these overheads (the total bandwidth for the same interface as reported in the Network Interfaces section, will be lower than the total bandwidth reported here). QoS data collection may have a slight time difference compared to the interface (QoS data collection uses a BASH script, so a shift in data collection of a few milliseconds should be justified).'
33
+ info: 'Netdata collects and visualizes <code>tc</code> class utilization using its ' +
34
+ '<a href="https://github.com/firehol/netdata/blob/master/plugins.d/tc-qos-helper.sh" target="_blank">tc-helper plugin</a>. ' +
35
+ 'If you also use <a href="http://firehol.org/#fireqos" target="_blank">FireQOS</a> for setting up QoS, ' +
36
+ 'netdata automatically collects interface and class names. If your QoS configuration includes overheads ' +
37
+ 'calculation, the values shown here will include these overheads (the total bandwidth for the same ' +
38
+ 'interface as reported in the Network Interfaces section, will be lower than the total bandwidth ' +
39
+ 'reported here). QoS data collection may have a slight time difference compared to the interface ' +
40
+ '(QoS data collection uses a BASH script, so a shift in data collection of a few milliseconds ' +
41
+ 'should be justified).'
42
},
43
44
'net': {
@@ -41,7 +50,13 @@ netdataDashboard.menu = {
50
'ipv4': {
51
title: 'IPv4 Networking',
52
icon: '<i class="fas fa-cloud"></i>',
44
- info: 'Metrics for the IPv4 stack of the system. <a href="https://en.wikipedia.org/wiki/IPv4" target="_blank">Internet Protocol version 4 (IPv4)</a> is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet. IPv4 is a connectionless protocol for use on packet-switched networks. It operates on a best effort delivery model, in that it does not guarantee delivery, nor does it assure proper sequencing or avoidance of duplicate delivery. These aspects, including data integrity, are addressed by an upper layer transport protocol, such as the Transmission Control Protocol (TCP).'
53
+ info: 'Metrics for the IPv4 stack of the system. ' +
54
+ '<a href="https://en.wikipedia.org/wiki/IPv4" target="_blank">Internet Protocol version 4 (IPv4)</a> is ' +
55
+ 'the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based ' +
56
+ 'internetworking methods in the Internet. IPv4 is a connectionless protocol for use on packet-switched ' +
57
+ 'networks. It operates on a best effort delivery model, in that it does not guarantee delivery, nor does ' +
58
+ 'it assure proper sequencing or avoidance of duplicate delivery. These aspects, including data integrity, ' +
59
+ 'are addressed by an upper layer transport protocol, such as the Transmission Control Protocol (TCP).'
60
},
61
62
'ipv6': {
@@ -220,7 +235,7 @@ netdataDashboard.menu = {
235
info: 'Performance metrics for <b>redis</b>. Redis (REmote DIctionary Server) is a software project that implements data structure servers. It is open-source, networked, in-memory, and stores keys with optional durability.'
236
},
237
223
- 'rethinkdbs': {
238
+ 'rethinkdbs': {
239
title: 'RethinkDB',
240
icon: '<i class="fas fa-database"></i>',
241
info: 'Performance metrics for <b>rethinkdb</b>. RethinkDB is the first open-source scalable database built for realtime applications'
@@ -412,7 +427,6 @@ netdataDashboard.menu = {
427
};
428
429
415
-
430
// ----------------------------------------------------------------------------
431
// submenus
432
@@ -513,8 +527,8 @@ netdataDashboard.submenu = {
527
528
'system.softnet_stat': {
529
title: 'softnet',
516
- info: function(os) {
517
- if(os === 'linux')
530
+ info: function (os) {
531
+ if (os === 'linux')
532
return 'Statistics for CPUs SoftIRQs related to network receive work. Break down per CPU core can be found at <a href="#menu_cpu_submenu_softnet_stat">CPU / softnet statistics</a>. <b>processed</b> states the number of packets processed, <b>dropped</b> is the number packets dropped because the network device backlog was full (to fix them on Linux use <code>sysctl</code> to increase <code>net.core.netdev_max_backlog</code>), <b>squeezed</b> is the number of packets dropped because the network device budget ran out (to fix them on Linux use <code>sysctl</code> to increase <code>net.core.netdev_budget</code> and/or <code>net.core.netdev_budget_usecs</code>). More information about identifying and troubleshooting network driver related issues can be found at <a href="https://access.redhat.com/sites/default/files/attachments/20150325_network_performance_tuning.pdf" target="_blank">Red Hat Enterprise Linux Network Performance Tuning Guide</a>.';
533
else
534
return 'Statistics for CPUs SoftIRQs related to network receive work.';
@@ -523,8 +537,8 @@ netdataDashboard.submenu = {
537
538
'cpu.softnet_stat': {
539
title: 'softnet',
526
- info: function(os) {
527
- if(os === 'linux')
540
+ info: function (os) {
541
+ if (os === 'linux')
542
return 'Statistics for per CPUs core SoftIRQs related to network receive work. Total for all CPU cores can be found at <a href="#menu_system_submenu_softnet_stat">System / softnet statistics</a>. <b>processed</b> states the number of packets processed, <b>dropped</b> is the number packets dropped because the network device backlog was full (to fix them on Linux use <code>sysctl</code> to increase <code>net.core.netdev_max_backlog</code>), <b>squeezed</b> is the number of packets dropped because the network device budget ran out (to fix them on Linux use <code>sysctl</code> to increase <code>net.core.netdev_budget</code> and/or <code>net.core.netdev_budget_usecs</code>). More information about identifying and troubleshooting network driver related issues can be found at <a href="https://access.redhat.com/sites/default/files/attachments/20150325_network_performance_tuning.pdf" target="_blank">Red Hat Enterprise Linux Network Performance Tuning Guide</a>.';
543
else
544
return 'Statistics for per CPUs core SoftIRQs related to network receive work. Total for all CPU cores can be found at <a href="#menu_system_submenu_softnet_stat">System / softnet statistics</a>.';
@@ -572,7 +586,6 @@ netdataDashboard.submenu = {
586
};
587
588
575
-
589
// ----------------------------------------------------------------------------
590
// chart
591
@@ -587,7 +600,7 @@ netdataDashboard.submenu = {
600
//
601
netdataDashboard.context = {
602
'system.cpu': {
590
- info: function(os) {
603
+ info: function (os) {
604
void(os);
605
return 'Total CPU utilization (all cores). 100% here means there is no CPU idle time at all. You can get per core usage at the <a href="#menu_cpu">CPUs</a> section and per application usage at the <a href="#menu_apps">Applications Monitoring</a> section.'
606
+ netdataDashboard.sparkline('<br/>Keep an eye on <b>iowait</b> ', 'system.cpu', 'iowait', '%', '. If it is constantly high, your disks are a bottleneck and they slow your system down.')
@@ -602,10 +615,10 @@ netdataDashboard.context = {
615
},
616
617
'system.io': {
605
- info: function(os) {
618
+ info: function (os) {
619
var s = 'Total Disk I/O, for all physical disks. You can get detailed information about each disk at the <a href="#menu_disk">Disks</a> section and per application Disk usage at the <a href="#menu_apps">Applications Monitoring</a> section.';
620
608
- if(os === 'linux')
621
+ if (os === 'linux')
622
return s + ' Physical are all the disks that are listed in <code>/sys/block</code>, but do not exist in <code>/sys/devices/virtual/block</code>.';
623
else
624
return s;
@@ -664,10 +677,10 @@ netdataDashboard.context = {
677
},
678
679
'system.net': {
667
- info: function(os) {
680
+ info: function (os) {
681
var s = 'Total bandwidth of all physical network interfaces. This does not include <code>lo</code>, VPNs, network bridges, IFB devices, bond interfaces, etc. Only the bandwidth of physical network interfaces is aggregated.';
682
670
- if(os === 'linux')
683
+ if (os === 'linux')
684
return s + ' Physical are all the network interfaces that are listed in <code>/proc/net/dev</code>, but do not exist in <code>/sys/devices/virtual/net</code>.';
685
else
686
return s;
@@ -725,9 +738,9 @@ netdataDashboard.context = {
738
739
'mem.ksm_ratios': {
740
heads: [
728
- function(os, id) {
741
+ function (os, id) {
742
void(os);
730
- return '<div data-netdata="' + id + '"'
743
+ return '<div data-netdata="' + id + '"'
744
+ ' data-gauge-max-value="100"'
745
+ ' data-chart-library="gauge"'
746
+ ' data-title="Savings"'
@@ -743,7 +756,7 @@ netdataDashboard.context = {
756
},
757
758
'mem.pgfaults': {
746
- info: 'A <a href="https://en.wikipedia.org/wiki/Page_fault" target="_blank">page fault</a> is a type of interrupt, called trap, raised by computer hardware when a running program accesses a memory page that is mapped into the virtual address space, but not actually loaded into main memory. If the page is loaded in memory at the time the fault is generated, but is not marked in the memory management unit as being loaded in memory, then it is called a <b>minor</b> or soft page fault. A <b>major</b> page fault is generated when the system needs to load the memory page from disk or swap memory.'
759
+ info: 'A <a href="https://en.wikipedia.org/wiki/Page_fault" target="_blank">page fault</a> is a type of interrupt, called trap, raised by computer hardware when a running program accesses a memory page that is mapped into the virtual address space, but not actually loaded into main memory. If the page is loaded in memory at the time the fault is generated, but is not marked in the memory management unit as being loaded in memory, then it is called a <b>minor</b> or soft page fault. A <b>major</b> page fault is generated when the system needs to load the memory page from disk or swap memory.'
760
},
761
762
'mem.committed': {
@@ -894,10 +907,10 @@ netdataDashboard.context = {
907
908
'tc.qos': {
909
heads: [
897
- function(os, id) {
910
+ function (os, id) {
911
void(os);
912
900
- if(id.match(/.*-ifb$/))
913
+ if (id.match(/.*-ifb$/))
914
return netdataDashboard.gaugeChart('Inbound', '12%', '', '#5555AA');
915
else
916
return netdataDashboard.gaugeChart('Outbound', '12%', '', '#AA9900');
@@ -910,9 +923,9 @@ netdataDashboard.context = {
923
924
'net.net': {
925
mainheads: [
913
- function(os, id) {
926
+ function (os, id) {
927
void(os);
915
- if(id.match(/^cgroup_.*/)) {
928
+ if (id.match(/^cgroup_.*/)) {
929
var iface;
930
try {
931
iface = ' ' + id.substring(id.lastIndexOf('.net_') + 5, id.length);
@@ -925,9 +938,9 @@ netdataDashboard.context = {
938
else
939
return '';
940
},
928
- function(os, id) {
941
+ function (os, id) {
942
void(os);
930
- if(id.match(/^cgroup_.*/)) {
943
+ if (id.match(/^cgroup_.*/)) {
944
var iface;
945
try {
946
iface = ' ' + id.substring(id.lastIndexOf('.net_') + 5, id.length);
@@ -942,16 +955,16 @@ netdataDashboard.context = {
955
}
956
],
957
heads: [
945
- function(os, id) {
958
+ function (os, id) {
959
void(os);
947
- if(!id.match(/^cgroup_.*/))
960
+ if (!id.match(/^cgroup_.*/))
961
return netdataDashboard.gaugeChart('Received', '12%', 'received');
962
else
963
return '';
964
},
952
- function(os, id) {
965
+ function (os, id) {
966
void(os);
954
- if(!id.match(/^cgroup_.*/))
967
+ if (!id.match(/^cgroup_.*/))
968
return netdataDashboard.gaugeChart('Sent', '12%', 'sent');
969
else
970
return '';
@@ -1044,38 +1057,38 @@ netdataDashboard.context = {
1057
1058
'mysql.queries': {
1059
info: 'The number of statements executed by the server.<ul>' +
1047
- '<li><strong>queries</strong> counts the statements executed within stored SQL programs.</li>' +
1048
- '<li><strong>questions</strong> counts the statements sent to the mysql server by mysql clients.</li>' +
1049
- '<li><strong>slow queries</strong> counts the number of statements that took more than <a href="http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_long_query_time" target="_blank">long_query_time</a> seconds to be executed.' +
1050
- ' For more information about slow queries check the mysql <a href="http://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html" target="_blank">slow query log</a>.</li>' +
1051
- '</ul>'
1060
+ '<li><strong>queries</strong> counts the statements executed within stored SQL programs.</li>' +
1061
+ '<li><strong>questions</strong> counts the statements sent to the mysql server by mysql clients.</li>' +
1062
+ '<li><strong>slow queries</strong> counts the number of statements that took more than <a href="http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_long_query_time" target="_blank">long_query_time</a> seconds to be executed.' +
1063
+ ' For more information about slow queries check the mysql <a href="http://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html" target="_blank">slow query log</a>.</li>' +
1064
+ '</ul>'
1065
},
1066
1067
'mysql.handlers': {
1068
info: 'Usage of the internal handlers of mysql. This chart provides very good insights of what the mysql server is actually doing.' +
1056
- ' (if the chart is not showing all these dimensions it is because they are zero - set <strong>Which dimensions to show?</strong> to <strong>All</strong> from the dashboard settings, to render even the zero values)<ul>' +
1057
- '<li><strong>commit</strong>, the number of internal <a href="http://dev.mysql.com/doc/refman/5.7/en/commit.html" target="_blank">COMMIT</a> statements.</li>' +
1058
- '<li><strong>delete</strong>, the number of times that rows have been deleted from tables.</li>' +
1059
- '<li><strong>prepare</strong>, a counter for the prepare phase of two-phase commit operations.</li>' +
1060
- '<li><strong>read first</strong>, the number of times the first entry in an index was read. A high value suggests that the server is doing a lot of full index scans; e.g. <strong>SELECT col1 FROM foo</strong>, with col1 indexed.</li>' +
1061
- '<li><strong>read key</strong>, the number of requests to read a row based on a key. If this value is high, it is a good indication that your tables are properly indexed for your queries.</li>' +
1062
- '<li><strong>read next</strong>, the number of requests to read the next row in key order. This value is incremented if you are querying an index column with a range constraint or if you are doing an index scan.</li>' +
1063
- '<li><strong>read prev</strong>, the number of requests to read the previous row in key order. This read method is mainly used to optimize <strong>ORDER BY ... DESC</strong>.</li>' +
1064
- '<li><strong>read rnd</strong>, the number of requests to read a row based on a fixed position. A high value indicates you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan entire tables or you have joins that do not use keys properly.</li>' +
1065
- '<li><strong>read rnd next</strong>, the number of requests to read the next row in the data file. This value is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.</li>' +
1066
- '<li><strong>rollback</strong>, the number of requests for a storage engine to perform a rollback operation.</li>' +
1067
- '<li><strong>savepoint</strong>, the number of requests for a storage engine to place a savepoint.</li>' +
1068
- '<li><strong>savepoint rollback</strong>, the number of requests for a storage engine to roll back to a savepoint.</li>' +
1069
- '<li><strong>update</strong>, the number of requests to update a row in a table.</li>' +
1070
- '<li><strong>write</strong>, the number of requests to insert a row in a table.</li>' +
1071
- '</ul>'
1069
+ ' (if the chart is not showing all these dimensions it is because they are zero - set <strong>Which dimensions to show?</strong> to <strong>All</strong> from the dashboard settings, to render even the zero values)<ul>' +
1070
+ '<li><strong>commit</strong>, the number of internal <a href="http://dev.mysql.com/doc/refman/5.7/en/commit.html" target="_blank">COMMIT</a> statements.</li>' +
1071
+ '<li><strong>delete</strong>, the number of times that rows have been deleted from tables.</li>' +
1072
+ '<li><strong>prepare</strong>, a counter for the prepare phase of two-phase commit operations.</li>' +
1073
+ '<li><strong>read first</strong>, the number of times the first entry in an index was read. A high value suggests that the server is doing a lot of full index scans; e.g. <strong>SELECT col1 FROM foo</strong>, with col1 indexed.</li>' +
1074
+ '<li><strong>read key</strong>, the number of requests to read a row based on a key. If this value is high, it is a good indication that your tables are properly indexed for your queries.</li>' +
1075
+ '<li><strong>read next</strong>, the number of requests to read the next row in key order. This value is incremented if you are querying an index column with a range constraint or if you are doing an index scan.</li>' +
1076
+ '<li><strong>read prev</strong>, the number of requests to read the previous row in key order. This read method is mainly used to optimize <strong>ORDER BY ... DESC</strong>.</li>' +
1077
+ '<li><strong>read rnd</strong>, the number of requests to read a row based on a fixed position. A high value indicates you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan entire tables or you have joins that do not use keys properly.</li>' +
1078
+ '<li><strong>read rnd next</strong>, the number of requests to read the next row in the data file. This value is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.</li>' +
1079
+ '<li><strong>rollback</strong>, the number of requests for a storage engine to perform a rollback operation.</li>' +
1080
+ '<li><strong>savepoint</strong>, the number of requests for a storage engine to place a savepoint.</li>' +
1081
+ '<li><strong>savepoint rollback</strong>, the number of requests for a storage engine to roll back to a savepoint.</li>' +
1082
+ '<li><strong>update</strong>, the number of requests to update a row in a table.</li>' +
1083
+ '<li><strong>write</strong>, the number of requests to insert a row in a table.</li>' +
1084
+ '</ul>'
1085
},
1086
1087
'mysql.table_locks': {
1088
info: 'MySQL table locks counters: <ul>' +
1076
- '<li><strong>immediate</strong>, the number of times that a request for a table lock could be granted immediately.</li>' +
1077
- '<li><strong>waited</strong>, the number of times that a request for a table lock could not be granted immediately and a wait was needed. If this is high and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.</li>' +
1078
- '</ul>'
1089
+ '<li><strong>immediate</strong>, the number of times that a request for a table lock could be granted immediately.</li>' +
1090
+ '<li><strong>waited</strong>, the number of times that a request for a table lock could not be granted immediately and a wait was needed. If this is high and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.</li>' +
1091
+ '</ul>'
1092
},
1093
1094
// ------------------------------------------------------------------------
@@ -1084,57 +1097,57 @@ netdataDashboard.context = {
1097
1098
'postgres.db_stat_blks': {
1099
info: 'Blocks reads from disk or cache.<ul>' +
1087
- '<li><strong>blks_read:</strong> number of disk blocks read in this database.</li>' +
1088
- '<li><strong>blks_hit:</strong> number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache)</li>' +
1089
- '</ul>'
1100
+ '<li><strong>blks_read:</strong> number of disk blocks read in this database.</li>' +
1101
+ '<li><strong>blks_hit:</strong> number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache)</li>' +
1102
+ '</ul>'
1103
},
1104
'postgres.db_stat_tuple_write': {
1105
info: '<ul><li>Number of rows inserted/updated/deleted.</li>' +
1093
- '<li><strong>conflicts:</strong> number of queries canceled due to conflicts with recovery in this database. (Conflicts occur only on standby servers; see <a href="https://www.postgresql.org/docs/10/static/monitoring-stats.html#PG-STAT-DATABASE-CONFLICTS-VIEW" target="_blank">pg_stat_database_conflicts</a> for details.)</li>' +
1094
- '</ul>'
1106
+ '<li><strong>conflicts:</strong> number of queries canceled due to conflicts with recovery in this database. (Conflicts occur only on standby servers; see <a href="https://www.postgresql.org/docs/10/static/monitoring-stats.html#PG-STAT-DATABASE-CONFLICTS-VIEW" target="_blank">pg_stat_database_conflicts</a> for details.)</li>' +
1107
+ '</ul>'
1108
},
1109
'postgres.db_stat_temp_bytes': {
1110
info: 'Temporary files can be created on disk for sorts, hashes, and temporary query results.'
1111
},
1112
'postgres.db_stat_temp_files': {
1113
info: '<ul>' +
1101
- '<li><strong>files:</strong> number of temporary files created by queries. All temporary files are counted, regardless of why the temporary file was created (e.g., sorting or hashing).</li>' +
1102
- '</ul>'
1114
+ '<li><strong>files:</strong> number of temporary files created by queries. All temporary files are counted, regardless of why the temporary file was created (e.g., sorting or hashing).</li>' +
1115
+ '</ul>'
1116
},
1117
'postgres.archive_wal': {
1105
- info: 'WAL archiving.<ul>' +
1106
- '<li><strong>total:</strong> total files.</li>' +
1107
- '<li><strong>ready:</strong> WAL waiting to be archived.</li>' +
1108
- '<li><strong>done:</strong> WAL successfully archived' +
1109
- 'Ready WAL can indicate archive_command is in error, see <a href="https://www.postgresql.org/docs/current/static/continuous-archiving.html" target="_blank">Continuous Archiving and Point-in-Time Recovery</a>.</li>' +
1110
- '</ul>'
1118
+ info: 'WAL archiving.<ul>' +
1119
+ '<li><strong>total:</strong> total files.</li>' +
1120
+ '<li><strong>ready:</strong> WAL waiting to be archived.</li>' +
1121
+ '<li><strong>done:</strong> WAL successfully archived. ' +
1122
+ 'Ready WAL can indicate archive_command is in error, see <a href="https://www.postgresql.org/docs/current/static/continuous-archiving.html" target="_blank">Continuous Archiving and Point-in-Time Recovery</a>.</li>' +
1123
+ '</ul>'
1124
},
1125
'postgres.checkpointer': {
1126
info: 'Number of checkpoints.<ul>' +
1114
- '<li><strong>scheduled:</strong> when checkpoint_timeout is reached.</li>' +
1115
- '<li><strong>requested:</strong> when max_wal_size is reached.</li>' +
1116
- '</ul>' +
1117
- 'For more information see <a href="https://www.postgresql.org/docs/current/static/wal-configuration.html" target="_blank">WAL Configuration</a>.'
1127
+ '<li><strong>scheduled:</strong> when checkpoint_timeout is reached.</li>' +
1128
+ '<li><strong>requested:</strong> when max_wal_size is reached.</li>' +
1129
+ '</ul>' +
1130
+ 'For more information see <a href="https://www.postgresql.org/docs/current/static/wal-configuration.html" target="_blank">WAL Configuration</a>.'
1131
},
1132
'postgres.autovacuum': {
1120
- info: 'PostgreSQL databases require periodic maintenance known as vacuuming. For many installations, it is sufficient to let vacuuming be performed by the autovacuum daemon.' +
1121
- 'For more information see <a href="https://www.postgresql.org/docs/current/static/routine-vacuuming.html#AUTOVACUUM" target="_blank">The Autovacuum Daemon</a>.'
1133
+ info: 'PostgreSQL databases require periodic maintenance known as vacuuming. For many installations, it is sufficient to let vacuuming be performed by the autovacuum daemon. ' +
1134
+ 'For more information see <a href="https://www.postgresql.org/docs/current/static/routine-vacuuming.html#AUTOVACUUM" target="_blank">The Autovacuum Daemon</a>.'
1135
},
1136
'postgres.standby_delta': {
1137
info: 'Streaming replication delta.<ul>' +
1125
- '<li><strong>sent_delta:</strong> replication delta sent to standby.</li>' +
1126
- '<li><strong>write_delta:</strong> replication delta written to disk by this standby.</li>' +
1127
- '<li><strong>flush_delta:</strong> replication delta flushed to disk by this standby server.</li>' +
1128
- '<li><strong>replay_delta:</strong> replication delta replayed into the database on this standby server.</li>' +
1129
- '</ul>' +
1130
- 'For more information see <a href="https://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION" target="_blank">Synchronous Replication</a>.'
1138
+ '<li><strong>sent_delta:</strong> replication delta sent to standby.</li>' +
1139
+ '<li><strong>write_delta:</strong> replication delta written to disk by this standby.</li>' +
1140
+ '<li><strong>flush_delta:</strong> replication delta flushed to disk by this standby server.</li>' +
1141
+ '<li><strong>replay_delta:</strong> replication delta replayed into the database on this standby server.</li>' +
1142
+ '</ul>' +
1143
+ 'For more information see <a href="https://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION" target="_blank">Synchronous Replication</a>.'
1144
},
1145
'postgres.replication_slot': {
1146
info: 'Replication slot files.<ul>' +
1134
- '<li><strong>wal_keeped:</strong> WAL files retained by each replication slots.</li>' +
1135
- '<li><strong>pg_replslot_files:</strong> files present in pg_replslot.</li>' +
1136
- '</ul>' +
1137
- 'For more information see <a href="https://www.postgresql.org/docs/current/static/warm-standby.html#STREAMING-REPLICATION-SLOTS" target="_blank">Replication Slots</a>.'
1147
+ '<li><strong>wal_keeped:</strong> WAL files retained by each replication slots.</li>' +
1148
+ '<li><strong>pg_replslot_files:</strong> files present in pg_replslot.</li>' +
1149
+ '</ul>' +
1150
+ 'For more information see <a href="https://www.postgresql.org/docs/current/static/warm-standby.html#STREAMING-REPLICATION-SLOTS" target="_blank">Replication Slots</a>.'
1151
},
1152
1153
@@ -1164,9 +1177,9 @@ netdataDashboard.context = {
1177
1178
'apache.workers': {
1179
mainheads: [
1167
- function(os, id) {
1180
+ function (os, id) {
1181
void(os);
1169
- return '<div data-netdata="' + id + '"'
1182
+ return '<div data-netdata="' + id + '"'
1183
+ ' data-dimensions="busy"'
1184
+ ' data-append-options="percentage"'
1185
+ ' data-gauge-max-value="100"'
@@ -1225,9 +1238,9 @@ netdataDashboard.context = {
1238
1239
'lighttpd.workers': {
1240
mainheads: [
1228
- function(os, id) {
1241
+ function (os, id) {
1242
void(os);
1230
- return '<div data-netdata="' + id + '"'
1243
+ return '<div data-netdata="' + id + '"'
1244
+ ' data-dimensions="busy"'
1245
+ ' data-append-options="percentage"'
1246
+ ' data-gauge-max-value="100"'
@@ -1281,7 +1294,7 @@ netdataDashboard.context = {
1294
1295
'httpcheck.responsetime': {
1296
info: 'The <code>response time</code> describes the time passed between request and response. ' +
1284
- 'Currently, the accuracy of the response time is low and should be used as reference only.'
1297
+ 'Currently, the accuracy of the response time is low and should be used as reference only.'
1298
},
1299
1300
'httpcheck.responselength': {
@@ -1291,8 +1304,8 @@ netdataDashboard.context = {
1304
'httpcheck.status': {
1305
valueRange: "[0, 1]",
1306
info: 'This chart verifies the response of the webserver. Each status dimension will have a value of <code>1</code> if triggered. ' +
1294
- 'Dimension <code>success</code> is <code>1</code> only if all constraints are satisfied.' +
1295
- 'This chart is most useful for alarms or third-party apps.'
1307
+ 'Dimension <code>success</code> is <code>1</code> only if all constraints are satisfied. ' +
1308
+ 'This chart is most useful for alarms or third-party apps.'
1309
},
1310
1311
// ------------------------------------------------------------------------
@@ -1316,9 +1329,9 @@ netdataDashboard.context = {
1329
'retroshare.peers': {
1330
info: 'Number of (connected) RetroShare friends.',
1331
mainheads: [
1319
- function(os, id) {
1332
+ function (os, id) {
1333
void(os);
1321
- return '<div data-netdata="' + id + '"'
1334
+ return '<div data-netdata="' + id + '"'
1335
+ ' data-dimensions="peers_connected"'
1336
+ ' data-append-options="friends"'
1337
+ ' data-chart-library="easypiechart"'
@@ -1355,9 +1368,9 @@ netdataDashboard.context = {
1368
1369
'cgroup.cpu': {
1370
mainheads: [
1358
- function(os, id) {
1371
+ function (os, id) {
1372
void(os);
1360
- return '<div data-netdata="' + id + '"'
1373
+ return '<div data-netdata="' + id + '"'
1374
+ ' data-chart-library="gauge"'
1375
+ ' data-title="CPU"'
1376
+ ' data-units="%"'
@@ -1374,9 +1387,9 @@ netdataDashboard.context = {
1387
1388
'cgroup.mem_usage': {
1389
mainheads: [
1377
- function(os, id) {
1390
+ function (os, id) {
1391
void(os);
1379
- return '<div data-netdata="' + id + '"'
1392
+ return '<div data-netdata="' + id + '"'
1393
+ ' data-chart-library="gauge"'
1394
+ ' data-title="Memory"'
1395
+ ' data-units="MB"'
@@ -1393,9 +1406,9 @@ netdataDashboard.context = {
1406
1407
'cgroup.throttle_io': {
1408
mainheads: [
1396
- function(os, id) {
1409
+ function (os, id) {
1410
void(os);
1398
- return '<div data-netdata="' + id + '"'
1411
+ return '<div data-netdata="' + id + '"'
1412
+ ' data-dimensions="read"'
1413
+ ' data-chart-library="gauge"'
1414
+ ' data-title="Read Disk I/O"'
@@ -1408,9 +1421,9 @@ netdataDashboard.context = {
1421
+ ' data-colors="' + NETDATA.colors[2] + '"'
1422
+ ' role="application"></div>';
1423
},
1411
- function(os, id) {
1424
+ function (os, id) {
1425
void(os);
1413
- return '<div data-netdata="' + id + '"'
1426
+ return '<div data-netdata="' + id + '"'
1427
+ ' data-dimensions="write"'
1428
+ ' data-chart-library="gauge"'
1429
+ ' data-title="Write Disk I/O"'
@@ -1548,9 +1561,9 @@ netdataDashboard.context = {
1561
'web_log.response_statuses': {
1562
info: 'Web server responses by type. <code>success</code> includes <b>1xx</b>, <b>2xx</b> and <b>304</b>, <code>error</code> includes <b>5xx</b>, <code>redirect</code> includes <b>3xx</b> except <b>304</b>, <code>bad</code> includes <b>4xx</b>, <code>other</code> are all the other responses.',
1563
mainheads: [
1551
- function(os, id) {
1564
+ function (os, id) {
1565
void(os);
1553
- return '<div data-netdata="' + id + '"'
1566
+ return '<div data-netdata="' + id + '"'
1567
+ ' data-dimensions="success"'
1568
+ ' data-chart-library="gauge"'
1569
+ ' data-title="Successful"'
@@ -1566,9 +1579,9 @@ netdataDashboard.context = {
1579
+ ' role="application"></div>';
1580
},
1581
1569
- function(os, id) {
1582
+ function (os, id) {
1583
void(os);
1571
- return '<div data-netdata="' + id + '"'
1584
+ return '<div data-netdata="' + id + '"'
1585
+ ' data-dimensions="redirect"'
1586
+ ' data-chart-library="gauge"'
1587
+ ' data-title="Redirects"'
@@ -1584,9 +1597,9 @@ netdataDashboard.context = {
1597
+ ' role="application"></div>';
1598
},
1599
1587
- function(os, id) {
1600
+ function (os, id) {
1601
void(os);
1589
- return '<div data-netdata="' + id + '"'
1602
+ return '<div data-netdata="' + id + '"'
1603
+ ' data-dimensions="bad"'
1604
+ ' data-chart-library="gauge"'
1605
+ ' data-title="Bad Requests"'
@@ -1602,9 +1615,9 @@ netdataDashboard.context = {
1615
+ ' role="application"></div>';
1616
},
1617
1605
- function(os, id) {
1618
+ function (os, id) {
1619
void(os);
1607
- return '<div data-netdata="' + id + '"'
1620
+ return '<div data-netdata="' + id + '"'
1621
+ ' data-dimensions="error"'
1622
+ ' data-chart-library="gauge"'
1623
+ ' data-title="Server Errors"'
@@ -1624,20 +1637,20 @@ netdataDashboard.context = {
1637
1638
'web_log.response_codes': {
1639
info: 'Web server responses by code family. ' +
1627
- 'According to the standards <code>1xx</code> are informational responses, ' +
1628
- '<code>2xx</code> are successful responses, ' +
1629
- '<code>3xx</code> are redirects (although they include <b>304</b> which is used as "<b>not modified</b>"), ' +
1630
- '<code>4xx</code> are bad requests, ' +
1631
- '<code>5xx</code> are internal server errors, ' +
1632
- '<code>other</code> are non-standard responses, ' +
1633
- '<code>unmatched</code> counts the lines in the log file that are not matched by the plugin (<a href="https://github.com/firehol/netdata/issues/new?title=web_log%20reports%20unmatched%20lines&body=web_log%20plugin%20reports%20unmatched%20lines.%0A%0AThis%20is%20my%20log:%0A%0A%60%60%60txt%0A%0Aplease%20paste%20your%20web%20server%20log%20here%0A%0A%60%60%60" target="_blank">let us know</a> if you have any unmatched).'
1640
+ 'According to the standards <code>1xx</code> are informational responses, ' +
1641
+ '<code>2xx</code> are successful responses, ' +
1642
+ '<code>3xx</code> are redirects (although they include <b>304</b> which is used as "<b>not modified</b>"), ' +
1643
+ '<code>4xx</code> are bad requests, ' +
1644
+ '<code>5xx</code> are internal server errors, ' +
1645
+ '<code>other</code> are non-standard responses, ' +
1646
+ '<code>unmatched</code> counts the lines in the log file that are not matched by the plugin (<a href="https://github.com/firehol/netdata/issues/new?title=web_log%20reports%20unmatched%20lines&body=web_log%20plugin%20reports%20unmatched%20lines.%0A%0AThis%20is%20my%20log:%0A%0A%60%60%60txt%0A%0Aplease%20paste%20your%20web%20server%20log%20here%0A%0A%60%60%60" target="_blank">let us know</a> if you have any unmatched).'
1647
},
1648
1649
'web_log.response_time': {
1650
mainheads: [
1638
- function(os, id) {
1651
+ function (os, id) {
1652
void(os);
1640
- return '<div data-netdata="' + id + '"'
1653
+ return '<div data-netdata="' + id + '"'
1654
+ ' data-dimensions="avg"'
1655
+ ' data-chart-library="gauge"'
1656
+ ' data-title="Average Response Time"'
@@ -1675,15 +1688,15 @@ netdataDashboard.context = {
1688
1689
'web_log.squid_response_statuses': {
1690
info: 'Squid responses by type. ' +
1678
- '<code>success</code> includes <b>1xx</b>, <b>2xx</b>, <b>000</b>, <b>304</b>, ' +
1679
- '<code>error</code> includes <b>5xx</b> and <b>6xx</b>, ' +
1680
- '<code>redirect</code> includes <b>3xx</b> except <b>304</b>, ' +
1681
- '<code>bad</code> includes <b>4xx</b>, ' +
1682
- '<code>other</code> are all the other responses.',
1691
+ '<code>success</code> includes <b>1xx</b>, <b>2xx</b>, <b>000</b>, <b>304</b>, ' +
1692
+ '<code>error</code> includes <b>5xx</b> and <b>6xx</b>, ' +
1693
+ '<code>redirect</code> includes <b>3xx</b> except <b>304</b>, ' +
1694
+ '<code>bad</code> includes <b>4xx</b>, ' +
1695
+ '<code>other</code> are all the other responses.',
1696
mainheads: [
1684
- function(os, id) {
1697
+ function (os, id) {
1698
void(os);
1686
- return '<div data-netdata="' + id + '"'
1699
+ return '<div data-netdata="' + id + '"'
1700
+ ' data-dimensions="success"'
1701
+ ' data-chart-library="gauge"'
1702
+ ' data-title="Successful"'
@@ -1699,9 +1712,9 @@ netdataDashboard.context = {
1712
+ ' role="application"></div>';
1713
},
1714
1702
- function(os, id) {
1715
+ function (os, id) {
1716
void(os);
1704
- return '<div data-netdata="' + id + '"'
1717
+ return '<div data-netdata="' + id + '"'
1718
+ ' data-dimensions="redirect"'
1719
+ ' data-chart-library="gauge"'
1720
+ ' data-title="Redirects"'
@@ -1717,9 +1730,9 @@ netdataDashboard.context = {
1730
+ ' role="application"></div>';
1731
},
1732
1720
- function(os, id) {
1733
+ function (os, id) {
1734
void(os);
1722
- return '<div data-netdata="' + id + '"'
1735
+ return '<div data-netdata="' + id + '"'
1736
+ ' data-dimensions="bad"'
1737
+ ' data-chart-library="gauge"'
1738
+ ' data-title="Bad Requests"'
@@ -1735,9 +1748,9 @@ netdataDashboard.context = {
1748
+ ' role="application"></div>';
1749
},
1750
1738
- function(os, id) {
1751
+ function (os, id) {
1752
void(os);
1740
- return '<div data-netdata="' + id + '"'
1753
+ return '<div data-netdata="' + id + '"'
1754
+ ' data-dimensions="error"'
1755
+ ' data-chart-library="gauge"'
1756
+ ' data-title="Server Errors"'
@@ -1757,22 +1770,22 @@ netdataDashboard.context = {
1770
1771
'web_log.squid_response_codes': {
1772
info: 'Web server responses by code family. ' +
1760
- 'According to HTTP standards <code>1xx</code> are informational responses, ' +
1761
- '<code>2xx</code> are successful responses, ' +
1762
- '<code>3xx</code> are redirects (although they include <b>304</b> which is used as "<b>not modified</b>"), ' +
1763
- '<code>4xx</code> are bad requests, ' +
1764
- '<code>5xx</code> are internal server errors. ' +
1765
- 'Squid also defines <code>000</code> mostly for UDP requests, and ' +
1766
- '<code>6xx</code> for broken upstream servers sending wrong headers. ' +
1767
- 'Finally, <code>other</code> are non-standard responses, and ' +
1768
- '<code>unmatched</code> counts the lines in the log file that are not matched by the plugin (<a href="https://github.com/firehol/netdata/issues/new?title=web_log%20reports%20unmatched%20lines&body=web_log%20plugin%20reports%20unmatched%20lines.%0A%0AThis%20is%20my%20log:%0A%0A%60%60%60txt%0A%0Aplease%20paste%20your%20web%20server%20log%20here%0A%0A%60%60%60" target="_blank">let us know</a> if you have any unmatched).'
1773
+ 'According to HTTP standards <code>1xx</code> are informational responses, ' +
1774
+ '<code>2xx</code> are successful responses, ' +
1775
+ '<code>3xx</code> are redirects (although they include <b>304</b> which is used as "<b>not modified</b>"), ' +
1776
+ '<code>4xx</code> are bad requests, ' +
1777
+ '<code>5xx</code> are internal server errors. ' +
1778
+ 'Squid also defines <code>000</code> mostly for UDP requests, and ' +
1779
+ '<code>6xx</code> for broken upstream servers sending wrong headers. ' +
1780
+ 'Finally, <code>other</code> are non-standard responses, and ' +
1781
+ '<code>unmatched</code> counts the lines in the log file that are not matched by the plugin (<a href="https://github.com/firehol/netdata/issues/new?title=web_log%20reports%20unmatched%20lines&body=web_log%20plugin%20reports%20unmatched%20lines.%0A%0AThis%20is%20my%20log:%0A%0A%60%60%60txt%0A%0Aplease%20paste%20your%20web%20server%20log%20here%0A%0A%60%60%60" target="_blank">let us know</a> if you have any unmatched).'
1782
},
1783
1784
'web_log.squid_duration': {
1785
mainheads: [
1773
- function(os, id) {
1786
+ function (os, id) {
1787
void(os);
1775
- return '<div data-netdata="' + id + '"'
1788
+ return '<div data-netdata="' + id + '"'
1789
+ ' data-dimensions="avg"'
1790
+ ' data-chart-library="gauge"'
1791
+ ' data-title="Average Response Time"'
@@ -1803,55 +1816,55 @@ netdataDashboard.context = {
1816
1817
'web_log.squid_transport_methods': {
1818
info: 'Break down per delivery method: <code>TCP</code> are requests on the HTTP port (usually 3128), ' +
1806
- '<code>UDP</code> are requests on the ICP port (usually 3130), or HTCP port (usually 4128). ' +
1807
- 'If ICP logging was disabled using the log_icp_queries option, no ICP replies will be logged. ' +
1808
- '<code>NONE</code> are used to state that squid delivered an unusual response or no response at all. ' +
1809
- 'Seen with cachemgr requests and errors, usually when the transaction fails before being classified into one of the above outcomes. ' +
1810
- 'Also seen with responses to <code>CONNECT</code> requests.'
1819
+ '<code>UDP</code> are requests on the ICP port (usually 3130), or HTCP port (usually 4128). ' +
1820
+ 'If ICP logging was disabled using the log_icp_queries option, no ICP replies will be logged. ' +
1821
+ '<code>NONE</code> are used to state that squid delivered an unusual response or no response at all. ' +
1822
+ 'Seen with cachemgr requests and errors, usually when the transaction fails before being classified into one of the above outcomes. ' +
1823
+ 'Also seen with responses to <code>CONNECT</code> requests.'
1824
},
1825
1826
'web_log.squid_code': {
1827
info: 'These are combined squid result status codes. A break down per component is given in the following charts. ' +
1815
- 'Check the <a href="http://wiki.squid-cache.org/SquidFaq/SquidLogs">squid documentation about them</a>.'
1828
+ 'Check the <a href="http://wiki.squid-cache.org/SquidFaq/SquidLogs">squid documentation about them</a>.'
1829
},
1830
1831
'web_log.squid_handling_opts': {
1832
info: 'These tags are optional and describe why the particular handling was performed or where the request came from. ' +
1820
- '<code>CLIENT</code> means that the client request placed limits affecting the response. Usually seen with client issued a <b>no-cache</b>, or analogous cache control command along with the request. Thus, the cache has to validate the object.' +
1821
- '<code>IMS</code> states that the client sent a revalidation (conditional) request. ' +
1822
- '<code>ASYNC</code>, is used when the request was generated internally by Squid. Usually this is background fetches for cache information exchanges, background revalidation from stale-while-revalidate cache controls, or ESI sub-objects being loaded. ' +
1823
- '<code>SWAPFAIL</code> is assigned when the object was believed to be in the cache, but could not be accessed. A new copy was requested from the server. ' +
1824
- '<code>REFRESH</code> when a revalidation (conditional) request was sent to the server. ' +
1825
- '<code>SHARED</code> when this request was combined with an existing transaction by collapsed forwarding. NOTE: the existing request is not marked as SHARED. ' +
1826
- '<code>REPLY</code> when particular handling was requested in the HTTP reply from server or peer. Usually seen on DENIED due to http_reply_access ACLs preventing delivery of servers response object to the client.'
1833
+ '<code>CLIENT</code> means that the client request placed limits affecting the response. Usually seen with client issued a <b>no-cache</b>, or analogous cache control command along with the request. Thus, the cache has to validate the object.' +
1834
+ '<code>IMS</code> states that the client sent a revalidation (conditional) request. ' +
1835
+ '<code>ASYNC</code>, is used when the request was generated internally by Squid. Usually this is background fetches for cache information exchanges, background revalidation from stale-while-revalidate cache controls, or ESI sub-objects being loaded. ' +
1836
+ '<code>SWAPFAIL</code> is assigned when the object was believed to be in the cache, but could not be accessed. A new copy was requested from the server. ' +
1837
+ '<code>REFRESH</code> when a revalidation (conditional) request was sent to the server. ' +
1838
+ '<code>SHARED</code> when this request was combined with an existing transaction by collapsed forwarding. NOTE: the existing request is not marked as SHARED. ' +
1839
+ '<code>REPLY</code> when particular handling was requested in the HTTP reply from server or peer. Usually seen on DENIED due to http_reply_access ACLs preventing delivery of servers response object to the client.'
1840
},
1841
1842
'web_log.squid_object_types': {
1843
info: 'These tags are optional and describe what type of object was produced. ' +
1831
- '<code>NEGATIVE</code> is only seen on HIT responses, indicating the response was a cached error response. e.g. <b>404 not found</b>. ' +
1832
- '<code>STALE</code> means the object was cached and served stale. This is usually caused by stale-while-revalidate or stale-if-error cache controls. ' +
1833
- '<code>OFFLINE</code> when the requested object was retrieved from the cache during offline_mode. The offline mode never validates any object. ' +
1834
- '<code>INVALID</code> when an invalid request was received. An error response was delivered indicating what the problem was. ' +
1835
- '<code>FAIL</code> is only seen on <code>REFRESH</code> to indicate the revalidation request failed. The response object may be the server provided network error or the stale object which was being revalidated depending on stale-if-error cache control. ' +
1836
- '<code>MODIFIED</code> is only seen on <code>REFRESH</code> responses to indicate revalidation produced a new modified object. ' +
1837
- '<code>UNMODIFIED</code> is only seen on <code>REFRESH</code> responses to indicate revalidation produced a <b>304</b> (Not Modified) status, which was relayed to the client. ' +
1838
- '<code>REDIRECT</code> when squid generated an HTTP redirect response to this request.'
1844
+ '<code>NEGATIVE</code> is only seen on HIT responses, indicating the response was a cached error response. e.g. <b>404 not found</b>. ' +
1845
+ '<code>STALE</code> means the object was cached and served stale. This is usually caused by stale-while-revalidate or stale-if-error cache controls. ' +
1846
+ '<code>OFFLINE</code> when the requested object was retrieved from the cache during offline_mode. The offline mode never validates any object. ' +
1847
+ '<code>INVALID</code> when an invalid request was received. An error response was delivered indicating what the problem was. ' +
1848
+ '<code>FAIL</code> is only seen on <code>REFRESH</code> to indicate the revalidation request failed. The response object may be the server provided network error or the stale object which was being revalidated depending on stale-if-error cache control. ' +
1849
+ '<code>MODIFIED</code> is only seen on <code>REFRESH</code> responses to indicate revalidation produced a new modified object. ' +
1850
+ '<code>UNMODIFIED</code> is only seen on <code>REFRESH</code> responses to indicate revalidation produced a <b>304</b> (Not Modified) status, which was relayed to the client. ' +
1851
+ '<code>REDIRECT</code> when squid generated an HTTP redirect response to this request.'
1852
},
1853
1854
'web_log.squid_cache_events': {
1855
info: 'These tags are optional and describe whether the response was loaded from cache, network, or otherwise. ' +
1843
- '<code>HIT</code> when the response object delivered was the local cache object. ' +
1844
- '<code>MEM</code> when the response object came from memory cache, avoiding disk accesses. Only seen on HIT responses. ' +
1845
- '<code>MISS</code> when the response object delivered was the network response object. ' +
1846
- '<code>DENIED</code> when the request was denied by access controls. ' +
1847
- '<code>NOFETCH</code> an ICP specific type, indicating service is alive, but not to be used for this request (sent during "-Y" startup, or during frequent failures, a cache in hit only mode will return either UDP_HIT or UDP_MISS_NOFETCH. Neighbours will thus only fetch hits). ' +
1848
- '<code>TUNNEL</code> when a binary tunnel was established for this transaction.'
1856
+ '<code>HIT</code> when the response object delivered was the local cache object. ' +
1857
+ '<code>MEM</code> when the response object came from memory cache, avoiding disk accesses. Only seen on HIT responses. ' +
1858
+ '<code>MISS</code> when the response object delivered was the network response object. ' +
1859
+ '<code>DENIED</code> when the request was denied by access controls. ' +
1860
+ '<code>NOFETCH</code> an ICP specific type, indicating service is alive, but not to be used for this request (sent during "-Y" startup, or during frequent failures, a cache in hit only mode will return either UDP_HIT or UDP_MISS_NOFETCH. Neighbours will thus only fetch hits). ' +
1861
+ '<code>TUNNEL</code> when a binary tunnel was established for this transaction.'
1862
},
1863
1864
'web_log.squid_transport_errors': {
1865
info: 'These tags are optional and describe some error conditions which occured during response delivery (if any). ' +
1853
- '<code>ABORTED</code> when the response was not completed due to the connection being aborted (usually by the client). ' +
1854
- '<code>TIMEOUT</code>, when the response was not completed due to a connection timeout.'
1866
+ '<code>ABORTED</code> when the response was not completed due to the connection being aborted (usually by the client). ' +
1867
+ '<code>TIMEOUT</code>, when the response was not completed due to a connection timeout.'
1868
},
1869
1870
// ------------------------------------------------------------------------
@@ -1868,7 +1881,7 @@ netdataDashboard.context = {
1881
commonMax: true,
1882
valueRange: "[0, 100]",
1883
info: 'The <code>Autonomy</code> is the percentage of how autonomous the installation is. An autonomy of 100 % means that the installation is producing more energy than it is needed. ' +
1871
- 'The <code>Self consumption</code> indicates the ratio between the current power generated and the current load. When it reaches 100 %, the <code>Autonomy</code> declines, since the solar panels can not produce enough energy and need support from the grid.'
1884
+ 'The <code>Self consumption</code> indicates the ratio between the current power generated and the current load. When it reaches 100 %, the <code>Autonomy</code> declines, since the solar panels can not produce enough energy and need support from the grid.'
1885
},
1886
1887
'fronius.energy.today': {
@@ -1891,14 +1904,14 @@ netdataDashboard.context = {
1904
1905
'portcheck.latency': {
1906
info: 'The <code>latency</code> describes the time spent connecting to a TCP port. No data is sent or received. ' +
1894
- 'Currently, the accuracy of the latency is low and should be used as reference only.'
1907
+ 'Currently, the accuracy of the latency is low and should be used as reference only.'
1908
},
1909
1910
'portcheck.status': {
1911
valueRange: "[0, 1]",
1912
info: 'The <code>status</code> chart verifies the availability of the service. ' +
1900
- 'Each status dimension will have a value of <code>1</code> if triggered. Dimension <code>success</code> is <code>1</code> only if connection could be established.' +
1901
- 'This chart is most useful for alarms and third-party apps.'
1913
+ 'Each status dimension will have a value of <code>1</code> if triggered. Dimension <code>success</code> is <code>1</code> only if connection could be established. ' +
1914
+ 'This chart is most useful for alarms and third-party apps.'
1915
},
1916
1917
// ------------------------------------------------------------------------
@@ -1929,8 +1942,15 @@ netdataDashboard.context = {
1942
},
1943
1944
'chrony.residualfreq': {
1932
- 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.' +
1933
- '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.',
1945
+ info: 'This shows the <code>residual frequency</code> for the currently selected reference source. ' +
1946
+ 'It reflects any difference between what the measurements from the reference source indicate the ' +
1947
+ 'frequency should be and the frequency currently being used. The reason this is not always zero is ' +
1948
+ 'that a smoothing procedure is applied to the frequency. Each time a measurement from the reference ' +
1949
+ 'source is obtained and a new residual frequency computed, the estimated accuracy of this residual ' +
1950
+ 'is compared with the estimated accuracy (see <code>skew</code>) of the existing frequency value. ' +
1951
+ 'A weighted average is computed for the new frequency, with weights depending on these accuracies. ' +
1952
+ 'If the measurements from the reference source follow a consistent trend, the residual will be ' +
1953
+ 'driven to zero over time.',
1954
height: 0.5,
1955
colors: NETDATA.colors[3]
1956
},
@@ -1955,7 +1975,7 @@ netdataDashboard.context = {
1975
1976
'btrfs.disk': {
1977
info: 'Physical disk usage of BTRFS. The disk space reported here is the raw physical disk space assigned to the BTRFS volume (i.e. <b>before any RAID levels</b>). BTRFS uses a two-stage allocator, first allocating large regions of disk space for one type of block (data, metadata, or system), and then using a regular block allocator inside those regions. <code>unallocated</code> is the physical disk space that is not allocated yet and is available to become data, metdata or system on demand. When <code>unallocated</code> is zero, all available disk space has been allocated to a specific function. Healthy volumes should ideally have at least five percent of their total space <code>unallocated</code>. You can keep your volume healthy by running the <code>btrfs balance</code> command on it regularly (check <code>man btrfs-balance</code> for more info). Note that some of the spac elisted as <code>unallocated</code> may not actually be usable if the volume uses devices of different sizes.',
1958
- colors: [ NETDATA.colors[12] ]
1978
+ colors: [NETDATA.colors[12]]
1979
},
1980
1981
'btrfs.data': {
web/index.html
+28
-17
@@ -572,9 +572,21 @@
572
// enable registry updates
573
var netdataRegistry = true;
574
575
+ // forward definition only - not used here
576
+ var netdataServer = undefined;
577
+ var netdataServerStatic = undefined;
578
+ var netdataCheckXSS = undefined;
579
+
580
// control the welcome modal and analytics
581
var this_is_demo = null;
582
583
+ function xssFix(s) {
584
+ return s.toString().replace(/</g, '<')
585
+ .replace(/>/g, '>')
586
+ .replace(/"/g, '"')
587
+ .replace(/'/g, '#27;');
588
+ }
589
+
590
// --------------------------------------------------------------------
591
// urlOptions
592
@@ -693,7 +705,7 @@
705
urlOptions.highlight = true;
706
}
707
else
696
- urlOptions.highlight = false
708
+ urlOptions.highlight = false;
709
710
switch(urlOptions.mode) {
711
case 'print':
@@ -1071,7 +1083,7 @@
1083
a1 += '<li role="separator" class="divider"></li>';
1084
1085
el += '<li><a href="https://github.com/firehol/netdata/wiki/mynetdata-menu-item" style="color: #999;" target="_blank">What is this?</a></li>';
1074
- a1 += '<li><a href="#" style="color: #999;" onclick="switchRegistryModalHandler(); return false;"><i class="fas fa-cog" style="color: #999;"></i></a></li>'
1086
+ a1 += '<li><a href="#" style="color: #999;" onclick="switchRegistryModalHandler(); return false;"><i class="fas fa-cog" style="color: #999;"></i></a></li>';
1087
1088
document.getElementById('mynetdata_servers').innerHTML = el;
1089
document.getElementById('mynetdata_servers2').innerHTML = el;
@@ -1100,7 +1112,7 @@
1112
1113
function netdataURL(url, forReload) {
1114
if(typeof url === 'undefined')
1103
- url = document.location.toString();
1115
+ url = xssFix(document.location.toString());
1116
1117
if(url.indexOf('#') !== -1)
1118
url = url.substring(0, url.indexOf('#'));
@@ -1820,9 +1832,9 @@
1832
var hi = 0, hlen = hcharts.length;
1833
while(hi < hlen) {
1834
if(typeof hcharts[hi] === 'function')
1823
- head += hcharts[hi](netdataDashboard.os, chart.id).replace('CHART_DURATION', duration.toString()).replace('CHART_UNIQUE_ID', chart.id);
1835
+ head += hcharts[hi](netdataDashboard.os, chart.id).replace(/CHART_DURATION/g, duration.toString()).replace(/CHART_UNIQUE_ID/g, chart.id);
1836
else
1825
- head += hcharts[hi].replace('CHART_DURATION', duration.toString()).replace('CHART_UNIQUE_ID', chart.id);
1837
+ head += hcharts[hi].replace(/CHART_DURATION/g, duration.toString()).replace(/CHART_UNIQUE_ID/g, chart.id);
1838
hi++;
1839
}
1840
}
@@ -2173,7 +2185,7 @@
2185
dimensions = ' of the sum of all dimensions ';
2186
2187
if(typeof alarm.lookup_dimensions !== 'undefined') {
2176
- var d = alarm.lookup_dimensions.replace('|', ',');
2188
+ var d = alarm.lookup_dimensions.replace(/|/g, ',');
2189
var x = d.split(',');
2190
if(x.length > 1)
2191
dimensions = 'of the sum of dimensions <code>' + alarm.lookup_dimensions + '</code> ';
@@ -2184,7 +2196,7 @@
2196
return '<code>' + alarm.lookup_method + '</code> '
2197
+ dimensions + ', of chart <code>' + alarm.chart + '</code>'
2198
+ ', starting <code>' + NETDATA.seconds4human(alarm.lookup_after + alarm.lookup_before, { space: ' ' }) + '</code> and up to <code>' + NETDATA.seconds4human(alarm.lookup_before, { space: ' ' }) + '</code>'
2187
- + ((alarm.lookup_options)?(', with options <code>' + alarm.lookup_options.replace(' ', ', ') + '</code>'):'')
2199
+ + ((alarm.lookup_options)?(', with options <code>' + alarm.lookup_options.replace(/ /g, ', ') + '</code>'):'')
2200
+ '.';
2201
}
2202
@@ -2268,7 +2280,6 @@
2280
}
2281
2282
// find the proper family of each alarm
2271
- var now = Date.now();
2283
var x, family, alarm;
2284
var count_active = 0;
2285
var count_all = 0;
@@ -2759,7 +2770,7 @@
2770
}
2771
2772
function alarmsCallback(data) {
2762
- var count = 0;
2773
+ var count = 0, x;
2774
for(x in data.alarms) {
2775
if(!data.alarms.hasOwnProperty(x)) continue;
2776
@@ -3269,7 +3280,7 @@
3280
loadSnapshotModalLog('info', 'Please wait, activating snapshot...');
3281
$('#loadSnapshotModal').modal('hide');
3282
3272
- netdataShowAlarms === false;
3283
+ netdataShowAlarms = false;
3284
netdataRegistry = false;
3285
netdataServer = tmpSnapshotData.server;
3286
NETDATA.serverDefault = netdataServer;
@@ -3517,7 +3528,7 @@
3528
var start_date = new Date(start_ms);
3529
var yyyymmddhhssmm = start_date.getFullYear() + NETDATA.zeropad(start_date.getMonth() + 1) + NETDATA.zeropad(start_date.getDate()) + '-' + NETDATA.zeropad(start_date.getHours()) + NETDATA.zeropad(start_date.getMinutes()) + NETDATA.zeropad(start_date.getSeconds());
3530
3520
- document.getElementById('saveSnapshotFilename').value = 'netdata-' + options.hostname.toString() + '-' + yyyymmddhhssmm.toString() + '-' + saveSnapshotViewDuration.toString() + '.snapshot'
3531
+ document.getElementById('saveSnapshotFilename').value = 'netdata-' + options.hostname.toString() + '-' + yyyymmddhhssmm.toString() + '-' + saveSnapshotViewDuration.toString() + '.snapshot';
3532
saveSnapshotSetCompression(saveSnapshotCompression);
3533
3534
var min = options.update_every;
@@ -3647,7 +3658,7 @@
3658
var data = state.data;
3659
state.data = null;
3660
data.state = null;
3650
- str = JSON.stringify(data);
3661
+ var str = JSON.stringify(data);
3662
3663
if (typeof str === 'string') {
3664
var cstr = compress(str);
@@ -4406,7 +4417,7 @@
4417
});
4418
4419
NETDATA.requiredJs.push({
4409
- url: NETDATA.serverStatic + 'dashboard_info.js?v20180628-1',
4420
+ url: NETDATA.serverStatic + 'dashboard_info.js?v20180916-1',
4421
async: false,
4422
isAlreadyLoaded: function() { return false; }
4423
});
@@ -4472,7 +4483,7 @@
4483
4484
document.getElementById('current_timezone').innerText = (NETDATA.options.current.timezone === 'default')?'unset, using browser default':NETDATA.options.current.timezone;
4485
return false;
4475
- }
4486
+ };
4487
4488
// our entry point
4489
// var netdataStarted = performance.now();
@@ -5662,7 +5673,7 @@
5673
</div>
5674
<div class="modal-footer">
5675
<button type="button" class="btn btn-success" data-dismiss="modal">keep it</button>
5665
- <a href="#" onclick="notifyForDeleteRegistry(true); return false;" type="button" class="btn btn-danger">delete it</a>
5676
+ <a href="#" onclick="notifyForDeleteRegistry(); return false;" type="button" class="btn btn-danger">delete it</a>
5677
</div>
5678
</div>
5679
</div>
@@ -5698,7 +5709,7 @@
5709
</div>
5710
<div class="modal-footer">
5711
<button type="button" class="btn btn-success" data-dismiss="modal">cancel</button>
5701
- <a href="#" onclick="notifyForSwitchRegistry(true); return false;" type="button" class="btn btn-danger">impersonate</a>
5712
+ <a href="#" onclick="notifyForSwitchRegistry(); return false;" type="button" class="btn btn-danger">impersonate</a>
5713
</div>
5714
</div>
5715
</div>
@@ -5729,6 +5740,6 @@
5740
</div>
5741
</div>
5742
<div id="hiddenDownloadLinks" style="display: none;" hidden></div>
5732
- <script type="text/javascript" src="dashboard.js?v20180628-1"></script>
5743
+ <script type="text/javascript" src="dashboard.js?v20180916-1"></script>
5744
</body>
5745
</html>