diff --git a/check_apache_requests b/check_apache_requests index 7945cead09f5dde8980f06ebc6c0e9f91f1b0e03..481704a00199995e6be90bbc7c356a87f6c62dd7 100755 --- a/check_apache_requests +++ b/check_apache_requests @@ -12,11 +12,11 @@ # 2022-08-31 v1.3 <axel.hahn@iml.unibe.ch> add help; shellfix corrections # 2022-08-31 v1.4 <axel.hahn@iml.unibe.ch> add help; shellfix corrections # 2023-06-19 v1.5 <axel.hahn@unibe.ch> no more tmpfile +# 2023-07-27 v1.6 <axel.hahn@unibe.ch> update help page # ====================================================================== . $(dirname $0)/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) -self_APPVERSION=1.5 +self_APPVERSION=1.6 # url=`hostname -f`/server-status url=localhost/server-status @@ -41,15 +41,9 @@ paramsWget="-T 5 -t 1 --no-check-certificate" # ---------------------------------------------------------------------- function showHelp(){ -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Get Apache httpd server-status page $url. You get output with the server status and values for each slot type. @@ -80,7 +74,7 @@ Slot types of apache httpd: SYNTAX: -$(basename $0) [-w WARN_LIMIT] [-c CRITICAL_LIMIT] +$_self [-w WARN_LIMIT] [-c CRITICAL_LIMIT] OPTIONS: @@ -95,7 +89,7 @@ PARAMETERS: EXAMPLE: -$(basename $0) -w 60 -c 80 +$_self -w 60 -c 80 EOF } diff --git a/check_ceph_diskfree b/check_ceph_diskfree index 749bf1f70c91d2e723bddac7a4e3c4255166b8c4..5f5253afa77bbc433749b3fc9e13ce4e58d2acbf 100755 --- a/check_ceph_diskfree +++ b/check_ceph_diskfree @@ -16,10 +16,11 @@ # # ---------------------------------------------------------------------- # 2020-03-04 v1.0 <axel.hahn@iml.unibe.ch> -# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions -# 2023-04-24 v1.2 <axel.hahn@unibe.ch> update for newer ceph versions -# 2023-05-09 v1.3 <axel.hahn@unibe.ch> add help -# 2023-06-19 v1.4 <axel.hahn@unibe.ch> no more tmpfile +# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions +# 2023-04-24 v1.2 <axel.hahn@unibe.ch> update for newer ceph versions +# 2023-05-09 v1.3 <axel.hahn@unibe.ch> add help +# 2023-06-19 v1.4 <axel.hahn@unibe.ch> no more tmpfile +# 2023-07-27 v1.5 <axel.hahn@unibe.ch> update help page # ====================================================================== . $(dirname $0)/inc_pluginfunctions @@ -27,20 +28,12 @@ typeset -i iWarning=0 typeset -i iCritical=0 - -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) -self_APPVERSION=1.4 +self_APPVERSION=1.5 function showHelp(){ -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Show available and free space on a ceph cluster. This check sends performance data. diff --git a/check_ceph_io b/check_ceph_io index e5b65a88ea9da87904851ad027d8d97307eb6d50..cf1701f2cf25cc7b4a3d94f8a879c513d90b2285 100755 --- a/check_ceph_io +++ b/check_ceph_io @@ -18,24 +18,17 @@ # 2023-05-10 v1.1 <axel.hahn@unibe.ch> fix for small transfer rates in B/s # 2023-05-10 v1.2 <axel.hahn@unibe.ch> add tests # 2023-05-11 v1.3 <axel.hahn@unibe.ch> handle ceph status without io data in output +# 2023-07-27 v1.4 <axel.hahn@unibe.ch> update help page # ====================================================================== . $(dirname $0)/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) -self_APPVERSION=1.3 +self_APPVERSION=1.4 function showHelp(){ - _self=$(basename $0) -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Show cheph IO as read and written bytes per second. This check sends performance data. diff --git a/check_ceph_osd b/check_ceph_osd index bbe1dd512c1f657bca971cd174f472e0a1878fab..d5c45220494f033291d0ddbd8e1f33621a820f42 100755 --- a/check_ceph_osd +++ b/check_ceph_osd @@ -31,7 +31,6 @@ . $(dirname $0)/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPVERSION=1.6 # column number in output where to find the up/ down info @@ -42,16 +41,9 @@ iColUpDown=5 # ---------------------------------------------------------------------- function showHelp(){ - _self=$(basename $0) -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Show cheph osd status: how many OSDs exist and how many are up/ down. This check sends performance data. diff --git a/check_ceph_status b/check_ceph_status index aa18e5984925c9655b18048d483ea43919e63605..3e8b6bd026ee825847d049766cc22d841312ce81 100755 --- a/check_ceph_status +++ b/check_ceph_status @@ -20,14 +20,14 @@ # 2021-04-12 v1.3 <axel.hahn@iml.unibe.ch> if degraded items are 0 delete init file too # 2023-04-24 v1.4 <axel.hahn@unibe.ch> update for newer ceph versions # 2023-06-19 v1.5 <axel.hahn@unibe.ch> add help and param support; no more tmpfile +# 2023-07-27 v1.6 <axel.hahn@unibe.ch> update help page # ====================================================================== . $(dirname $0)/inc_pluginfunctions initfile="/tmp/ceph-status-not-ok-start-$USER" -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) -self_APPVERSION=1.5 +self_APPVERSION=1.6 iSleep=3 doLoop=1 diff --git a/check_clientbackup b/check_clientbackup index f0a66a44afd6451a8a33bee7cabe2b951b726da1..a3aad97e94acd1bad08e8f7888d40ba0facbf773 100755 --- a/check_clientbackup +++ b/check_clientbackup @@ -17,13 +17,12 @@ # 2022-10-21 v1.10 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space # show last backup, prune, verify # 2023-06-22 v1.11 <axel.hahn@unibe.ch> add help and param support; add parameter for install directory -# 2023-06-22 v1.12 <axel.hahn@unibe.ch> add docs url of IML backup +# 2023-07-27 v1.12 <axel.hahn@unibe.ch> add docs url of IML backup # ====================================================================== . $( dirname $0 )/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) -self_APPVERSION=1.11 +self_APPVERSION=1.12 sInstalldir=/opt/imlbackup/client/ @@ -32,16 +31,9 @@ sInstalldir=/opt/imlbackup/client/ # ---------------------------------------------------------------------- function showHelp(){ - _self=$(basename $0) -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Show status of IML backup. See https://os-docs.iml.unibe.ch/iml-backup/ diff --git a/check_conn.cfg b/check_conn.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2e36a1fd9100db40674df2153561197426df7a66 --- /dev/null +++ b/check_conn.cfg @@ -0,0 +1,5 @@ +# +tcp/www.axel-hahn.de/80 +tcp/www.axel-hahn.de/443 + +tcp/localhost/8002 diff --git a/check_cpu b/check_cpu index 0f5bc3e4f38cb3fbaa21b5ee3d648717f40bac45..3e160cec45e707ffdcce3e7a792e2b1428fc86b6 100755 --- a/check_cpu +++ b/check_cpu @@ -9,41 +9,35 @@ # # ---------------------------------------------------------------------- # 2020-03-10 v1.0 <axel.hahn@iml.unibe.ch> -# 2020-03-23 v1.1 <axel.hahn@iml.unibe.ch> added more data -# 2020-07-08 v1.2 <axel.hahn@iml.unibe.ch> FIX: set "ph." instead "ps." -# 2020-07-17 v1.3 <axel.hahn@iml.unibe.ch> use ph.require to check binaries -# 2021-02-10 v1.4 <axel.hahn@iml.unibe.ch> added critical io wait -# 2021-10-28 v1.5 <axel.hahn@iml.unibe.ch> Use 2nd update of top -# 2021-12-10 v1.6 <axel.hahn@iml.unibe.ch> show processes with status D to find cpu waits -# 2022-03-09 v1.7 <axel.hahn@iml.unibe.ch> show most cpu intensive processes -# 2022-03-10 v1.8 <axel.hahn@iml.unibe.ch> add cli param -p; update help -# 2022-03-22 v1.9 <axel.hahn@iml.unibe.ch> fix syntax error on 100% idle -# 2022-04-14 v1.10 <axel.hahn@iml.unibe.ch> show consuming cpu processes with top and ps -# 2022-08-29 v1.11 <axel.hahn@iml.unibe.ch> replace pipe to prevent start of metrics section -# 2022-08-29 v1.12 <axel.hahn@iml.unibe.ch> fix: replace pipe -# 2023-02-13 v1.13 <axel.hahn@iml.unibe.ch> small shell fixes +# 2020-03-23 v1.1 <axel.hahn@iml.unibe.ch> added more data +# 2020-07-08 v1.2 <axel.hahn@iml.unibe.ch> FIX: set "ph." instead "ps." +# 2020-07-17 v1.3 <axel.hahn@iml.unibe.ch> use ph.require to check binaries +# 2021-02-10 v1.4 <axel.hahn@iml.unibe.ch> added critical io wait +# 2021-10-28 v1.5 <axel.hahn@iml.unibe.ch> Use 2nd update of top +# 2021-12-10 v1.6 <axel.hahn@iml.unibe.ch> show processes with status D to find cpu waits +# 2022-03-09 v1.7 <axel.hahn@iml.unibe.ch> show most cpu intensive processes +# 2022-03-10 v1.8 <axel.hahn@iml.unibe.ch> add cli param -p; update help +# 2022-03-22 v1.9 <axel.hahn@iml.unibe.ch> fix syntax error on 100% idle +# 2022-04-14 v1.10 <axel.hahn@iml.unibe.ch> show consuming cpu processes with top and ps +# 2022-08-29 v1.11 <axel.hahn@iml.unibe.ch> replace pipe to prevent start of metrics section +# 2022-08-29 v1.12 <axel.hahn@iml.unibe.ch> fix: replace pipe +# 2023-02-13 v1.13 <axel.hahn@iml.unibe.ch> small shell fixes +# 2023-07-27 v1.14 <axel.hahn@unibe.ch> update help page # ====================================================================== . $(dirname $0)/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) -self_APPVERSION=1.13 +self_APPVERSION=1.14 # ---------------------------------------------------------------------- # functions # ---------------------------------------------------------------------- function showHelp(){ -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) check cpu usage and cpu wait Cpu infos are taken from output of top command. diff --git a/check_cronstatus b/check_cronstatus index e6752649828742276ba6fcc0342bde86e0af9fa3..ffc4b1d834c7494265a1715b59a9afb1529290c6 100755 --- a/check_cronstatus +++ b/check_cronstatus @@ -17,19 +17,19 @@ # ds=daniel.schueler@iml.unibe.ch # # 2017-10-13 v1.0 ah,ds -# 2017-10-17 v1.1 ah,ds remove PIPESTATUS for Debian8 compatibility -# 2019-04-30 v1.2 ah,ds show scriptlabel of failed jobs in 1st line -# 2020-02-28 v1.3 ah,ds ouput with separated error jobs and OK jobs -# 2020-03-05 v1.4 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions -# 2022-02-28 v1.5 <axel.hahn@iml.unibe.ch> fix output of error counter -# 2022-08-23 v2.0 <axel.hahn@iml.unibe.ch> simplify it: use cronstatus.sh (it has exitcode >0 on errors now) +# 2017-10-17 v1.1 ah,ds remove PIPESTATUS for Debian8 compatibility +# 2019-04-30 v1.2 ah,ds show scriptlabel of failed jobs in 1st line +# 2020-02-28 v1.3 ah,ds ouput with separated error jobs and OK jobs +# 2020-03-05 v1.4 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions +# 2022-02-28 v1.5 <axel.hahn@iml.unibe.ch> fix output of error counter +# 2022-08-23 v2.0 <axel.hahn@iml.unibe.ch> simplify it: use cronstatus.sh (it has exitcode >0 on errors now) +# 2023-07-27 v2.1 <axel.hahn@unibe.ch> update help page # ====================================================================== . $( dirname $0 )/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) -self_APPVERSION=2.0 +self_APPVERSION=2.1 statusScript=/opt/cronwrapper/cronstatus.sh # ---------------------------------------------------------------------- @@ -37,15 +37,9 @@ statusScript=/opt/cronwrapper/cronstatus.sh # ---------------------------------------------------------------------- function showHelp(){ -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Show status of all Cronjobs using Axels Cronwrapper https://github.com/axelhahn/cronwrapper diff --git a/check_disk-io b/check_disk-io index 31e1112c0931a95eac4465c6c7b48dd7a71804bc..4dcdc2514ec3e15c9da4241a51d94b857336b842 100755 --- a/check_disk-io +++ b/check_disk-io @@ -13,13 +13,12 @@ # # ---------------------------------------------------------------------- # 2020-07-17 v1.0 <axel.hahn@iml.unibe.ch> -# 2023-07-27 v1.1 <axel.hahn@iml.unibe.ch> shell fixes; remove unsupported warn and critical +# 2023-07-27 v1.1 <axel.hahn@unibe.ch> shell fixes; remove unsupported warn and critical # ====================================================================== . $( dirname $0 )/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPVERSION=1.1 # ---------------------------------------------------------------------- @@ -46,18 +45,9 @@ function getDisks(){ # show help function showHelp(){ - _self=$(basename $0) -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -Check dis io and latency - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Disk infos based on /sys/block/[NAME]/stat See https://www.kernel.org/doc/Documentation/block/stat.txt diff --git a/check_dns_responsetime b/check_dns_responsetime index 6e865104787bbeade33943ccb00aa1139f8fecfa..88d07d9c4202b871e596f9aa729df6c85941877b 100755 --- a/check_dns_responsetime +++ b/check_dns_responsetime @@ -11,13 +11,12 @@ # test tcp 53 first # check result depends on 1st nameserver only # 2022-10-24 v1.2 <axel.hahn@unibe.ch> shell fixes; remove pipe char in output -# 2023-07-27 v1.3 <axel.hahn@iml.unibe.ch> shell fixes; add help page +# 2023-07-27 v1.3 <axel.hahn@unibe.ch> shell fixes; add help page # ====================================================================== . $( dirname $0 )/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPVERSION=1.3 tmpfile=/tmp/check_netstat_out_$$ @@ -38,16 +37,9 @@ typeset -i iNotReachable=0 # show help function showHelp(){ - _self=$(basename $0) -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Loop over all defined dns servers (in /etc/resolv.conf) and check each: diff --git a/check_fs_errors b/check_fs_errors index 6369f4b0140bf2f12348095dd144fcff84c00b8e..426c1866b336dc91e8a62fdf160d54caa74580a7 100755 --- a/check_fs_errors +++ b/check_fs_errors @@ -10,13 +10,12 @@ # ---------------------------------------------------------------------- # 2021-03-23 v1.0 <axel.hahn@iml.unibe.ch> # 2021-03-30 v1.1 <axel.hahn@iml.unibe.ch> max age of detected errors: since yesterday (commented) -# 2023-07-27 v1.2 <axel.hahn@iml.unibe.ch> shell fixes; update help page +# 2023-07-27 v1.2 <axel.hahn@unibe.ch> shell fixes; update help page # ====================================================================== . $( dirname $0 )/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPVERSION=1.2 @@ -25,16 +24,9 @@ self_APPVERSION=1.2 # ---------------------------------------------------------------------- function showHelp(){ - _self=$(basename $0) -cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ + local _self=$(basename $0) + cat <<EOF +$( ph.showImlHelpHeader ) Check if kernel logs inconsistency messages in the journallog. It requires sudo permission on /bin/journalctl diff --git a/check_fs_writable b/check_fs_writable index 20c544313184e65bd3573d569dfc255c14a188f0..9470f60c30bf1407a6e57dd86a0574c99afbdf92 100755 --- a/check_fs_writable +++ b/check_fs_writable @@ -8,13 +8,12 @@ # # ---------------------------------------------------------------------- # 2021-03-23 v0.0 <axel.hahn@iml.unibe.ch> -# 2023-07-27 v1.2 <axel.hahn@iml.unibe.ch> shell fixes; update help page +# 2023-07-27 v1.2 <axel.hahn@unibe.ch> shell fixes; update help page # ====================================================================== . $( dirname $0 )/inc_pluginfunctions -self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPVERSION=1.2 dirs2test="/tmp /var/tmp" @@ -27,14 +26,7 @@ out="" function showHelp(){ _self=$(basename $0) cat <<EOF -______________________________________________________________________ - -$self_APPNAME -v$self_APPVERSION - -(c) Institute for Medical Education - University of Bern -Licence: GNU GPL 3 -______________________________________________________________________ +$( ph.showImlHelpHeader ) Check if a filesystem is readonly in given directories. In each of the given directories a random file will be touched.