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
f62ac072
Commit
f62ac072
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
check_cepho_osd harden su command execution
parent
7e509e4e
Branches
Branches containing commit
No related tags found
1 merge request
!192
6723 sudo
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
check_ceph_osd
+3
-2
3 additions, 2 deletions
check_ceph_osd
docs/20_Checks/check_ceph_io.md
+14
-14
14 additions, 14 deletions
docs/20_Checks/check_ceph_io.md
with
17 additions
and
16 deletions
check_ceph_osd
+
3
−
2
View file @
f62ac072
...
...
@@ -27,11 +27,12 @@
# 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> shorten ceph exec; show output on error; shell fixes
# 2023-10-20 v1.7 <axel.hahn@unibe.ch> harden sudo command execution
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
export
self_APPVERSION
=
1.
6
export
self_APPVERSION
=
1.
7
# column number in output where to find the up/ down info
iColUpDown
=
5
...
...
@@ -87,7 +88,7 @@ case "$1" in
*
)
esac
if
!
data
=
$(
sudo
/bin/ceph osd tree 2>&1
)
;
then
if
!
data
=
$(
sudo
-n
/bin/ceph osd tree 2>&1
)
;
then
echo
"
$data
"
ph.abort
"UNKNOWN: ceph is not available or no sudo permissions to execute ceph commands."
fi
...
...
This diff is collapsed.
Click to expand it.
docs/20_Checks/check_ceph_io.md
+
14
−
14
View file @
f62ac072
...
...
@@ -18,35 +18,35 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph
```
txt
______________________________________________________________________
CHECK_CEPH_
I
O
v1.
5
CHECK_CEPH_O
SD
v1.
7
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_ceph_
i
o.html
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_ceph_o
sd
.html
______________________________________________________________________
Show cheph
IO as read and written bytes per second
.
Show cheph
osd status: how many OSDs exist and how many are up/ down
.
This check sends performance data.
On your cluster you might want to increase the values for warning and
critical level.
SYNTAX:
check_ceph_
i
o
check_ceph_o
sd [-w WARN_LIMIT] [-c CRITICAL_LIMIT]
OPTIONS:
-h or --help show this help.
-
t [STRING] test a value; for debugging purposes
Without a string internally stored values will be tested
-
w VALUE warning level (default: 1)
-c VALUE critical level (default: 2)
EXAMPLE:
check_ceph_io
no parameters; normal usage to get the ceph io data
check_ceph_io -t
Run a few builtin tests
check_ceph_osd
no parameters; normal usage to get the ceph osd status
check_ceph_
io -t " client: 255 B/s rd, 0 op/s rd, 0 op/s wr"
Test a given string
check_ceph_
osd -c 10
change to critical level if 10 osds are down.
```
...
...
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