Log Collection

How to use WMA log collection

The Webscale Monitoring Agent can be configured to aggregate logs in the Webscale Control Panel for easy filtering, searching, and viewing. This is done by enabling log collection in the WMA configuration file.

Logs are aggregated as “Custom Logs” and can be viewed in the Webscale Control Panel. For more information, see Configuring and Viewing Custom Logs.

Log streams

A log stream is simply a collection of logs, aggregated for easy filtering and searching

Name

A descriptive stream name will help users more easily filter and locate desired logs.

File patterns

The log stream should specify one ore more files to watch for new logs to be written to. Any file(s) that match the file pattern(s) specified will be aggregated. A wildcard (*) can be used to match multiple logs in a directory.

Application ID

Logs aggregated by WMA must be associated with a Webscale Application. To find this ID, send a GET to /v2/applications and use the 12 character alphanumeric ID in the application href for the desired application.

Sample log config

...
"log_config": {
    "disabled": false, # When true log collection will be disabled.
    "log_streams": [
      {
        "name": "stream_name", # A name for stream.
        "file_patterns": [
          "/home/test/custom.log", # A specific file to capture logs from
          "/etc/nginx/*.log", # Will capture all files in /etc/nginx that end with '.log'
        ],
        "application_id": "wxyz1234abcd" # Application id to post logs.
      }
    ]
  }
...
Last modified October 8, 2024