-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Rosa-Luxemburgstiftung-Berlin/checkmk_hea…
…lth_checks implemented health check for checkmk
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ openproject_required_packages: | |
|
||
openproject_hold_package: false | ||
|
||
# main version | ||
openproject_main_version: 14 | ||
|
||
# you can set this to something like openproject=13.3.1-1709106543.9f5d5716.bookworm | ||
|
@@ -94,5 +95,7 @@ openproject_update_installerdat: {} | |
# openproject_update_installerdat: | ||
# 'openproject/admin_email': [email protected] | ||
|
||
# install the health check for ckeckmk | ||
openproject_use_checkmk_check: false | ||
|
||
# vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 smartindent nu ft=yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! /bin/bash | ||
|
||
declare -r OPJ_HOST="{{ ansible_fqdn }}" | ||
|
||
curl -s -w "\n" https://${OPJ_HOST}/health_checks/all 2>&1 | sed '1d' | while read checkline; do | ||
CHECKNAME=${checkline%%: *} | ||
STATUSTXT=${checkline#*: } | ||
STATUS=${STATUSTXT%% *} | ||
ECODE=0 | ||
[ "$STATUS" != "PASSED" ] && ECODE=1 | ||
echo "$ECODE health_check_$CHECKNAME - $STATUSTXT" | ||
done |