diff --git a/docs/20_Checks/_index.md b/docs/20_Checks/_index.md index e6a5a9976937ba507c6ce0c5ca1280c14fa40b68..f4620728d62b895015dfeee943320378eaf43744 100644 --- a/docs/20_Checks/_index.md +++ b/docs/20_Checks/_index.md @@ -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 diff --git a/docs/20_Checks/check_ceph_diskfree.md b/docs/20_Checks/check_ceph_diskfree.md new file mode 100644 index 0000000000000000000000000000000000000000..3a96e2491adeca37170d1f7d16b178d79c9e6250 --- /dev/null +++ b/docs/20_Checks/check_ceph_diskfree.md @@ -0,0 +1,60 @@ +# 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 +... diff --git a/docs/20_Checks/check_ceph_io.md b/docs/20_Checks/check_ceph_io.md new file mode 100644 index 0000000000000000000000000000000000000000..8a0c10d228cfeb9cfff7e1ce8c7b8be742dfb947 --- /dev/null +++ b/docs/20_Checks/check_ceph_io.md @@ -0,0 +1,46 @@ +# 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;; +... diff --git a/docs/20_Checks/check_eol.md b/docs/20_Checks/check_eol.md index 9c2173683357f7d7a970ad87bedae7d9035d0d6b..ed065393371a84f3bda07de95de3d8185b5c4370 100644 --- a/docs/20_Checks/check_eol.md +++ b/docs/20_Checks/check_eol.md @@ -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 diff --git a/docs/20_Checks/check_snmp_data.md b/docs/20_Checks/check_snmp_data.md index 8a182e40d101aab25694354d94eebbe11bbf7e82..27bbc2e9d7df99f237aa94fc88762d372583efa2 100644 --- a/docs/20_Checks/check_snmp_data.md +++ b/docs/20_Checks/check_snmp_data.md @@ -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 +``` diff --git a/docs/20_Checks/check_snmp_synology.md b/docs/20_Checks/check_snmp_synology.md new file mode 100644 index 0000000000000000000000000000000000000000..b53123315bd679c75aa18cb4ff03211d0b95c275 --- /dev/null +++ b/docs/20_Checks/check_snmp_synology.md @@ -0,0 +1,168 @@ +# 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 +``` diff --git a/docs/_index.md b/docs/_index.md index 9ed5d8e4409b6f32e77e43a1208e76fdbb9f1586..7d306d9aa8292f24129bea32f56300ffea20aab3 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -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