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
127e7f98
Commit
127e7f98
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Plain Diff
Merge branch '6723-sudo' into 'master'
update sudo handling See merge request
!193
parents
0f59f79c
e14e4b61
No related branches found
No related tags found
1 merge request
!193
update sudo handling
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
check_ceph_diskfree
+4
-3
4 additions, 3 deletions
check_ceph_diskfree
check_ceph_io
+1
-5
1 addition, 5 deletions
check_ceph_io
check_proc_mem
+11
-3
11 additions, 3 deletions
check_proc_mem
with
16 additions
and
11 deletions
check_ceph_diskfree
+
4
−
3
View file @
127e7f98
...
...
@@ -64,15 +64,16 @@ case "$1" in
*
)
esac
# --- check required tools
ph.require ceph
# set default / override from command line params
typeset
-i
iWarnLimit
=
$(
ph.getValueWithParam 70 w
"
$@
"
)
typeset
-i
iCriticalLimit
=
$(
ph.getValueWithParam 90 c
"
$@
"
)
if
!
data
=
$(
sudo
-n
/bin/ceph
df
2>&1
)
then
echo
"
$data
"
ph.abort
"UNKNOWN: ceph is not available or no sudo permissions to execute ceph commands."
ph.abort
"UNKNOWN: No sudo permissions to execute ceph commands."
fi
isHeader
=
0
...
...
This diff is collapsed.
Click to expand it.
check_ceph_io
+
1
−
5
View file @
127e7f98
...
...
@@ -89,11 +89,7 @@ else
# --- get output of ceph
if
!
CEPHOUT
=
$(
sudo
-n
ceph status 2>&1
)
;
then
ph.setStatus
"unknown"
ph.status
"no data"
echo
"There is no output from 'sudo ceph status'."
echo
"No ceph here or no sudo permissions on ceph command?"
echo
"
$CEPHOUT
"
ph.abort
"UNKNOWN: No sudo permissions to execute ceph commands."
fi
CEPHIO
=
$(
echo
"
$CEPHOUT
"
|
grep
"client:"
)
fi
...
...
This diff is collapsed.
Click to expand it.
check_proc_mem
+
11
−
3
View file @
127e7f98
...
...
@@ -11,10 +11,15 @@
#
# ----------------------------------------------------------------------
# 2020-03-02 v1.0 initial version
# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2023-02-13 v1.2 <axel.hahn@unibe.ch> some shell fixes
# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2023-02-13 v1.2 <axel.hahn@unibe.ch> some shell fixes
# 2023-08-24 v1.3 <axel.hahn@unibe.ch> add help; do not use tmp file anymore
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
export
self_APPVERSION
=
1.1
# --- tmp files for internal usage
tmpfile
=
/tmp/processlist1_
$$
tmpfile2
=
/tmp/processlist2_
$$
...
...
@@ -31,7 +36,10 @@ typeset -i iCountCritical=0
rm
-f
$tmpfile
$tmpfile2
$outCritical
$outWarning
2>/dev/null
.
$(
dirname
$0
)
/inc_pluginfunctions
# ----------------------------------------------------------------------
# functions
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# MAIN
...
...
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