Configuring the baseline by using the REST API
You can set up and modify the baseline configuration by using the /admin/baseline endpoint. Background information and equivalent manual procedures are described in Baseline-configuration.
To run a baseline check
Run a baseline check using the POST /admin/baseline endpoint.
The endpoint returns: 200 successful operation.
To get a baseline configuration
GET the current cluster configuration. Use the GET /admin/baseline endpoint.
The endpoint returns JSON formatted data in the following keys:
summary key
Reports whether the baseline is OK, the last message, and the time the baseline was last checked. For example:
"last_ok": false,
"last_message": "Major Problems Detected",
"last_checked": "2024-08-15T14:15:00+00:00"
},
results key
An object with the following keys, each of which is a list of checks:
- PASSED — checks that have passed.
- FAILED — checks that have failed.
- NOT_RUN — checks that were not run.
The results objects are described in the following table:
Name | Type | Description |
|---|---|---|
name | string | Name of the check |
severity | string | The severity of the check, one of: INFO, MINOR, MAJOR, or CRITICAL. |
enabled | boolean | Whether the check is enabled or not. |
message | string | A message describing the status of the check |
details | array | An array of details about the results of running the check on each cluster member. |
Example results objects are shown in the following sample:
"results": {
"FAILED": [
{
"name": "Apache Configuration",
"severity": "MAJOR",
"enabled": true,
"message": "MAJOR: Apache Configuration has been altered"
},
...
{
"name": "Miscellaneous Global Settings",
"severity": "MAJOR",
"enabled": true,
"message": "MAJOR: Miscellaneous Settings have been altered",
"details": [
{
"status": "FAILED",
"messages": [
"'INFERRED_SYNC_LOG_LEVEL' has been changed from 20 to 10",
"'REASONING_LOG_LEVEL' has been changed from 20 to 10"
]
}
]
...
checks key
A list of checks performed, including name, enabled, and severity.
"checks": [
{
"name": "Apache Configuration",
"key": "appliance.apache.config",
"enabled": true,
"severity": "MAJOR"
},
...
{
"name": "Appliance Compact Status",
"key": "appliance.compact",
"enabled": true,
"severity": "INFO"
}
],
actions
A list of actions taken for checks of each severity.
"actions": {
"critical": [
"SEND_EMAIL"
],
...
"ok": [
"SEND_EMAIL"
]
}
To update a baseline check settings and actions
Modify the checks and actions sections of the JSON returned by the GET /admin/baseline endpoint to reflect the updates you require. Apply the updates by using the PATCH /admin/baseline endpoint.