From 0e4c3e0945aa20cc7c25593cb195b798a7693057 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Thu, 7 Jul 2022 14:37:44 +0200
Subject: [PATCH] lint md files

---
 docs/20_Checks/check_cpu.md           | 16 +++------
 docs/20_Checks/check_snmp_data.md     | 50 +++++++++++++--------------
 docs/20_Checks/inc_pluginfunctions.md | 28 +++++++--------
 docs/20_Checks/zz_template_check_.md  | 20 ++++-------
 4 files changed, 48 insertions(+), 66 deletions(-)

diff --git a/docs/20_Checks/check_cpu.md b/docs/20_Checks/check_cpu.md
index 489e3f3..58e5a90 100644
--- a/docs/20_Checks/check_cpu.md
+++ b/docs/20_Checks/check_cpu.md
@@ -1,12 +1,6 @@
-# IML Checks for Icinga / Nagios
+# check CPU
 
-[Home](readme.md)
-
----
-
-## check CPU
-
-### Introduction
+## Introduction
 
 **check_cpu** is a plugin to check cpu usage and cpu io wait.
 It reads cpu data from output of top command and shows
@@ -26,11 +20,11 @@ For all values it sends performance data.
 
 If there are processes with status D they will be shown (to analyze cpu waits).
 
-### Syntax
+## Syntax
 
 ``$ check_NAME [-c CRITICAL] [-w WARING] [-i CRITICAL_IO]``
 
-#### Parameters
+### Parameters
 
 ```text
     -w VALUE       cpu usage warning level  (default: 75)
@@ -42,7 +36,7 @@ If there are processes with status D they will be shown (to analyze cpu waits).
 
 ```
 
-# Examples
+## Examples
 
 ``check_cpu -w 60 -c 80 -i 40``
     check cpu usage.
diff --git a/docs/20_Checks/check_snmp_data.md b/docs/20_Checks/check_snmp_data.md
index d12ef66..b0725ac 100644
--- a/docs/20_Checks/check_snmp_data.md
+++ b/docs/20_Checks/check_snmp_data.md
@@ -1,26 +1,20 @@
-# IML Checks for Icinga / Nagios
+# check SNMP data
 
-[Home](readme.md)
-
----
-
-## check SNMP data
-
-### Introduction
+## Introduction
 
 **check_snmp_data** is a plugin for fetching performance data with a set of given OIDs.
 
 It can handle current values (i.e. load or cpu usage) and counter values (i.e. network io).
 
-### Syntax
+## Syntax
 
 ``$ check_snmp_data -h HOSTNAME [-C COOMMUNITYSTRING] -v -m METHOD``
 
-#### Parameters
+### Parameters
 
 Starting the script without parameters shows a help.
 
-```
+```txt
 
 SNMP performance data v1.0
 
@@ -46,16 +40,16 @@ EXAMPLE:
 
 ```
 
-### Examples
+## Examples
+
+### Get values
 
-#### Get values
+`./check_snmp_data -h 192.168.100.12 -v -m cpu`
 
-``./check_snmp_data -h 192.168.100.12 -v -m cpu``
-    
 Shows the current cpu usage of host *192.168.100.12*.
 The output is something like that:
 
-```
+```txt
 OK: SNMP performance data :: CPU usage 
 cpu-user       0 %
 cpu-system     0 %
@@ -68,19 +62,21 @@ The 3 lines with values starting from line 2 are written with *-v* option only.
 
 The performance data (last line) always will be sent.
 
-#### Get counter data
+### Get counter data
+
+`./check_snmp_data -h 192.168.100.12 -v -m netio`
 
-``./check_snmp_data -h 192.168.100.12 -v -m netio``
-    
 If there is a check with counter data using *-v* option you see the counter value and the delta speed. It is calculated by
 
-```
+```txt
               [current_counter] - [last_counter]
 delta_speed = ----------------------------------
                 time_since_last_check_in_sec
 ```
+
 The output looks like that:
-```
+
+```txt
 OK: SNMP performance data :: Network IO (experimental) 
 in             total: 2669086814     delta:      1  per sec
 out            total: 2212665608     delta:      0  per sec
@@ -88,19 +84,21 @@ out            total: 2212665608     delta:      0  per sec
  |in=1;;;0; out=0;;;0;
 ```
 
-
-### Configuration
+## Configuration
 
 check_snmp_data is a Bash script. If you open / view it you see a DATA section as comment lines on the top.
 
 It starts with a short description:
-```
+
+```txt
 # SYNTAX:
 # label    --> DATA:[method]:label:[text]
 # n x data --> DATA:[method]:data:[perf-label]:[oid]:[optional unit]
 ```
+
 ... followed by the configuration data of the checks.
-```
+
+```txt
 #
 # DATA:cpu:label:CPU usage
 # DATA:cpu:data:cpu-user:1.3.6.1.4.1.2021.11.9.0:%
@@ -108,7 +106,7 @@ It starts with a short description:
 # DATA:cpu:data:cpu-idle:1.3.6.1.4.1.2021.11.11.0:%
 ```
 
-To fetch configuration data the text in $0 is grepped by ``^#\ DATA:``.
+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.
 
diff --git a/docs/20_Checks/inc_pluginfunctions.md b/docs/20_Checks/inc_pluginfunctions.md
index 8ca811e..65d951c 100644
--- a/docs/20_Checks/inc_pluginfunctions.md
+++ b/docs/20_Checks/inc_pluginfunctions.md
@@ -1,20 +1,14 @@
-# IML Checks for Icinga / Nagios
+# Shared functions
 
-[Home](readme.md)
+## Init
 
----
-
-## Shared functions
-
-### Init
-
-All scripts start with sourcing a shared bash file 
+All scripts start with sourcing a shared bash file
 
 ``. `dirname $0`/inc_pluginfunctions``
 
 In that script are several functions starting with prefix **ph.** (=plugin helper)
 
-### Available functions
+## Available functions
 
 This is a list in alphabetic order
 
@@ -70,7 +64,7 @@ You can override it as often you want during the script. Based on the last setti
 
 **ph.setStatusByLimit** VALUE WARNLIMIT CRITLIMIT
 
-set statuscode by verifying integer(!) value with crtical and warning limit	
+set statuscode by verifying integer(!) value with crtical and warning limit 
 
 Example:
 
@@ -93,23 +87,25 @@ Add performance data. Their output will be written with ph.exit. So you are free
 For increasing system counters: get changerate per second since last check.
 
 Unit value can be
+
 * s or sec - for seconds
 * m or min - for minutes
 
 Example:
 
-    # speed in byte per sec based on last stored value and its age
-    iSpeedRead=` ph.perfdeltaspeed "netio-${myinterface}-rx" $iRead`
+```txt
+# speed in byte per sec based on last stored value and its age
+iSpeedRead=` ph.perfdeltaspeed "netio-${myinterface}-rx" $iRead`
+```
 
 **ph.perfshow**
 
 dump performance data (if u are not using ph.exit)
 
-**ph.require** [PROG [PROG2]]
+**ph.require** [PROG [...PROG_N]]
 
 check if a binary PROG exists in search path (=are installed) - if not then execution stops with showing a warning message and status unknown (using ph.abort).
 
 Example:
 
-``ph.require bc lsblk``
-
+`ph.require bc lsblk`
diff --git a/docs/20_Checks/zz_template_check_.md b/docs/20_Checks/zz_template_check_.md
index 63d8e5f..a512312 100644
--- a/docs/20_Checks/zz_template_check_.md
+++ b/docs/20_Checks/zz_template_check_.md
@@ -1,26 +1,20 @@
-# IML Checks for Icinga / Nagios
+# check NAME
 
-[Home](readme.md)
-
----
-
-## check NAME
-
-### Introduction
+## Introduction
 
 **check_NAME** is a plugin for ...
 
-### Syntax
+## Syntax
 
-``$ check_NAME [-c CRITICAL] [-w WARING] PRODUCT VERSION``
+`$ check_NAME [-c CRITICAL] [-w WARING] PRODUCT VERSION`
 
-#### Parameters
+### Parameters
 
 ...
 
-### Examples
+## Examples
 
 ...
 
-``check_NAME blubb``
+`check_NAME blubb`
     Show blubber bubbles
-- 
GitLab