alerting-dashboards-plugin
                                
                                
                                
                                    alerting-dashboards-plugin copied to clipboard
                            
                            
                            
                        [BUG] date_nanos time field not selectable when creating alert monitors / anomaly detectors
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:
- 
Create one index containing a field with normal
datetype and another index containing a field withdate_nanostype.PUT my-date { "mappings": { "properties": { "my-time": { "type": "date" } } } } PUT my-date-nanos { "mappings": { "properties": { "my-time": { "type": "date_nanos" } } } } - 
Go to Alerting > Monitors > Create Monitor
 - 
Select "Per query monitor" and use the "Visual Editor"
 - 
Select the
my-dateindex in the "Data source" section - 
Select the
my-timetime field. - 
Now, instead of the
my-dateindex select themy-date-nanosindex - 
=>
my-timetime 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
Host/Environment (please complete the following information):
- Chrome Version 123.0.6312.87 (Official Build) (x86_64)
 
Additional context
@opensearch-project/admin please re-direct this to: https://github.com/opensearch-project/alerting-dashboards-plugin
@amsiglan @AWSHurneyt , could you please look into it?