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

Query DSL filter input for anomaly detector not working #715

Open
rlarens opened this issue Apr 2, 2024 · 1 comment
Open

Query DSL filter input for anomaly detector not working #715

rlarens opened this issue Apr 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rlarens
Copy link

rlarens commented Apr 2, 2024

What is the bug?
When you input a filter using query DSL option to input a data filter to an anomaly detector, the Next button on the bottom right of the screen goes away, the result being you cannot create the detector. Instead, you must first create the detector without the filter, and then stop the detector, edit it to add the filter, and then restart the detector, which is awkward.
k
How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Go to 'Anomaly detection' page
  2. Click on 'Create detector' in upper right
  3. Type in name, description, index. Then click on 'Add data filter'.
  4. Click on "use query DSL' in upper right, and type or paste in filter logic using query DSL. Then, click 'Save' at lower right.
  5. The 'Next' button at the lower right of the screen disappears, the result being you cannot create the detector.

What is the expected behavior?
After you save the query DSL, the 'Next' button should remain on the page, allowing you to go to the next page and create the filter.

What is your host/environment? AWS Cloud account.

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

@rlarens rlarens added bug Something isn't working untriaged labels Apr 2, 2024
@kaituo kaituo removed the untriaged label Apr 2, 2024
@kaituo
Copy link
Collaborator

kaituo commented Apr 2, 2024

I can reproduce your bug locally. Example DSL:

{
    "bool": {
        "must": [
            {
                "bool": {
                    "should": [
                        {
                            "match": {
                                "response": "a"
                            }
                        },
                        {
                            "match": {
                                "response": "b"
                            }
                        },
                        {
                            "match": {
                                "response": "c"
                            }
                        },
                        {
                            "match": {
                                "response": "d"
                            }
                        },
                        {
                            "match": {
                                "response": "e"
                            }
                        },
                        {
                            "match": {
                                "response": "f"
                            }
                        },
                        {
                            "match": {
                                "response": "g"
                            }
                        },
                        {
                            "match": {
                                "response": "h"
                            }
                        },
                        {
                            "match": {
                                "response": "i"
                            }
                        }
                    ]
                }
            }
        ],
        "must_not": [
            {
                "wildcard": {
                    "response": "*j*"
                }
            },
            {
                "match": {
                    "response": "\"id\": \"1234\""
                }
            }
        ]
    }
}

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

2 participants