Logging events and messages in the Linux system log

By default, Teracloud® Streams logs events and messages in rolling log files on each resource. You can use this procedure to configure Teracloud® Streams to log events and messages in the Linux system log.

There are differences in the Teracloud® Streams rolling log file and the Linux system log. For more information, see Log file formats and examples for Teracloud Streams and Linux.

Depending on the configuration settings for the resource, log data might be forwarded to a Linux Syslog Server. To view log data on a Syslog Server, select Administration > System Log > syslog.

Procedure

  1. Enable UDP syslog reception in the syslog configuration.
    1. Log in to the system as root or with su permission.
    2. Open the /etc/rsyslog.conf file with an editor.
    3. To enable UDP reception, uncomment the following lines in the # Provides UDP syslog reception section:
      module(load="imudp")
      input(type="imudp" port="514")
    4. Optional: By default, Teracloud® Streams log messages are saved in the /var/log/messages directory. To change the default location, update the /etc/rsyslog.conf file.
    5. Restart the syslog service to enable UDP reception by running the following command:
      systemctl restart rsyslog
    6. Verify that the syslog service is listening on UDP by running the following command:
      netstat --listen -p | grep rsyslog
      Messages similar to the following example are issued:
      [root@test1 ˜]# netstat --listen -p | grep rsyslog
      udp    0      0 0.0.0.0:syslog    0.0.0.0:*   28535/rsyslogd

  2. For Teracloud® Streams to use the Linux system log, update the domainLog.type property for the Teracloud® Streams domain by executing the following command in the streamtool command-line interface:
    streamtool setdomainproperty -d domain1 domainLog.type=syslog