From e5a812082ae033afb1eed82c0f2df3d0f6bdc93f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 08:53:20 +0200 Subject: Adding upstream version 2.1.6. Signed-off-by: Daniel Baumann --- agents/ocf/HealthIOWait.in | 197 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100755 agents/ocf/HealthIOWait.in (limited to 'agents/ocf/HealthIOWait.in') diff --git a/agents/ocf/HealthIOWait.in b/agents/ocf/HealthIOWait.in new file mode 100755 index 0000000..ba7a17a --- /dev/null +++ b/agents/ocf/HealthIOWait.in @@ -0,0 +1,197 @@ +#!/bin/sh +# +# ocf:pacemaker:HealthIOWait resource agent +# +# Copyright 2004-2023 the Pacemaker project contributors +# +# The version control history for this file may have further details. +# +# This source code is licensed under the GNU General Public License version 2 +# (GPLv2) WITHOUT ANY WARRANTY. +# + +# +# Measures CPU iowait % via top and writes #health-iowait status into the CIB +# +####################################################################### +# Initialization: + +: ${OCF_FUNCTIONS:="${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs"} +. "${OCF_FUNCTIONS}" +: ${__OCF_ACTION:="$1"} + +####################################################################### + +meta_data() { + cat < + +1.1 + + +System health agent that measures the CPU iowait via top and updates the #health-iowait attribute. + +System health based on CPU iowait measurement + + + + +Location to store the resource state in. + +State file + + + + + +Upper limit of iowait percentage to switch the health attribute to yellow. I.e. +the #health-iowait will go yellow if the %iowait of the CPU gets higher than 10%. + +Upper limit for yellow health attribute + + + + + +Upper limit of iowait percentage to switch the health attribute to red. I.e. +the #health-iowait will go red if the %iowait of the CPU get higher than 15%. + +Upper limit for red health attribute + + + + + + + + + + + + + +END +} + +####################################################################### + +agent_usage() { + cat <