A host’s instance may or not be in compliance. For example, if a package defined by an installed application is not present on the instance, the host is not in compliance. When a host is not in compliance, compliance errors are associated to it. In this case, its state is ERROR.
In order to bring a host in compliance again, methods available in application context resource might be used. For instance, if a file is not in compliance, its update might be triggered to bring host’s instance back in compliance.
The following elements are defined as part of a compliance error:
{
    "application" : "WebServer",
    "type" : "serviceResource",
    "name" : "httpd",
    "currentState" : {
        "running" : false,
        "enabled" : true
    },
    "expectedState" : {
        "running" : true,
        "enabled" : true
    }
}
In above example, httpd service is not running, however it should.
{
    "modificationTime" : "...",
    "creationTime" : "...",
    "path" : "/etc/httpd/conf/httpd.conf",
    "mode" : "644",
    "owner" : "root",
    "group" : "root",
    "present" : true
}
{
    "running" : false,
    "enabled" : true
}
{
    "installed" : true
}
Compliance errors are part of sub-collections of a host, below URLs are therefore relative.
compliance
compliance/applications/{app_name}/files/{file_name}
compliance/applications/{app_name}/packages/{pkg_name}
compliance/applications/{app_name}/services/{svc_name}
2016 © ComodIT. All Rights Reserved. Privacy Policy | Terms of Service