Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] make OpenSearchISMPolicy support email channel notification #946

Open
latituder opened this issue Jan 27, 2025 · 1 comment
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@latituder
Copy link

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.

@latituder latituder added enhancement New feature or request untriaged Issues that have not yet been triaged labels Jan 27, 2025
@prudhvigodithi prudhvigodithi added good first issue Good for newcomers and removed untriaged Issues that have not yet been triaged labels Jan 30, 2025
@prudhvigodithi
Copy link
Member

[Triage]
Thanks @latituder. OpenSearchISMPolicy is for index management, we should have a new CRD for alerting and notifications ?
https://opensearch.org/docs/latest/observing-your-data/notifications/index/
Adding @gaiksaya @swoehrl-mw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants