Hello,
I'm a newby and french guy so..
I have a error in zmfilter: Can't execute filter 'SELECT E.*, unix_timestamp(E.StartTime) as Time, M.Name as MonitorName, M.DefaultRate, M.DefaultScale FROM Events as E INNER JOIN Monitors as M on M.Id = E.MonitorId LEFT JOIN Storage as S on S.Id = E.StorageId WHERE (E.EndTime IS NOT NULL) AND ( E.AlarmFrames > -60 seconds ) AND ( E.Emailed = 0 ) ORDER BY E.Id DESC LIMIT 0,1', ignoring: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'seconds ) AND ( E.Emailed = 0 ) ORDER BY E.Id DESC LIMIT 0,1' at line 9.
When i try this request in phpmyadmin (ZM, filters) same result until i write [E.AlarmFrames > '-60 seconds'] !
Also when i try this filter with List Matches it's work!
What i've done wrong?
Thanks
Error sql zmfilter
Re: Error sql zmfilter
AlarmFrames is an integer count... you seem to have specified -60 seconds. Perhaps you meant StartDate/Time
-
- Posts: 3
- Joined: Tue Mar 10, 2020 5:26 pm
Re: Error sql zmfilter
I think not because the filter i've used works, i receive an email, and LIST MATCHES works but in the log i have an error in mariadb because sql don't understand "-60 secondes" or "-60 secondes" whithout single quotation.
I don't understand why this filter works in LIST MATCHES and don't with sql in zmfilter.
I don't understand why this filter works in LIST MATCHES and don't with sql in zmfilter.
-
- Posts: 3
- Joined: Tue Mar 10, 2020 5:26 pm
Re: Error sql zmfilter
Hi iconnor,
Of course you're right!
I needed a small nap to understand!
Thanks a lot.
Of course you're right!
I needed a small nap to understand!
Thanks a lot.
Re: Error sql zmfilter
You're right. The filter that you used isn't good. I made the same mistake a couple of weeks ago. I also received an email that told me about the error I got in MariaDB because SQL got the -60 second quotation. I tried to use another filter that I found on google. Well, that also didn't work, and I kept getting the same email. After that, I tried to make a sql server copy database to another server. I tried to use the same filters as I used on the original servers, and you know, everything worked just fine!