Skip to content
Snippets Groups Projects
Commit d39c54d3 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'update-docs' into 'master'

Update docs

See merge request !269
parents 94948dd4 f9bb0125
No related branches found
No related tags found
1 merge request!269Update docs
...@@ -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
......
...@@ -9,34 +9,60 @@ ...@@ -9,34 +9,60 @@
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# 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]
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 params # --- check required tools
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
......
...@@ -42,7 +42,7 @@ There is one include script used by all checks: ...@@ -42,7 +42,7 @@ There is one include script used by all checks:
* [check_php-fpm-status](check_php-fpm-status.md) * [check_php-fpm-status](check_php-fpm-status.md)
* [check_proc_mem](check_proc_mem.md) * [check_proc_mem](check_proc_mem.md)
* [check_proc_ressources](check_proc_ressources.md) * [check_proc_ressources](check_proc_ressources.md)
* check_proc_zombie * [check_proc_zombie](check_proc_zombie.md)
* [check_psqlserver](check_psqlserver.md) * [check_psqlserver](check_psqlserver.md)
* [check_rearbackup](check_rearbackup.md) * [check_rearbackup](check_rearbackup.md)
* [check_reboot_required](check_reboot_required.md) * [check_reboot_required](check_reboot_required.md)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## Introduction ## Introduction
**check_cehp_diskfree** is a plugin to show the available and free diskspace. **check_ceph_diskfree** is a plugin to show the available and free diskspace.
It returns a single line for the status, data and performance data. It returns a single line for the status, data and performance data.
## Requirements ## Requirements
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## Introduction ## Introduction
**check_cehp_io** is a plugin to show read and written bytes per second. **check_ceph_io** is a plugin to show read and written bytes per second.
It returns a single line for the status and performance data. It returns a single line for the status and performance data.
## Requirements ## Requirements
......
...@@ -17,7 +17,7 @@ As output you get a summary of all checks followed by more detailed status per j ...@@ -17,7 +17,7 @@ As output you get a summary of all checks followed by more detailed status per j
* The cronwrapper must be installed * The cronwrapper must be installed
* Your cronjob(s) must be changed to use the wrapper, eg.\ * Your cronjob(s) must be changed to use the wrapper, eg.\
`*/60 * * * * /opt/cronwrappre.sh 60 <YOUR_COMMAND>` `*/60 * * * * /opt/cronwrapper/cronwrapper.sh 60 <YOUR_COMMAND>`
📄 Source: <https://github.com/axelhahn/cronwrapper>\ 📄 Source: <https://github.com/axelhahn/cronwrapper>\
📜 License: GNU GPL 3.0\ 📜 License: GNU GPL 3.0\
......
...@@ -7,7 +7,7 @@ The kind of check is defined by a parameter `-m METHOD`. ...@@ -7,7 +7,7 @@ The kind of check is defined by a parameter `-m METHOD`.
## Requirements ## Requirements
* mysql (cli tool) * ``mysql`` (mysql client as cli tool)
* The icinga user needs to connect to the database server (see Installation). * The icinga user needs to connect to the database server (see Installation).
## Syntax ## Syntax
...@@ -161,3 +161,7 @@ As root run ...@@ -161,3 +161,7 @@ As root run
``` ```
This drops the database user `icingaclient` and removes the config file `/etc/icingaclient/.my.cnf`. This drops the database user `icingaclient` and removes the config file `/etc/icingaclient/.my.cnf`.
## Graph
See templates for mysql graphs in <https://git-repo.iml.unibe.ch/iml-open-source/icinga-graphite-templates>.
...@@ -10,8 +10,7 @@ The check fetches several counters from php-fm-status page. ...@@ -10,8 +10,7 @@ The check fetches several counters from php-fm-status page.
* running PHP FPM service * running PHP FPM service
* enabled status page * enabled status page
To enable a status page as <http://localhost/fpm-status.php>
To enable a status page as http://localhost/fpm-status.php
* Set pm.status_path in your pool config eg. /etc/php/8.1/fpm/pool.d/www.conf * Set pm.status_path in your pool config eg. /etc/php/8.1/fpm/pool.d/www.conf
...@@ -28,7 +27,6 @@ pm.status_path = /fpm-status.php ...@@ -28,7 +27,6 @@ pm.status_path = /fpm-status.php
</Location> </Location>
``` ```
## Syntax ## Syntax
```text ```text
...@@ -79,7 +77,6 @@ check_php-fpm-status -u http://localhost/my-custom-fpm-statuspage.php ...@@ -79,7 +77,6 @@ check_php-fpm-status -u http://localhost/my-custom-fpm-statuspage.php
## Examples ## Examples
`./check_php-fpm-status -u localhost/fpm-status.php` returns `./check_php-fpm-status -u localhost/fpm-status.php` returns
```txt ```txt
...@@ -111,3 +108,7 @@ Workers: Running: 1 ...@@ -111,3 +108,7 @@ Workers: Running: 1
|php-fpm-active=2;;;0;0 php-fpm-maxactive=5;;;0;0 php-fpm-queue=0;;;0;0 php-fpm-maxqueue=0;;;0;0 php-fpm-slow=0;;;0;0 php-fpm-speed=1;;;0;0 php-fpm-idle=3;;;0;0 php-fpm-running=1;;;0;0 php-fpm-reading=1;;;0;0 |php-fpm-active=2;;;0;0 php-fpm-maxactive=5;;;0;0 php-fpm-queue=0;;;0;0 php-fpm-maxqueue=0;;;0;0 php-fpm-slow=0;;;0;0 php-fpm-speed=1;;;0;0 php-fpm-idle=3;;;0;0 php-fpm-running=1;;;0;0 php-fpm-reading=1;;;0;0
``` ```
## Graph
You can use the template <https://git-repo.iml.unibe.ch/iml-open-source/icinga-graphite-templates/-/blob/master/iml_php-fpm-status.ini>.
# Check_proc_zombie
## Introduction
**check_proc_zombie** is a plugin to show the count of zombie processes.
It sends performance data.
## Requirements
* `ps`
* `top`
## Syntax
```txt
$ check_proc_zombie -h
______________________________________________________________________
CHECK_PROC_ZOMBIE
v1.2
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_proc_zombie.html
______________________________________________________________________
SYNTAX:
check_proc_zombie [-h] [-w WARNLIMIT] [-c CRITICALLIMIT]
OPTIONS:
-h, --help
show help
-c, --critical VALUE
critical value; default: 10
-w. --warning VALUE
warning limit value; default: 1
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.
```
### Parameters
(none)
## Examples
`$ check_ceph_diskfree` returns
```txt
OK: 0 ZOMBIE-Processes (total: 392 - running: 2 - sleeping: 390 - stopped: 0)
|proc-zombie=0;1;10;0
```
# Shared functions # Shared functions
## Init ## Introduction
All scripts start with sourcing a shared bash file All scripts start with sourcing a shared bash file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment