Skip to content

Troubleshooting

Start with two agent features. The health metrics tell you whether the agent and collector are up, and why the collector is down. The self-logs bring the agent’s own error messages into KloudMate, so you can read them without logging in to the host. Check both first.

  • Missing API key. The agent needs its API key to check in. Confirm the key was provided at install. In the health metrics, a healthy agent emits kmagent.up.
  • Invalid collector configuration. If a pushed configuration is invalid, the collector will not start. Look for kmagent.collector.up=0 with reason=config_invalid, and read the error text in the self-logs. In managed mode, the agent checks generated configuration before applying it and keeps running the last good one. In manual mode, fix the YAML.
  • Stopped at a memory limit. If you set a memory cap, the kernel stops the agent when it reaches the cap, and the service manager starts it again. On Linux, journalctl -u kmagent | grep -i oom shows when that happened. Raise the cap as described in CPU and memory limits.
  • Insufficient privileges. The agent needs elevated privileges for eBPF (on Linux) and for instrumentation. On Linux, it runs with the privileges it needs by default. On Windows, it runs as Local System. A permissions failure shows up in the self-logs.
  • eBPF is unavailable. If RED metrics and the service map are missing, the host may not support eBPF. Check the agent’s log for eBPF baseline not enabled, which gives the reason (kernel older than 4.14, debugfs not mounted, or missing privileges). On a Linux host, run journalctl -u kmagent | grep "eBPF baseline". Host metrics and logs are unaffected. See eBPF observability.
  • The integration is not enabled. In managed mode, confirm the feature or integration is toggled on. In manual mode, confirm the receiver is in the YAML.
  • A collection error. A receiver that cannot reach its target or authenticate logs a scrape error rather than crashing the collector. Check the self-logs for the specific receiver.
  • The service was not discovered. Only discovered services can be instrumented. Confirm the service appears in the Application Performance Monitoring card on the agent’s APM tab. See Discovery.
  • The toggle has not applied. Instrumentation takes effect on restart. Check the service’s status chip: pending restart means the change is written but the service has not restarted. See Application APM overview.
  • Injection failed and rolled back. If the status shows failed and rolled back, the service crash-looped after instrumentation and the agent reverted the change. Read the reason in the self-logs, then retry. eBPF monitoring continues to cover the service throughout.

Applications aren’t traced from the host policy

Section titled “Applications aren’t traced from the host policy”

Run sudo kmagent apm check on the host first. It shows the mode each application got from the host policy, the rule that set it, and how the agent applies it.

  • The policy is invalid. The agent applies nothing from an invalid policy. The agents list shows Host policy not applied, and the log has APM policy not applied with the error, such as an unknown key or a mode other than off, ebpf, or sdk. Fix the file and restart the agent. kmagent apm check exits with code 1 and prints the same error.
  • The change hasn’t been read. The agent reads the policy only when it starts. Restart it after you edit apm.yaml or KM_APM_POLICY.
  • A rule doesn’t match. An application that shows mode off (default) matched no rule. Compare the rule with the match line. A Node.js application under a systemd unit is named after its unit, so an app whose package.json says checkout but runs as checkout-api.service is named checkout-api.
  • A selection saved in the UI overrides it. When the agents list shows Host policy overridden, the selection saved for that host applies. Click Use host policy on the agent’s APM tab to go back to the file.
  • The SDK was rolled back after a slow start. If an application takes longer than the agent’s wait to come back after the SDK restart, the agent undoes the change and holds off retrying. The status detail names the wait. Raise it with KM_INSTRUMENT_HEALTH_TIMEOUT, for example 10m. See Slow-starting applications.
  • A start script removes the SDK’s settings. Some launchers, such as a service wrapper that switches user with a login shell, start the application with a fresh environment. The agent finds that the application started without the SDK and undoes the change, with the reason in the status. A JVM that runs outside systemd, such as one started from /etc/rc.local, gets the SDK by runtime attach instead, which doesn’t depend on its environment.
  • Credentials rejected. Confirm the monitoring user and secret are correct and that the environment reference resolves. On Kubernetes, confirm the Kubernetes Secret exists and the pod was started after it. See Database credentials.
  • A missing grant or prerequisite. Some coverages need a grant or extension (for example, GRANT pg_monitor, or the pg_stat_statements extension for PostgreSQL query performance). The wizard lists the exact setup steps. See Engines and coverages.
  • Endpoints do not join. If database metrics and traces do not line up, confirm the configured endpoint matches what your applications connect to. On Kubernetes, use the Service DNS endpoint. See Telemetry identity.
  • The .NET profiler did not attach. Confirm the application pool runs a supported runtime (.NET Framework 4.6.2 or newer), that an ASP.NET Core pool is set to “No Managed Code,” and that the pool was recycled. Legacy CLR 2.0 pools use ETW monitoring instead. See .NET application APM.
  • No ETW spans. ETW monitoring needs the Local System privileges the agent runs with. See Windows platform notes.
  • A collector pod is crashing. Check the pod’s status in the Kubernetes view, which shows the real per-node collector status, and read the fleet manager and collector self-logs. A crash is often an invalid configuration.
  • APM annotations were not applied. Confirm APM is enabled and the workload is in a monitored namespace. See Application APM on Kubernetes.
  • Do not edit ConfigMaps by hand. The agent owns them in managed mode and will overwrite manual edits. See Kubernetes platform notes.

To help KloudMate diagnose an issue quickly, include:

  • The agent version and deployment mode.
  • The relevant self-logs and the collector status (kmagent.collector.up state and reason).
  • A description of what you changed and the status chip or error you saw.