Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-checks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Commits
4c7b746b
Commit
4c7b746b
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
ceph diskfree - add help
parent
2b54629d
Branches
Branches containing commit
No related tags found
1 merge request
!77
update docs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_ceph_diskfree
+40
-1
40 additions, 1 deletion
check_ceph_diskfree
with
40 additions
and
1 deletion
check_ceph_diskfree
+
40
−
1
View file @
4c7b746b
...
...
@@ -18,6 +18,7 @@
# 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
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
...
...
@@ -28,10 +29,48 @@ outfile=/tmp/check_ceph_df_out__$$
typeset
-i
iWarning
=
0
typeset
-i
iCritical
=
0
self_APPNAME
=
$(
basename
$0
|
tr
[
:lower:]
[
:upper:]
)
self_APPVERSION
=
1.3
function
showHelp
(){
cat
<<
EOF
______________________________________________________________________
$self_APPNAME
v
$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
Show available and free space on a ceph cluster.
This check sends performance data.
It uses 'ceph df' to parse data.
SYNTAX:
$(
basename
$0
)
OPTIONS:
-h or --help show this help.
EOF
}
# ----------------------------------------------------------------------
# MAIN
# ----------------------------------------------------------------------
# --- check param -h
case
"
$1
"
in
"--help"
|
"-h"
)
showHelp
exit
0
;;
*
)
esac
# set default / override from command line params
typeset
-i
iWarnLimit
=
$(
ph.getValueWithParam 70 w
"
$@
"
)
typeset
-i
iCriticalLimit
=
$(
ph.getValueWithParam 90 c
"
$@
"
)
...
...
@@ -40,7 +79,7 @@ typeset -i iCriticalLimit=$( ph.getValueWithParam 90 c "$@")
if
!
sudo
/bin/ceph
df
>
$tmpfile
2>&1
then
rm
-f
$tmpfile
ph.abort
"UNKNOWN: ceph is not available or no sudo permissions to execute ceph commands."
ph.abort
"UNKNOWN: ceph is not available or no sudo permissions to execute ceph commands."
fi
rm
-f
$outfile
2>/dev/null
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment