[ZBX-18115] Template DB MSSQL by ODBC: Most dependent items fail with: Preprocessing failed Created: 2020 Jul 20 Updated: 2024 Apr 10 Resolved: 2020 Jul 28 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Templates (T) |
Affects Version/s: | 5.0.2 |
Fix Version/s: | 5.0.3rc1, 5.2.0alpha1, 5.2 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | Marco Hofmann | Assignee: | Maxim Chudinov (Inactive) |
Resolution: | Fixed | Votes: | 0 |
Labels: | odbc, template | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian amd64 10 Buster |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() |
Team: | |
Sprint: | Sprint 66 (Jul 2020) |
Story Points: | 1 |
Description |
Steps to reproduce:
Result:
Preprocessing failed for: [{"object_name":"MSSQL$AX:Access Methods","counter_name":"AU cleanup batches/sec","instance_name"... 1. Failed: cannot extract value from json by path "$[?(@.object_name=='SQLServer:Buffer Manager' && @.counter_name=='Page reads/sec')].cntr_value.first()": no data matches the specified path Preprocessing failed for: [{"object_name":"MSSQL$AX:Access Methods","counter_name":"AU cleanup batches/sec","instance_name"... 1. Failed: cannot extract value from json by path "$[?(@.object_name=='SQLServer:Buffer Manager' && @.counter_name=='Page life expectancy')].cntr_value.first()": no data matches the specified path Preprocessing failed for: [{"object_name":"MSSQL$AX:Access Methods","counter_name":"AU cleanup batches/sec","instance_name"... 1. Failed: cannot extract value from json by path "$[?(@.object_name=='SQLServer:Buffer Manager' && @.counter_name=='Lazy writes/sec')].cntr_value.first()": no data matches the specified path Expected: |
Comments |
Comment by Marco Hofmann [ 2020 Jul 20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I did a manual test of the raw master item, and noticed that the returned JSON is far from complete, as it's cut at some length or size. Maybe that's part of the issue. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Marco Hofmann [ 2020 Jul 20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I did more tests. The first test, pictured above, is from a big test and dev MS SQL Server from ours. When I execute the SQL Query from the Master Item, I receive a whopping 3419 rows! I did a second test on a much smaller SQL Server, and there the query returns 1967 rows. Still the JSON return value is capped and incomplete. I think there might not be an issue with the template itself, but with the size of the value a db.odbc.get may return. If I'm on the right track, that would mean the following:
I hope this all makes sense and I'm on the right track. But it might also be, that the initial Preprocessing failed error has a completly different reason. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Alexey Pustovalov [ 2020 Jul 20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hello! May I ask you to attach both queries output to the issue. If you worry about private information, feel free to send it to [email protected]. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Marco Hofmann [ 2020 Jul 21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hi. I did a "Save results as.." CSV and send it to [email protected]. Hope that's what you need. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Alexey Pustovalov [ 2020 Jul 21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Marco, Just one additional question: I see MSSQL$AX and MSSQL$ZENTRAL are differ with SQLServer, did you specify it manually? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Marco Hofmann [ 2020 Jul 21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I don't understand the question? These are the results of two total different SQL Server Hosts. Two VMs and two Hosts in Zabbix. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Alexey Pustovalov [ 2020 Jul 21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I see object name contains object name + prefix (MSSQL$AX or MSSQL$ZENTRAL). Where from is it? Host name? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Marco Hofmann [ 2020 Jul 21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I'm sorry. Now I get your question. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Alexey Pustovalov [ 2020 Jul 21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Thank you for the explanation! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Maxim Chudinov (Inactive) [ 2020 Jul 28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Available in:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Marco Hofmann [ 2020 Jul 30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I've tested the new Template from the Git Repo. Seems to work now. I can't find errors, yet. Thank you! But I've a question: Now that I can define the SQL Instance, how can I monitor the four instances I have on a single VM, as I can only define one macro? Do I have to create four Hosts in Zabbix, each targeting a different SQL Instance via a Macro? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Alexey Pustovalov [ 2020 Jul 30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Marco, It is better to use different host, so in this case host is just application | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Maxim Chudinov (Inactive) [ 2020 Jul 31 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hi starko. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment by Jesús Chávez Bastías [ 2023 Jun 07 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Same problem with metrics in ODBC MSSQL Template, SQL Query shows correctly the results but pre-procesing is wrong. No data is showed for any instances.
|