|
@@ -2,9 +2,10 @@
|
|
|
|
|
|
|
|
# Version 0.1 - initial start of this localcheck
|
|
# Version 0.1 - initial start of this localcheck
|
|
|
# Version 0.2 - introduced additional logic to also deal with a local installed version being higher than available from the release-url.
|
|
# Version 0.2 - introduced additional logic to also deal with a local installed version being higher than available from the release-url.
|
|
|
|
|
+# Version 0.3 - changed status reporting in CheckMK when prerequisites for the Localcheck are not met.
|
|
|
|
|
|
|
|
# Current active version of the script
|
|
# Current active version of the script
|
|
|
-SCRIPT_VERSION=0.2
|
|
|
|
|
|
|
+SCRIPT_VERSION=0.3
|
|
|
|
|
|
|
|
# Installation
|
|
# Installation
|
|
|
# This file should be place on a/the Gogs (https://gogs.io) host in /usr/lib/check_mk_agent/local
|
|
# This file should be place on a/the Gogs (https://gogs.io) host in /usr/lib/check_mk_agent/local
|
|
@@ -41,19 +42,19 @@ SERVICE="Gogs"
|
|
|
|
|
|
|
|
# Check if jq package is present on the system (required for this check)
|
|
# Check if jq package is present on the system (required for this check)
|
|
|
if ! command -v jq >/dev/null 2>&1; then
|
|
if ! command -v jq >/dev/null 2>&1; then
|
|
|
- echo "2 \"$SERVICE\" - $SERVICE localcheck requires jq package to be installed"
|
|
|
|
|
|
|
+ echo "3 \"$SERVICE\" - $SERVICE localcheck requires jq package to be installed"
|
|
|
exit 0
|
|
exit 0
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# Check if curl package is present on the system (required for this check)
|
|
# Check if curl package is present on the system (required for this check)
|
|
|
if ! command -v curl >/dev/null 2>&1; then
|
|
if ! command -v curl >/dev/null 2>&1; then
|
|
|
- echo "2 \"$SERVICE\" - $SERVICE localcheck requires curl package to be installed"
|
|
|
|
|
|
|
+ echo "3 \"$SERVICE\" - $SERVICE localcheck requires curl package to be installed"
|
|
|
exit 0
|
|
exit 0
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# Check Gogs binary presence and report if not found
|
|
# Check Gogs binary presence and report if not found
|
|
|
if [[ ! -x "$GOGS_BIN" ]]; then
|
|
if [[ ! -x "$GOGS_BIN" ]]; then
|
|
|
- echo "2 \"$SERVICE\" - Gogs executable not found: $GOGS_BIN check localcheck configuration."
|
|
|
|
|
|
|
+ echo "3 \"$SERVICE\" - Gogs executable not found: $GOGS_BIN check localcheck configuration."
|
|
|
exit 0
|
|
exit 0
|
|
|
fi
|
|
fi
|
|
|
|
|
|