We're running Zabbix 2.4.6 on Red Hat 4.4.7-4.
No Zabbix proxy or agent involved in this question.
I have a Low Level Discovery Rule that uses an SQL query throudh ODBC to construct a JSON LLD response. It works as expected, as long as the JSON is <2048 bytes. Indeed, a test item that does the same SQL query truncates the JSON at 2047 characters (if Latest Data/History is to be believed).
Any clue where the truncation is occurring? None of my other Postgres clients truncate the JSON value.
(Ths Postgres server is on another host.)
I read in docs: "Return values of a low-level discovery rule are limited to 2048 bytes on a Zabbix proxy run with IBM DB2 database. This limit does not apply to Zabbix server as return values are processed without being stored in a database." But this isn't a proxy and we're not on DB2.
The JSON validates on jsonlint. And anyway it works for LLD as long as I limit it to <2048 characters.
The SQL looks like this:
SELECT '{"data":' || array_to_json(array_agg(row_to_json(cte))) || '}' FROM (
SELECT name "{#CHNAME}", uuid "{#CHUUID}" FROM ...
) cte
Does the ODBC layer truncate the returned value?
The error is, of course, "Value should be a JSON object."
No Zabbix proxy or agent involved in this question.
I have a Low Level Discovery Rule that uses an SQL query throudh ODBC to construct a JSON LLD response. It works as expected, as long as the JSON is <2048 bytes. Indeed, a test item that does the same SQL query truncates the JSON at 2047 characters (if Latest Data/History is to be believed).
Any clue where the truncation is occurring? None of my other Postgres clients truncate the JSON value.
(Ths Postgres server is on another host.)
I read in docs: "Return values of a low-level discovery rule are limited to 2048 bytes on a Zabbix proxy run with IBM DB2 database. This limit does not apply to Zabbix server as return values are processed without being stored in a database." But this isn't a proxy and we're not on DB2.
The JSON validates on jsonlint. And anyway it works for LLD as long as I limit it to <2048 characters.
The SQL looks like this:
SELECT '{"data":' || array_to_json(array_agg(row_to_json(cte))) || '}' FROM (
SELECT name "{#CHNAME}", uuid "{#CHUUID}" FROM ...
) cte
Does the ODBC layer truncate the returned value?
The error is, of course, "Value should be a JSON object."