Kubesense

Troubleshooting

Installation

SymptomCauseFix
No Synthetics menu in KubeSenseThe web app or the KubeSense API does not have Synthetic Monitoring enabled, or your role has no Synthetics accessKubernetes: check synthetics.enabled: true and that the upgrade finished. VM: set ENABLE_SYNTHETICS on the web app and SYNTHETICS_ENABLED on the API, then recreate both. Check the role's Synthetics permissions
Synthetics pages show an error or service unavailableThe KubeSense API cannot reach synthetics-api, or the tokens differCheck SYNTHETICS_BASE_URL. SYNTHETICS_TOKEN on the API must equal SYNTHETICS_API_TOKEN on synthetics-api
No new runs; the synthetics-api log shows kube_synthetics tables missingThe KubeSense database migrations have not run on this ClickHouseKubernetes: check the db-migrations job of the release and rerun the upgrade if it failed. VM: run the KubeSense migrations again
synthetics-api restarts; its log shows store init failedWrong database credentials, or the MySQL user cannot create the synthetics databaseCheck the MySQL and ClickHouse passwords; give the user CREATE, or create the database first
The log shows Error 1129 ... is blocked because of many connection errorsMySQL blocked synthetics-api's address after repeated failed connectionsFix the credentials, then run mysqladmin flush-hosts on the MySQL server
synthetics-api exits at startup; its log says -api-token and -agent-token are requiredSYNTHETICS_API_TOKEN or SYNTHETICS_AGENT_TOKEN is empty (the log names which)VM: set both in synthetics.env and recreate synthetics-api. Kubernetes: with synthetics.existingSecret, add both keys to that Secret
synthetics-api exits at startup naming a config keyAn unknown key or a wrong value in configFile / synthetics-api.yamlFix the key named in the log. Durations take s, m or h

Agents and Locations

SymptomCauseFix
An agent never appears under its locationWrong or revoked token, the location does not exist, or the agent cannot reach the APICheck the agent's log; generate a new token for the location; check the agent endpoint (ingress or proxy) from the agent's machine
The install commands say they work only inside the clusterThe agent ingress is offEnable synthetics.agentIngress (Kubernetes) or a reverse proxy (VM) — see Private Locations
A restarted agent takes about a minute to come backIts registration is not kept, so it waits for the old one to expireKeep the token file on a volume (-token-file on a mounted directory; synthetics.agent.persistence.enabled in the KubeSense chart)
A location shows Offline or DegradedAgents stopped or cannot reach synthetics-apiCheck the agents' pods or containers and their logs
An agent is marked outdatedIt is older than the installation's minimum agent versionUpgrade the agent (helm upgrade, or a new image tag)
Ping checks fail with a permission errorThe agent lacks NET_RAWenableICMP=true (Helm) or --cap-add NET_RAW (Docker)
Internal targets fail with SSRF_BLOCKEDThe agent's egress rules refuse the addressCheck allowedDomains, blockedDomains and the IP range settings of the agent
Kubernetes checks never runNo agent with k8sChecks=true in the monitor's locationsInstall one with the synthetics-agent chart

Browser Tests

SymptomCauseFix
Browser tests never runNo browser agent in the monitor's locationsEnable browserAgent (Kubernetes) or add the browser agent (VM), or pick a location that has one
The browser agent restarts or runs out of memoryToo many concurrent browser runs for its memoryLower the concurrency, or give it more memory and shared memory (shm_size on a VM)
Steps fail with element not found although the page looks rightThe selector changed, or the page loads slowlyOpen the run's Journey: compare the screenshot and the page's HTML; add alternative selectors or raise the step timeout

Monitors and Alerts

SymptomCauseFix
A monitor stays at No dataNo online agent in its locations runs it (for a browser test, no browser agent)Check the locations' agents under Locations & agents
Monitors fail but nobody is notifiedNo notification channel on the monitor and no default channels, or a maintenance window mutes itPick channels in the monitor's alert settings or set defaults under Settings → Synthetics → Defaults & usage; check the monitor's Properties → Maintenance windows in effect
Too many alerts for short blipsThresholds too low for the targetRaise Failure threshold, set Alert only after failing for, use Fast retries or Flap detection, or raise the Location threshold
Saving a monitor fails with a tag errorThe tag policy is enforcedAdd the required labels shown in the banner of the first step
Saving fails with a quota errorA limit in Defaults & usage or the installation is reachedRaise the interval or remove locations, or ask an administrator to change the limit
Secure variables or monitor credentials fail after a reinstallSYNTHETICS_SECRET_KEYS changed, so stored secrets cannot be decryptedRestore the previous key from your backup
Run now or Test answers too many requestsToo many on-demand runs at onceWait a moment; the limit is Max concurrent on-demand runs