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

[mysql ]Problem with timefilter macro #13866

Closed
drix1994 opened this issue Oct 29, 2018 · 2 comments
Closed

[mysql ]Problem with timefilter macro #13866

drix1994 opened this issue Oct 29, 2018 · 2 comments

Comments

@drix1994
Copy link

drix1994 commented Oct 29, 2018

Read before posting:

Please include this information:

What Grafana version are you using?

Now 5.2.1 because I must do downgrade from 5.3.2

What datasource are you using?

MySQL

What OS are you running grafana on?

RedHat 7

What did you do?

I used $__timeFilter(dateColumn) in mysql querry.

What happened instead?

In your docs I found info:

$__timeFilter(dateColumn) | Will be replaced by a time range filter using the specified column name. For example, dateColumn BETWEEN ‘2017-04-21T05:01:17Z’ AND ‘2017-04-21T05:06:17Z’

In my opinion, your date format is incorrect. When I updated Grafana, then Grafana killed my database, because I created index on datetime column named "load_date" and when the alert module started, then a lot of querries with timefilter locked table because "2017-04-21T05:01:17Z" was not recognized as datetime and mysql was not able to use index...
Is it possibility to edit mysql macro myself?

My EXAMPLE:

Before update:
image

After update:
image

@marefr
Copy link
Contributor

marefr commented Oct 29, 2018

Duplicate of #13769

@marefr marefr marked this as a duplicate of #13769 Oct 29, 2018
@marefr
Copy link
Contributor

marefr commented Oct 29, 2018

#13769is fixed and will be included in upcoming v5.3.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants