Skip to content
Richard Kavanagh edited this page Mar 10, 2016 · 7 revisions

What is the Zabbix Data Logger

The Zabbix data logger is a tool that is designed to take data directly from Zabbix and write it to disk. It is used to write metric data from hosts to disk for later processing, such as during an experiment. The metrics that are logged to disk can be any reported to the Zabbix server. A list of standard metrics provided by a Zabbix agents can be found in the Zabbix online manual.

Usage of the Zabbix Data Logger

The usage is fairly simple and is shown below:

Zabbix_Data_Logger.jar <Hostname> {silent}{s}{json}{j}

The hostname is the only parameter that must be specified. This can be found listed in Zabbix. It will then write out to the following file:

Dataset_<hostname>.txt

The silent or s option is used to ensure the Zabbix Data Logger doesn't wait for console input as a means of telling it when to stop logging data. i.e. it continues until the process is killed. Normally typing "quit" will kill the application off after waiting for the final set of data to be written out to disk.

The json or j option is used to use the JSON based interface for Zabbix and requires the ascetic-zabbix-api.properties configuration file. A complete example of this file is provided with the source code.

Zabbix Data Logger Config File

A standard configuration file for the data logger looks like:

data.logger.zabbix.db.url = jdbc:mysql://localhost/zabbix
data.logger.zabbix.db.driver = org.mariadb.jdbc.Driver
data.logger.zabbix.db.password = password
data.logger.zabbix.db.user = zabbix
data.logger.filter.begins = testnode
data.logger.filter.isHost = true
data.logger.zabbix.only.available.hosts = false

The main settings are for connecting to the database, which are used for direct access to the data. This is done as it is far faster than via the JSON interface and causes a lower overhead.

The final parameters "data.logger.zabbix.only.available.hosts" indicates if only Zabbix agents hosts should be detected or not. Hosts using IPMI will not be seen for example if this flag is set to true.

The filter.begins and filter.isHost parameters are used by the data source adaptor that is used in the Logging tool and are only needed if the software using the data source adaptor class distinguishes between types of Zabbix host.