From e63f4fb8a0708f584ea96b2af30974b5e92d3e69 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Thu, 27 Jul 2023 17:09:15 +0200 Subject: [PATCH] add export keyword for version --- check_apache_requests | 2 +- check_ceph_diskfree | 3 ++- check_ceph_io | 2 +- check_ceph_osd | 2 +- check_ceph_status | 4 ++-- check_clientbackup | 2 +- check_conn | 26 +++++++++++--------------- check_cpu | 2 +- check_cronstatus | 3 ++- check_disk-io | 2 +- check_dns_responsetime | 2 +- check_eol | 2 +- check_fs_errors | 2 +- check_fs_writable | 4 ++-- 14 files changed, 28 insertions(+), 30 deletions(-) diff --git a/check_apache_requests b/check_apache_requests index 335ee6f..af9f8d1 100755 --- a/check_apache_requests +++ b/check_apache_requests @@ -16,7 +16,7 @@ # ====================================================================== . $(dirname $0)/inc_pluginfunctions -self_APPVERSION=1.6 +export self_APPVERSION=1.6 # url=`hostname -f`/server-status url=localhost/server-status diff --git a/check_ceph_diskfree b/check_ceph_diskfree index 9d0459c..ce3f847 100755 --- a/check_ceph_diskfree +++ b/check_ceph_diskfree @@ -25,10 +25,11 @@ . $(dirname $0)/inc_pluginfunctions +export self_APPVERSION=1.5 + typeset -i iWarning=0 typeset -i iCritical=0 -self_APPVERSION=1.5 function showHelp(){ local _self; _self=$(basename $0) diff --git a/check_ceph_io b/check_ceph_io index dce7617..36d5a07 100755 --- a/check_ceph_io +++ b/check_ceph_io @@ -23,7 +23,7 @@ . $(dirname $0)/inc_pluginfunctions -self_APPVERSION=1.4 +export self_APPVERSION=1.4 function showHelp(){ local _self; _self=$(basename $0) diff --git a/check_ceph_osd b/check_ceph_osd index f2f0a67..e1224a0 100755 --- a/check_ceph_osd +++ b/check_ceph_osd @@ -31,7 +31,7 @@ . $(dirname $0)/inc_pluginfunctions -self_APPVERSION=1.6 +export self_APPVERSION=1.6 # column number in output where to find the up/ down info iColUpDown=5 diff --git a/check_ceph_status b/check_ceph_status index 2a2959f..61fc8a5 100755 --- a/check_ceph_status +++ b/check_ceph_status @@ -25,9 +25,9 @@ . $(dirname $0)/inc_pluginfunctions -initfile="/tmp/ceph-status-not-ok-start-$USER" +export self_APPVERSION=1.6 -self_APPVERSION=1.6 +initfile="/tmp/ceph-status-not-ok-start-$USER" iSleep=3 doLoop=1 diff --git a/check_clientbackup b/check_clientbackup index be1f56d..26da48c 100755 --- a/check_clientbackup +++ b/check_clientbackup @@ -22,7 +22,7 @@ . $( dirname $0 )/inc_pluginfunctions -self_APPVERSION=1.12 +export self_APPVERSION=1.12 sInstalldir=/opt/imlbackup/client/ diff --git a/check_conn b/check_conn index 1d06e5a..7848798 100755 --- a/check_conn +++ b/check_conn @@ -8,10 +8,13 @@ # # ---------------------------------------------------------------------- # 2021-11-05 v0.0 <axel.hahn@iml.unibe.ch> +# 2023-07-27 v1.1 <axel.hahn@unibe.ch> update help page # ====================================================================== -. `dirname $0`/inc_pluginfunctions +. $(dirname $0)/inc_pluginfunctions + +export self_APPVERSION=1.1 cfgfile=$( dirname $0 )/$( basename $0 ).cfg @@ -31,19 +34,12 @@ function getChecks(){ function showHelp(){ -cat <<EOF -______________________________________________________________________ - -CHECK_CONN check if is a host available on a given port via tcp or udp -from local machine $( hostname -f ). - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ - + local _self; _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) SYNTAX: -`basename $0` OPTIONS +$_self OPTIONS You can create a file named $cfgfile and add your connections there. @@ -64,12 +60,12 @@ PARAMETERS: udp/host/port EXAMPLES: -`basename $0` If no param is given it checks entries in $cfgfile +$_self If no param is given it checks entries in $cfgfile -`basename $0` -t "tcp/api.example.com/443" +$_self -t "tcp/api.example.com/443" Check a single connection -`basename $0` -t "tcp/api.example.com/443 tcp/localhost/3306" +$_self -t "tcp/api.example.com/443 tcp/localhost/3306" Check multiple connections. EOF diff --git a/check_cpu b/check_cpu index 034bb71..1c03b9a 100755 --- a/check_cpu +++ b/check_cpu @@ -28,7 +28,7 @@ . $(dirname $0)/inc_pluginfunctions -self_APPVERSION=1.14 +export self_APPVERSION=1.14 # ---------------------------------------------------------------------- # functions diff --git a/check_cronstatus b/check_cronstatus index 0fd56b5..1d1a751 100755 --- a/check_cronstatus +++ b/check_cronstatus @@ -29,7 +29,8 @@ . $( dirname $0 )/inc_pluginfunctions -self_APPVERSION=2.1 +export self_APPVERSION=2.1 + statusScript=/opt/cronwrapper/cronstatus.sh # ---------------------------------------------------------------------- diff --git a/check_disk-io b/check_disk-io index 8b8fece..82d57d7 100755 --- a/check_disk-io +++ b/check_disk-io @@ -19,7 +19,7 @@ . $( dirname $0 )/inc_pluginfunctions -self_APPVERSION=1.1 +export self_APPVERSION=1.1 # ---------------------------------------------------------------------- # FUNCTIONS diff --git a/check_dns_responsetime b/check_dns_responsetime index d468953..0b73b9d 100755 --- a/check_dns_responsetime +++ b/check_dns_responsetime @@ -17,7 +17,7 @@ . $( dirname $0 )/inc_pluginfunctions -self_APPVERSION=1.3 +exort self_APPVERSION=1.3 tmpfile=/tmp/check_netstat_out_$$ infofile=/tmp/check_netstat_out_2_$$ diff --git a/check_eol b/check_eol index c471ed5..391a533 100755 --- a/check_eol +++ b/check_eol @@ -55,7 +55,7 @@ . "$( dirname $0 )/inc_pluginfunctions" eolcfg="${0}-data/*.cfg" -self_APPVERSION=1.7 +export self_APPVERSION=1.7 # --- limits typeset -i iDaysWarn=365 diff --git a/check_fs_errors b/check_fs_errors index 9638553..5f32133 100755 --- a/check_fs_errors +++ b/check_fs_errors @@ -16,7 +16,7 @@ . $( dirname $0 )/inc_pluginfunctions -self_APPVERSION=1.2 +export self_APPVERSION=1.2 # ---------------------------------------------------------------------- diff --git a/check_fs_writable b/check_fs_writable index a5578f6..e6c3543 100755 --- a/check_fs_writable +++ b/check_fs_writable @@ -8,13 +8,13 @@ # # ---------------------------------------------------------------------- # 2021-03-23 v0.0 <axel.hahn@iml.unibe.ch> -# 2023-07-27 v1.2 <axel.hahn@unibe.ch> shell fixes; update help page +# 2023-07-27 v1.1 <axel.hahn@unibe.ch> shell fixes; update help page # ====================================================================== . $( dirname $0 )/inc_pluginfunctions -self_APPVERSION=1.2 +export self_APPVERSION=1.1 dirs2test="/tmp /var/tmp" out="" -- GitLab