Zabbix Documentation 3.4

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


manual:discovery:low_level_discovery:sql_queries

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:discovery:low_level_discovery:sql_queries [2017/06/22 07:15]
martins-v some structuring of the page
manual:discovery:low_level_discovery:sql_queries [2019/01/28 14:50] (current)
sasha <code js> => <code java>
Line 12: Line 12:
  
 key should be used instead of "​db.odbc.select[<​description>,<​dsn>​]"​. key should be used instead of "​db.odbc.select[<​description>,<​dsn>​]"​.
 +
 +Discovery using SQL queries is supported since Zabbix server/​proxy 3.0.
  
 As a practical example to illustrate how the SQL query is transformed into JSON, let us consider low-level discovery of Zabbix proxies by performing an ODBC query on Zabbix database. This is useful for automatic creation of "​zabbix[proxy,<​name>,​lastaccess]"​ [[:​manual/​config/​items/​itemtypes/​internal|internal items]] to monitor which proxies are alive. As a practical example to illustrate how the SQL query is transformed into JSON, let us consider low-level discovery of Zabbix proxies by performing an ODBC query on Zabbix database. This is useful for automatic creation of "​zabbix[proxy,<​name>,​lastaccess]"​ [[:​manual/​config/​items/​itemtypes/​internal|internal items]] to monitor which proxies are alive.
Line 35: Line 37:
 By the internal workings of "​db.odbc.discovery[]"​ item, the result of this query gets automatically transformed into the following JSON: By the internal workings of "​db.odbc.discovery[]"​ item, the result of this query gets automatically transformed into the following JSON:
  
-<​code ​js>+<​code ​java>
 { {
     "​data":​ [     "​data":​ [