@cryptotaxi247 / netdata-1 / commits / acdde1365

added btrfs alarms and dashboard info

Costa Tsaousis (ktsaou) committed Dec 19, 2017 at 00:46 UTC acdde1365fefbf4edc88447818131070cfdcab78
5 files changed +77 -3
conf.d/Makefile.am
+1
@@ -75,6 +75,7 @@ dist_healthconfig_DATA = \
75 health.d/backend.conf \
76 health.d/beanstalkd.conf \
77 health.d/bind_rndc.conf \
78 + health.d/btrfs.conf \
79 health.d/cpu.conf \
80 health.d/couchdb.conf \
81 health.d/disks.conf \
conf.d/health.d/btrfs.conf new
+57
@@ -0,0 +1,57 @@
1 +
2 +template: btrfs_unallocated
3 + on: btrfs.disk
4 + os: *
5 + hosts: *
6 +families: *
7 + calc: $unallocated * 100 / ($unallocated + $data_used + $data_free + $meta_used + $meta_free + $sys_used + $sys_free)
8 + units: %
9 + every: 10s
10 + warn: $this < (($status >= $WARNING) ? (10) : (5))
11 + crit: $this < (($status == $CRITICAL) ? ( 5) : (1))
12 + delay: up 1m down 15m multiplier 1.5 max 1h
13 + info: the percentage of unallocated BTRFS physical disk space
14 + to: sysadmin
15 +
16 +template: btrfs_data
17 + on: btrfs.data
18 + os: *
19 + hosts: *
20 +families: *
21 + calc: $free * 100 / ($used + $free)
22 + units: %
23 + every: 10s
24 + warn: $this < (($status >= $WARNING) ? (10) : (5)) && $btrfs_unallocated < 1
25 + crit: $this < (($status == $CRITICAL) ? ( 5) : (1)) && $btrfs_unallocated < 1
26 + delay: up 1m down 15m multiplier 1.5 max 1h
27 + info: the percentage of free BTRFS data space
28 + to: sysadmin
29 +
30 +template: btrfs_metadata
31 + on: btrfs.metadata
32 + os: *
33 + hosts: *
34 +families: *
35 + calc: $free * 100 / ($used + $free + $reserved)
36 + units: %
37 + every: 10s
38 + warn: $this < (($status >= $WARNING) ? (10) : (5)) && $btrfs_unallocated < 1
39 + crit: $this < (($status == $CRITICAL) ? ( 5) : (1)) && $btrfs_unallocated < 1
40 + delay: up 1m down 15m multiplier 1.5 max 1h
41 + info: the percentage of free BTRFS metadata space
42 + to: sysadmin
43 +
44 +template: btrfs_system
45 + on: btrfs.system
46 + os: *
47 + hosts: *
48 +families: *
49 + calc: $free * 100 / ($used + $free)
50 + units: %
51 + every: 10s
52 + warn: $this < (($status >= $WARNING) ? (10) : (5)) && $btrfs_unallocated < 1
53 + crit: $this < (($status == $CRITICAL) ? ( 5) : (1)) && $btrfs_unallocated < 1
54 + delay: up 1m down 15m multiplier 1.5 max 1h
55 + info: the percentage of free BTRFS system space
56 + to: sysadmin
57 +
src/sys_fs_btrfs.c
+1 -1
@@ -644,7 +644,7 @@ int do_sys_fs_btrfs(int update_every, usec_t dt) {
644 , id
645 , name
646 , node->label
647 - , "btrfs.metdata"
647 + , "btrfs.metadata"
648 , title
649 , "MB"
650 , "proc"
web/dashboard_info.js
+17 -1
@@ -124,7 +124,7 @@ netdataDashboard.menu = {
124 'btrfs': {
125 title: 'BTRFS filesystem',
126 icon: '<i class="fas fa-folder-open"></i>',
127 - info: 'Utilization metrics of the BTRFS filesystem.'
127 + info: 'Disk space metrics for the BTRFS filesystem.'
128 },
129
130 'apps': {
@@ -1667,5 +1667,21 @@ netdataDashboard.context = {
1667
1668 'couchdb.open_files': {
1669 info: 'Count of all files held open by CouchDB. If this value seems pegged at 1024 or 4096, your server process is probably hitting the open file handle limit and <a href="http://docs.couchdb.org/en/latest/maintenance/performance.html#pam-and-ulimit">needs to be increased.</a>'
1670 + },
1671 +
1672 + 'btrfs.disk': {
1673 + 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.'
1674 + },
1675 +
1676 + 'btrfs.data': {
1677 + info: 'Logical disk usage for BTRFS data. The disk space reported here is the usable allocation (i.e. after any RAID levels).'
1678 + },
1679 +
1680 + 'btrfs.metadata': {
1681 + info: 'Logical disk usage for BTRFS metadata. The disk space reported here is the usable allocation (i.e. after any RAID levels).'
1682 + },
1683 +
1684 + 'btrfs.system': {
1685 + info: 'Logical disk usage for BTRFS system. The disk space reported here is the usable allocation (i.e. after any RAID levels).'
1686 }
1687 };
web/index.html
+1 -1
@@ -4274,7 +4274,7 @@
4274 });
4275
4276 NETDATA.requiredJs.push({
4277 - url: NETDATA.serverStatic + 'dashboard_info.js?v20171217-1',
4277 + url: NETDATA.serverStatic + 'dashboard_info.js?v20171218-1',
4278 async: false,
4279 isAlreadyLoaded: function() { return false; }
4280 });