Administering data storage
Manage disk space used by runbook executions to avoid outages when the available disk space has been exhausted.
Before you begin
About this task
Runbook executions can be offloaded to store them somewhere else, in a different format (JSON or HTML), or to reduce the amount of data stored in the database. This is especially important if either the database is getting short of disk space, or a performance degradation that is caused by too much data is becoming noticeable. It is also a good practice to regularly offload runbook executions that exceed a certain age and are therefore no longer required on the production system.
When you offload and delete runbook execution records, the referenced automation execution
records are included in the offloading output and deleted as well. However, additional automation
execution records might remain for runbook executions that were already deleted separately, or were
executed outside of a runbook context. You can find instructions below on how to offload and delete
those automation execution records as well. Make sure to delete the automation execution records
only after the runbook execution records for the same time frame have been offloaded and deleted.
Otherwise, the runbook execution records contain broken links to automation execution records that
have been deleted already.
Note:
It is recommended to set up a scheduled task that offloads runbook execution data is
regularly. For your planning you should consider the following aspects:- Once runbook executions are offloaded and deleted, they are no longer accessible from the runbook history page and are not reflected in the aggregated statistics of their runbook anymore.
- The size of the database does not shrink immediately after the runbook executions have been deleted, but only after the next CouchDB database compaction has been performed by CouchDB itself. For more information about CouchDB, see CouchDB.
- What is the maximum size of the persistent volume that hosts the database where the runbook execution data is stored? For example, 20 GB.
- What is the average size of a single runbook execution in your environment? For simple runbooks, you can assume a value of about 15 KB per runbook execution.
- How many runbooks are executed per day?
The offloading script must run on a Linux® system that meets the following requirements:
- Network access to the Red Hat® OpenShift® cluster where Netcool® Operations Insight® is installed.
- The
curl
tool must be installed. - The
jq
tool must be installed. Starting with RHEL 8.0,jq
can be installed by using the AppStream repository. On earlier RHEL versions,jq
can be installed by following the instructions on https://stedolan.github.io/jq/. - Some free disk space must exist to store copies of the offloaded runbook executions. See the FOLDER parameter for more information.
- API: The Runbook API URL as described in Runbooks API.
For example, set the value of the API parameter to
https://netcool-noi.apps.cp.mycomp.com/api/v1/rba
. - APIKEY_NAME: The name of the API key that was created by using the instructions in API Keys.
- APIKEY_PW: The password of the API key that was created by using the instructions in API Keys.
- FOLDER: The fully qualified path name of an existing directory on the Linux system that will be used for storing the offloaded runbooks.
- MODE: Used to specify a format for the offloaded runbook executions. You can choose between
html
andjson
. - DELETE: Whether to delete the offloaded runbook executions from the runbook database after
successful offload. Recommended to be set to
false
while performing early tests, but set totrue
once you are ready to delete documents and reduce the size of the database. - OLDER_THAN_MONTHS: A number of months to specify the timeframe for offloading runbook
executions. Only runbook executions older than the specified number of months are offloaded. If you
set this value to
0
then all runbook executions that were created before today will be offloaded. You can set this parameter to-1
and instead use the parameters AFTER and BEFORE if you need to have more granular control on the time period. - AFTER: Only offload execution records that are started after this timestamp. You can specify a
date like
2022-03-31
or a timestamp in the moment.js format, for example,2022-03-31T12:59:59
. If you want to use this parameter, the parameter OLDER_THAN_MONTHS must be set to the empty string. - BEFORE: Only offload execution records that are started before this timestamp. You can specify a
date like
2022-04-04
or a timestamp in the moment.js format, for example,2022-04-04T12:59:59
. If you want to use this parameter, the parameter OLDER_THAN_MONTHS must be set to the empty string.