Contact Us 1-800-596-4880

View and Configure Logging in Runtime Fabric

Runtime Fabric generates log files that provide information about the following:

  • Deployed Mule applications

  • Deployed API proxies

  • Runtime Fabric services

  • Kubernetes services

Log Levels

Runtime Fabric enables you to specify the level of severity of the message written to the log file.

Table 1. Runtime Fabric Log Levels
Value Description Command

All Priorities

List all messages

N/A

ERROR

List only error messages, such when an exception occurs.

priority:ERROR

FATAL

List only fatal messages for when an application fails

priority:FATAL

INFO

List informative messages

priority:INFO

SYSTEM

List messages about application and worker startup

priority:SYSTEM

CONSOLE

List message about console events such as setting the objectstore

priority:CONSOLE

WARN

List warning messages

priority:WARN

DEBUG

List debugging messages

priority:DEBUG

Log levels are specified per Mule application or API proxy during deployment.

Log levels are specified when deploying a Mule application or an API proxy. After deployment you cannot change the log levels.

Viewing Logs

Ops Center shows a stream of logs outputted by applications and services running on Runtime Fabric. Navigate to "Logging" on the left of the page to view the logging interface.

View Logs from an Application

With Ops Center, you can view the logs from a deployed application. This can be useful in cases where log forwarding is not set up.

  1. On Ops Center, click on Kubernetes on the left sidebar.

  2. Click on the Pods tab.

  3. Select the environment ID where the application was deployed on the right dropdown, near the search input.

  4. Find the Pod name which begins with the name of your application.

  5. Click on the Pod name and select "Logs".

The page should redirect to the Logs tab with a filter applied to your application.

To view the latest logs, click the "Refresh" button on the upper right portion of the page.

Filters

There are two levels of filters to help drill down on the logs to make visible:

  • Containers filter on names of containers.

  • Pods filter on the names of pods. This is useful for specifying application names followed by a wildcard (%).

Forward Logs to External Services

Anypoint Runtime Fabric enables you to forward application and cluster logs to an external logging service. The log forwarder built in to Runtime Fabric enables you to send log data to an rsyslog server over TCP or UDP.

Log data from Anypoint Runtime Fabric components and Mule applications can be forwarded to an external logging solution for viewing, retention and alerting in a centralized destination. An rsyslog client service is included in Runtime Fabric, and provides log forwarding transmission via TCP or UDP to an rsyslog server. Logging services such as Splunk or Logstash provide methods to receive log data from rsyslog clients.

Anypoint Runtime Fabric provides dashboards and alerts on critical metrics when performance or availability are compromised. These can be viewed and adjusted using Ops Center. An SMTP server is required to receive alerts.

Procedure

  1. Using a terminal, open a shell/SSH connection to a controller VM.

  2. Create a file named log-forwarder.yaml.

  3. Add the following content to this file after customizing based on the table below:

    kind: logforwarder
    version: v2
    metadata:
       name: log-forwarder
    spec:
       address: 192.168.100.1:514
       protocol: udp

    Using the following values specific to your environment:

    Table 2. Log Forwarding Configuration Parameters
    Key Description

    name

    Specifies the name of the log forwarding rule.

    address

    Specifies the endpoint and port to forward the log data.

    protocol

    Specifies the protocol to send the data to. Supported protocols are TCP or UDP.

  4. Run the following command on the controller VM, referencing the file created earlier.

gravity resource create log-forwarder.yaml

Your logs should now be forwarded to your external logging service.