[ZBX-23196] Failed: cannot extract value from json by path no data matches the specified path. MSSQL with multiple instances. Created: 2023 Aug 02  Updated: 2023 Aug 02  Resolved: 2023 Aug 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Templates (T)
Affects Version/s: 6.4.5
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Łukasz Assignee: Zabbix Support Team
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix Host
Rocky Linux 9.2
Zabbix Server 6.4.5
Zabbix Agent 6.4.5

Monitored Host:
Windows 2016, v1607
Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) (with multiple SQL instances
Zabbix Agent 6.4.4


Attachments: PNG File 1.png     PNG File 2.png     PNG File 3.png     PNG File 4.png    

 Description   

Steps to reproduce:

  1. Configure and test ODBC connection
  2. Fill the Macros at Zabbix configuration
  3. Note that only some values are populated. 

Result:
1. Failed: cannot extract value from json by path "$[?(@.counter_name=='Log Flush Waits/sec')].cntr_value.first()": no data matches the specified path
  1320:20230802:083301.293 error reason for "SQLServerName:mssql.db.log_flush_wait_time["PAM_ExternalData"]" changed: Preprocessing failed for: [{"object_name":"SQLServerName$InstanceName:Databases","cntr_value":"0","counter_name":"State","SQLServerName_...
1. Failed: cannot extract value from json by path "$[?(@.counter_name=='Log Flush Wait Time')].cntr_value.first()": no data matches the specified path
  1320:20230802:083301.293 error reason for "SQLServerName:mssql.db.log_files_used_size["PAM_ExternalData"]" changed: Preprocessing failed for: [{"object_name":"SQLServerName$$InstanceName:Databases","cntr_value":"0","counter_name":"State","SQLServerName_...
1. Failed: cannot extract value from json by path "$[?(@.counter_name=='Log File(s) Used Size (KB)')].cntr_value.first()": no data matches the specified path
  1320:20230802:083301.293 error reason for "SQLServerName:mssql.db.log_files_size["PAM_ExternalData"]" changed: Preprocessing failed for: [{"object_name":"SQLServerName$$InstanceName:Databases","cntr_value":"0","counter_name":"State","SQLServerName_...
1. Failed: cannot extract value from json by path "$[?(@.counter_name=='Log File(s) Size (KB)')].cntr_value.first()": no data matches the specified path
  1320:20230802:083301.293 error reason for "SQLServerName:mssql.db.log_bytes_flushed_sec.rate["PAM_ExternalData"]" changed: Preprocessing failed for: [{"object_name":"SQLServerName$$InstanceName:Databases","cntr_value":"0","counter_name":"State","SQLServerName_...
1. Failed: cannot extract value from json by path "$[?(@.counter_name=='Log Bytes Flushed/sec')].cntr_value.first()": no data matches the specified path
  1320:20230802:083301.293 error reason for "SQLServerName:mssql.db.data_files_size["PAM_ExternalData"]" changed: Preprocessing failed for: [{"object_name":"SQLServerName$$InstanceName:Databases","cntr_value":"0","counter_name":"State","SQLServerName_...
1. Failed: cannot extract value from json by path "$[?(@.counter_name=='Data File(s) Size (KB)')].cntr_value.first()": no data matches the specified path
  1320:20230802:083301.293 error reason for "SQLServerName:mssql.db.active_transactions["PAM_ExternalData"]" changed: Preprocessing failed for: [{"object_name":"SQLServerName$$InstanceName:Databases","cntr_value":"0","counter_name":"State","SQLServerName_...
1. Failed: cannot extract value from json by path "$[?(@.counter_name=='Active Transactions')].cntr_value.first()": no data matches the specified path



 Comments   
Comment by Łukasz [ 2023 Aug 02 ]

The {$MSSQL.Instance} tag needs to be defined as MSSQL$YourInstance, no matter what's the actual MS SQL Server name. So it's not Hostname$InstanceName, just strict MSSQL phrase. 

Generated at Sun Apr 06 06:44:29 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.