From 8d8c90e31a1977e65e8b6e7e8ce053f5fc7470c9 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 17 Dec 2020 16:28:57 +0100 Subject: [PATCH] Update Template_App_ZFS --- zabbix_templates/Template_App_ZFS.xml | 66 ++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 16 deletions(-) diff --git a/zabbix_templates/Template_App_ZFS.xml b/zabbix_templates/Template_App_ZFS.xml index 105f7f5..f4ca38e 100644 --- a/zabbix_templates/Template_App_ZFS.xml +++ b/zabbix_templates/Template_App_ZFS.xml @@ -1,7 +1,7 @@ - 4.4 - 2020-02-17T07:55:13Z + 5.0 + 2020-12-17T15:28:00Z Templates @@ -62,17 +62,29 @@ ZFS: ARC: compression win - CALCULATED + DEPENDENT vfs.zfs.stats[arcstats,compress_win] - 300 + 0 1825d B - last("vfs.zfs.stats[arcstats,uncompressed_size]")-last("vfs.zfs.stats[arcstats,compressed_size]") Memory + + + JAVASCRIPT + json = JSON.parse(value); +uncomp = json.uncompressed_size; +comp = json.compressed_size; +diff = uncomp - comp; +return (diff < 0 ? 0 : diff); + + + + vfs.zfs.stats.all[arcstats] + ZFS: ARC: $2 @@ -308,7 +320,7 @@ - {avg(1h)}>(100-{$ZFS_ARC_HIT_METADATA_PCT_WARN}) + {avg(900)}>(100-{$ZFS_ARC_HIT_METADATA_PCT_WARN}) ZFS: Low ARC metadata efficiency INFO @@ -1084,12 +1096,11 @@ ZFS: fs {#ZFS_FS} compression win - CALCULATED + DEPENDENT vfs.zfs.dataset[{#ZFS_FS},fs,compression_win] - 300s + 0 1825d B - last("vfs.zfs.dataset[{#ZFS_FS},fs,logicalused]")-last("vfs.zfs.dataset[{#ZFS_FS},fs,used]") Storage @@ -1097,10 +1108,16 @@ - MULTIPLIER - 1 + JAVASCRIPT + json = JSON.parse(value); +logicalused = json.logicalused; +used = json.used; +return (logicalused > used ? logicalused - used : 0); + + vfs.zfs.dataset.info[{#ZFS_FS},fs] + ZFS: fs {#ZFS_FS} compression ratio @@ -1942,7 +1959,8 @@ ZFS: Sanoid {#ZFS_SANOID} vfs.zfs.sanoid.check[{#ZFS_SANOID}] - 322s + 300s + 30d 0 CHAR @@ -1955,6 +1973,11 @@ DISCARD_UNCHANGED_HEARTBEAT 1800 + + NOT_MATCHES_REGEX + ^print + DISCARD_VALUE + @@ -1987,17 +2010,28 @@ ZFS: Zvol {#ZFS_ZVOL} compression win - CALCULATED + DEPENDENT vfs.zfs.dataset[{#ZFS_ZVOL},zvol,compression_win] - 300s + 0 FLOAT B - last("vfs.zfs.dataset[{#ZFS_ZVOL},zvol,logicalused]")-last("vfs.zfs.dataset[{#ZFS_ZVOL},zvol,used]") Storage + + + JAVASCRIPT + json = JSON.parse(value); +logicalused = json.logicalused; +used = json.used; +return (logicalused > used ? logicalused - used : 0); + + + + vfs.zfs.dataset.info[{#ZFS_ZVOL},zvol] + ZFS: Zvol {#ZFS_ZVOL} compression ratio @@ -2214,7 +2248,7 @@ {$ZFS_POOL_ALLOC_WARN} - 75 + 80