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

VMAlert add ability to disable query validation. #521

Closed
korjavin opened this issue May 30, 2020 · 2 comments
Closed

VMAlert add ability to disable query validation. #521

korjavin opened this issue May 30, 2020 · 2 comments
Labels
enhancement New feature or request vmalert

Comments

@korjavin
Copy link

I use loki-promql as datasource for alerts.
For loki query like
sum(count_over_time({app="myapp"}[5m]|="NEVER"))
is valid.

Grafana works with it fine.

When I add it to vmalert like:

      groups:
        - name: myapp
          rules:    
            - alert: import never logs count
              for: 1m
              expr: sum(count_over_time({app="myapp"}[5m]|="NEVER"))>1
              labels:
                app : myapp
                reason : never

I am getting:

invalid expression for rule "never logs count": cannot recognize "|=\"NEVER\"))>1"; unparsed data: "]|=\"NEVER\"))>1"

I'd like to have query validation as optional thing, it will allow me to use loki's promql.

@hagen1778
Copy link
Collaborator

Hi @korjavin ! Flag for disabling expressions validation was added in ffa75c4

You can verify it by building vmalert from sources. The change will be also included in next release.

@valyala
Copy link
Collaborator

valyala commented Jun 19, 2020

vmalert supports disabling rule expression validation starting from v1.37.1. Closing the feature request as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vmalert
Projects
None yet
Development

No branches or pull requests

3 participants