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] Not possible to create AD monitors #1126

Open
heilmela opened this issue Oct 15, 2024 · 1 comment
Open

[BUG] Not possible to create AD monitors #1126

heilmela opened this issue Oct 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@heilmela
Copy link

heilmela commented Oct 15, 2024

What is the bug?
It's not possible to create a trigger for an AD monitor the UI shows an error "Failed to Load..." while the network tab shows BadRequest on http://ose-dashboards:5603/api/alerting/detectors/u5gchpIBOU-wiD8XajaL/results?startTime=1728380244166&endTime=1728985044167&preview=true
{
"statusCode": 400,
"error": "Bad Request",
"message": "[request query.startTime]: definition for this key is missing"
}

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Go to Alerting
  2. Select Create Monitor
  3. Select "Per query monitor" + "Anomaly detector"
  4. Select an existing detector
  5. See error
  6. Repeat with "Remove Trigger" + "Add Trigger"

What is the expected behavior?
Should be possible to create a trigger on a AD feature

What is your host/environment?

  • OS: Macos 15x
  • Version 2.17.1

Plugins:

Do you have any additional context?
Im new to the plugin source code and need confirmation before working on a PR.
commit 9c4dfb0
changed the query schema from schema.any() to query: createValidateQuerySchema(dataSourceEnabled)
now the /.../startTime&endTime do not seem to be allowed.

All of the following fixes the issue and its possible to create a AD trigger

  1. removing the validator
  2. schema.any()
  3. a schema loosely based on the observed query works
{
    startTime: schema.number(),
    endTime: schema.number(),
    preview: schema.boolean(),
 }

This does not seem to be #149
as I have tried with detectors having enough results.

@heilmela heilmela added bug Something isn't working untriaged labels Oct 15, 2024
@dblock dblock removed the untriaged label Nov 4, 2024
@dblock
Copy link
Member

dblock commented Nov 4, 2024

[Catch All Triage - 1, 2]

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