Controlling Logging

Failover Manager writes and stores one log file per agent and one startup log per agent in /var/log/<cluster_name>-3.6 (where <cluster_name> specifies the name of the cluster).

You can control the level of detail written to the agent log by modifying the jgroups.loglevel and efm.loglevel parameters in the cluster properties file:

# Logging levels for JGroups and EFM.
# Valid values are: TRACE, DEBUG, INFO, WARN, ERROR
# Default value: INFO
# It is not necessary to increase these values unless debugging a
# specific issue. If nodes are not discovering each other at
# startup, increasing the jgroups level to DEBUG will show
# information about the TCP connection attempts that may help
# diagnose the connection failures.
jgroups.loglevel=INFO
efm.loglevel=INFO

The logging facilities use the Java logging library and logging levels. The log levels (in order from most logging output to least) are:

  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR

For example, if you set the efm.loglevel parameter to WARN, Failover Manager will only log messages at the WARN level and above (WARN and ERROR).

By default, Failover Manager log files are rotated daily, compressed, and stored for a week. You can modify the file rotation schedule by changing settings in the log rotation file (/etc/logrotate.d/efm-3.6). For more information about modifying the log rotation schedule, consult the logrotate man page:

$ man logrotate

Enabling syslog Log File Entries

Failover Manager supports for syslog logging. To implement syslog logging, you must configure syslog to allow UDP or TCP connections.

To allow a connection to syslog, edit the /etc/rsyslog.conf file and uncomment the protocol you wish to use. You must also ensure that the UDPServerRun or TCPServerRun entry associated with the protocol includes the port number to which log entries will be sent.

For example, the following configuration file entries enable UDP connections to port 514:

# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

The following configuration file entries enable TCP connections to port 514:

# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514

After modifying the syslog configuration file, restart the rsyslog service to enable the connections:

systemctl restart rsyslog.service

After modifying the rsyslog.conf file on the Failover Manager host, you must modify the Failover Manager properties to enable logging. Use your choice of editor to modify the properties file (/etc/edb/efm-3.6/efm.properties.in) specifying the type of logging that you wish to implement:

# Which logging is enabled.
file.log.enabled=true
syslog.enabled=false

You must also specify syslog details for your system. Use the syslog.protocol parameter to specify the protocol type (UDP or TCP) and the syslog.port parameter to specify the listener port of the syslog host. The syslog.facility value may be used as an identifier for the process that created the entry; the value must be between LOCAL0 and LOCAL7.

# Syslog information. The syslog service must be listening # on the
 port for the given protocol, which can be UDP or
# TCP. The facilities supported are LOCAL0 through LOCAL7.
# syslog.host=localhost
syslog.port=514
syslog.protocol=UDP
syslog.facility=LOCAL1

For more information about syslog, please see the syslog man page:

syslog man