From 998273a0e41ac22aaf0c41435af9d3114e575a7b Mon Sep 17 00:00:00 2001 From: Ciacho Date: Thu, 28 Jun 2018 15:09:20 +0200 Subject: [PATCH] Create macros to support free space triggers on FS --- OS Linux/OS Linux.xml | 308 ++++++++++++++++++++++++++++++------------ 1 file changed, 219 insertions(+), 89 deletions(-) diff --git a/OS Linux/OS Linux.xml b/OS Linux/OS Linux.xml index 6051b24..96da4b7 100644 --- a/OS Linux/OS Linux.xml +++ b/OS Linux/OS Linux.xml @@ -1,7 +1,7 @@ 3.4 - 2018-06-11T11:38:28Z + 2018-06-28T13:06:53Z Templates @@ -191,6 +191,92 @@ Notes: + + CHK::Network port::ssh + 7 + + + net.tcp.port[,{$SVC_SSH_PORT}] + 5m + 2w + 365d + 0 + 3 + + + + + 0 + 0 + + 0 + + + + 0 + + + + + + Check of possible create TCP connection to SSH port (configured macros). + 0 + + + NET + + + + Service state + + + + + + + + NET::service::$1 + 7 + + + net.tcp.service[ssh,,{$SVC_SSH_PORT}] + 5m + 2w + 365d + 0 + 3 + + + + + 0 + 0 + + 0 + + + + 0 + + + + + + Check if SSH services is running and accepted connection. + 0 + + + NET + + + + Service state + + + + + + NET::service::$1 7 @@ -3143,7 +3229,7 @@ Value is calculated by read number of sectors multiplied by 512. - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<15 + {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<={$VOL_FREE_SPACE_AVERAGE} 0 VOL::{#FSNAME}::free {ITEM.VALUE} @@ -3151,31 +3237,21 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 1 - FS volume free space is less than 15%. - 0 - 0 - - - - - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<15 and {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}>10 - 0 - - VOL::{#FSNAME}::free {ITEM.VALUE} - 0 - - - 0 - 1 - FS volume free space is between 85% and 90%. + 3 + FS volume free space is less than {$VOL_FREE_SPACE_AVERAGE}%. 0 0 - + + + VOL::{#FSNAME}::free {ITEM.VALUE} + {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<={$VOL_FREE_SPACE_WARNING} + + + - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<=1 + {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<={$VOL_FREE_SPACE_AVERAGE} and {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}>{$VOL_FREE_SPACE_HIGH} 0 VOL::{#FSNAME}::free {ITEM.VALUE} @@ -3184,14 +3260,14 @@ Value is calculated by read number of sectors multiplied by 512. 0 3 - FS volume free space is less than 1%. + FS volume free space is between {$VOL_FREE_SPACE_HIGH}% and {$VOL_FREE_SPACE_AVERAGE}%. 0 0 - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<=5 + {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<={$VOL_FREE_SPACE_HIGH} 0 VOL::{#FSNAME}::free {ITEM.VALUE} @@ -3199,26 +3275,15 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 3 - FS volume free space is less than 5%. + 4 + FS volume free space is less than {$VOL_FREE_SPACE_HIGH}%. 0 0 - - - VOL::{#FSNAME}::free {ITEM.VALUE} - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<15 - - - - VOL::{#FSNAME}::free {ITEM.VALUE} - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<=10 - - - + - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<=5 and {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}>1 + {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<={$VOL_FREE_SPACE_INFORMATION} 0 VOL::{#FSNAME}::free {ITEM.VALUE} @@ -3226,15 +3291,15 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 3 - FS volume free space is between 1% and 5%. + 1 + FS volume free space is <={$VOL_FREE_SPACE_INFORMATION}%. Configured macros. 0 0 - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<=10 + {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<={$VOL_FREE_SPACE_INFORMATION} and {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}>{$VOL_FREE_SPACE_WARNING} 0 VOL::{#FSNAME}::free {ITEM.VALUE} @@ -3242,21 +3307,16 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 2 - FS volume free space is less than 10%. + 1 + FS volume free space is between {$VOL_FREE_SPACE_INFORMATION}% and {$VOL_FREE_SPACE_WARNING}%. +Both are configured macros. 0 0 - - - VOL::{#FSNAME}::free {ITEM.VALUE} - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<15 - - - + - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<=10 and {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}>5 + {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<={$VOL_FREE_SPACE_WARNING} 0 VOL::{#FSNAME}::free {ITEM.VALUE} @@ -3265,14 +3325,14 @@ Value is calculated by read number of sectors multiplied by 512. 0 2 - FS volume free space is between 90% and 95%. + FS volume free space is less than {$VOL_FREE_SPACE_WARNING}%. 0 0 - {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<=15 + {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}<={$VOL_FREE_SPACE_WARNING} and {OS Linux:vfs.fs.size[{#FSNAME},pfree].last()}>{$VOL_FREE_SPACE_AVERAGE} 0 VOL::{#FSNAME}::free {ITEM.VALUE} @@ -3280,15 +3340,15 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 1 - FS volume free space is <=15%. + 2 + FS volume free space is between {$VOL_FREE_SPACE_WARNING}% and {$VOL_FREE_SPACE_AVERAGE}%. 0 0 - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<15 + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_AVERAGE} 0 VOL::{#FSNAME}::inodes::free {ITEM.VALUE} @@ -3296,15 +3356,26 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 1 - FS volume inodes free space is less than 15%. + 3 + FS volume inodes free space is less than {$VOL_FREE_INODE_AVERAGE}%. 0 0 - + + + VOL::{#FSNAME}::inodes::free {ITEM.VALUE} + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_INFORMATION} + + + + VOL::{#FSNAME}::inodes::free {ITEM.VALUE} + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_WARNING} + + + - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<15 and {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}>10 + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_AVERAGE} and {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}>{$VOL_FREE_INODE_HIGH} 0 VOL::{#FSNAME}::inodes::free {ITEM.VALUE} @@ -3312,15 +3383,15 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 1 - FS volume inodes free space is between 15% and 10%. + 3 + FS volume inodes free space is between {$VOL_FREE_INODE_AVERAGE}% and {$VOL_FREE_INODE_HIGH}%. 0 0 - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<=1 + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_HIGH} 0 VOL::{#FSNAME}::inodes::free {ITEM.VALUE} @@ -3328,15 +3399,15 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 3 - FS volume inodes free space is less than 1%. + 4 + FS volume inodes free space is less than {$VOL_FREE_INODE_HIGH}%. 0 0 - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<=5 + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_INFORMATION} 0 VOL::{#FSNAME}::inodes::free {ITEM.VALUE} @@ -3344,26 +3415,15 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 3 - FS volume inodes free space is less than 5%. + 1 + FS volume inodes free space is less than {$VOL_FREE_INODE_INFORMATION}%. 0 0 - - - VOL::{#FSNAME}::inodes::free {ITEM.VALUE} - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<15 - - - - VOL::{#FSNAME}::inodes::free {ITEM.VALUE} - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<=10 - - - + - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<=5 and {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}>1 + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_INFORMATION} and {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}>{$VOL_FREE_INODE_WARNING} 0 VOL::{#FSNAME}::inodes::free {ITEM.VALUE} @@ -3371,15 +3431,15 @@ Value is calculated by read number of sectors multiplied by 512. 0 - 3 - FS volume inodes free space is between 5% and 1%. + 1 + FS volume inodes free space is between {$VOL_FREE_INODE_INFORMATION}% and {$VOL_FREE_INODE_WARNING}%. 0 0 - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<=10 + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_WARNING} 0 VOL::{#FSNAME}::inodes::free {ITEM.VALUE} @@ -3388,20 +3448,20 @@ Value is calculated by read number of sectors multiplied by 512. 0 2 - FS volume inodes free space is less than 10%. + FS volume inodes free space is less than {$VOL_FREE_INODE_WARNING}%. 0 0 VOL::{#FSNAME}::inodes::free {ITEM.VALUE} - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<15 + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_INFORMATION} - {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<=10 and {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}>5 + {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}<={$VOL_FREE_INODE_WARNING} and {OS Linux:vfs.fs.inode[{#FSNAME},pfree].last()}>{$VOL_FREE_INODE_AVERAGE} 0 VOL::{#FSNAME}::inodes::free {ITEM.VALUE} @@ -3410,7 +3470,7 @@ Value is calculated by read number of sectors multiplied by 512. 0 2 - FS volume inodes free space is between 10% and 5%. + FS volume inodes free space is between {$VOL_FREE_INODE_WARNING}% and {$VOL_FREE_INODE_AVERAGE}%. 0 0 @@ -3561,6 +3621,38 @@ Value is calculated by read number of sectors multiplied by 512. {$STEAL_WARN} 20 + + {$VOL_FREE_INODE_AVERAGE} + 5 + + + {$VOL_FREE_INODE_HIGH} + 1 + + + {$VOL_FREE_INODE_INFORMATION} + 15 + + + {$VOL_FREE_INODE_WARNING} + 10 + + + {$VOL_FREE_SPACE_AVERAGE} + 5 + + + {$VOL_FREE_SPACE_HIGH} + 1 + + + {$VOL_FREE_SPACE_INFORMATION} + 15 + + + {$VOL_FREE_SPACE_WARNING} + 10 +