Merge "user guide demo for monitoring gui"
[policy/parent.git] / docs / drools / feature_clmgt.rst
1
2 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4
5 ********************************
6 Feature: Control Loop Management
7 ********************************
8
9 .. contents::
10     :depth: 3
11
12 Summary
13 ^^^^^^^
14
15 The Control Loop Management feature augments the telemetry tooling to allow
16 introspection of runtime operational policies.
17
18 Usage
19 ^^^^^
20
21 The feature is enabled by default.  The lifecycle "enabled" property can be toggled with
22 the "features" command line tool.
23
24     .. code-block:: bash
25        :caption: PDPD Features Command
26
27         policy stop
28
29         features disable controlloop-management   # enable/disable toggles the activation of the feature.
30
31         policy start
32
33 The "telemetry" tool can be used to list the control loops and associated Operational Polices at runtime.
34
35     .. code-block:: bash
36        :caption: PDPD Features Command
37
38        bash-4.4$ telemetry
39        Version: 1.0.0
40        https://localhost:9696/policy/pdp/engine> cd controllers/usecases/drools/facts/usecases/controlloops
41        https://localhost:9696/policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops> get
42        HTTP/1.1 200 OK
43        Content-Length: 132
44        Content-Type: application/json
45        Date: Mon, 03 Jun 2019 20:23:38 GMT
46        Server: Jetty(9.4.14.v20181114)
47
48        [
49            "LOOP_vLoadBalancerMS_v3_0_vLoadBalancerMS0_k8s-tca-clamp-policy-05162019",
50            "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e"
51        ]
52
53        https://localhost:9696/policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops> get ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e/policy
54        HTTP/1.1 200 OK
55        Content-Length: 612
56        Content-Type: text/plain
57        Date: Mon, 03 Jun 2019 20:23:58 GMT
58        Server: Jetty(9.4.14.v20181114)
59
60        controlLoop:
61          version: 2.0.0
62          controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
63          trigger_policy: unique-policy-id-1-restart
64          timeout: 3600
65          abatement: true
66
67        policies:
68          - id: unique-policy-id-1-restart
69            name: Restart the VM
70            description:
71            actor: APPC
72            recipe: Restart
73            target:
74              type: VM
75            retry: 3
76            timeout: 1200
77            success: final_success
78            failure: final_failure
79            failure_timeout: final_failure_timeout
80            failure_retries: final_failure_retries
81            failure_exception: final_failure_exception
82            failure_guard: final_failure_guard
83
84        https://localhost:9696/policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops>
85
86 End of Document