<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
<resource-agent name="HealthCPU" version="0.1">
<version>1.0</version>

<longdesc lang="en">
Systhem health agent that measures the CPU idling and updates the #health-cpu attribute.
</longdesc>
<shortdesc lang="en">System health CPU usage</shortdesc>

<parameters>
<parameter name="state" unique="1">
<longdesc lang="en">
Location to store the resource state in.
</longdesc>
<shortdesc lang="en">State file</shortdesc>
<content type="string" default="/var/run/health-cpu-HealthCPU.state" />
</parameter>

<parameter name="yellow_limit" unique="1">
<longdesc lang="en">
Lower (!) limit of idle percentage to switch the health attribute to yellow. I.e.
the #health-cpu will go yellow if the %idle of the CPU falls below 50%.
</longdesc>
<shortdesc lang="en">Lower limit for yellow health attribute</shortdesc>
<content type="string" default="50"/>
</parameter>

<!--
     The original agent defines red_limit with unique=1.
     However, we use this agent to test the 'pcs resource describe' command and
     its ability to mark unique attributes as such. In order to have at least
     one unique and one non-unique attribute for the test, red_limit has been
     made non-unique.
     If this is needed to be set to unique for whatever reason, create a new
     agent XML to use in the describe test. Perhaps it would be better if it
     wasn't based on any existing agent and would be named e.g.
     ocf:pacemaker:pcs-test-describe.
-->
<parameter name="red_limit">
<longdesc lang="en">
Lower (!) limit of idle percentage to switch the health attribute to red. I.e.
the #health-cpu will go red if the %idle of the CPU falls below 10%.
</longdesc>
<shortdesc lang="en">Lower limit for red health attribute</shortdesc>
<content type="string" default="10"/>
</parameter>

</parameters>

<actions>
<action name="start"        timeout="10s" />
<action name="stop"         timeout="10s" />
<action name="monitor"      timeout="10s" interval="10s" start-delay="0s" />
<action name="meta-data"    timeout="5s" />
<action name="validate-all"   timeout="10s" />
</actions>
</resource-agent>

