Configuring WMA

How to configure the Webscale Monitoring Agent

The Webscale Monitoring Agent is a multipurpose program that can be installed on a host to facilitate communication with Webscale. It is composed of three independent processes, which can be enabled or disabled as needed via the configuration file. These three processes are metric monitoring, log collection, and SSH connectivity.

Configuration

The Webscale Monitoring Agent can be configured using defaults, metadata provided through Webscale server creation, or a local configuration file (/etc/webscale/wma-config.json). Each level of configuration overrides the previous, so configuration provided in a local configuration file will supersede any configuration provided in metadata, and any configuration provided in metadata will supersede any configuration defaults. The defaults are shown in the sample configuration file below:

{
  "upload_endpoint": "https://api.webscale.com",
  "access_token": "xyz",
  "server_id": "self", # API id of associated cluster server
  "interval": 20, # Frequency at which WMA metric collection runs.
  "log_config": {
    "disabled": false, # When true, log collection will be disabled.
    "log_streams": [
      {
        "name": "StreamName", # A name for stream to aggregate logs.
        "file_patterns": [
          "/home/test/custom.log" # Log file from which logs are collected.
        ],
        "application_id": "wxyz1234abcd" # Application ID to associate with logs.
      }
    ]
  },
  "metrics_config": {
    "disabled": false # When true, metrics collection will be disabled.
  },
  "ssh_config": {
    "disabled": false, # When true, the WMA will not register this machine as an ssh host, or manage users within the environment.
    "address": "1.2.3.4",  # Can be a private or public address (if private, via should be specified). Can also be "self" in which case the address registered with the host will be the IP of the registration request.
    "via": "ssh-hosts/xyz", # optional bastion/proxy ssh host href. Must be provided if address is private.
  },
  "topic_endpoint":"wss://wss://topic.cloudmaestro.com:3009/topics" # endpoint of the topic service for receiving updates regarding ssh host user access,
  "debug": false # When true, enables additional logging to help troubleshooting
}

Metadata configuration

WMA is often run on servers managed by the Webscale Control Plane. When the server has been created in a Webscale Cluster, a metadata file (/var/lib/webscale/metadata.json) may contain useful values that will be used by WMA (if not overwritten by the local configuration file). These metadata values include:

[
	{
		"key":"WEBSCALE_API_HOST",
		"value":"api.webscale.com"
	},
	{
		"key":"WEBSCALE_ACCESS_TOKEN",
		"value":"xyz"
	},
	{
		"key":"WEBSCALE_SERVER_ID",
		"value":"abcd"
	},
	{
		"key": "WEBSCALE_WMA_INTERVAL",
		"value": "20"
	},
	{
		"key": "WEBSCALE_WMA_SERVICE_NAME",
		"value": "service name"
	}
]
Last modified October 8, 2024