Hello,
In my company we are using Zabbix server and agent version 2.4 and I have a problem with implementing LLD with PHP script which outputs json as it should in documentation here https://www.zabbix.com/documentation...evel_discovery
In user paramter I have put this line:
When I use zabbix-get to see the output then it looks fine:
But when I use zabbix_agentd with "-t" switch it just freezes and prints nothing:
Forcing me to use CTRL-C to exit.
this only occurs when I use php scripting only, when using perl or bash it works fine, but rewriting scripts from php to one of then is out of question. Is it a common problem with the PHP scripting in LLD?
In my company we are using Zabbix server and agent version 2.4 and I have a problem with implementing LLD with PHP script which outputs json as it should in documentation here https://www.zabbix.com/documentation...evel_discovery
In user paramter I have put this line:
Code:
UserParameter=php.test.discovery,php -e /opt/somescript.php
Code:
# zabbix_get -s 127.0.0.1 -k "php.test.discovery"
{"data":[{"{#RGID}":"0_0_0","{#STATE}":"Unbound"},{"{#RGID}":"0_0_1","{#STATE}":"Unbound"},{"{#RGID}":"0_0_2","{#STATE}":"Unbound"},{"{#RGID}":"0_0_3","{#STATE}":"Unbound"},{"{#RGID}":"0_0_4","{#STATE}":"Empty"},{"{#RGID}":"0_0_5","{#STATE}":"Empty"},{"{#RGID}":"0_0_6","{#STATE}":"Empty"},{"{#RGID}":"0_0_7","{#STATE}":"Empty"},{"{#RGID}":"0_0_8","{#STATE}":"Empty"},{"{#RGID}":"0_0_9","{#STATE}":"Empty"},{"{#RGID}":"0_0_10","{#STATE}":"Empty"},{"{#RGID}":"0_0_11","{#STATE}":"Empty"},{"{#RGID}":"0_0_12","{#STATE}":"Empty"},{"{#RGID}":"0_0_13","{#STATE}":"Empty"},{"{#RGID}":"0_0_14","{#STATE}":"Empty"},{"{#RGID}":"0_0_15","{#STATE}":"Empty"},{"{#RGID}":"0_0_16","{#STATE}":"Empty"},{"{#RGID}":"0_0_17","{#STATE}":"Empty"},{"{#RGID}":"0_0_18","{#STATE}":"Empty"},{"{#RGID}":"0_0_19","{#STATE}":"Empty"},{"{#RGID}":"0_0_20","{#STATE}":"Empty"},{"{#RGID}":"0_0_21","{#STATE}":"Empty"},{"{#RGID}":"0_0_22","{#STATE}":"Empty"}]}
Code:
# zabbix_agentd -t "php.test.discovery" php.test.discovery
this only occurs when I use php scripting only, when using perl or bash it works fine, but rewriting scripts from php to one of then is out of question. Is it a common problem with the PHP scripting in LLD?
Comment