It is time to say goodbye: This version of Elastic Cloud Enterprise has reached end-of-life (EOL) and is no longer supported.
The documentation for this version is no longer being maintained. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
elastic-cloud-enterprise.sh set-logging-and-metrics-policy
editelastic-cloud-enterprise.sh set-logging-and-metrics-policy
editNAME
bash elastic-cloud-enterprise.sh set-logging-and-metrics-policy — Set the retention period for logging and metrics indices
SYNOPSIS
bash elastic-cloud-enterprise.sh set-logging-and-metrics-policy [--print] [--pattern PATTERN] [--days DAYS] [--secrets PATH_TO_SECRETS_FILE] [--host-storage-path PATH_NAME] [[--]help]
REQUIRED PRIVILEGES
To run this script, a user must be part of the docker
group. The host that you run this script on must be the first host that you installed Elastic Cloud Enterprise on or a host that holds the director role.
DESCRIPTION
Set the retention period for the logging and metrics indices that allow you to monitor your Elastic Cloud Enterprise installation.
PARAMETERS
- Prints the policy that is currently in effect. Cannot be specified together with --pattern and --days.
-
--pattern
PATTERN
-
Specifies the index pattern for which a new retention period will be set, such as
cluster-logs-*
. If specified, --days must also be specified. -
--days
DAYS
-
Specifies the number of days that indices matching the given pattern are kept. Defaults to one day for patterns that match metrics indices and seven days for patterns that match logging indices. Specifying
0
or-1
disables index curation and results in indices being retained indefinitely. If specified, --pattern must also be specified. -
--secrets
PATH_TO_SECRETS_FILE
-
Specifies a path to a file with secrets. If not specified, attempts to use
HOST_STORAGE_PATH/bootstrap-state/bootstrap-secrets.json
, whereHOST_STORAGE_PATH
is the host storage path used by the Elastic Cloud Enterprise installation. -
--host-storage-path
PATH_NAME
-
Specifies the host storage path used by the Elastic Cloud Enterprise installation. Defaults to
/mnt/data/elastic
. Used for determining the default locations of the secrets file and log files.
Example
editSet the retention period for the cluster-logs-*
index pattern to 14 days:
bash elastic-cloud-enterprise.sh set-logging-and-metrics-policy --pattern cluster-logs-* --days 14