[ZBX-24754] Errors and weird values using MSSQL ODBC based template Created: 2024 Jun 28  Updated: 2024 Jul 03

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 6.0.31
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Sergio Belkin Assignee: Aigars Kadikis
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2024-07-01-11-11-39-758.png     PNG File image-2024-07-01-11-13-42-725.png     PNG File image-2024-07-01-11-18-36-159.png     PNG File image-2024-07-01-11-40-47-652.png     PNG File image-2024-07-01-11-42-11-655.png     PNG File image-2024-07-01-13-19-46-682.png     PNG File image-2024-07-01-13-20-18-728.png     PNG File screenshot-1.png     PNG File screenshot-2.png     File zbx_export_templates_mssql-odbc.yaml    

 Description   

There are errors with items such as:

  • Buffer cache hit ratio
  • Cache Hit Ratio
  • Worktables From Cache Ratio

Error happens on preprocessing steps using parameter, for example
**
Code:
$[?(@.counter_name=='WorktablesFromCacheRatio')].cntr_value.first()
it fails with this message:

**

 Preprocessing failed for: [{"object_name":"SQLServer:Access Methods","cntr_value":"828","counter_name":"AU cleanup batches/...

1. Failed: cannot extract value from json by path "$[?(@.counter_name=='WorktablesFromCacheRatio')].cntr_value.first()": no data matches the specified path

 
One can modifies preprocessing steps to:
 

$[?(@.counter_name=='Worktables From Cache Ratio')].cntr_value.first()

 

Now it get values but I think they are miscalculated:

 

 



 Comments   
Comment by Aigars Kadikis [ 2024 Jul 01 ]

Thank you for contacting us.
Let us know a more precise version of MS SQL server:

SELECT VERSION();

The template was tested with version 2019.
The item "Worktables from cache ratio" initially gets data from "Get Access Methods counters" comes from "Get Access Methods counters". Could you temporarily enable history:

Attach full JSON as TXT.

Comment by Sergio Belkin [ 2024 Jul 01 ]

aigars.kadikis Thank you for your response.

This the MS SQL Server version:

I've enabled history,

This the Last Data:

I made the modification a few minutes ago. For now, I don't see any changes. If the history needs to be enabled, how long should it take to see the correct values?

Comment by Aigars Kadikis [ 2024 Jul 01 ]

If the host is behind a proxy, it might take up to 1h.

Comment by Sergio Belkin [ 2024 Jul 01 ]

No, the host is not behind a proxy, last values :

 

Sadly for now, the problem persists

 

Comment by Sergio Belkin [ 2024 Jul 01 ]

aigars.kadikis The problem after a few hours persists:

Just in case, I attach the template: zbx_export_templates_mssql-odbc.yaml

Comment by Sergio Belkin [ 2024 Jul 03 ]

Hi aigars.kadikis I wonder if it's available a patch or a workaround for this issue.

Thanks in advance!

Generated at Sat Apr 19 02:33:46 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.