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

Merge branch 'simple-task/7546-icinga-check-für-ablaufende-gitlab-tokens' into 'master'

Update docs

See merge request !302
parents 2cbcbf74 0fa3e742
No related branches found
No related tags found
1 merge request!302Update docs
Showing
with 230 additions and 35 deletions
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
# 2022-08-31 v1.4 <axel.hahn@iml.unibe.ch> add help; shellfix corrections # 2022-08-31 v1.4 <axel.hahn@iml.unibe.ch> add help; shellfix corrections
# 2023-06-19 v1.5 <axel.hahn@unibe.ch> no more tmpfile # 2023-06-19 v1.5 <axel.hahn@unibe.ch> no more tmpfile
# 2023-07-27 v1.6 <axel.hahn@unibe.ch> update help page # 2023-07-27 v1.6 <axel.hahn@unibe.ch> update help page
# 2025-02-10 v1.3 <axel.hahn@unibe.ch> harden sourcing files # 2025-02-10 v1.7 <axel.hahn@unibe.ch> harden sourcing files
# ====================================================================== # ======================================================================
# shellcheck source=/dev/null # shellcheck source=/dev/null
. "$( dirname "$0" )/inc_pluginfunctions" || exit 1 . "$( dirname "$0" )/inc_pluginfunctions" || exit 1
export self_APPVERSION=1.6 export self_APPVERSION=1.7
# url=`hostname -f`/server-status # url=`hostname -f`/server-status
url=localhost/server-status url=localhost/server-status
......
...@@ -36,7 +36,7 @@ OPTIONS: ...@@ -36,7 +36,7 @@ OPTIONS:
default: ${sInstalldir} default: ${sInstalldir}
EXAMPLE: EXAMPLE:
$_self -d /home/deployuser/imlbackup $_self -d /home/deployuser/imldeployment-installer
set a custom directory und run the backup check set a custom directory und run the backup check
EOF EOF
......
...@@ -11,7 +11,7 @@ Nothing special. ...@@ -11,7 +11,7 @@ Nothing special.
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -21,7 +21,7 @@ From this repository ypu need next to this script: ...@@ -21,7 +21,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
ABOUT ABOUT
v1.2 v1.3
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -18,7 +18,7 @@ The check sends performance data for these data too. ...@@ -18,7 +18,7 @@ The check sends performance data for these data too.
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -28,7 +28,7 @@ From this repository ypu need next to this script: ...@@ -28,7 +28,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_APACHE_REQUESTS CHECK_APACHE_REQUESTS
v1.6 v1.7
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -17,7 +17,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph ...@@ -17,7 +17,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
......
...@@ -15,7 +15,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph ...@@ -15,7 +15,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -25,7 +25,7 @@ From this repository ypu need next to this script: ...@@ -25,7 +25,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_CEPH_IO CHECK_CEPH_IO
v1.5 v1.6
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -22,7 +22,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph ...@@ -22,7 +22,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph
______________________________________________________________________ ______________________________________________________________________
CHECK_CEPH_OSD CHECK_CEPH_OSD
v1.6 v1.8
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -15,7 +15,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph ...@@ -15,7 +15,7 @@ icingaclient ALL=(ALL) NOPASSWD: /bin/ceph
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -25,7 +25,7 @@ From this repository ypu need next to this script: ...@@ -25,7 +25,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_CEPH_STATUS CHECK_CEPH_STATUS
v1.8 v1.9
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -14,7 +14,7 @@ Script: `check_clientbackup` ...@@ -14,7 +14,7 @@ Script: `check_clientbackup`
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -25,7 +25,7 @@ From this repository ypu need next to this script: ...@@ -25,7 +25,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_CLIENTBACKUP CHECK_CLIENTBACKUP
v1.12 v1.14
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -6,7 +6,7 @@ It is a plugin to check oe or mmultiple tcp and udp connections to localhost or ...@@ -6,7 +6,7 @@ It is a plugin to check oe or mmultiple tcp and udp connections to localhost or
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -16,7 +16,7 @@ From this repository ypu need next to this script: ...@@ -16,7 +16,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_CONN CHECK_CONN
v1.2 v1.3
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -22,7 +22,7 @@ Check couchdb status. This check contains different modes for several checks. ...@@ -22,7 +22,7 @@ Check couchdb status. This check contains different modes for several checks.
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -33,7 +33,7 @@ From this repository ypu need next to this script: ...@@ -33,7 +33,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_COUCHDB CHECK_COUCHDB
v0.7 v1.0
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -22,24 +22,55 @@ If there are processes with status D they will be shown (to analyze cpu waits). ...@@ -22,24 +22,55 @@ If there are processes with status D they will be shown (to analyze cpu waits).
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
## Syntax ## Syntax
``$ check_cpu [-c CRITICAL] [-w WARING] [-i CRITICAL_IO]`` ```txt
> check_cpu -h
______________________________________________________________________
CHECK_CPU
v1.16
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_cpu.html
______________________________________________________________________
check cpu usage and cpu wait
Cpu infos are taken from output of top command.
On higher cpu usage it can show processes that cause cpu waits and
with most cpu consumption.
SYNTAX:
### Parameters check_cpu [-w WARN_LIMIT] [-c CRITICAL_LIMIT] [-i CRITICAL_IO_WAIT] [-p PROCESS_LIMIT]
OPTIONS:
```text
-w VALUE cpu usage warning level (default: 75) -w VALUE cpu usage warning level (default: 75)
-c VALUE cpu usage critical level (default: 90) -c VALUE cpu usage critical level (default: 90)
-i VALUE io wait critical level (default: 50) -i VALUE io wait critical level (default: 50)
-p VALUE show process info with highest cpu consumption if
usage is > NN %; default: 50
-h or --help show this help. -h or --help show this help.
PARAMETERS:
None.
EXAMPLE:
check_cpu -w 60 -c 80 -p 40
``` ```
## Examples ## Examples
......
...@@ -25,7 +25,7 @@ As output you get a summary of all checks followed by more detailed status per j ...@@ -25,7 +25,7 @@ As output you get a summary of all checks followed by more detailed status per j
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -35,7 +35,7 @@ From this repository ypu need next to this script: ...@@ -35,7 +35,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_CRONSTATUS CHECK_CRONSTATUS
v2.4 v2.5
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
## Check Deployment
Script: `check_deployment`
This is a check for the IML deployment client that downloads and installs an application package.
This check starts the script `check_deployment.sh` that is part of the IML deployment client.
It returns
* OK if all apps were installed/ updated successfully.
* Unknown on exitcode 0 but the OK message for a successful installation was not found
* Error on non zero exitcode because download, installation or replacement for configuration files failed.
## Requirements
* The IML deployment client must be installed
📄 Source: <https://git-repo.iml.unibe.ch/iml-open-source/imldeployment-client/>\
📜 License: GNU GPL 3.0\
📗 Docs: see docs folder or online <https://os-docs.iml.unibe.ch/imldeployment-client/>
## Standalone installation
From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash
## Syntax
```txt
______________________________________________________________________
CHECK_DEPLOYMENT
v1.0
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_deployment.html
______________________________________________________________________
Show status of rollouts with IML deployment client on this system.
See https://os-docs.iml.unibe.ch/imldeployment-client/
SYNTAX:
check_deployment [-d DIRECTORY]
OPTIONS:
-h or --help show this help.
-d or --dir set installation dir of iml deployment to find its check skript
default: /opt/imldeployment-installer
EXAMPLE:
check_deployment -d /home/deployuser/imldeployment-installer
set a custom directory und run the backup check
```
## Examples
The script has no parameter. It shows all created profiles and its installation status based on the latest found logfile.
```txt
OK: Deployment ... Profiles: 2 ... Errors: 0
OK: myapp_a - /var/log/imldeployment-client/myapp_a__2025-02-20__030307.log
OK: myapp_b - /var/log/imldeployment-client/myapp_b__2025-02-20__030329.log
```
...@@ -12,7 +12,7 @@ It shows a multiline output and sends performance data. ...@@ -12,7 +12,7 @@ It shows a multiline output and sends performance data.
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -22,7 +22,7 @@ From this repository ypu need next to this script: ...@@ -22,7 +22,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_DISK-IO CHECK_DISK-IO
v1.1 v1.2
Check dis io and latency Check dis io and latency
......
...@@ -10,7 +10,7 @@ Script: `check_dns_responsetime` ...@@ -10,7 +10,7 @@ Script: `check_dns_responsetime`
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
...@@ -20,7 +20,7 @@ From this repository ypu need next to this script: ...@@ -20,7 +20,7 @@ From this repository ypu need next to this script:
______________________________________________________________________ ______________________________________________________________________
CHECK_DNS_RESPONSETIME CHECK_DNS_RESPONSETIME
v1.4 v1.5
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -18,7 +18,7 @@ icingaclient ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker ...@@ -18,7 +18,7 @@ icingaclient ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
* `inc_dockerfunctions.sh` * `inc_dockerfunctions.sh`
...@@ -37,7 +37,7 @@ If DOCKER_HOST is not set then the docker socket is detected from a running dock ...@@ -37,7 +37,7 @@ If DOCKER_HOST is not set then the docker socket is detected from a running dock
______________________________________________________________________ ______________________________________________________________________
CHECK_DOCKER_INFO CHECK_DOCKER_INFO
v1.5 v1.6
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -22,7 +22,7 @@ icingaclient ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker ...@@ -22,7 +22,7 @@ icingaclient ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
* `inc_dockerfunctions.sh` * `inc_dockerfunctions.sh`
...@@ -41,7 +41,7 @@ If DOCKER_HOST is not set then the docker socket is detected from a running dock ...@@ -41,7 +41,7 @@ If DOCKER_HOST is not set then the docker socket is detected from a running dock
______________________________________________________________________ ______________________________________________________________________
CHECK_DOCKER_IO CHECK_DOCKER_IO
v0.1 v0.2
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
...@@ -18,7 +18,7 @@ icingaclient ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker ...@@ -18,7 +18,7 @@ icingaclient ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker
## Standalone installation ## Standalone installation
From this repository ypu need next to this script: From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash * `inc_pluginfunctions` shared function for all IML checks written in bash
* `inc_dockerfunctions.sh` * `inc_dockerfunctions.sh`
...@@ -37,7 +37,7 @@ If DOCKER_HOST is not set then the docker socket is detected from a running dock ...@@ -37,7 +37,7 @@ If DOCKER_HOST is not set then the docker socket is detected from a running dock
______________________________________________________________________ ______________________________________________________________________
CHECK_DOCKER_STATS CHECK_DOCKER_STATS
v1.1 v1.2
(c) Institute for Medical Education - University of Bern (c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3 Licence: GNU GPL 3
......
## CHECK_DOCKERCONTAINER_INFO
Script: `check_dockercontainer_info`
List existing containers and show container details.
To show details you can enter an id or define a regex
⚠️ This script is more experimental.
## Requirements
* `docker` Docker must be installed
* `jq` must be installed - commandline JSON processor
* `bc` must be installed - an arbitrary precision calculator language
* sudo permissions on docker command
```txt
icingaclient ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker
```
## Standalone installation
From this repository you need next to this script:
* `inc_pluginfunctions` shared function for all IML checks written in bash
* `inc_dockerfunctions.sh`
## Rootless docker
It works with docker setups as root and can handle rootless docker instances.
To bring it up and running with an unpriviledged icinga user it must be able to access docker. Copy the docker binary eg. from /home/dockeruser/bin/docker to /usr/bin/. Then use the parameter `-p /usr/bin`.
If DOCKER_HOST is not set then the docker socket is detected from a running docker instance and will be fetched from the process list.
## Syntax
```txt
______________________________________________________________________
CHECK_DOCKERCONTAINER_INFO
v1.1
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_dockercontainer_info.html
______________________________________________________________________
List existing containers and show container details.
To show details you can enter an id or define a regex
USAGE:
check_dockercontainer_info [OPTIONS]
OPTIONS:
-h Show this help and exit.
-s Show containers using 'docker ps --all' and exit.
-i ID
Show details for container with given id.
-f REGEX
Show details for first matching container with given regex in output
of 'docker ps --all'.
If the options -i and -f are used then -i ID has priority.
PARAMETERS:
ID Hexadcimal value for the container id
REGEX String to filter the container list. With it you can set an image
name or a container name.
EXAMPLES:
check_dockercontainer_info -s
Show all containers
check_dockercontainer_info -i 0356f42ed27d
Show container details of container with id 0356f42ed27d
check_dockercontainer_info -f myapp
Show container details of first container that matches "myapp" in the
output of the container list.
```
### Parameters
None.
## Examples
### Stats
`$ ./check_dockercontaeiner_top` returns
```txt
TODO
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment