minimon.sh mit Script Support

2022-06-19 · christian · bash, monitoring, projects

minimon.sh unterstützt nun eigene Shell Script zur Überwachung von Services. Das Script kann dabei eine Zeile Text und einen Status Code zurück geben.

Beispiel Script (scrdemo):

#!/usr/bin/env bash
echo "script output here"
exit 1

# exit 0 = OK
# exit 1 = WARN
# exit 2 = NOK
# exit 3 = UNKNOWN

Der Aufruf:

./minimon.sh --script "./scrdemo;demo"
[2022-06-19T23:30:56+02:00] script_demo - ./scrdemo - WARN (1) - 0.226s - script output here

Ein Anwendungsbeispiel wäre zum Beispiel die Überwachung einer SQL Abfrage und dessen Performance.


More


serverless.industries BG by Carl Lender (CC BY 2.0) Imprint & Privacy
0afe8347 2024-04-20 23:58
Mastodon via chaos.social Mastodon via einbeck.social