From 446157e940ebb33f5cbc60c83b93b29d554b4e33 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Thu, 12 Oct 2023 14:52:34 +0200
Subject: [PATCH] add docs

---
 docs/20_Checks/_index.md           |  1 +
 docs/20_Checks/check_journallog.md | 71 ++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)
 create mode 100644 docs/20_Checks/check_journallog.md

diff --git a/docs/20_Checks/_index.md b/docs/20_Checks/_index.md
index c02273c..1dce8b7 100644
--- a/docs/20_Checks/_index.md
+++ b/docs/20_Checks/_index.md
@@ -26,6 +26,7 @@ There is one include script used by all checks:
 * [check_haproxy_health](check_haproxy_health.md)
 * [check_haproxy_status](check_haproxy_status.md)
 * [check_http](check_http.md)
+* [check_journallog](check_journallog.md)
 * [check_memory](check_memory.md)
 * [check_mysqlserver](check_mysqlserver.md)
 * [check_netio](check_netio.md)
diff --git a/docs/20_Checks/check_journallog.md b/docs/20_Checks/check_journallog.md
new file mode 100644
index 0000000..2012aec
--- /dev/null
+++ b/docs/20_Checks/check_journallog.md
@@ -0,0 +1,71 @@
+# Check Systemd unit
+
+## Introduction
+
+This check shows the count of written entries in the journallog per minute.
+This check requires access to journalctl.
+
+## Requirements
+
+* `journalctl` binary
+
+## Syntax
+
+```txt
+______________________________________________________________________
+
+CHECK_JOURNALLOG
+v0.1
+
+(c) Institute for Medical Education - University of Bern
+Licence: GNU GPL 3
+
+https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_journallog.html
+______________________________________________________________________
+
+Show number of lines in journallog per min.
+A strong change of the written lines per min COULD indicate a problem.
+
+The status is ...
+- unknown - if journalctl is not available
+          - if the script is started the 1st time and stores the last 
+            line of the journallog
+- ok - when showing written tnries per min
+- warning/ critical - when giving -c and -w parameter values
+
+This plugin sends performancedata.
+
+SYNTAX:
+  check_journallog [-h] [-w WARN_LIMIT] [-c CRITICAL_LIMIT]
+
+OPTIONS:
+  -h                this help
+  -w VALUE          warning level  (default: 0)
+  -c VALUE          critical level (default: 0)
+
+PARAMETERS:
+  None.
+
+EXAMPLES:
+
+  check_journallog  show count of newly written log entries
+  check_journallog -w 100 -c 200
+                    Set warning level to 100 written lines per min and
+                    critical to 200.
+  check_journallog -w 100
+                    Set warning level to 100 written lines per min but
+                    no critical limit. This check then never will send a
+                    critical status.
+
+```
+
+## Examples
+
+``./check_journallog`` returns
+
+```txt
+./check_journallog
+OK: Journallog stored 14 lines per min
+Limits: No warning level; No critical level 
+ |lines-per-min=14;;
+```
-- 
GitLab