Skip to content

[FEATURE] make OpenSearchISMPolicy support email channel notification #946

@latituder

Description

@latituder

Is your feature request related to a problem?

A clear and concise description of what the problem is, e.g. I'm always frustrated when [...].

I use opensearch Operator deploy my openserach-cluster.
the opensearch Operator also brings a CRD “OpenSearchISMPolicy”, which helps to use a yaml to deinfe ISM.

In the Opensearch UI, if I manually setup an ISM policy, then I can choose a configured notification channel (email), and write an email template.

hoewver, in CR OpenSearchISMPolicy, I see the notifcation doesn’t has email option.

$ kc explain OpenSearchISMPolicy.spec.errorNotification.destination
GROUP:      opensearch.opster.io
KIND:       OpenSearchISMPolicy
VERSION:    v1

FIELD: destination <Object>


DESCRIPTION:
    The destination URL.
    
FIELDS:
  amazon        <Object>
    <no description>

  chime <Object>
    <no description>

  customWebhook <Object>
    <no description>

  slack <Object>
    <no description>

What solution would you like?

A clear and concise description of what you want to happen.
Ideally, I’d like to set the OpenSearchISMPolicy like this:

apiVersion: opensearch.opster.io/v1
kind: OpenSearchISMPolicy
metadata:
  name: logs-rollover-retention
spec:
  opensearchCluster:
    name: app-logging-opensearch
  description: "set index rollover then wait and retension"
  policyId: logs-rollover-retention
  defaultState: young_indexes
  ismTemplate:
    indexPatterns:
       - logs-*
    priority:  1
  errorNotification:
    channel: my-email-channel # this email channel already configured and tested
    destination: 
        <may I refer an email receiver group name here?>
    messageTemplate:
      source: "APP logging OpenSearch ISM job: The index {{ctx.index}} failed during ISM policy execution"
  states:
    - name: young_indexes
      actions:
.......

apiVersion: opensearch.opster.io/v1
kind: OpenSearchISMPolicy
metadata:
name: logs-rollover-retention
spec:
opensearchCluster:

What alternatives have you considered?

A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions