Documentation forSolarWinds Observability SaaS

Troubleshoot the SWO K8s Collector

If you encounter trouble with Kubernetes data collection during or after installing the SWO K8s Collector, try the following steps:

Use error logs to identify the cause of problems

To help identify the cause of the SWO K8s Collector problems, use the kubectl logs command to retrieve the logs from the containers running in your pods and search for logs with the severity of WARN or ERROR.

Update log verbosity

By default, the SWO K8s Collector is configured with minimal logging (error level only) to reduce log noise. The telemetry log level is set to error for all collector components, which suppresses informational and warning messages.

If you need more detailed logging information for troubleshooting purposes, you can increase the log verbosity by changing the telemetry log level in the values.yaml file.

Example configuration to adjust logging levels for multiple components

This list is not exhaustive and there may be additional places where log levels can be changed.

otel:
  events:
    telemetry:
      logs:
        enabled: true
        level: "warn"  # Shows warning and error messages
  logs:
    telemetry:
      logs:
        enabled: true
        level: “info”  # Shows info, warning and error messages
  metrics:
    telemetry:
      logs:
        enabled: true
        level: "warn"   # Shows warning and error messages
    autodiscovery:
      discovery_collector:
        telemetry:
          logs:
            enabled: true
            level: "error"  # Errors only (default)
  gateway:
    telemetry:
      logs:
        enabled: true
        level: "info"   # Shows info, warning and error messages

The SWO K8s Collector supports the following log levels (in order of verbosity):

  • trace: Fine-grained debugging events. Typically disabled in default configurations.

  • debug: Debugging events for development and troubleshooting.

  • info: Informational events indicating normal operations.

  • warn: Warning events. Not errors but likely more important than informational events.

  • error: Error events. Something went wrong. Default level.

  • fatal: Fatal errors such as application or system crash.

Performance Considerations

  • trace and debug levels can generate significant log volume in busy clusters.

  • Increased logging levels may impact collector performance and storage requirements.

  • Always return to default level after troubleshooting is complete.

Gather the logs

Run the following command to retrieve the logs for all containers running the SWO K8s Collector, replacing YourNamespace with the Kubernetes namespace where the SWO K8s Collector is deployed.

kubectl logs --selector=app.kubernetes.io/part-of=swo-k8s-collector --all-containers -n=YourNamespace --prefix

Review the error logs to determine the cause of the issue and help identify the appropriate steps to take to resolve the issue. If the logs do not provide immediate insight into the problem or resolution, continue with the remaining troubleshooting steps.