Skip to content

Commit dea1b8e

Browse files
committed
docs: better explanation of multiple policies configuration
1 parent e5c15a9 commit dea1b8e

1 file changed

Lines changed: 30 additions & 7 deletions

File tree

docs/source/AdministratorGuide/Systems/ResourceStatus/advanced_configuration.rst

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ Already described in :ref:`config section <config section>`.
2121
Policies
2222
--------
2323

24-
This section describes the policies and the conditions to match elements.
24+
This section describes the policies, and to which elements such policies are applied.
2525

2626
::
2727

2828
/Operations/Defaults/ResourceStatus
2929
/Policies
3030
/PolicyName
31-
policyType = policyType
31+
policyType = nameOfPolicyType
3232
doNotCombineResult = something
3333
/matchParams
3434
element = element
@@ -42,10 +42,10 @@ This section describes the policies and the conditions to match elements.
4242

4343
This is the complete definition of a policy. Let's go one by one.
4444

45-
* PolicyName : this must be a human readable name explaining what the policy is doing ( mandatory ).
46-
* policyType : is the name of the policy we want to run as defined in DIRAC.ResourceStatusSystem.Policy.Configurations ( mandatory ).
47-
* doNotCombineResult : if this option is present, the status will not be merged with the rest of statuses ( but actions on this policy will apply ).
48-
* matchParams : is the dictionary containing the policy metadata used by :ref:`Info Getter <info getter>` to match policies. Any of them can be a CSV.
45+
* PolicyName : this must be a human readable name explaining what the policy is doing (mandatory).
46+
* policyType : is the name of the policy we want to run as defined in DIRAC.ResourceStatusSystem.Policy.Configurations (mandatory). Possible policy names: "Downtime", "FreeDiskSpace", "JobEfficiency", "PilotEfficiency", "AlwaysBanned", "AlwaysActive", "AlwaysProbing", "AlwaysDegraded", "Propagation", "JobDoneRatio", "JobRunningWaitingRatio", "JobRunningMatchedRatio"
47+
* doNotCombineResult : if this option is present, the status will not be merged with the rest of statuses (but actions on this policy will apply).
48+
* matchParams : This section defines to which elements the policy is applied. It is used by :ref:`Info Getter <info getter>` to match policies.
4949

5050
.. note :: Remember, declare ONLY the parameters in match params that want to be taken into account.
5151
@@ -66,10 +66,13 @@ we cannot define the following matchParams:
6666

6767
Code templates and examples for creating custom policies: :doc:`../../../DeveloperGuide/Systems/ResourceStatus/index`
6868

69+
70+
The Downtime and FreeDiskSpace policies have some configurable parameters.
71+
6972
Built-in Downtime Policy
7073
~~~~~~~~~~~~~~~~~~~~~~~~
7174

72-
The ``Downtime`` policy type evaluates GOCDB downtime data for a Site or Resource.
75+
The ``Downtime`` policy type evaluates `GOC DB <https://goc.egi.eu/>`__ downtime data for a Site or Resource.
7376
Severity is mapped to RSS status as follows:
7477

7578
* **OUTAGE** → **Banned**
@@ -101,6 +104,26 @@ Example: flag elements with downtimes starting within the next 24 hours::
101104
hours = 24
102105
}
103106

107+
108+
Example: setting 2 downtime policies:
109+
110+
::
111+
112+
/Operations/Defaults/ResourceStatus
113+
/Policies
114+
/OngoingDowntime
115+
policyType = Downtime
116+
hours = 0 # hours to look ahead (0 = ongoing only, default)
117+
/matchParams
118+
element = Site
119+
/Downtime12
120+
policyType = Downtime
121+
hours = 12
122+
/matchParams
123+
element = Resource
124+
125+
126+
104127
Built-in FreeDiskSpace Policy
105128
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106129

0 commit comments

Comments
 (0)