Skip to content
Snippets Groups Projects
Commit c1e91773 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update check_ceph_diskfree

parent 0fecb6de
Branches
No related tags found
1 merge request!297Simple task/7546 icinga check für ablaufende gitlab tokens
...@@ -22,11 +22,12 @@ ...@@ -22,11 +22,12 @@
# 2023-06-19 v1.4 <axel.hahn@unibe.ch> no more tmpfile # 2023-06-19 v1.4 <axel.hahn@unibe.ch> no more tmpfile
# 2023-07-27 v1.5 <axel.hahn@unibe.ch> update help page # 2023-07-27 v1.5 <axel.hahn@unibe.ch> update help page
# 2023-10-20 v1.6 <axel.hahn@unibe.ch> harden sudo command execution # 2023-10-20 v1.6 <axel.hahn@unibe.ch> harden sudo command execution
# 2025-02-12 v1.7 <axel.hahn@unibe.ch> Show -w and -c param in help
# ====================================================================== # ======================================================================
. $(dirname $0)/inc_pluginfunctions . $(dirname $0)/inc_pluginfunctions
export self_APPVERSION=1.6 export self_APPVERSION=1.7
typeset -i iWarning=0 typeset -i iWarning=0
typeset -i iCritical=0 typeset -i iCritical=0
...@@ -48,6 +49,9 @@ $(basename $0) ...@@ -48,6 +49,9 @@ $(basename $0)
OPTIONS: OPTIONS:
-h or --help show this help. -h or --help show this help.
-w VALUE warning level (default: 70)
-c VALUE critical level (default: 90)
EOF EOF
} }
...@@ -68,8 +72,8 @@ esac ...@@ -68,8 +72,8 @@ esac
ph.require ceph ph.require ceph
# set default / override from command line params # set default / override from command line params
typeset -i iWarnLimit=$( ph.getValueWithParam 70 w "$@") typeset -i iWarnLimit; iWarnLimit=$( ph.getValueWithParam 70 w "$@")
typeset -i iCriticalLimit=$( ph.getValueWithParam 90 c "$@") typeset -i iCriticalLimit; iCriticalLimit=$( ph.getValueWithParam 90 c "$@")
if ! data=$( sudo -n /bin/ceph df 2>&1 ) if ! data=$( sudo -n /bin/ceph df 2>&1 )
then then
......
...@@ -27,11 +27,13 @@ From this repository ypu need next to this script: ...@@ -27,11 +27,13 @@ From this repository ypu need next to this script:
$ check_ceph_diskfree -h $ check_ceph_diskfree -h
______________________________________________________________________ ______________________________________________________________________
CHECK_CEPH_DISKFREE CHECK_CEPH_DISKFREE
v1.6 v1.7
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_ceph_diskfree.html
______________________________________________________________________ ______________________________________________________________________
Show available and free space on a ceph cluster. Show available and free space on a ceph cluster.
...@@ -44,6 +46,10 @@ check_ceph_diskfree ...@@ -44,6 +46,10 @@ check_ceph_diskfree
OPTIONS: OPTIONS:
-h or --help show this help. -h or --help show this help.
-w VALUE warning level (default: 70)
-c VALUE critical level (default: 90)
``` ```
### Parameters ### Parameters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment