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
a288b19f
Commit
a288b19f
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
ceph_io: fix for small transfer rates in B/s
parent
02dd8b36
No related branches found
No related tags found
1 merge request
!79
ceph_io: fix for small transfer rates in B/s
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_ceph_io
+9
-3
9 additions, 3 deletions
check_ceph_io
with
9 additions
and
3 deletions
check_ceph_io
+
9
−
3
View file @
a288b19f
...
@@ -15,12 +15,13 @@
...
@@ -15,12 +15,13 @@
#
#
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# 2023-05-09 v1.0 <axel.hahn@unibe.ch>
# 2023-05-09 v1.0 <axel.hahn@unibe.ch>
# 2023-05-10 v1.1 <axel.hahn@unibe.ch> fix for small transfer rates in B/s
# ======================================================================
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
.
$(
dirname
$0
)
/inc_pluginfunctions
self_APPNAME
=
$(
basename
$0
|
tr
[
:lower:]
[
:upper:]
)
self_APPNAME
=
$(
basename
$0
|
tr
[
:lower:]
[
:upper:]
)
self_APPVERSION
=
1.
0
self_APPVERSION
=
1.
1
function
showHelp
(){
function
showHelp
(){
cat
<<
EOF
cat
<<
EOF
...
@@ -59,6 +60,8 @@ ph.require ceph
...
@@ -59,6 +60,8 @@ ph.require ceph
CEPHIO
=
$(
sudo
ceph status 2>/dev/null |
grep
"client:.* rd,.* wr,"
|
cut
-f
2
-d
":"
)
CEPHIO
=
$(
sudo
ceph status 2>/dev/null |
grep
"client:.* rd,.* wr,"
|
cut
-f
2
-d
":"
)
# CEPHIO="8.9 KiB/s rd, 887 KiB/s wr, 138 op/s rd, 140 op/s wr"
# CEPHIO="8.9 KiB/s rd, 887 KiB/s wr, 138 op/s rd, 140 op/s wr"
# CEPHIO="255 B/s rd, 85 B/s wr, 0 op/s rd, 0 op/s"
if
[
-z
"
${
CEPHIO
}
"
]
;
then
if
[
-z
"
${
CEPHIO
}
"
]
;
then
ph.setStatus
"unknown"
ph.setStatus
"unknown"
...
@@ -67,8 +70,11 @@ if [ -z "${CEPHIO}" ]; then
...
@@ -67,8 +70,11 @@ if [ -z "${CEPHIO}" ]; then
echo
"No ceph here or no sudo permissions on ceph command?"
echo
"No ceph here or no sudo permissions on ceph command?"
else
else
IO_READ
=
$(
echo
${
CEPHIO
}
|
cut
-f
1,2
-d
" "
|
sed
-E
"s#([0-9]*) (.).(.).*#
\1\2\3
#g"
)
# remark:
IO_WRITE
=
$(
echo
${
CEPHIO
}
|
cut
-f
4,5
-d
" "
|
sed
-E
"s#([0-9]*) (.).(.).*#
\1\2\3
#g"
)
# - the sed transforms "NN KiB/s" --> "NN KB" (cut "i")
# - the tr is for small values "NN B/s" and removes "s"
IO_READ
=
$(
echo
${
CEPHIO
}
|
cut
-f
1,2
-d
" "
|
sed
-E
"s#([0-9]*) (.).(.).*#
\1\2\3
#g"
|
tr
-d
's'
)
IO_WRITE
=
$(
echo
${
CEPHIO
}
|
cut
-f
4,5
-d
" "
|
sed
-E
"s#([0-9]*) (.).(.).*#
\1\2\3
#g"
|
tr
-d
's'
)
ph.status
"
$CEPHIO
"
ph.status
"
$CEPHIO
"
# echo "read: $IO_READ"
# echo "read: $IO_READ"
...
...
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