User story #6137
closedRetrieve compliance from the API
Description
I want to be able to get the compliance of a given node from the API.
And maybe be get the global compliance status too.
The proposed endpoints are:
GET .../api/latest/compliance/nodes
=> return the list of compliance by node for all nodes, see proposed format belove
GET .../api/latest/compliance/nodes/UUID-OF-NODE
=> return the list of compliance for the node with the given UUID, see proposed format belove
GET .../api/latest/compliance/rules
=> return the list of compliance by rule for all rules, see proposed format belove
GET .../api/latest/compliance/rules/UUID-OF-RULE
=> return the list of compliance for the rule with the given UUID, see proposed format belove
The name of the compliance level would bi:
- successNotApplicable
- successAlreadyOK
- successRepaired
- error
- unexpectedUnknownComponent
- unexpectedMissingComponent
- noReport
- applaying
For a node, we will have the hierarchy: Node -> Rules -> Directives -> Components -> Values, like:
{ "id": "root", "compliance": { "successAlreadyOK": 100 }, "rules": [ { "id": "2278f76f-28d3-4326-8199-99561dd8c785", "compliance": { "successAlreadyOK": 100 }, "directives": [ { "id": "ab459975-7116-40ad-aab7-6479694ff606", "compliance": { "successAlreadyOK": 100 }, "components": [ { "name": "MOTD Configuration", "compliance": { "successAlreadyOK": 100 }, "values": [ { "value": "None", "reports": [ { "status": "successAlreadyOK" } ] } ] } ] } ] } ] }
And for a rule, the hierarchy would be: Rule -> Directives -> Components -> Nodes -> Values, like:
{ "id": "inventory-all", "compliance": { "successAlreadyOK": 33.33, "noReport": 66.67 }, "directives": [ { "id": "inventory-all", "compliance": { "successAlreadyOK": 33.33, "noReport": 66.67 }, "components": [ { "name": "inventory", "compliance": { "successAlreadyOK": 33.33, "noReport": 66.67 }, "nodes": [ { "id": "729be5c4-55a2-4b97-8529-5154cbb63a18", "values": [ { "value": "None", "reports": [ { "status": "noReport" } ] } ] }, { "id": "0876521e-3c81-4775-85c7-5dd7f9d5d3da", "values": [ { "value": "None", "reports": [ { "status": "noReport" } ] } ] }, { "id": "root", "values": [ { "value": "None", "reports": [ { "status": "successAlreadyOK" } ] } ] } ] } ] } ] }
Updated by François ARMAND almost 10 years ago
- Target version set to 3.1.0~beta1
Clearly a 3.1 target !
Updated by François ARMAND over 9 years ago
It could also be as a first approximation the inclusion of itop-compliance plugin : https://github.com/Normation/rudder-plugin-itop/
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 3.1.0~beta1 to 3.1.0~rc1
Updated by François ARMAND over 9 years ago
- Description updated (diff)
- Status changed from New to Pending technical review
- Assignee set to Vincent MEMBRÉ
- Priority changed from N/A to 2
- Pull Request set to https://github.com/Normation/rudder/pull/868
The PR is here: https://github.com/Normation/rudder/pull/868
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from Pending technical review to 12
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from 12 to Pending release
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.1.0~rc1 which was released on the 16th June 2015.
- Announcement 3.1
- Changelog 3.1
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/