Skip to content

Commit

Permalink
Revert "17036 FIX heartbeat_crm: Handle cases when pacemaker service …
Browse files Browse the repository at this point in the history
…is not running"

This reverts commit cdc91cb.

Reason for revert: Creates a new service for non-clustered setups

Change-Id: I638ea8e20b708e63ed124d3634c8f72a7768292e
  • Loading branch information
racicLuka committed Oct 9, 2024
1 parent adc45df commit 15558c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
13 changes: 0 additions & 13 deletions .werks/17036

This file was deleted.

12 changes: 3 additions & 9 deletions agents/check_mk_agent.linux
Original file line number Diff line number Diff line change
Expand Up @@ -918,15 +918,9 @@ section_drbd() {
}

section_heartbeat() {
if command -v crm_mon >/dev/null 2>&1 || [ -S /var/run/heartbeat/crm/cib_ro ] || [ -S /var/run/crm/cib_ro ] || pgrep "^(crmd|pacemaker-contr)$" >/dev/null 2>&1; then
crm_output=$(TZ=UTC crm_mon -1 -r | grep -v ^$ | sed 's/^ //; /^\sResource Group:/,$ s/^\s//; s/^\s/_/g')
if [ -n "$crm_output" ]; then
echo '<<<heartbeat_crm>>>'
echo "$crm_output"
else
echo '<<<heartbeat_crm>>>'
crm_mon -1 -r 2>&1
fi
if [ -S /var/run/heartbeat/crm/cib_ro ] || [ -S /var/run/crm/cib_ro ] || pgrep "^(crmd|pacemaker-contr)$" >/dev/null 2>&1; then
echo '<<<heartbeat_crm>>>'
TZ=UTC crm_mon -1 -r | grep -v ^$ | sed 's/^ //; /^\sResource Group:/,$ s/^\s//; s/^\s/_/g'
fi

if inpath cl_status; then
Expand Down

0 comments on commit 15558c2

Please sign in to comment.