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 = 127.0.0.1,<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 127.0.0.1 -p 10056 -k 'zorka.ls["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:
zabbix.active = 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 agentprotocol on some address:port); zabbix protocol is the only one supported at the moment;
zabbix.listen.addr = 127.0.0.1- listen address for zabbix integration;
zabbix.listen.port = 10055- port zabbix agent will listen on;
zabbix.server.addr = 127.0.0.1- zabbix server address; agent will accept connections only from this server; multipleaddresses separated by comma can be added here;