See for the official Zabbix site.

Talk:Docs/howto/Microsoft SQL Server monitoring with unixODBC and LLD

Jump to: navigation, search

This is all really cool, but I am testing and it does not really work on 2010 for instance. Although he returns the JSON, he returns inside a row which unixODBC / FreeTDS / Zabbix is unable to read, thereafter it render the discovery useless, is there any other ideas?

I was testing variants like:

SELECT CONVERT(VARCHAR(300), (select '{"data":[', (SELECT STUFF((SELECT ',' + '{"{#DBNAME}":"' + [Name] + '"}' FROM master..sysdatabases ORDER BY [Name] FOR XML PATH()), 1, 1, )) ,']}' FOR XML PATH()))

But then there is a "hard limit" of 300 chars somewhere, if I set "Varchar(301)" the result becomes empty.