]> arthur.barton.de Git - netdata.git/commitdiff
multi-os support (final touch)
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 7 Feb 2017 23:00:08 +0000 (01:00 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 7 Feb 2017 23:00:08 +0000 (01:00 +0200)
conf.d/Makefile.am
configure.ac
web/dashboard_info.js
web/index.html

index acca5a4db978a0f4c99e9a569518701b3edb19c7..3c733aa168b2a95e870670f59288562c57b93aee 100644 (file)
@@ -57,11 +57,11 @@ dist_pythonconfig_DATA = \
     $(NULL)
 
 healthconfigdir=$(configdir)/health.d
+
 dist_healthconfig_DATA = \
     health.d/apache.conf \
     health.d/backend.conf \
     health.d/bind_rndc.conf \
-    health.d/cpu.conf \
     health.d/disks.conf \
     health.d/elasticsearch.conf \
     health.d/entropy.conf \
@@ -80,17 +80,23 @@ dist_healthconfig_DATA = \
     health.d/nginx.conf \
     health.d/postgres.conf \
     health.d/qos.conf \
-    health.d/ram.conf \
     health.d/redis.conf \
     health.d/retroshare.conf \
     health.d/softnet.conf \
     health.d/squid.conf \
-    health.d/swap.conf \
     health.d/tcp_resets.conf \
     health.d/udp_errors.conf \
     health.d/varnish.conf \
     $(NULL)
 
+if LINUX
+dist_healthconfig_DATA += \
+    health.d/cpu.conf \
+    health.d/ram.conf \
+    health.d/swap.conf \
+    $(NULL)
+endif LINUX
+
 chartsconfigdir=$(configdir)/charts.d
 dist_chartsconfig_DATA = \
     charts.d/apache.conf \
index fd9b0cd1c001f032f0788892b8ff2eb9f8f02e36..513929dbdfcba519b7a9e20ae56f0fd605a1f979 100644 (file)
@@ -59,11 +59,13 @@ darwin*)
        LDFLAGS="${LDFLAGS} -framework CoreFoundation -framework IOKit"
        ;;
 *)
+       build_target=linux
        ;;
 esac
 
 AM_CONDITIONAL([FREEBSD], [test x$build_target = xfreebsd])
 AM_CONDITIONAL([MACOS], [test x$build_target = xmacos])
+AM_CONDITIONAL([LINUX], [test x$build_target = xlinux])
 
 AC_ARG_ENABLE(
        [plugin-nfacct],
index 871a4f8f657701ef236be5cbcc247c5cc1309833..6885b6d443bbc8dc3f0a9f009189d4bf7085d9f8 100644 (file)
@@ -14,177 +14,177 @@ netdataDashboard.menu = {
     'services': {
         title: 'systemd Services',
         icon: '<i class="fa fa-cogs" aria-hidden="true"></i>',
-        info: 'Resources utilization of systemd services.'
+        info: 'Resources utilization of systemd services. netdata monitors all systemd services via cgroups (the resources accounting used by containers). '
     },
 
     'ap': {
         title: 'Access Points',
         icon: '<i class="fa fa-wifi" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for the access points (i.e. wireless interfaces in AP mode) found on the system.'
     },
 
     'tc': {
         title: 'Quality of Service',
         icon: '<i class="fa fa-globe" aria-hidden="true"></i>',
-        info: 'Netdata collects and visualizes tc 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). Also, data collection may have a slight time difference compared to the interface (QoS data collection is implemented with a BASH script, so a shift in data collection of a few milliseconds should be justified).'
+        info: 'Netdata collects and visualizes tc 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).'
     },
 
     'net': {
         title: 'Network Interfaces',
         icon: '<i class="fa fa-share-alt" aria-hidden="true"></i>',
-        info: 'Per network interface statistics collected from <code>/proc/net/dev</code>.'
+        info: 'Performance metrics for network interfaces.'
     },
 
     'ipv4': {
         title: 'IPv4 Networking',
         icon: '<i class="fa fa-cloud" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for the IPv4 stack of the system.'
     },
 
     'ipv6': {
         title: 'IPv6 Networking',
         icon: '<i class="fa fa-cloud" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for the IPv6 stack of the system.'
     },
 
     'ipvs': {
         title: 'IP Virtual Server',
         icon: '<i class="fa fa-eye" aria-hidden="true"></i>',
-        info: undefined
+        info: '<a href="http://www.linuxvirtualserver.org/software/ipvs.html" target="_blank">IPVS (IP Virtual Server)</a> implements transport-layer load balancing inside the Linux kernel, so called Layer-4 switching. IPVS running on a host acts as a load balancer at the front of a cluster of real servers, it can direct requests for TCP/UDP based services to the real servers, and makes services of the real servers to appear as a virtual service on a single IP address.'
     },
 
     'netfilter': {
         title: 'Firewall (netfilter)',
         icon: '<i class="fa fa-shield" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics of the netfilter components.'
     },
 
     'cpu': {
         title: 'CPUs',
         icon: '<i class="fa fa-bolt" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Detailed information for each CPU of the system. A summary of the system for all CPUs can be found at the <a href="#menu_system">System Overview</a> section.'
     },
 
     'mem': {
         title: 'Memory',
         icon: '<i class="fa fa-bolt" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Detailed information about the memory management of the system.'
     },
 
     'disk': {
         title: 'Disks',
         icon: '<i class="fa fa-folder" aria-hidden="true"></i>',
-        info: 'Charts with performance information for all the system disks. Special care has been given to present disk performance metrics in a way compatible with <code>iostat -x</code>. netdata by default prevents rendering performance charts for individual partitions and unmounted virtual disks. Disabled charts can still be enabled by altering the relative settings in the netdata configuration file.'
+        info: 'Charts with performance information for all the system disks. Special care has been given to present disk performance metrics in a way compatible with <code>iostat -x</code>. netdata by default prevents rendering performance charts for individual partitions and unmounted virtual disks. Disabled charts can still be enabled by configuring the relative settings in the netdata configuration file.'
     },
 
     'sensors': {
         title: 'Sensors',
         icon: '<i class="fa fa-leaf" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Readings of the configured system sensors.'
     },
 
     'nfsd': {
         title: 'NFS Server',
         icon: '<i class="fa fa-folder-open" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics of the Network File Server. NFS is a distributed file system protocol, allowing a user on a client computer to access files over a network, much like local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. The NFS is an open standard defined in Request for Comments (RFC).'
     },
 
     'nfs': {
         title: 'NFS Client',
         icon: '<i class="fa fa-folder-open" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics of the NFS operations of this system, acting as an NFS client.'
     },
 
     'apps': {
         title: 'Applications',
         icon: '<i class="fa fa-heartbeat" aria-hidden="true"></i>',
-        info: 'Per application statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through the entire <code>/proc</code> filesystem and aggregates statistics for applications of interest, defined in <code>/etc/netdata/apps_groups.conf</code> (the default is <a href="https://github.com/firehol/netdata/blob/master/conf.d/apps_groups.conf" target="_blank">here</a>). The plugin internally builds a process tree (much like <code>ps fax</code> does), and groups processes together (evaluating both child and parent processes) so that the result is always a chart with a predefined set of dimensions (of course, only application groups found running are reported). The reported values are compatible with <code>top</code>, although the netdata plugin counts also the resources of exited children (unlike <code>top</code> which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.',
+        info: 'Per application statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through all processes and aggregates statistics for applications of interest, defined in <code>/etc/netdata/apps_groups.conf</code> (the default is <a href="https://github.com/firehol/netdata/blob/master/conf.d/apps_groups.conf" target="_blank">here</a>). The plugin internally builds a process tree (much like <code>ps fax</code> does), and groups processes together (evaluating both child and parent processes) so that the result is always a chart with a predefined set of dimensions (of course, only application groups found running are reported). The reported values are compatible with <code>top</code>, although the netdata plugin counts also the resources of exited children (unlike <code>top</code> which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.',
         height: 1.5
     },
 
     'users': {
         title: 'Users',
         icon: '<i class="fa fa-user" aria-hidden="true"></i>',
-        info: 'Per user statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through the entire <code>/proc</code> filesystem and aggregates statistics per user. The reported values are compatible with <code>top</code>, although the netdata plugin counts also the resources of exited children (unlike <code>top</code> which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.',
+        info: 'Per user statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through all processes and aggregates statistics per user. The reported values are compatible with <code>top</code>, although the netdata plugin counts also the resources of exited children (unlike <code>top</code> which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.',
         height: 1.5
     },
 
     'groups': {
         title: 'User Groups',
         icon: '<i class="fa fa-users" aria-hidden="true"></i>',
-        info: 'Per user group statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through the entire <code>/proc</code> filesystem and aggregates statistics per user group. The reported values are compatible with <code>top</code>, although the netdata plugin counts also the resources of exited children (unlike <code>top</code> which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.',
+        info: 'Per user group statistics are collected using netdata\'s <code>apps.plugin</code>. This plugin walks through all processes and aggregates statistics per user group. The reported values are compatible with <code>top</code>, although the netdata plugin counts also the resources of exited children (unlike <code>top</code> which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.',
         height: 1.5
     },
 
     'netdata': {
         title: 'Netdata Monitoring',
         icon: '<i class="fa fa-bar-chart" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for the operation of netdata itself and its plugins.'
     },
 
     'example': {
         title: 'Example Charts',
-        info: undefined
+        info: 'Example charts, demonstrating the external plugin architecture.'
     },
 
     'cgroup': {
         title: '',
         icon: '<i class="fa fa-th" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Container resource utilization metrics. Netdata reads this information from <b>cgroups</b> (abbreviated from <b>control groups</b>), a Linux kernel feature that limits and accounts resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes. <b>cgroups</b> together with <b>namespaces</b> (that offer isolation between processes) provide what we usually call: <b>containers</b>.'
     },
 
     'cgqemu': {
         title: '',
         icon: '<i class="fa fa-th-large" aria-hidden="true"></i>',
-        info: undefined
+        info: 'QEMU virtual machine resource utilization metrics. QEMU (short for Quick Emulator) is a free and open-source hosted hypervisor that performs hardware virtualization.'
     },
 
     'fping': {
         title: 'fping',
         icon: '<i class="fa fa-exchange" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Network latency statistics, via <b>fping</b>. <b>fping</b> is a program to send ICMP echo probes to network hosts, similar to <code>ping</code>, but much better performing when pinging multiple hosts. fping versions after 3.15 can be directly used as netdata plugins.'
     },
 
     'memcached': {
         title: 'memcached',
         icon: '<i class="fa fa-database" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for <b>memcached</b>. Memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.'
     },
 
     'mysql': {
         title: 'MySQL',
         icon: '<i class="fa fa-database" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for <b>mysql</b>, the open-source relational database management system (RDBMS).'
     },
 
     'postgres': {
         title: 'Postgres',
         icon: '<i class="fa fa-database" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for <b>PostgresSQL</b>, the object-relational database (ORDBMS).'
     },
 
     'redis': {
         title: 'Redis',
         icon: '<i class="fa fa-database" aria-hidden="true"></i>',
-        info: undefined
+        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.'
     },
 
     'retroshare': {
         title: 'RetroShare',
         icon: '<i class="fa fa-share-alt" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for <b>RetroShare</b>. RetroShare is open source software for encrypted filesharing, serverless email, instant messaging, online chat, and BBS, based on a friend-to-friend network built on GNU Privacy Guard (GPG).'
     },
 
     'ipfs': {
         title: 'IPFS',
         icon: '<i class="fa fa-folder-open" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for the InterPlanetary File System (IPFS), a content-addressable, peer-to-peer hypermedia distribution protocol.'
     },
 
     'phpfpm': {
         title: 'PHP-FPM',
         icon: '<i class="fa fa-eye" aria-hidden="true"></i>',
-        info: undefined
+        info: 'Performance metrics for <b>PHP-FPM</b>, an alternative FastCGI implementation for PHP.'
     },
 
     'postfix': {
@@ -272,7 +272,7 @@ netdataDashboard.submenu = {
 
     'netfilter.conntrack': {
         title: 'Connection Tracker',
-        info: 'Netfilter Connection Tracker performance monitoring, read from <code>/proc/net/stat/nf_conntrack</code>. The connection tracker keeps track of all connections of the machine, inbound and outbound. It works by keeping a database with all open connections, tracking network and address translation and connection expectations.'
+        info: 'Netfilter Connection Tracker performance metrics. The connection tracker keeps track of all connections of the machine, inbound and outbound. It works by keeping a database with all open connections, tracking network and address translation and connection expectations.'
     },
 
     'netfilter.nfacct': {
@@ -282,17 +282,17 @@ netdataDashboard.submenu = {
 
     'netfilter.synproxy': {
         title: 'DDoS Protection',
-        info: 'DDoS Protection performance monitoring read from <code>/proc/net/stat/synproxy</code>. <a href="https://github.com/firehol/firehol/wiki/Working-with-SYNPROXY" target="_blank">SYNPROXY</a> is a TCP SYN packets proxy. It is used to protect any TCP server (like a web server) from SYN floods and similar DDoS attacks. It is a netfilter module, in the Linux kernel (since version 3.12). It is optimized to handle millions of packets per second utilizing all CPUs available without any concurrency locking between the connections. It can be used for any kind of TCP traffic (even encrypted), since it does not interfere with the content itself.'
+        info: 'DDoS protection performance metrics. <a href="https://github.com/firehol/firehol/wiki/Working-with-SYNPROXY" target="_blank">SYNPROXY</a> is a TCP SYN packets proxy. It is used to protect any TCP server (like a web server) from SYN floods and similar DDoS attacks. It is a netfilter module, in the Linux kernel (since version 3.12). It is optimized to handle millions of packets per second utilizing all CPUs available without any concurrency locking between the connections. It can be used for any kind of TCP traffic (even encrypted), since it does not interfere with the content itself.'
     },
 
     'system.softnet_stat': {
         title: 'softnet',
-        info: 'Statistics for CPUs SoftIRQs related to network receive work, read from <code>/proc/net/softnet_stat</code>. 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 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 use <code>sysctl</code> to increase <code>net.core.netdev_budget</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>.'
+        info: '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 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 use <code>sysctl</code> to increase <code>net.core.netdev_budget</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>.'
     },
 
     'cpu.softnet_stat': {
         title: 'softnet',
-        info: 'Statistics for per CPUs core SoftIRQs related to network receive work, read from <code>/proc/net/softnet_stat</code>. 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 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 use <code>sysctl</code> to increase <code>net.core.netdev_budget</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>.'
+        info: '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 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 use <code>sysctl</code> to increase <code>net.core.netdev_budget</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>.'
     }
 };
 
@@ -308,60 +308,64 @@ netdataDashboard.submenu = {
 //
 netdataDashboard.context = {
     'system.cpu': {
-        info: '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.<br/>Keep an eye on <b>iowait</b> ' + sparkline('system.cpu', 'iowait', '%') + '. If it is constantly high, your disks are a bottleneck and they slow your system down.<br/>Another important metric worth monitoring, is <b>softirq</b> ' + sparkline('system.cpu', 'softirq', '%') + '. A constantly high percentage of softirq may indicate network driver issues.',
+        info: function() {
+            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.'
+                + 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.')
+                + netdataDashboard.sparkline('<br/>An important metric worth monitoring, is <b>softirq</b> ', 'system.cpu', 'softirq', '%', '. A constantly high percentage of softirq may indicate network driver issues.');
+        },
         valueRange: "[0, 100]"
     },
 
     'system.load': {
-        info: 'Current system load, i.e. the number of processes using CPU or waiting for system resources (usually CPU and disk). The 3 metrics refer to 1, 5 and 15 minute averages. Linux calculates this once every 5 seconds. Netdata reads them from <code>/proc/loadavg</code>. For more information check <a href="https://en.wikipedia.org/wiki/Load_(computing)" target="_blank">this wikipedia article</a>',
+        info: 'Current system load, i.e. the number of processes using CPU or waiting for system resources (usually CPU and disk). The 3 metrics refer to 1, 5 and 15 minute averages. The system calculates this once every 5 seconds. For more information check <a href="https://en.wikipedia.org/wiki/Load_(computing)" target="_blank">this wikipedia article</a>',
         height: 0.7
     },
 
     'system.io': {
-        info: 'Total Disk I/O, for all disks, read from <code>/proc/vmstat</code>. 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.'
+        info: 'Total Disk I/O, for all 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.'
     },
 
     'system.swapio': {
-        info: 'Total Swap I/O, read from <code>/proc/vmstat</code>. (netdata measures both <code>in</code> and <code>out</code>. If either of them is not shown in the chart, it is because it is zero - you can change the page settings to always render all the available dimensions on all charts).'
+        info: 'Total Swap I/O. (netdata measures both <code>in</code> and <code>out</code>. If either of them is not shown in the chart, it is because it is zero - you can change the page settings to always render all the available dimensions on all charts).'
     },
 
     'system.pgfaults': {
-        info: 'Total page faults, read from <code>/proc/vmstat</code>. <b>Major page faults</b> indicates that the system is using its swap. You can find which applications use the swap at the <a href="#menu_apps">Applications Monitoring</a> section.'
+        info: 'Total page faults. <b>Major page faults</b> indicates that the system is using its swap. You can find which applications use the swap at the <a href="#menu_apps">Applications Monitoring</a> section.'
     },
 
     'system.entropy': {
         colors: '#CC22AA',
-        info: '<a href="https://en.wikipedia.org/wiki/Entropy_(computing)" target="_blank">Entropy</a>, read from <code>/proc/sys/kernel/random/entropy_avail</code>, is like a pool of random numbers (<a href="https://en.wikipedia.org/wiki//dev/random" target="_blank">/dev/random</a>) that are mainly used in cryptography. It is advised that the pool remains always <a href="https://blog.cloudflare.com/ensuring-randomness-with-linuxs-random-number-generator/" target="_blank">above 200</a>. If the pool of entropy gets empty, you risk your security to be predictable and you should install a user-space random numbers generating daemon, like <code>haveged</code> or <code>rng-tools</code> (i.e. <b>rngd</b>), to keep the pool in healthy levels.'
+        info: '<a href="https://en.wikipedia.org/wiki/Entropy_(computing)" target="_blank">Entropy</a>, is like a pool of random numbers (<a href="https://en.wikipedia.org/wiki//dev/random" target="_blank">/dev/random</a>) that are mainly used in cryptography. It is advised that the pool remains always <a href="https://blog.cloudflare.com/ensuring-randomness-with-linuxs-random-number-generator/" target="_blank">above 200</a>. If the pool of entropy gets empty, you risk your security to be predictable and you should install a user-space random numbers generating daemon, like <code>haveged</code> or <code>rng-tools</code> (i.e. <b>rngd</b>), to keep the pool in healthy levels.'
     },
 
     'system.forks': {
         colors: '#5555DD',
-        info: 'The number of new processes created per second, read from <code>/proc/stat</code>.'
+        info: 'Number of new processes created.'
     },
 
     'system.intr': {
         colors: '#DD5555',
-        info: 'Total number of CPU interrupts, read from <code>/proc/stat</code>. Check <code>system.interrupts</code> that gives more detail about each interrupt and also the <a href="#menu_cpu">CPUs</a> section where interrupts are analyzed per CPU core.'
+        info: 'Total number of CPU interrupts. Check <code>system.interrupts</code> that gives more detail about each interrupt and also the <a href="#menu_cpu">CPUs</a> section where interrupts are analyzed per CPU core.'
     },
 
     'system.interrupts': {
-        info: 'CPU interrupts in detail, read from <code>/proc/interrupts</code>. At the <a href="#menu_cpu">CPUs</a> section, interrupts are analyzed per CPU core.'
+        info: 'CPU interrupts in detail. At the <a href="#menu_cpu">CPUs</a> section, interrupts are analyzed per CPU core.'
     },
 
     'system.softirqs': {
-        info: 'CPU softirqs in detail, read from <code>/proc/softirqs</code>. At the <a href="#menu_cpu">CPUs</a> section, softirqs are analyzed per CPU core.'
+        info: 'CPU softirqs in detail. At the <a href="#menu_cpu">CPUs</a> section, softirqs are analyzed per CPU core.'
     },
 
     'system.processes': {
-        info: 'System processes, read from <code>/proc/stat</code>. <b>Running</b> are the processes in the CPU. <b>Blocked</b> are processes that are willing to enter the CPU, but they cannot, e.g. because they wait for disk activity.'
+        info: 'System processes. <b>Running</b> are the processes in the CPU. <b>Blocked</b> are processes that are willing to enter the CPU, but they cannot, e.g. because they wait for disk activity.'
     },
 
     'system.active_processes': {
-        info: 'All system processes, read from <code>/proc/loadavg</code>.'
+        info: 'All system processes.'
     },
 
     'system.ctxt': {
-        info: '<a href="https://en.wikipedia.org/wiki/Context_switch" target="_blank">Context Switches</a>, read from <code>/proc/stat</code>, is the switching of the CPU from one process, task or thread to another. If there are many processes or threads willing to execute and very few CPU cores available to handle them, the system is making more context switching to balance the CPU resources among them. The whole process is computationally intensive. The more the context switches, the slower the system gets.'
+        info: '<a href="https://en.wikipedia.org/wiki/Context_switch" target="_blank">Context Switches</a>, is the switching of the CPU from one process, task or thread to another. If there are many processes or threads willing to execute and very few CPU cores available to handle them, the system is making more context switching to balance the CPU resources among them. The whole process is computationally intensive. The more the context switches, the slower the system gets.'
     },
 
     'system.idlejitter': {
@@ -370,19 +374,19 @@ netdataDashboard.context = {
     },
 
     'system.ipv4': {
-        info: 'Total IPv4 Traffic, read from <code>/proc/net/netstat</code>.'
+        info: 'Total IPv4 Traffic.'
     },
 
     'system.ipv6': {
-        info: 'Total IPv6 Traffic, read from <code>/proc/net/snmp6</code>.'
+        info: 'Total IPv6 Traffic.'
     },
 
     'system.ram': {
-        info: 'System memory, read from <code>/proc/meminfo</code>.'
+        info: 'System memory usage.'
     },
 
     'system.swap': {
-        info: 'System swap memory, read from <code>/proc/meminfo</code>.'
+        info: 'System swap memory usage.'
     },
 
     // ------------------------------------------------------------------------
@@ -413,24 +417,24 @@ netdataDashboard.context = {
     },
 
     'mem.pgfaults': {
-       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. These values are read from <code>/proc/vmstat</code>.'
+       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.'
     },
 
     'mem.committed': {
         colors: NETDATA.colors[3],
-        info: 'Committed Memory, read from <code>/proc/meminfo</code>, is the sum of all memory which has been allocated by processes.'
+        info: 'Committed Memory, is the sum of all memory which has been allocated by processes.'
     },
 
     'mem.writeback': {
-        info: 'Read from <code>/proc/meminfo</code>, <b>Dirty</b> is the amount of memory waiting to be written to disk. <b>Writeback</b> is how much memory is actively being written to disk.'
+        info: '<b>Dirty</b> is the amount of memory waiting to be written to disk. <b>Writeback</b> is how much memory is actively being written to disk.'
     },
 
     'mem.kernel': {
-        info: 'Read from <code>/proc/meminfo</code>, This chart displays the total ammount of memory being used by the kernel. <b>Slab</b> is the amount of memory used by the kernel to cache data structures for its own use. <b>KernelStack</b> is the amount of memory allocated for each task done by the kernel. <b>PageTables</b> is the amount of memory decicated to the lowest level of page tables (A page table is used to turn a virtual address into a physical memory address). <b>VmallocUsed</b> is the amount of memory being used as virtual address space.'
+        info: 'The total ammount of memory being used by the kernel. <b>Slab</b> is the amount of memory used by the kernel to cache data structures for its own use. <b>KernelStack</b> is the amount of memory allocated for each task done by the kernel. <b>PageTables</b> is the amount of memory decicated to the lowest level of page tables (A page table is used to turn a virtual address into a physical memory address). <b>VmallocUsed</b> is the amount of memory being used as virtual address space.'
     },
 
     'mem.slab': {
-        info: 'Read from <code>/proc/meminfo</code>, <b>reclaimable</b> is the amount of memory which the kernel can reuse. <b>unreclaimable</b> can not be reused even when the kernel is lacking memory.'
+        info: '<b>Reclaimable</b> is the amount of memory which the kernel can reuse. <b>Unreclaimable</b> can not be reused even when the kernel is lacking memory.'
     },
 
     // ------------------------------------------------------------------------
@@ -568,12 +572,12 @@ netdataDashboard.context = {
         heads: [
             netdataDashboard.gaugeChart('Utilization', '12%', '', '#FF5588')
         ],
-        info: 'Disk Utilization measures the amount of time the disk was busy with something. This is not related to its performance. 100% means that the Linux kernel always had an outstanding operation on the disk. Keep in mind that depending on the underlying technology of the disk, 100% here may or may not be an indication of congestion.'
+        info: 'Disk Utilization measures the amount of time the disk was busy with something. This is not related to its performance. 100% means that the system always had an outstanding operation on the disk. Keep in mind that depending on the underlying technology of the disk, 100% here may or may not be an indication of congestion.'
     },
 
     'disk.backlog': {
         colors: '#0099CC',
-        info: 'Backlog is an indication of the duration of pending disk operations. On every I/O event the Linux kernel is multiplying the time spent doing I/O since the last update of this field with the number of pending operations. While not accurate, this metric can provide an indication of the expected completion time of the operations in progress.'
+        info: 'Backlog is an indication of the duration of pending disk operations. On every I/O event the system is multiplying the time spent doing I/O since the last update of this field with the number of pending operations. While not accurate, this metric can provide an indication of the expected completion time of the operations in progress.'
     },
 
     'disk.io': {
@@ -585,7 +589,7 @@ netdataDashboard.context = {
     },
 
     'disk.ops': {
-        info: 'Completed disk I/O operations. Keep in mind the number of operations requested might be higher, since the Linux kernel is able to merge adjacent to each other (see merged operations chart).'
+        info: 'Completed disk I/O operations. Keep in mind the number of operations requested might be higher, since the system is able to merge adjacent to each other (see merged operations chart).'
     },
 
     'disk.qops': {
@@ -598,7 +602,7 @@ netdataDashboard.context = {
     },
     'disk.mops': {
         height: 0.5,
-        info: 'The number of merged disk operations. The Linux kernel is able to merge adjacent I/O operations, for example two 4KB reads can become one 8KB read before given to disk.'
+        info: 'The number of merged disk operations. The system is able to merge adjacent I/O operations, for example two 4KB reads can become one 8KB read before given to disk.'
     },
     'disk.svctm': {
         height: 0.5,
index 04ff2218b7f63c635ab426f9acaa5650ea2aea4c..6daed50666b11537759a748150dc14690317680e 100644 (file)
                 if(localStorageTest() === true)
                     ret = localStorage.getItem(name);
             }
-            catch(error) {
-                ;
-            }
+            catch(error) {}
 
             if(typeof ret === 'undefined' || ret === null)
                 return null;
                     return true;
                 }
             }
-            catch(error) {
-                ;
-            }
+            catch(error) {}
 
             return false;
         }
                             this_is_demo = true;
                 }
             }
-            catch(error) {
-                ;
-            }
-
+            catch(error) {}
             return this_is_demo;
         }
 
         }
 
         function netdataReload(url) {
-            var t = netdataURL(url);
-            // console.log('netdataReload: ' + t);
-            document.location = t;
+            document.location = netdataURL(url);
 
             // since we play with hash
             // this is needed to reload the page
 
         var deleteRegistryUrl = null;
         function deleteRegistryModalHandler(guid, name, url) {
+            void(guid);
+
             deleteRegistryUrl = url;
             document.getElementById('deleteRegistryServerName').innerHTML = name;
             document.getElementById('deleteRegistryServerName2').innerHTML = name;
         }
 
         var options = {
-            sparklines_registry: {},
             menus: {},
             submenu_names: {},
             data: null,
             hostname: 'netdata_server', // will be overwritten by the netdata server
-            categories: new Array(),
+            categories: [],
             categories_idx: {},
-            families: new Array(),
+            families: [],
             families_idx: {},
 
             chartsPerRow: 0,
             chartsMinWidth: 1450,
-            chartsHeight: 180,
-            sparklinesHeight: 60,
+            chartsHeight: 180
         };
 
-        // generate a sparkline
-        // used in the documentation
-        function sparkline(chart, dimension, units) {
-            var key = chart + '.' + dimension;
-
-            if(typeof units === 'undefined')
-                units = '';
-
-            if(typeof options.sparklines_registry[key] === 'undefined')
-                options.sparklines_registry[key] = { count: 1 };
-            else
-                options.sparklines_registry[key].count++;
-
-            key = key + '.' + options.sparklines_registry[key].count;
-
-            var h = '<div data-netdata="' + chart + '" data-after="-120" data-width="25%" data-height="15px" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-dimensions="' + dimension + '" data-show-value-of-' + dimension + '-at="' + key + '"></div> (<span id="' + key + '" style="display: inline-block; min-width: 50px; text-align: right;">X</span>' + units + ')';
-
-            return h;
-        }
-
         function chartsPerRow(total) {
             if(options.chartsPerRow === 0) {
-                width = Math.floor(total / options.chartsMinWidth);
+                var width = Math.floor(total / options.chartsMinWidth);
                 if(width === 0) width = 1;
                 return width;
             }
 
         function sortObjectByPriority(object) {
             var idx = {};
-            var sorted = new Array();
+            var sorted = [];
 
             for(var i in object) {
+                if(!object.hasOwnProperty(i)) continue;
+
                 if(typeof idx[i] === 'undefined') {
                     idx[i] = object[i];
                     sorted.push(i);
         // ----------------------------------------------------------------------------
 
         var netdataDashboard = {
+            sparklines_registry: {},
+
             menu: {},
             submenu: {},
             context: {},
 
+            // generate a sparkline
+            // used in the documentation
+            sparkline: function (prefix, chart, dimension, units, suffix) {
+                if(options.data === null || typeof options.data.charts === 'undefined')
+                    return '';
+
+                if(typeof options.data.charts[chart] === 'undefined')
+                    return '';
+
+                if(typeof options.data.charts[chart].dimensions === 'undefined')
+                    return '';
+
+                if(typeof options.data.charts[chart].dimensions[dimension] === 'undefined')
+                    return '';
+
+                var key = chart + '.' + dimension;
+
+                if(typeof units === 'undefined')
+                    units = '';
+
+                if(typeof this.sparklines_registry[key] === 'undefined')
+                    this.sparklines_registry[key] = { count: 1 };
+                else
+                    this.sparklines_registry[key].count++;
+
+                key = key + '.' + this.sparklines_registry[key].count;
+
+                return prefix + '<div data-netdata="' + chart + '" data-after="-120" data-width="25%" data-height="15px" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-dimensions="' + dimension + '" data-show-value-of-' + dimension + '-at="' + key + '"></div> (<span id="' + key + '" style="display: inline-block; min-width: 50px; text-align: right;">X</span>' + units + ')' + suffix;
+            },
+
             gaugeChart: function(title, width, dimensions, colors) {
                 if(typeof colors === 'undefined')
                     colors = '';
                     dimensions = '';
 
                 return '<div data-netdata="CHART_UNIQUE_ID"'
-                                        + ' data-dimensions="' + dimensions + '"'
-                                        + ' data-chart-library="gauge"'
-                                        + ' data-gauge-adjust="width"'
-                                        + ' data-title="' + title + '"'
-                                        + ' data-width="' + width + '"'
-                                        + ' data-before="0"'
-                                        + ' data-after="-CHART_DURATION"'
-                                        + ' data-points="CHART_DURATION"'
-                                        + ' data-colors="' + colors + '"'
-                                        + ' role="application"></div>';
+                            + ' data-dimensions="' + dimensions + '"'
+                            + ' data-chart-library="gauge"'
+                            + ' data-gauge-adjust="width"'
+                            + ' data-title="' + title + '"'
+                            + ' data-width="' + width + '"'
+                            + ' data-before="0"'
+                            + ' data-after="-CHART_DURATION"'
+                            + ' data-points="CHART_DURATION"'
+                            + ' data-colors="' + colors + '"'
+                            + ' role="application"></div>';
             },
 
             anyAttribute: function(obj, attr, key, def) {
-                if(typeof obj[key] !== 'undefined') {
-                    if(typeof obj[key][attr] !== 'undefined')
-                        return obj[key][attr];
+                if(typeof(obj[key]) !== 'undefined') {
+                    var x = obj[key][attr];
+
+                    if(typeof(x) === 'undefined')
+                        return def;
+
+                    if(typeof(x) === 'function')
+                        return x();
+
+                    return x;
                 }
+
                 return def;
             },
 
             menuTitle: function(chart) {
                 if(typeof chart.menu_pattern !== 'undefined') {
-                    return (netdataDashboard.anyAttribute(netdataDashboard.menu, 'title', chart.menu_pattern, chart.menu_pattern).toString()
+                    return (this.anyAttribute(this.menu, 'title', chart.menu_pattern, chart.menu_pattern).toString()
                             + '&nbsp;' + chart.type.slice(-(chart.type.length - chart.menu_pattern.length - 1)).toString()).replace(/_/g, ' ');
                 }
 
-                return (netdataDashboard.anyAttribute(netdataDashboard.menu, 'title', chart.menu, chart.menu)).toString().replace(/_/g, ' ');
+                return (this.anyAttribute(this.menu, 'title', chart.menu, chart.menu)).toString().replace(/_/g, ' ');
             },
 
             menuIcon: function(chart) {
                 if(typeof chart.menu_pattern !== 'undefined')
-                    return netdataDashboard.anyAttribute(netdataDashboard.menu, 'icon', chart.menu_pattern, '<i class="fa fa-puzzle-piece" aria-hidden="true"></i>').toString();
+                    return this.anyAttribute(this.menu, 'icon', chart.menu_pattern, '<i class="fa fa-puzzle-piece" aria-hidden="true"></i>').toString();
 
-                return netdataDashboard.anyAttribute(netdataDashboard.menu, 'icon', chart.menu, '<i class="fa fa-puzzle-piece" aria-hidden="true"></i>');
+                return this.anyAttribute(this.menu, 'icon', chart.menu, '<i class="fa fa-puzzle-piece" aria-hidden="true"></i>');
             },
 
-            menuInfo: function(menu) {
-                return netdataDashboard.anyAttribute(netdataDashboard.menu, 'info', menu, null);
+            menuInfo: function(chart) {
+                if(typeof chart.menu_pattern !== 'undefined')
+                    return this.anyAttribute(this.menu, 'info', chart.menu_pattern, null);
+
+                return this.anyAttribute(this.menu, 'info', chart.menu, null);
             },
 
-            menuHeight: function(menu, relative) {
-                return netdataDashboard.anyAttribute(netdataDashboard.menu, 'height', menu, 1.0) * relative;
+            menuHeight: function(chart) {
+                if(typeof chart.menu_pattern !== 'undefined')
+                    return this.anyAttribute(this.menu, 'height', chart.menu_pattern, 1.0);
+
+                return this.anyAttribute(this.menu, 'height', chart.menu, 1.0);
             },
 
             submenuTitle: function(menu, submenu) {
                 var key = menu + '.' + submenu;
-                var title = netdataDashboard.anyAttribute(netdataDashboard.submenu, 'title', key, submenu).toString().replace(/_/g, ' ');;
+                var title = this.anyAttribute(this.submenu, 'title', key, submenu).toString().replace(/_/g, ' ');
                 if(title.length > 28) {
                     var a = title.substring(0, 13);
                     var b = title.substring(title.length - 12, title.length);
 
             submenuInfo: function(menu, submenu) {
                 var key = menu + '.' + submenu;
-                return netdataDashboard.anyAttribute(netdataDashboard.submenu, 'info', key, null);
+                return this.anyAttribute(this.submenu, 'info', key, null);
             },
 
             submenuHeight: function(menu, submenu, relative) {
                 var key = menu + '.' + submenu;
-                return netdataDashboard.anyAttribute(netdataDashboard.submenu, 'height', key, 1.0) * relative;
+                return this.anyAttribute(this.submenu, 'height', key, 1.0) * relative;
             },
 
             contextInfo: function(id) {
-                if(typeof netdataDashboard.context[id] !== 'undefined' && typeof netdataDashboard.context[id].info !== 'undefined')
-                    return '<div class="chart-message netdata-chart-alignment" role="document">' + netdataDashboard.context[id].info + '</div>';
+                var x = this.anyAttribute(this.context, 'info', id, null);
+
+                if(x !== null)
+                    return '<div class="chart-message netdata-chart-alignment" role="document">' + x + '</div>';
                 else
                     return '';
             },
 
             contextValueRange: function(id) {
-                if(typeof netdataDashboard.context[id] !== 'undefined' && typeof netdataDashboard.context[id].valueRange !== 'undefined')
-                    return netdataDashboard.context[id].valueRange;
+                if(typeof this.context[id] !== 'undefined' && typeof this.context[id].valueRange !== 'undefined')
+                    return this.context[id].valueRange;
                 else
                     return '[null, null]';
             },
 
             contextHeight: function(id, def) {
-                if(typeof netdataDashboard.context[id] !== 'undefined' && typeof netdataDashboard.context[id].height !== 'undefined')
-                    return def * netdataDashboard.context[id].height;
+                if(typeof this.context[id] !== 'undefined' && typeof this.context[id].height !== 'undefined')
+                    return def * this.context[id].height;
                 else
                     return def;
             }
             var charts = data.charts;
 
             for(var c in charts) {
+                if(!charts.hasOwnProperty(c)) continue;
+
                 enrichChartData(charts[c]);
 
                 // create the menu
                         submenus: {},
                         title: netdataDashboard.menuTitle(charts[c]),
                         icon: netdataDashboard.menuIcon(charts[c]),
-                        info: netdataDashboard.menuInfo(charts[c].menu),
-                        height: netdataDashboard.menuHeight(charts[c].menu, options.chartsHeight)
+                        info: netdataDashboard.menuInfo(charts[c]),
+                        height: netdataDashboard.menuHeight(charts[c]) * options.chartsHeight
                     };
                 }
 
                 if(typeof menus[charts[c].menu].submenus[charts[c].submenu] === 'undefined') {
                     menus[charts[c].menu].submenus[charts[c].submenu] = {
                         priority: charts[c].priority,
-                        charts: new Array(),
+                        charts: [],
                         title: null,
                         info: netdataDashboard.submenuInfo(charts[c].menu, charts[c].submenu),
                         height: netdataDashboard.submenuHeight(charts[c].menu, charts[c].submenu, menus[charts[c].menu].height)
             // propagate the descriptive subname given to QoS
             // to all the other submenus with the same name
             for(var m in menus) {
+                if(!menus.hasOwnProperty(m)) continue;
+
                 for(var s in menus[m].submenus) {
+                    if(!menus[m].submenus.hasOwnProperty(s)) continue;
+
                     // set the family using a name
                     if(typeof options.submenu_names[s] !== 'undefined') {
                         menus[m].submenus[s].title = s + ' (' + options.submenu_names[s] + ')';
         var bootstrapTableLoaded = false;
         function loadBootstrapTable(callback) {
             if(bootstrapTableLoaded === false) {
-                bootstrapTableLoaded === true;
+                bootstrapTableLoaded = true;
                 loadJs(NETDATA.serverDefault + 'lib/bootstrap-table-1.11.0.min.js', function() {
                     loadJs(NETDATA.serverDefault + 'lib/bootstrap-table-export-1.11.0.min.js', function() {
                         loadJs(NETDATA.serverDefault + 'lib/tableExport-1.6.0.min.js', callback);
             var footer = '<hr/><a href="https://github.com/firehol/netdata/wiki/Generating-Badges" target="_blank">netdata badges</a> refresh automatically. Their color indicates the state of the alarm: <span style="color: #e05d44"><b>&nbsp;red&nbsp;</b></span> is critical, <span style="color:#fe7d37"><b>&nbsp;orange&nbsp;</b></span> is warning, <span style="color: #4c1"><b>&nbsp;bright green&nbsp;</b></span> is ok, <span style="color: #9f9f9f"><b>&nbsp;light grey&nbsp;</b></span> is undefined (i.e. no data or no status), <span style="color: #000"><b>&nbsp;black&nbsp;</b></span> is not initialized. You can copy and paste their URLs to embed them in any web page.<br/>netdata can send notifications for these alarms. Check <a href="https://github.com/firehol/netdata/blob/master/conf.d/health_alarm_notify.conf">this configuration file</a> for more information.';
 
             NETDATA.alarms.get('all', function(data) {
-                options.alarm_families = new Array();
+                options.alarm_families = [];
 
                 alarmsCallback(data);
 
                         return '';
                     }
 
-                    var has_alarm = ((typeof alarm.warn !== 'undefined' || typeof alarm.crit !== 'undefined')?true:false);
+                    var has_alarm = (typeof alarm.warn !== 'undefined' || typeof alarm.crit !== 'undefined');
 
                     var role_href = ((has_alarm === true)?('<br/>&nbsp;<br/>role: <b>' + alarm.recipient + '</b><br/>&nbsp;<br/><b><i class="fa fa-line-chart" aria-hidden="true"></i></b><small>&nbsp;&nbsp;<a href="#" onClick="NETDATA.alarms.scrollToChart(\'' + alarm.chart + '\'); $(\'#alarmsModal\').modal(\'hide\'); return false;">jump to chart</a></small>'):('&nbsp;'));
 
 
                 // find the proper family of each alarm
                 var now = Date.now();
-                var x;
+                var x, family, alarm;
                 var count_active = 0;
                 var count_all = 0;
                 var families = {};
-                var families_sort = new Array();
+                var families_sort = [];
                 for(x in data.alarms) {
-                    var alarm = data.alarms[x];
-                    var family = alarm.family;
+                    if(!data.alarms.hasOwnProperty(x)) continue;
+
+                    alarm = data.alarms[x];
+                    family = alarm.family;
 
                     // find the chart
                     var chart = options.data.charts[alarm.chart];
                     if(typeof families[family] === 'undefined') {
                         families[family] = {
                             name: family,
-                            arr: new Array(),
+                            arr: [],
                             priority: chart.priority
                         };
 
                 var fc = 0;
                 var len = families_sorted.length;
                 while(len--) {
-                    var family = families_sorted[len].name;
+                    family = families_sorted[len].name;
                     var active_family_added = false;
                     var expanded = 'true';
                     var collapsed = '';
                     if(fc !== 0) {
                         all += "</table></div></div></div>";
                         expanded = 'false';
-                        collapsed = 'class="collapsed"'
+                        collapsed = 'class="collapsed"';
                         cin = '';
                     }
 
                     var arr = families[family].arr;
                     var c = arr.length;
                     while(c--) {
-                        var alarm = arr[c];
+                        alarm = arr[c];
                         if(alarm.status === 'WARNING' || alarm.status === 'CRITICAL') {
                             if(!active_family_added) {
                                 active_family_added = true;
                 if(families_sorted.length > 0) alarm_family_show(0);
 
                 // register bootstrap events
-                $('#alarms_all_accordion').on('show.bs.collapse', function (d) {
+                var $accordion = $('#alarms_all_accordion');
+                $accordion.on('show.bs.collapse', function (d) {
                     var target = $(d.target);
                     var id = $(target).data('alarm-id');
                     alarm_family_show(id);
                 });
-                $('#alarms_all_accordion').on('hidden.bs.collapse', function (d) {
+                $accordion.on('hidden.bs.collapse', function (d) {
                     var target = $(d.target);
                     var id = $(target).data('alarm-id');
                     $('#alarm_all_' + id.toString()).html('');
                             fileName: 'netdata_alarm_log'
                         },
                         rowStyle: function(row, index) {
+                            void(index);
+
                             switch(row.status) {
                                 case 'CRITICAL' : return { classes: 'danger'  }; break;
                                 case 'WARNING'  : return { classes: 'warning' }; break;
                                 title: 'Event Date',
                                 valign: 'middle',
                                 titleTooltip: 'The date and time the even took place',
-                                formatter: function(value, row, index) { return timestamp4human(value, ' '); },
+                                formatter: function(value, row, index) { void(row); void(index); return timestamp4human(value, ' '); },
                                 align: 'center',
-                                valign: 'middle',
                                 switchable: false,
                                 sortable: true
                             },
                                 valign: 'middle',
                                 titleTooltip: 'The host that generated this event',
                                 align: 'center',
-                                valign: 'middle',
                                 visible: false,
                                 sortable: true
                             },
                                 field: 'unique_id',
                                 title: 'Unique ID',
                                 titleTooltip: 'The host unique ID for this event',
-                                formatter: function(value, row, index) { return alarmid4human(value); },
+                                formatter: function(value, row, index) { void(row); void(index); return alarmid4human(value); },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 field: 'alarm_id',
                                 title: 'Alarm ID',
                                 titleTooltip: 'The ID of the alarm that generated this event',
-                                formatter: function(value, row, index) { return alarmid4human(value); },
+                                formatter: function(value, row, index) { void(row); void(index); return alarmid4human(value); },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 field: 'alarm_event_id',
                                 title: 'Alarm Event ID',
                                 titleTooltip: 'The incremental ID of this event for the given alarm',
-                                formatter: function(value, row, index) { return alarmid4human(value); },
+                                formatter: function(value, row, index) { void(row); void(index); return alarmid4human(value); },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 title: 'Alarm',
                                 titleTooltip: 'The alarm name that generated this event',
                                 formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
                                     return value.toString().replace(/_/g, ' ');
                                 },
                                 align: 'center',
                                 title: 'Old Value',
                                 titleTooltip: 'The value of the alarm, just before this event',
                                 formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
                                     return ((value !== null)?Math.round(value * 100) / 100:'NaN').toString();
                                 },
                                 align: 'center',
                                 title: 'Value',
                                 titleTooltip: 'The value of the alarm, that triggered this event',
                                 formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
                                     return ((value !== null)?Math.round(value * 100) / 100:'NaN').toString();
                                 },
                                 align: 'right',
                                 field: 'duration',
                                 title: 'Last Duration',
                                 titleTooltip: 'The duration the alarm was at its previous state, just before this event',
-                                formatter: function(value, row, index) { return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' }); },
+                                formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
+                                    return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });
+                                },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 field: 'non_clear_duration',
                                 title: 'Raised Duration',
                                 titleTooltip: 'The duration the alarm was raised, just before this event',
-                                formatter: function(value, row, index) { return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' }); },
+                                formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
+                                    return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });
+                                },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 title: 'Processed Status',
                                 titleTooltip: 'True when this event is processed',
                                 formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
+
                                     if(value === true)
                                         return 'DONE';
                                     else
                                 title: 'Updated Status',
                                 titleTooltip: 'True when this event has been updated by another event',
                                 formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
+
                                     if(value === true)
                                         return 'UPDATED';
                                     else
                                 field: 'updated_by_id',
                                 title: 'Updated By ID',
                                 titleTooltip: 'The unique ID of the event that obsoleted this one',
-                                formatter: function(value, row, index) { return alarmid4human(value); },
+                                formatter: function(value, row, index) { void(row); void(index); return alarmid4human(value); },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 field: 'updates_id',
                                 title: 'Updates ID',
                                 titleTooltip: 'The unique ID of the event obsoleted because of this event',
-                                formatter: function(value, row, index) { return alarmid4human(value); },
+                                formatter: function(value, row, index) { void(row); void(index); return alarmid4human(value); },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 field: 'exec_run',
                                 title: 'Script Run At',
                                 titleTooltip: 'The date and time the script has been ran',
-                                formatter: function(value, row, index) { return timestamp4human(value, ' '); },
+                                formatter: function(value, row, index) { void(row); void(index); return timestamp4human(value, ' '); },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 title: 'Script Return Value',
                                 titleTooltip: 'The return code of the script',
                                 formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
+
                                     if(value === 0)
                                         return 'OK (returned 0)';
                                     else
                                 field: 'delay',
                                 title: 'Script Delay',
                                 titleTooltip: 'The hysteresis of the notification',
-                                formatter: function(value, row, index) { return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' }); },
+                                formatter: function(value, row, index) {
+                                    void(row);
+                                    void(index);
+
+                                    return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });
+                                },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
                                 field: 'delay_up_to_timestamp',
                                 title: 'Script Delay Run At',
                                 titleTooltip: 'The date and time the script should be run, after hysteresis',
-                                formatter: function(value, row, index) { return timestamp4human(value, ' '); },
+                                formatter: function(value, row, index) { void(row); void(index); return timestamp4human(value, ' '); },
                                 align: 'center',
                                 valign: 'middle',
                                 visible: false,
         function alarmsCallback(data) {
             var count = 0;
             for(x in data.alarms) {
+                if(!data.alarms.hasOwnProperty(x)) continue;
+
                 var alarm = data.alarms[x];
                 if(alarm.status === 'WARNING' || alarm.status === 'CRITICAL')
                     count++;
                         var charts = data.charts;
                         var x;
                         for(x in charts) {
+                            if(!charts.hasOwnProperty(x)) continue;
+
                             var chart = charts[x];
                             data.charts_by_name[chart.name] = chart;
                         }
                                         {
                                             //console.log('They were open tags');
                                             //console.log(openTags);
-                                            for (j = 0; j < openTags.length; j++) {
+                                            for (var j = 0; j < openTags.length; j++) {
                                                 //console.log('Cierro tag ' + openTags[j]);
                                                 bag += '</' + openTags[j] + '>'; // Close all tags that were opened
 
                 //console.log('hash = ' + urlOptions.hash);
             }
 
+            var $sidebar = $('#sidebar');
             /* activate bootstrap sidebar (affix) */
-            $('#sidebar').affix({
+            $sidebar.affix({
                 offset: {
                     top: (isdemo())?150:0,
                     bottom: 0
             /* fix scrolling of very long affix lists
                http://stackoverflow.com/questions/21691585/bootstrap-3-1-0-affix-too-long
              */
-            $('#sidebar').on('affixed.bs.affix', function() {
+            $sidebar.on('affixed.bs.affix', function() {
                 $(this).removeAttr('style');
             });
 
             });
 
             // change the URL based on the current position of the screen
-            $('#sidebar').on('activate.bs.scrollspy', function (e) {
+            $sidebar.on('activate.bs.scrollspy', function (e) {
                 // console.log(e);
                 var el = $(e.target);
                 //if(el.find('ul').size() == 0) {
                         // console.log('switching ' + option.toString());
                         self.bootstrapToggle(NETDATA.getOption(option)?'on':'off');
                     }
-                }
+                };
 
                 var theme_sync_option = function(option) {
                     var self = $('#' + option);
 
                     self.bootstrapToggle(netdataTheme === 'slate'?'on':'off');
-                }
+                };
 
                 sync_option('eliminate_zero_dimensions');
                 sync_option('destroy_on_hide');
                     netdataReload();
             });
 
-            $('#updateModal').on('show.bs.modal', function() {
+            var $updateModal = $('#updateModal');
+            $updateModal.on('show.bs.modal', function() {
                 versionLog('checking, please wait...');
             });
 
-            $('#updateModal').on('shown.bs.modal', function() {
+            $updateModal.on('shown.bs.modal', function() {
                 notifyForUpdate(true);
             });
 
-            $('#alarmsModal').on('shown.bs.modal', function() {
+            var $alarmsModal = $('#alarmsModal');
+            $alarmsModal.on('shown.bs.modal', function() {
                 NETDATA.pause(alarmsUpdateModal);
             });
 
-            $('#alarmsModal').on('hidden.bs.modal', function() {
+            $alarmsModal.on('hidden.bs.modal', function() {
                 NETDATA.unpause();
                 document.getElementById('alarms_active').innerHTML =
                         document.getElementById('alarms_all').innerHTML =
             });
 
             NETDATA.requiredJs.push({
-                url: NETDATA.serverDefault + 'dashboard_info.js?v20170115-1',
+                url: NETDATA.serverDefault + 'dashboard_info.js?v20170207-12',
                 async: false,
                 isAlreadyLoaded: function() { return false; }
             });