Using zorka with Zabbix

Zabbix was the first and remains primary monitoring system Zorka integrates with. Zorka uses native zabbix protocol and can work in both standard and active mode.

Zabbix can treat it as regular zabbix agent or as zabbix trap generator. Zabbix protocol is enabled by default but administrator has to set zabbix server IP address and port (if there are more than one monitored java application on a server):

zabbix.server.addr =,<server-address>
zabbix.listen.port = 10056

At this point after starting application administrator can use zabbix_get command to query zorka agent manually, for example:

$ zabbix_get -s -p 10056 -k '["java", "java.lang:*"]'

Zabbix active agent

Note that this is fresh functionality and it needs to be tested. Zabbix Active Agent protocol allows for tracking more data with less overhead. In active mode agent periodically queries zabbix server for item list and sends data in batches. As active mode is fairly fresh feature, it is disabled by default. In order to enable active mode, set the following properties: = yes

Then configuring zabbix active agent, ensure that agent hostname (zorka.hostname property) exactly matches host name configured in zabbix.

How zabbix queries are processed

Agent translates zabbix queries to BSH function calls and executes them. Reqults are converted to string and returned. If function returns null or error occurs ZBX_NOTSUPPORTED is returned and zabbix will mark item as not supported. For example:


is equivalent to beanshell call:


If there is some item that might be no available at all times, administrator might have to return some known value (eg. 0) instead of nulls using helper function.

Zabbix related config options

  • zabbix = yes - this setting controls whether Zorka should work as zabbix agent (serving zabbix agent protocol on some address:port); zabbix protocol is the only one supported at the moment;

  • zabbix.listen.addr = - listen address for zabbix integration;

  • zabbix.listen.port = 10055 - port zabbix agent will listen on;

  • zabbix.server.addr = - zabbix server address; agent will accept connections only from this server; multiple addresses separated by comma can be added here;

Active checks related options

  • = no - enables zabbix active agent;

  • = 10 - maximum number of metrics sent every sender cycle;

  • = 150 - maximum number of collected metrics awaiting to be sent to zabbix server;

  • = 120 - defines how often agent will query zabbix server for metrics to check;

  • = 16384 - maximum size of data messages sent to zabbix server;

  • = 60 - defines how often collected metrics will be sent sent to zabbix server;

  • = ${zabbix.server.addr} - zabbix server address for handling active requests; typically this is the same as zabbix.server.addr, so no need for changing this setting in most cases;