Adding a CP4NA alias and policy in Elasticsearch

An index template is a way to tell Elasticsearch how to configure an index when it is created. For data streams, the index template configures the stream’s backing indices as they are created.

Add an lm-logs alias and its related policy to the Elasticsearch deployment, as shown in the following example.

[root@tncoiaf-inf ~]# oc edit elasticsearch 
apiVersion: logging.openshift.io/v1
kind: Elasticsearch
metadata:
  creationTimestamp: "2021-03-08T10:02:24Z"
    - aliases:
      - audit
      - logs.audit
      name: audit
      policyRef: audit-policy
....

    - aliases:
      - lm-logs
      - logs.lm-logs
      name: lm-logs
      policyRef: lm-logs-policy
...
    - name: audit-policy
      phases:
        delete:
          minAge: 7d
        hot:
          actions:
            rollover:
              maxAge: 8h
      pollInterval: 15m
...

    - name: lm-logs-policy
      phases:
        delete:
          minAge: 7d
        hot:
          actions:
            rollover:
              maxAge: 8h
      pollInterval: 15m