alerting-dashboards-plugin icon indicating copy to clipboard operation
alerting-dashboards-plugin copied to clipboard

[BUG] date_nanos time field not selectable when creating alert monitors / anomaly detectors

Open JannikBrand opened this issue 10 months ago • 2 comments

Describe the bug

If an index has a time field which has the field mapping type date_nanos, it cannot be selected within the "Visual Editor" when creating an alert monitor. You can workaround that by using the "Extraction query editor" instead or by directly creating the monitor via the OpenSearch API.

The same problem exists for creating an anomaly detector, possibly somewhere else?

To Reproduce Steps to reproduce the behavior:

  1. Create one index containing a field with normal date type and another index containing a field with date_nanos type.

    PUT my-date
    {
      "mappings": {
        "properties": {
          "my-time": {
            "type": "date"
          }
        }
      }
    }
    
    PUT my-date-nanos
    {
      "mappings": {
        "properties": {
          "my-time": {
            "type": "date_nanos"
          }
        }
      }
    }
    
  2. Go to Alerting > Monitors > Create Monitor

  3. Select "Per query monitor" and use the "Visual Editor"

  4. Select the my-date index in the "Data source" section

  5. Select the my-time time field.

  6. Now, instead of the my-date index select the my-date-nanos index

  7. => my-time time field cannot be selected.

Expected behavior Expect to input the date_nanos time field via the UI / Visual editor.

OpenSearch Version 2.12.0, 1.3.14.

Dashboards Version 2.12.0, 1.3.14.

Plugins opensearch-alerting, opensearch-anomaly-detection, ...

Screenshots

image

Host/Environment (please complete the following information):

  • Chrome Version 123.0.6312.87 (Official Build) (x86_64)

Additional context

JannikBrand avatar Apr 04 '24 13:04 JannikBrand

@opensearch-project/admin please re-direct this to: https://github.com/opensearch-project/alerting-dashboards-plugin

kavilla avatar Apr 04 '24 23:04 kavilla

@amsiglan @AWSHurneyt , could you please look into it?

sbcd90 avatar Apr 29 '24 18:04 sbcd90