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

[BUG] Notifications Channels does not appear in Monitor Trigger Actions #218

Closed
josiasnonato opened this issue Jun 13, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@josiasnonato
Copy link

Describe the bug

When I create an actions in a Monitor Trigger, the only option is "Manage Channels" with a message: "There are no existing channels. Add a channel to create an action".

I've created a channel, but I can't it in the Trigger Actions.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Notifications' page
  2. Click on 'Create channel'
  3. Select the type: Slack and create click on button Create
    PS.: My type is a Slack Channel.
  4. Go to Alerting page
  5. Click on Monitors Ribbon and create a Monitor
  6. Choose the following items:
    6.1. Per query monitor
    6.2. Visual Editor
    6.3. By internal - 1 minute
    6.4. Index Pattern: {{ Put your index }}
    6.5. Time field: timestamp
    6.6. Triggers: Add another Trigger
    6.7. Put a trigger name
    6.8 Actions: Here is the problem

Expected behavior
I believe that I should select my channel or select some options to channels

OpenSearch Version
Opensearch 2.14.0

Dashboards Version
Opensearch Dashboards 2.14.0

Plugins
Alerting

Screenshots

  1. The screen of my Notification channels
    notifications-screen

  2. The screen of my monitor showing the actions page
    alerting-monitor-triggers-actions-screen

Host/Environment (please complete the following information):

  • OS: The Opensearch is running on GCP VMs Debian 12 and Opensearch Dashboards is running in Kubernetes using the image: opensearchproject/opensearch-dashboards:2.14.0
  • Browser and version: Microsoft Edge - Version 125.0.2535.92

Additional context

  • User: My user has all_access permision.
@josiasnonato josiasnonato added bug Something isn't working untriaged labels Jun 13, 2024
@josiasnonato
Copy link
Author

Adding an information:

I've tried to create monitor with API following the oficial documentation.
But it was unsuccessful.

Using the API creates the monitor and one Action, but I can't edit and select my channel.
alerting-monitor-triggers-actions-notifictions-screen

I used this command in Opensearch Dashboards DevTools:

POST _plugins/_alerting/monitors
{
   "name": "my-monitor-test-2",
   "type": "monitor",
   "monitor_type": "query_level_monitor",
   "enabled": true,
   "schedule": {
      "period": {
         "unit": "MINUTES",
         "interval": 1
      }
   },
   "inputs": [
      {
         "search": {
            "indices": [
               "logs-ns-argocd*"
            ],
            "query": {
               "size": 0,
               "aggregations": {},
               "query": {
                  "bool": {
                     "filter": [
                        {
                           "range": {
                              "@timestamp": {
                                 "gte": "{{period_end}}||-10m",
                                 "lte": "{{period_end}}",
                                 "format": "epoch_millis"
                              }
                           }
                        },
                        {
                           "match_phrase": {
                              "stream": "stderr"
                           }
                        }
                     ]
                  }
               }
            }
         }
      }
   ],
   "triggers": [
      {
         "query_level_trigger": {
            "id": "8ofoEpABAV0q5COWFoqX",
            "name": "greater-than-10",
            "severity": "1",
            "condition": {
               "script": {
                  "source": "ctx.results[0].hits.total.value > 10",
                  "lang": "painless"
               }
            },
            "actions": [
              {
                "name": "test-action",
                "destination_id": "my-private",
                "message_template": {
                  "source": "This is my message body."
                },
                "throttle_enabled": true,
                "throttle": {
                  "value": 27,
                  "unit": "MINUTES"
                },
                "subject_template": {
                  "source": "TheSubject"
                }
              }
            ]
         }
      }
   ]
}

@AMoo-Miki
Copy link
Contributor

@opensearch-project/admin: plz route this to opensearch-project/dashboards-notifications

@gaiksaya gaiksaya transferred this issue from opensearch-project/OpenSearch-Dashboards Jun 18, 2024
@dblock dblock removed the untriaged label Jul 1, 2024
@dblock
Copy link
Member

dblock commented Jul 1, 2024

Thanks for opening this.

[Catch All Triage - Attendees 1, 2, 3, 4, 5]

@Hailong-am
Copy link
Collaborator

It has been fixed in 2.15 opensearch-project/notifications#922

@Hailong-am Hailong-am self-assigned this Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants