Configuring standard traps (logs)

Some monitoring scripts (eg. HTTP, EJB, SQL, JMS etc.) can provide additional logs of various kinds, eg. slow query logs, error logs, audit logs and other. What exactly is logged in various cases depends on type of monitored components. Those logs can be stored locally or transmitted to other systems (eg. syslog servers or zabbix servers). In order to harmonize and simplify logging configuration (and implementing new scripts), common configuration options for loggers and trappers are used across other scripts.

Configuration options

The following options are available:

  • traps = yes - enables or disables sending traps (logs);

  • traps.slow = no - enables slow query logs;

  • traps.slow.time = no - default minimum execution time for request (query) to be logged;

  • traps.error = no - enables error logs;

Logging to local files

  • traps.file = yes - enables logging to local files;

  • traps.file.max = 8M - maximum size of local log file;

  • traps.file.num = 8 - maximum number of archived log files;

Logging to zabbix

  • traps.zabbix = no - enables sending log information directly to zabbix;

  • traps.zabbix.addr = ${zabbix.server.addr} - address of zabbix server;

  • traps.zabbix.port = ${zabbix.server.port} - port number of zabbix server (10051 by default);

  • = ${zorka.hostname} - name with which agent will advertise itself when sending logs to zabbix;

Logging to remote syslog server

  • traps.syslog = no - enables sending log information to remote syslog server;

  • traps.syslog.addr = ${syslog.server.addr} - address of remote syslog server;

  • = ${zorka.hostname} - name with which agent will advertise itself when sending logs to syslog;

  • traps.syslog.facility = 13 - syslog facility (syslog.F_AUDIT is default); must be passed as integer;