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
82079d03
Commit
82079d03
authored
11 months ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
proc_zombie: add iml help and doc link
parent
90566eba
Branches
Branches containing commit
No related tags found
1 merge request
!269
Update docs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
check_proc_ressources
+1
-1
1 addition, 1 deletion
check_proc_ressources
check_proc_zombie
+43
-13
43 additions, 13 deletions
check_proc_zombie
with
44 additions
and
14 deletions
check_proc_ressources
+
1
−
1
View file @
82079d03
...
@@ -49,7 +49,7 @@ SYNTAX:
...
@@ -49,7 +49,7 @@ SYNTAX:
check_proc_ressources -m METHOD [-w WARNLIMIT] [-c CRITICALLIMIT]
check_proc_ressources -m METHOD [-w WARNLIMIT] [-c CRITICALLIMIT]
EXAMPLE
:
OPTIONS
:
-h, --help
-h, --help
show help
show help
...
...
This diff is collapsed.
Click to expand it.
check_proc_zombie
+
43
−
13
View file @
82079d03
...
@@ -9,34 +9,64 @@
...
@@ -9,34 +9,64 @@
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# 2020-03-10 v1.0 <axel.hahn@iml.unibe.ch>
# 2020-03-10 v1.0 <axel.hahn@iml.unibe.ch>
# 2020-07-08 v1.1 <axel.hahn@iml.unibe.ch> FIX: set "ph." instead "ps."
# 2020-07-08 v1.1 <axel.hahn@iml.unibe.ch> FIX: set "ph." instead "ps."
# 2024-06-07 v1.2 <axel.hahn@unibe.ch> update help and add docs link
# ======================================================================
# ======================================================================
.
`
dirname
$0
`
/inc_pluginfunctions
.
`
dirname
$0
`
/inc_pluginfunctions
tmpfile
=
/tmp/check_proc_zombie_
$$
tmpfile
=
/tmp/check_proc_zombie_
$$
export
self_APPVERSION
=
1.2
# show help
function
showHelp
(){
cat
<<
EOH
$(
ph.showImlHelpHeader
)
SYNTAX:
check_proc_zombie [-h] [-w WARNLIMIT] [-c CRITICALLIMIT]
-h this help
-w Warning level
-c Critical level
OPTIONS:
-h, --help
show help
-c, --critical VALUE
critical value; default:
$iCriticalLimit
-w. --warning VALUE
warning limit value; default:
$iWarnLimit
EXAMPLE:
check_proc_zombie -w 3 -c 15
Show count of zombie processes mark as critical when there are 15 or
more zombie processes and warn on 3 or more.
EOH
}
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# MAIN
# MAIN
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# --- check required tools
# set default / override from command line params
ph.require top
typeset
-i
iWarnLimit
=
`
ph.getValueWithParam 1 w
"
$@
"
`
typeset
-i
iCriticalLimit
=
`
ph.getValueWithParam 10 c
"
$@
"
`
# --- check param -h
# --- check param -h
if
[
"
$1
"
=
"-h"
]
;
then
if
[
"
$1
"
=
"-h"
]
;
then
echo
"
showHelp
usage:
$0
[ -w value -c value -h ]
-w Warning level
-c Critical level
-h this help
"
exit
0
exit
0
fi
fi
#
set default / override from command line param
s
#
--- check required tool
s
typeset
-i
iWarnLimit
=
`
ph.getValueWithParam 1 w
"
$@
"
`
ph.require ps
typeset
-i
iCriticalLimit
=
`
ph.getValueWithParam 10 c
"
$@
"
`
ph.require top
# get cpu status i.e.
# get cpu status i.e.
# %Cpu(s): 33.3 us, 9.5 sy, 0.0 ni, 57.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
# %Cpu(s): 33.3 us, 9.5 sy, 0.0 ni, 57.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
...
...
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