Configuring External Logging

This section deals with setting up the [log] section of the configuration.

Obscuring UUIDs in Logs

The log.obscureUUIDs parameter allows control of whether the entire UUIDs are displayed in logs.

With log.obscureUUIDs = false (the default), the entire UUID displays as follows:

<183>2016-02-11T17:06:10.359Z SCSP DEBUG: REQUEST: GET 172.16.0.33 <None>/358a76f06ffe7e4128d5e6c467a2a96d? alias=true (request:3087553833379006269 connection:25579392) 172.16.0.32 14/11 20:08:37.065

With log.obscureUUIDs = true, 20 of the 32 characters of the UUID display, as follows:

<183>2016-02-11T17:06:10.359Z SCSP DEBUG: REQUEST: GET 172.16.0.33 <None>/358a76f06f...c467a2a96d? alias=true (request:3087553833379006269 connection:25579392) 172.16.0.32 14/11 20:08:37.065

Keeping the default values makes issues easier to troubleshoot. Set log.obscureUUIDs = true if there are concerns about the security implications of displaying entire UUIDs in the logs.

Configuring the Logging Host

The log.host option enables Swarm log messages to be sent to a central syslog, rsyslog, or syslog-ng server. The examples here show the specific Swarm items that need to be added to the UNIX configuration files for syslog or syslog-ng. The actual configuration files likely contain additional information for logging messages from other hosts and other logging facilities.

See the syslogd reference and the syslog-ng reference.

To configure the Syslog server:

  1. Set the syslog or syslog-ng daemon options to enable logging from a remote host.
    Edit /etc/sysconfig/syslog to the SYSLOGD_OPTIONS to the following:  

    SYSLOGD_OPTIONS="-r -m 0"  syslog-ng
  2. Configure other logging options.
    This example shows a sample configuration with the standard syslog program. When editing the syslog.conf file, facility.level must be followed by a tab character to separate it from the destination specification. (See the syslog.conf manual page.)  

    This example shows a sample syslog-ng configuration. (See the syslog-ng.conf manual page.)

  3. Add the following in the section:

    If a filters section does not exist, add one after the source statement and before the destinations section.

  4. Add the following in the destinations section:

  5. Add the following log statement:

    The statement (source(s_net){ udp();}; is the default remote service source for syslog-ng. If using a different remote source name, replace (source(s_net){ udp();}; with the name used.

  6. Enter the following commands to restart the service with the changes:

  7. Set Swarm logging options in the node or cluster configuration file.

    • log.host. The fully qualified host name or IP address of the syslog or syslog-ng server.

    • log.port. The server port.

    • log.level. Set the log level below:

Level

Meaning

Level

Meaning

0

No logging

50

Critical messages and announcements only

40

Errors, critical messages, and announcements

30

Warnings, errors, critical messages, and announcements

20

Info, warnings, errors, critical messages, and announcements

10

Debug, info, warnings, errors, critical messages, and announcements (the most verbose log level)

Fully qualified parameters:

Section/unqualified parameters:

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.