Configuring WMA
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.
Field | Type | Description | Example |
---|---|---|---|
autoupdate |
String (optional) | Defines how frequently WMA checks for updates. Valid time units are ns , us (or µs ), ms , s , m , h . |
"300s" , "24h" , "2h45m" |
access_token |
String | Authentication token for accessing the upload endpoint. | |
upload_endpoint |
String (optional) | The URL endpoint for uploading data collected by WMA. | "https://api.webscale.com" |
topic_endpoint |
String (optional) | WebSocket endpoint for subscribing to updates on SSH host user access. | "wss://topic.cloudmaestro.com:3009/topics/?EIO=3&transport=websocket" |
interval |
Integer | Sets the frequency, in seconds, at which WMA performs metric collection. | 120 |
log_config: |
Object (optional) | Configuration for managing logging streams. | |
.log_streams |
Array of Objects | Array of log stream objects, where each object defines a single logging stream. | |
.name |
String | A name used to identify the log stream. | "StreamName" |
.file_patterns |
Array of Strings | List of file paths for logs to collect. | ["/home/test/custom.log"] |
.application_id |
String | An application identifier to associate logs with that application. | "wxyz1234abcd" |
metrics_config: |
Object (optional) | Configuration for metrics collection. | |
.disabled |
Boolean (optional) | When set to true , disables metric collection. |
true |
ssh_config: |
Object (optional) | Configuration for connecting via SSH. Enables ssh connect when provided. | |
.address |
String (optional) | IP address for SSH connection. If private, the via field is required. If omitted, request address will be used when registering host. |
"1.2.3.4" |
.via |
String (optional) | Optional SSH bastion/proxy host href. Required if address is private. |
"ssh-hosts/xyz" |
.disabled |
Boolean (optional) | When set to true , disables ssh connect. |
true |
debug |
Boolean | Enables additional logging for troubleshooting when set to true . |
true |
Sample configuration file:
{
"autoupdate": "24h",
"access_token": "xyz",
"interval": 20,
"log_config": {
"log_streams": [
{
"name": "StreamName",
"file_patterns": [
"/home/test/custom.log"
],
"application_id": "wxyz1234abcd"
}
]
},
"metrics_config": {
"disabled": false
},
"ssh_config": {
"address": "1.2.3.4",
"via": "ssh-hosts/xyz",
},
"debug": false
}
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"
}
]