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

update docs

parent 4c7b746b
Branches
No related tags found
1 merge request!77update docs
......@@ -9,7 +9,8 @@ There is one include script used by all checks:
* [check_apache_requests](check_apache_requests.md)
* check_backup_one
* check_ceph_diskfree
* [check_ceph_diskfree](check_ceph_diskfree.md)
* [check_ceph_io](check_ceph_io.md)
* check_ceph_osd
* check_ceph_status
* check_clientbackup
......@@ -33,7 +34,7 @@ There is one include script used by all checks:
* check_sensuplugins
* check_smartstatus
* [check_snmp_data](check_snmp_data.md)
* check_snmp_synology
* [check_snmp_synology](check_snmp_synology.md)
* check_ssl
* check_systemdservices
* check_timesync
......
# check Ceph diskfree
## Introduction
**check_cehp_diskfree** is a plugin to show the available and free diskspace.
It returns a single line for the status, data and performance data.
## Requirements
* `ceph` binary and sudo permission on it to get the information
## Syntax
```
$ check_ceph_diskfree -h
______________________________________________________________________
CHECK_CEPH_DISKFREE
v1.3
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
Show available and free space on a ceph cluster.
This check sends performance data.
It uses 'ceph df' to parse data.
SYNTAX:
check_ceph_diskfree
OPTIONS:
-h or --help show this help.
```
### Parameters
(none)
## Examples
`$ check_ceph_diskfree` returns
```txt
check_ceph_diskfree
OK: Disksize on Ceph cluster and its pools - warnings: 0 (70 %) .. critcal: 0 (90 %)
--- RAW STORAGE ---
CLASS SIZE AVAIL USED RAW USED %RAW USED
OK ssd 54 TiB 53 TiB 767 GiB 767 GiB 1.40
OK TOTAL 54 TiB 53 TiB 767 GiB 767 GiB 1.40
--- POOLS ---
POOL ID PGS STORED OBJECTS USED %USED MAX AVAIL
OK .mgr 1 1 18 MiB 6 18 MiB 0 16 TiB
OK one 2 32 255 GiB 66.65k 255 GiB 0.50 16 TiB
OK two 3 32 0 B 0 0 B 0 25 TiB
|global-total=59373627899904;;;0;59373627899904 global-avail=58274116272128;;;0;59373627899904 global-used=823559979008;;;0;59373627899904
...
# check Ceph IO
## Introduction
**check_cehp_io** is a plugin to show read and written bytes per second.
It returns a single line for the status and performance data.
## Requirements
* `ceph` binary and sudo permission on it to get the information
## Syntax
```
$ check_ceph_io --help
______________________________________________________________________
CHECK_CEPH_IO
v1.0
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
Show cheph IO as read and written bytes per second.
This check sends performance data.
SYNTAX:
check_ceph_io
OPTIONS:
-h or --help show this help.
```
### Parameters
(none)
## Examples
`$ check_ceph_io` returns
```txt
OK: 13 KiB/s rd, 1.1 MiB/s wr, 130 op/s rd, 137 op/s wr
|cephio-read=13K;; cephio-write=1.1M;;
...
......@@ -133,24 +133,28 @@ Al other lines, like empty lines, lines starting with special characters are ign
Snippet:
# --------------------------------------------
centos:The CentOS Project
centos:website https://www.centos.org/
# --------------------------------------------
centos:6:2020-11-30
centos:7:2024-06-30
centos:8:2029-05-31
```txt
# --------------------------------------------
centos:The CentOS Project
centos:website https://www.centos.org/
# --------------------------------------------
centos:6:2020-11-30
centos:7:2024-06-30
centos:8:2029-05-31
```
Example output:
$ check_eol centos 7
OK [centos 7] ends on 2024-06-30 ... 1586 days left
```txt
$ check_eol centos 7
OK [centos 7] ends on 2024-06-30 ... 1586 days left
The CentOS Project
website https://www.centos.org/
The CentOS Project
website https://www.centos.org/
Limit Info: warn below 365 days; critical below 90 days
Limit Info: warn below 365 days; critical below 90 days
```
#### Files
......
......@@ -113,3 +113,20 @@ To fetch configuration data the text in $0 is grepped by `^# DATA:`.
There is a single line with **label** to define a short description of the check.
There can be severeal lines with **data** to define the values to get. Each data line must have a uniq label within the same check.
## SNMP authentication configuration
In a configuration file you can put the authentication parameters for snmpget and snmpwalk.
By default it reads /etc/icinga2/snmp.cfg - but you can use `-f FILENAME` to override it.
```txt
sudo cat /etc/icinga2/snmp.cfg
#
# snmp-connections
# SYNTAX: [hostname]:[params]
#
DEFAULT:-v 2c -c public
server-01.example.com:-v 3 -l authnoPriv -a SHA -u imlmonitor -A password-for-server-01
server-02.example.com:-v 3 -l authnoPriv -a SHA -u imlmonitor -A password-for-server-02
```
# check SNMP Synology
## Introduction
**check_snmp_data** is a plugin to check the status of a Synology storage using snmp v2 or v3.
## Syntax
Start the script without parameter to get the help.
```txt
______________________________________________________________________
CHECK_SNMP_SYNOLOGY
v1.2
Based on script of Nicolas Ordonez.
Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
Check health of a Synology drive using SNMP.
SYNTAX:
check_snmp_synology [options] -h TARGET
OPTIONS:
-a STRING
Authentication params for snmpwalk/ snmpget to connect to target;
default: "-v2c -c public" (Snmpv2 with community string "public")
-h SNMPTARGET
Set a target to connect as fqdn or ip address; default: localhost
-f FILE
Read authentication from config file. See section 'CONFIG FILE' below.
default: "/etc/icinga2/snmp.cfg"
By default all checks will be executed. You can linit the executed checks
by naming single checks:
-s System check:
- Show system data: model, serial number, DSM version
- System status
- Power status
- System fan Status
- CPU fan status
-d Disk check:
- status and temperature of each hard disk
- status of all raid volumes
- free disk space
-u Update check; check switches to warning if an update is available
-t Temerature check
-v Enable detailed output of the checks. It is recommended for
system status and disk status.
CONFIG FILE:
The config file can be multiline and has the syntax
[SNMPTARGET[,target2]]:[auth parameters]
The auth parameters set the version and all needed values to connect.
Snmp v2 uses a community string.
Snmp v3 is highly recommended (you should disable Snmp v2) and needs
a user and password.
Example:
server-01.example.com:-v 3 -l authnoPriv -a SHA -u snmpmonitor -A password-for-server-01
server-02.example.com,192.168.0.4:-v 3 -l authnoPriv -a SHA -u snmpmonitor -A password-for-server-02
EXAMPLE:
check_snmp_synology -h server-01.example.com -v
Show complete Synology status of server-01 using connect data from
/etc/icinga2/snmp.cfg
check_snmp_synology -h server-01.example.com -v -f /opt/somewhere/snmp.conf
Show complete Synology status of server-01 using connect data from
custom config file
check_snmp_synology -h server-01.example.com -u
Make a single check if update is available.
```
## Examples
### Complete status
`./check_snmp_synology -h server-01.example.com -v`
Shows the full set of status checks.
The output is something like that:
```txt
OK: Synology "RS3614xs+" (s/n: "1410M9N0*****", "DSM 7.1-42962")
---------- INFORMATION
Synology model: "RS3614xs+"
Synology s/n: "1410M9N0*****"
DSM Version: "DSM 7.1-42962"
Update available: Up to date (2)
---------- SYSTEM
System Status: Normal
Power Status: Normal
System Fan Status: Normal
CPU Fan Status: Normal
NAS temperature: 40 °C
---------- STORAGE
Number of disks: 12
"Disk 1" (model:"ST2000NM0008-2F3100") status: Normal (1) temperature: 29 °C
"Disk 2" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 35 °C
"Disk 3" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 35 °C
"Disk 4" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 33 °C
"Disk 5" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 34 °C
"Disk 6" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 35 °C
"Disk 7" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 35 °C
"Disk 8" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 34 °C
"Disk 9" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 35 °C
"Disk 10" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 35 °C
"Disk 11" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 35 °C
"Disk 12" (model:"ST2000NM0033-9ZM175") status: Normal (1) temperature: 34 °C
Number of RAID volumes: 1
"Volume 1" status: Normal (1) - size 20282 GB, free 7514 GB (37%)
```
### Check temperature only
`./check_snmp_synology -h server-01.example.com -t`
Without `-v` param you get a short status with a single line. For this check the details are useless.
Next to the status you get a line with performance data.
```txt
OK: NAS temperature: 40 °C
|temp=40;;
```
### Check os update only
`./check_snmp_synology -h server-01.example.com -u`
Without `-v` param you get a short status with a single line. For this check the details are useless.
```txt
OK: Up to date
```
## SNMP authentication configuration
In a configuration file you can put the authentication parameters for snmpget and snmpwalk.
By default it reads /etc/icinga2/snmp.cfg - but you can use `-f FILENAME` to override it.
```txt
sudo cat /etc/icinga2/snmp.cfg
#
# snmp-connections
# SYNTAX: [hostname]:[params]
#
DEFAULT:-v 2c -c public
server-01.example.com:-v 3 -l authnoPriv -a SHA -u imlmonitor -A password-for-server-01
server-02.example.com:-v 3 -l authnoPriv -a SHA -u imlmonitor -A password-for-server-02
```
......@@ -14,4 +14,5 @@ We use Icinga graphite module to show performance data. The templates are locate
* Checks: <https://git-repo.iml.unibe.ch/iml-open-source/icinga-checks>
* Graphs (Graphite): <https://git-repo.iml.unibe.ch/iml-open-source/icinga-graphite-templates>
📜 Licence: GNU GPL 3.0
📜 Licence: GNU GPL 3.0 \
📗 Docs: <https://os-docs.iml.unibe.ch/icinga-checks/>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment