wtree Cloud

Logs and metrics

Ship container logs and host and container metrics from your servers to Loki, Prometheus, Datadog and other providers with Vector.

Log and metrics export sends a copy of your container logs and of host and container metrics to an external provider for retention, search, dashboards and alerting. It doesn't replace the live log viewer or Monitoring.

Log and metrics export

On each server you enable, wtree Cloud runs a Vector agent as the Swarm service w3panel-vector. Servers that ship metrics also run a cAdvisor service, w3panel-cadvisor.

Providers

Each provider sends logs, metrics or both. You choose what it sends when you create it.

ProviderSendsRequired fieldsOptional fields
Grafana LokiLogsEndpointUser / Instance ID, Password / API Token, Tenant ID
Prometheus remote write (Prometheus, Grafana Cloud, Mimir, VictoriaMetrics, Thanos, Cortex)MetricsRemote write URLUsername / Instance ID, Password / Token, Tenant ID
New RelicMetricsLicense key, Account IDRegion (us or eu)
InfluxDB 2.x / 3.xMetricsURL, Organization, Bucket, API token
DatadogLogs, MetricsAPI KeySite (default datadoghq.com)
AWS CloudWatchLogs, MetricsAccess Key ID, Secret Access Key, Region, Log Group Name (logs), Metrics namespace (metrics)Log Stream Name Template
Splunk HTTP Event CollectorLogs, MetricsEndpoint, HEC Token, Metrics index (metrics)Index, Source Type
Elasticsearch / OpenSearchLogs, MetricsEndpointUsername, Password / API Key, Index, Metrics index
Better StackLogs, MetricsSource Token, Ingesting Host

Provider notes:

  • Grafana Cloud: create a Loki provider for logs (Loki endpoint, numeric Loki Instance ID as user, API token as password) and a Prometheus provider for metrics (the /api/prom/push URL from the Prometheus card, the Prometheus Instance ID as username, an Access Policy token with metrics:write as token).
  • Prometheus: start it with --web.enable-remote-write-receiver and use http://host:9090/api/v1/write. Mimir uses http://host:9009/api/v1/push, VictoriaMetrics http://host:8428/api/v1/write. Set Tenant ID only for multi-tenant Mimir or Cortex.
  • AWS CloudWatch: the IAM user needs CloudWatch Logs permissions on the log group and cloudwatch:PutMetricData. The namespace can't start with AWS/. Only 14 metrics are sent (listed under What is sent).
  • Splunk: the metrics index must be of type Metrics and writable by the HEC token. If it isn't, create a second provider for metrics with another token.
  • Elasticsearch / OpenSearch: data goes to daily indexes, vector-%Y.%m.%d for logs and w3panel-metrics-%Y.%m.%d for metrics by default. Keep them separate.
  • Better Stack: not every source accepts metrics. If yours doesn't, create a second provider for metrics with a source that does.

Add a provider

Go to Integrations › Log and metrics export and click Add provider.

Pick the provider type and choose what it Sends. The form shows only the fields that apply.

Enter the credentials and click Test connection. wtree Cloud sends a test request per selected signal. New Relic, InfluxDB, Better Stack, Splunk and CloudWatch metrics store a real test data point in your account.

Save the provider.

When you edit a provider, leave a secret field blank to keep the stored value.

Editing credentials, settings or Sends, disabling, or deleting a provider re-applies the agent on every server that ships to it. A disabled provider is left out of the configuration. Deleting the last provider of a server removes its agent. If a server can't be reached, the panel shows a warning and you can Redeploy it later.

Deploy the agent

The Servers section lists each server with every provider as a checkbox labeled by what it sends, for example Datadog (logs and metrics).

Check the providers the server should ship to. A provider receives everything it sends.

Click Deploy. wtree Cloud saves the selection, writes the Vector configuration, validates it and starts or updates w3panel-vector. If any checked provider sends metrics, it also starts w3panel-cadvisor. Otherwise cAdvisor is removed and logs keep shipping.

Wait for the badge to show Running. With metrics enabled, it shows Running only when cAdvisor runs too.

Remove stops the agent and cAdvisor on that server and clears the selection.

A server can ship logs and metrics to different providers or both to one. Disabled providers show a Disabled badge and ship nothing, and you can't deploy with only disabled providers checked. The agent runs on manager nodes only, and remote servers need an SSH key configured to be selectable.

Redeploy re-applies the current selection. Vector watches its configuration file, so a configuration-only change is picked up without a restart or lost logs. The agent restarts only when its image or container settings change. If a deploy fails, for example because Vector rejects the configuration, the previous configuration stays active, the selection stays saved, and the server card shows the error with secrets redacted. Fix the provider and click Redeploy.

What is sent

Logs: every container log line with the wtree Cloud metadata below.

Metrics, every 30 seconds:

  • Host metrics from Vector's host_metrics source (CPU, memory, disk, filesystem, network, load) under the host namespace, for example host.cpu_seconds_total, host.memory_used_bytes, host.load1.
  • Container metrics from cAdvisor, such as container_cpu_usage_seconds_total, container_memory_usage_bytes, container_network_receive_bytes_total and container_fs_usage_bytes. They are scraped from 127.0.0.1:4510, and cAdvisor listens on localhost only.

Every metric carries a w3panel_server tag with the server name. CloudWatch receives only these 14 metrics, in your namespace: cpu_seconds_total, memory_used_bytes, memory_total_bytes, filesystem_used_bytes, filesystem_total_bytes, network_receive_bytes_total, network_transmit_bytes_total, load1, load5, load15, container_cpu_usage_seconds_total, container_memory_usage_bytes, container_network_receive_bytes_total, container_network_transmit_bytes_total.

Counters are cumulative. Datadog and CloudWatch convert them to deltas, so the first point of each counter series is a baseline and isn't sent. Counters appear about 30 seconds after gauges, and again after each agent restart. Other providers get the cumulative value.

Metadata

wtree Cloud labels the containers it deploys (applications, Compose services and stacks, databases). Vector adds these fields to every log line and the same names as tags on every container metric, plus their IDs: w3panel_organization, w3panel_project, w3panel_environment, w3panel_application, w3panel_service. Services deployed before log and metrics export existed lack the labels. Redeploy them.

Multiple organizations

  • Remote servers belong to one organization. The agent ships all container logs and metrics from the server, and unlabeled containers ship without w3panel_* fields.
  • The wtree Cloud server can be shared. The first organization to deploy the agent owns it, and others can't deploy or remove it until the owner removes it. It ships only logs and container metrics from the owner's containers (host metrics aren't filtered). Unlabeled containers aren't shipped.

Limits

  • On cloud-hosted panels, the agent runs on your remote servers only, not on the control plane, and connection tests can't target private or loopback addresses.
  • Redirects aren't followed during connection tests. Use the provider's final URL.

Troubleshooting

SymptomFix
Test connection failsCheck endpoint and credentials. A Prometheus remote write endpoint answers 400 when URL and credentials are right (it rejects only the empty test body). 401 means wrong credentials, 404 a wrong path.
CloudWatch metrics test fails with a permission errorGrant cloudwatch:PutMetricData to the IAM user.
Splunk says the token can't write to the indexAdd the metrics index to the HEC token's allowed indexes, or use a second provider with another token.
No logs or metrics arriveConfirm the server is Running with the provider checked, then redeploy. Read docker service logs w3panel-vector on that server, or docker service logs w3panel-cadvisor for container metrics.
Container metrics lack project or app tagsRedeploy those services to add the labels.
Port 4510 is in usecAdvisor can't start and Vector logs scrape errors, while logs keep shipping. Free the port and redeploy.

Next steps

On this page