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

Merge branch '6908_check_rearbackup' into 'master'

6908 check rearbackup

See merge request !225
parents 0e9fce5e cd4b66b6
No related branches found
No related tags found
1 merge request!2256908 check rearbackup
......@@ -5,11 +5,14 @@
# ABOUT
#
# ----------------------------------------------------------------------
# 2020-10-23 v1.0 <axel.hahn@iml.unibe.ch> initial version
# 2020-10-25 v1.1 <axel.hahn@iml.unibe.ch> show disks, show installed versions (WIP)
# 2023-10-23 v1.0 <axel.hahn@unibe.ch> initial version
# 2023-10-25 v1.1 <axel.hahn@unibe.ch> show disks, show installed versions (WIP)
# 2023-12-22 v1.2 <axel.hahn@unibe.ch> show help
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
. $(dirname $0)/inc_pluginfunctions
export self_APPVERSION=1.2
. /etc/icingaclient/client.cfg 2>/dev/null
......@@ -22,6 +25,32 @@
# FUNCTIONS
# ----------------------------------------------------------------------
# show help text
function showHelp(){
local _self; _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
About ... shows a short summary for the system:
* operating system
* cpu
* ram
* diskspace
* checked services
SYNTAX:
$_self [-h]
OPTIONS:
-h, --help
this help
EOF
}
function _section(){
echo ">>>>>>>>>> $*"
}
......@@ -30,6 +59,13 @@ function _section(){
# MAIN
# ----------------------------------------------------------------------
# --- check param -h
while [[ "$#" -gt 0 ]]; do case $1 in
-h|--help) showHelp; exit 0;;
*) echo "ERROR: Unknown parameter: $1"; showHelp; exit 1;
esac; done
_iCpu=$( grep -c "processor" /proc/cpuinfo )
_sCpuModel=$(grep "model name" /proc/cpuinfo | sort -u )
_iMem=$( grep "MemTotal:" /proc/meminfo | awk '{ print $2 }' )
......
......@@ -7,6 +7,7 @@ There is one include script used by all checks:
## Check scripts
* [about](about.md)
* [check_apache_requests](check_apache_requests.md)
* [check_ceph_diskfree](check_ceph_diskfree.md)
* [check_ceph_io](check_ceph_io.md)
......
# About
## Introduction
This check shows a short summary for the current system.
Its status is always OK.
## Requirements
Nothing special.
## Syntax
```txt
______________________________________________________________________
ABOUT
v1.2
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/about.html
______________________________________________________________________
About ... shows a short summary for the system:
* perating system
* cpu
* ram
* diskspace
* checked services
SYNTAX:
about [-h]
OPTIONS:
-h, --help
this help
```
## Example
```txt
# ./about
debian 12 / 16 cpu / 62.684 GB ram
>>>>>>>>>> CPU: 16
model name : Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
>>>>>>>>>> Memory
RAM total 65729512 kB
Swap 999420 kB
>>>>>>>>>> Disks
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/icinga--01--vg-root 218G 28G 179G 14% /
/dev/sda1 455M 105M 326M 25% /boot
>>>>>>>>>> Services
Apache-httpd
Carbon-Cache
Cron
Cronjob-watcher
Icinga2
Icinga-Director
Mariadb
PHP-FPM
Postfix
SSH
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment