Configuring WMA
The Webscale Monitoring Agent (WMA) is a multipurpose program that can be installed on a VM host to facilitate communication with Webscale. It consists of three independent processes—metric monitoring, log collection, and SSH connectivity—which you can enable or disable in the configuration file.
Configuration reference
Configure the Webscale Monitoring Agent using the file
/etc/webscale/wma-config.json. The Webscale control plane automatically
supplies some configuration values for VMs it creates. The file is in JSON
format with the following fields.
| Field | Type | Description | Default | Example |
|---|---|---|---|---|
access_token |
String | Authentication token for accessing the upload endpoint. | ||
autoupdate |
String | Frequency at which WMA checks for updates. A unit suffix (e.g., ’s’, ’m’, ‘h’) is required. | "300s", "24h" |
|
debug |
Boolean | Enables verbose logging for troubleshooting. | false |
true |
log_config |
Object | Settings for managing logging streams. See table below. | ||
resource_labels |
Array of Strings | Labels used when registering an SSH/resource host. | ["staging"] |
|
ssh_config |
Object | Settings for SSH connectivity. See table below. |
log_config Object
| Field | Type | Description | Default | Example |
|---|---|---|---|---|
disabled |
Boolean | Enables log capture when set to false. |
true |
false |
log_streams |
Array of Objects | Array of objects, where each object defines a single logging stream. See table below. |
log_streams Object
| Field | Type | Description | Default | Example |
|---|---|---|---|---|
application_id |
String | Required. An application identifier to associate logs with that application. | "a1yz47n4q15s" |
|
file_patterns |
Array of Strings | Required. List of file path patterns of logs to collect. The pattern may contain wildcards (*) to match zero or more characters. |
["/home/test/custom.log"] |
|
name |
String | Required. A name used to identify the log stream. | "my-app" |
|
filters |
Array of Strings | If configured, when any of the values are found in a log line, then the log line will be captured. If not configured, then all log lines are captured, subject to filter_regex. |
["CRIT"] |
|
filter_regex |
String | A regular expression. When configured, any matching log lines are captured. If not configured, then all log lines are captured, subject to filters. |
"CRIT\|EMERG\|ALERT" |
ssh_config
| Field | Type | Description | Default | Example |
|---|---|---|---|---|
address |
String | Used when registering an SSH host. Typically, this should not be set manually. | "1.2.3.4" |
|
via |
String | Used when registering an SSH host. Typically, this should not be set manually. | "ssh-hosts/xyz" |
|
disabled |
Boolean | Enables SSH connectivity when set to false. |
true |
false |
Sample configuration file:
{
"autoupdate": "24h",
"ssh_config": {
"disabled": false,
},
"log_config": {
"disabled": false,
"log_streams": [
{
"name": "StreamName",
"file_patterns": [
"/home/test/custom.log"
],
"application_id": "a1yz47n4q15s"
}
]
}
}
Metadata configuration
WMA typically runs on servers managed by the Webscale Control Plane. For servers created in a Webscale Cluster, the metadata file (/var/lib/webscale/metadata.json) contains values that WMA uses unless they are 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"
}
]
Note:
WMA must be restarted for configuration changes to take effect. WMA is restarted with:
sudo systemctl restart webscale-monitoring-agent
The WMA log can be viewed to verify the configuration was accepted using:
journalctl -u webscale-monitoring-agent