Set up a private probe
To run Synthetic Monitoring checks from your own network, register a private probe in Grafana and install the Synthetic Monitoring Agent. Choose from APT, YUM, Docker, or Kubernetes installation methods, then assign checks to the probe.
Before you begin
Note
By default, private probes collect and report anonymous, non-personally identifiable information (PII) about the running probe to a remote statistics server operated by Grafana Labs. Synthetic Monitoring maintainers use that data to understand how the open source community operates private probes.
To opt out, use the CLI flag
-disable-usage-reports=true. Refer to Anonymous usage statistics reporting for more information on what’s collected.
- Install and configure Synthetic Monitoring before adding a private probe.
- You need permission to create probes and edit checks in your stack. If Add Private Probe or the check-editing controls aren’t available, ask your Grafana administrator to review your Synthetic Monitoring permissions.
- You need administrative access to the Linux host, Docker environment, or Kubernetes namespace where you install the agent. The host must resolve and reach both Grafana Cloud services and the applications or services you want to monitor.
- Review the network and resource requirements and find your stack’s Probe API server URL.
- If you plan to run browser checks, review the browser setup requirements before selecting an agent image or installing the agent.
Each private probe has its own authentication token. Store the token as a secret: don’t commit it to source control or include it in screenshots, logs, or support requests. Register a separate probe for each independent agent deployment. If you run a private probe as a cluster, every agent in the cluster uses the same token. Refer to Run private probes in a cluster.
Add a new probe in your Grafana instance
- Navigate to Testing & synthetics > Synthetics > Probes.
- Click Add Private Probe.
- Enter a Probe Name.
- Enter a Latitude and Longitude to see an accurate location on the map panel.
- Select or enter a Region, such as
AMER,EMEA, orAPAC. This label groups probes in Grafana; it doesn’t select the Grafana Cloud API endpoint. - Optionally enter up to three custom labels to identify your probe. Probe labels can’t use reserved system label names. Refer to System labels.
- Click Add new probe.
- In Probe setup, copy
API_TOKENto your secret store. This is the probe authentication token. The dialog box shows it only once; if you lose it, you need to reset the token and update the agent configuration. - Copy
API_SERVERand save it for later. You can also use the Probe API server URL reference to find the endpoint for your stack.
Choose a deployment model
You can run a private probe in one of two ways:
- Single agent: One agent runs every check assigned to the probe. This is the default, and it’s the right choice for most private probes.
- Cluster: Several agents share the same probe and split its checks between them. Each check runs on exactly one agent. If an agent stops or fails, the remaining agents take over its checks.
Consider a cluster when one agent can’t keep up with the checks assigned to the probe, or when you want the probe to keep running checks while you restart or lose an individual agent.
Don’t enable clustering if you don’t need it. A cluster adds network traffic, metrics, and operational complexity.
Caution
Clustering is an experimental feature. Configuration flags and behavior might change in future releases.
To set up a cluster, first install or deploy the agent, then follow Run private probes in a cluster. On Kubernetes, the Helm chart can deploy either model.
With either model, if the probe runs many browser checks, you can run them on a separate fleet of browser instances. Refer to Run browser checks on a browser pool.
Install the agent
Choose one installation method. If the agent is already installed, review upgrade precautions, then follow the upgrade instructions under your installation method.
The agent’s release assets include Linux packages and archives for AMD64 and ARM64.
Make sure you have the probe authentication token and Probe API server URL. The API value must include :443 and must not include https://.
Install the agent on Ubuntu/Debian
You can install the agent using the Grafana official APT repository.
Install the required packages and add the repository GPG key.
sudo apt update sudo apt install -y wget ca-certificates sudo mkdir -p /etc/apt/keyrings/ sudo wget -O /etc/apt/keyrings/grafana.asc https://apt.grafana.com/gpg-full.key sudo chmod 644 /etc/apt/keyrings/grafana.ascAdd the repository for stable releases.
echo "deb [signed-by=/etc/apt/keyrings/grafana.asc] https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.listUpdate the package index and install the agent.
sudo apt update sudo apt install synthetic-monitoring-agentConfigure the probe.
Restrict access to the configuration file before adding your probe token:
sudo chmod 600 /etc/synthetic-monitoring/synthetic-monitoring-agent.confOpen
/etc/synthetic-monitoring/synthetic-monitoring-agent.confwith an editor usingsudo. Set these values, retaining the other settings:SM_AGENT_API_TOKEN='YOUR_PROBE_AUTHENTICATION_TOKEN' API_SERVER='YOUR_PROBE_API_SERVER_URL'Replace the placeholders with the probe authentication token and the Probe API server URL for your stack. Save the file.
Enable the service at boot and start it with your configuration.
sudo systemctl enable synthetic-monitoring-agent.service sudo systemctl restart synthetic-monitoring-agent.service sudo systemctl status synthetic-monitoring-agent.service --no-pagerThe service should report
active (running). If it exits or repeatedly restarts, inspect the agent logs.Continue to Verify the agent connection.
Upgrade the agent on Ubuntu/Debian
Review Keep the agent up to date, then update the installed package and restart the service:
sudo apt update
sudo apt install --only-upgrade synthetic-monitoring-agent
sudo systemctl restart synthetic-monitoring-agent.service
sudo systemctl status synthetic-monitoring-agent.service --no-pager
synthetic-monitoring-agent --versionConfirm that the package manager installed the version you intended and the service reports active (running). Review any package-manager messages about configuration files, then verify the upgrade.
Install the agent on distributions using yum
You can install the agent using the official YUM repository.
Create the Grafana repository configuration. If the repository is already configured, retain the existing definition and skip this step.
sudo tee /etc/yum.repos.d/grafana.repo > /dev/null <<'EOF' [grafana] name=grafana baseurl=https://rpm.grafana.com repo_gpgcheck=1 enabled=1 gpgcheck=1 gpgkey=https://rpm.grafana.com/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt EOFInstall the agent.
sudo yum install synthetic-monitoring-agentConfigure the agent.
Restrict access to the configuration file before adding your probe token:
sudo chmod 600 /etc/synthetic-monitoring/synthetic-monitoring-agent.confUsing an editor with
sudo, edit/etc/synthetic-monitoring/synthetic-monitoring-agent.confand set these values, retaining the other settings:SM_AGENT_API_TOKEN='YOUR_PROBE_AUTHENTICATION_TOKEN' API_SERVER='YOUR_PROBE_API_SERVER_URL'Replace the placeholders with the probe authentication token and the Probe API server URL for your stack. Save the file.
Enable the service and start it.
sudo systemctl enable synthetic-monitoring-agent.service sudo systemctl restart synthetic-monitoring-agent.service sudo systemctl status synthetic-monitoring-agent.service --no-pagerThe service should report
active (running). If it exits or repeatedly restarts, inspect the agent logs.Continue to Verify the agent connection.
Upgrade the agent on distributions using yum
Review Keep the agent up to date, then update the installed package and restart the service:
sudo yum update synthetic-monitoring-agent
sudo systemctl restart synthetic-monitoring-agent.service
sudo systemctl status synthetic-monitoring-agent.service --no-pager
synthetic-monitoring-agent --versionConfirm that the package manager installed the version you intended and the service reports active (running). Review any package-manager messages about configuration files, then verify the upgrade.
Deploy the agent using Docker
You need Docker and permission to run containers. The following example uses the standard agent image. For browser checks, use a -browser image and follow the container browser requirements.
Pull the latest image. For browser checks, use
latest-browserinstead oflatestin both the pull and run commands.docker pull grafana/synthetic-monitoring-agent:latestExport required configuration as environment variables.
Update the placeholders with your probe authentication token and the Probe API server URL for your stack region.
export SM_AGENT_API_TOKEN="@@@SM_PROBE_TOKEN@@@" export API_SERVER="@@@SM_PROBE_API_SERVER_URL@@@"Passing the token through the environment avoids putting it in the agent’s command-line arguments. Docker administrators can still inspect container environment variables; use your deployment’s secret-management controls to protect it.
Start a named container. The example binds the published diagnostics port to the Docker host’s loopback address, not to its public interfaces.
docker run -d --name sm-agent --restart unless-stopped \ -e SM_AGENT_API_TOKEN \ -p 127.0.0.1:4050:4050 \ grafana/synthetic-monitoring-agent:latest \ --api-server-address="$API_SERVER" \ --listen-address=0.0.0.0:4050The agent listens on all interfaces inside the container so port publishing can reach it. Other containers with access to that container’s network can also reach the diagnostics endpoint. Use a trusted container network.
Check that the container stays running, then continue to Verify the agent connection.
docker ps --filter name=sm-agent docker logs --tail 50 sm-agent
Upgrade the agent using Docker
Review Keep the agent up to date.
Export
SM_AGENT_API_TOKENandAPI_SERVERwith the same values used by the running container. Use the environment-variable step in Deploy the agent using Docker; don’t register a new probe for the upgrade.Pull the latest image:
export SM_AGENT_IMAGE="grafana/synthetic-monitoring-agent:latest" docker pull "$SM_AGENT_IMAGE"For browser checks, use
latest-browserinstead oflatest.Stop and replace the container. The following commands replace the
sm-agentcontainer created by this page’s setup example. If you added custom arguments, network settings, environment variables, or volumes, preserve those settings in your replacement command or use your deployment tool’s update procedure instead.docker stop sm-agent docker rm sm-agent docker run -d --name sm-agent --restart unless-stopped \ -e SM_AGENT_API_TOKEN \ -p 127.0.0.1:4050:4050 \ "$SM_AGENT_IMAGE" \ --api-server-address="$API_SERVER" \ --listen-address=0.0.0.0:4050 docker logs --tail 50 sm-agent
Pulling a new image or restarting the old container doesn’t change the image of an existing container. Don’t start a second independent agent with the same probe token as part of this replacement.
To run several agents for the same probe, refer to Configure clustering with Docker.
Deployment with Kubernetes
You need kubectl configured for the intended cluster and permission to create a namespace, Secret, and Deployment. Confirm your current context before applying resources:
kubectl config current-contextThe following procedure uses the example manifests from the agent repository. Review them before applying them, especially the image, security context, and resource requests. This is a deployment example, not a complete production configuration.
To deploy the agent with the Helm chart instead, refer to Deploy the agent with Helm.
Download the manifests into a working directory that isn’t tracked in source control.
wget https://raw.githubusercontent.com/grafana/synthetic-monitoring-agent/main/examples/kubernetes/namespace.yaml wget https://raw.githubusercontent.com/grafana/synthetic-monitoring-agent/main/examples/kubernetes/secret.yaml wget https://raw.githubusercontent.com/grafana/synthetic-monitoring-agent/main/examples/kubernetes/deployment.yamlCreate the
synthetic-monitoringnamespace.kubectl apply -f namespace.yamlEdit
secret.yaml. ReplaceYOUR_TOKENinstringData.api-tokenwith your probe authentication token. ReplacePROBE_API_SERVER_URLinstringData.api-serverwith your stack’s Probe API server URL.Apply the Secret and confirm that it exists without displaying its values:
kubectl apply -f secret.yaml kubectl get secret sm-agent-1 -n synthetic-monitoringReview
deployment.yaml. The example uses the latest standard agent image:image: grafana/synthetic-monitoring-agent:latestFor browser checks, use the browser image instead:
image: grafana/synthetic-monitoring-agent:latest-browserFor browser checks, also uncomment the
/home/smvolume mount in the manifest so Chromium has writable temporary storage.Apply the Deployment and wait for its rollout:
kubectl apply -f deployment.yaml kubectl rollout status deployment/sm-agent-1 -n synthetic-monitoring kubectl logs -n synthetic-monitoring deployment/sm-agent-1 --tail=50A completed rollout shows that Kubernetes started the container. The example doesn’t enable a readiness probe, so this alone doesn’t establish an API connection.
Continue to Verify the agent connection. Protect the local Secret manifest according to your organization’s secret-handling policy.
Upgrade the agent on Kubernetes
Review Keep the agent up to date.
In the manifest that manages the Deployment, use
latestorlatest-browserand set the container’simagePullPolicytoAlwaysso new Pods check for an updated image. Retain its Secret references, resource settings, custom arguments, and volumes, including browser-specific settings.Confirm your Kubernetes context before applying changes:
kubectl config current-contextCheck that the context is your intended cluster. Use your own Deployment and namespace names if they differ from the example.
Apply the manifest and restart the Deployment to replace the running Pods, even if the image tag hasn’t changed. For the example on this page:
kubectl apply -f deployment.yaml kubectl rollout restart deployment/sm-agent-1 -n synthetic-monitoring kubectl rollout status deployment/sm-agent-1 -n synthetic-monitoring kubectl logs -n synthetic-monitoring deployment/sm-agent-1 --tail=50Check that the Deployment is configured with the intended image:
kubectl get deployment sm-agent-1 -n synthetic-monitoring -o jsonpath='{.spec.template.spec.containers[0].image}'
Deploy the agent with Helm
The synthetic-monitoring-agent Helm chart deploys the agent and, optionally, a cluster and a browser pool.
Before you install the chart, review the following:
- The chart version is independent of the agent version. To run a different agent release, set
image.tag. - The agent needs the
NET_RAWcapability for ping and traceroute checks. The Pod Securitybaselineprofile doesn’t allow it, so deploy the chart in a namespace that allows theprivilegedprofile. - Version 2.0.0 of the chart replaces the previous
synthetic-monitoring-agent1.x charts and renames most values. To migrate, uninstall the 1.x release and install the new chart.
Create the
synthetic-monitoringnamespace and a secret with the probe authentication token.kubectl create namespace synthetic-monitoring kubectl create secret generic sm-agent -n synthetic-monitoring --from-literal=api-token="@@@SM_PROBE_TOKEN@@@"Create a
values.yamlfile. Update the placeholder with the Probe API server URL for your stack region.probe: apiServerAddress: "@@@SM_PROBE_API_SERVER_URL@@@" existingSecret: sm-agentKeep this file. You pass it again when you upgrade the release or change its configuration.
Install the chart:
helm install sm-agent oci://ghcr.io/grafana/helm-charts/synthetic-monitoring-agent \ -n synthetic-monitoring -f values.yamlThe chart is also available in the
grafanaHelm repository,https://grafana.github.io/helm-charts.Continue to Verify the agent connection.
For every available value, and for the migration from the 1.x charts, refer to the chart README.
Upgrade the agent with Helm
Review Keep the agent up to date.
To run a different agent version, set
image.tagin yourvalues.yamlfile. Otherwise, the chart uses the agent version it was released with.Upgrade the release with the
values.yamlfile you installed with:helm upgrade sm-agent oci://ghcr.io/grafana/helm-charts/synthetic-monitoring-agent \ -n synthetic-monitoring -f values.yamlWhen you pass a values file, Helm resets every value that isn’t in it to the chart default, so always pass your complete file.
A single agent stops before its replacement starts, so the probe is offline while the agent restarts. In a cluster, the chart starts each new agent before it stops an old one.
Don’t use this upgrade to switch a single agent to a cluster. Instead, follow Configure clustering with Helm.
Verify the agent connection
Open Testing & synthetics > Synthetics > Probes in the stack where you registered the probe. Find your private probe and check that it is online and shows an agent version. Registration alone doesn’t establish that the agent has connected.
For a Linux package installation or the Docker example on this page, run the following command on the agent host:
curl --fail --show-error http://127.0.0.1:4050/readyA successful response is HTTP
200with the bodyready. HTTP503means the agent hasn’t established its initial API connection. Refer to Troubleshoot private probes.The endpoint stays ready after the first successful connection for that process. It isn’t a continuous connectivity check and doesn’t confirm that results reach Prometheus or Loki. For Kubernetes, use the Grafana probe view and agent logs unless you’ve configured access to the diagnostics endpoint.
For a new probe, assign checks. If the probe already has assigned checks, verify their executions.
Assign checks to your private probe
New probes aren’t automatically added to existing checks, even if you selected all available probes when creating a check.
- Open Testing & synthetics > Synthetics > Checks and edit a check that should run from your environment, or create a check.
- Open Execution. Under Probe locations, select your probe in Private probes. Keep any other probes you still want to use, then click Save.
- Verify check executions from your probe.
Verify check executions
Use these steps after assigning a check or upgrading the agent. An upgrade that retains the existing probe token doesn’t require reassigning checks.
- Open an assigned check’s View dashboard link. Select a time range after the assignment or upgrade and allow at least one configured check interval and execution timeout for a result to arrive. Results can take additional time to appear in the dashboard.
- In the time point explorer, select Reachability, then select a completed time point and your private probe’s tab. The newest time point can still be pending; select an earlier completed time point within your selected time range if necessary. Confirm that the execution has a result from that probe. For detailed controls, refer to Visualize check execution.
A successful execution confirms that the configured check ran and reported success from this probe. A failed execution confirms reporting, but requires investigation of the check or monitored application. For failures, refer to Troubleshoot a failing check. If no completed execution appears, refer to Troubleshoot private probes.
Keep the agent up to date
Review agent releases regularly for fixes and new functionality. Check the release notes for changes that affect your checks, configuration, and deployment. Don’t assume that a running older agent supports newly introduced features.
Before upgrading:
- Record the version shown for the probe in Testing & synthetics > Synthetics > Probes, or run
synthetic-monitoring-agent --versionon a package installation. - Record the installed package version or container image tag so you can identify the previous deployment. Keep a protected copy of your configuration and deployment manifests; don’t copy tokens into an issue or pull request.
- Plan for a gap while the agent restarts. Package installation or upgrade tools can restart the service during the package transaction, before your explicit restart command. Upgrade one probe first and verify it before upgrading the remaining probes.
- Retain the existing probe token and API endpoint. An upgrade doesn’t require registering a new probe.
Keeping the agent up to date is especially important for the label migration: the un-prefixed label behavior is delivered by the agent. Upgrade all your private probes to the latest agent version before enabling dual-write.
Warning
If some of your probes run an older agent version when you migrate, those probes keep emitting custom labels with the
label_prefix while upgraded probes emit the new format. This leaves the same check with inconsistent labels across probes.This includes probes that are offline or that you no longer use: upgrade them or delete them before you migrate.
If you run agents as a cluster, keep every agent in the cluster on the same version. Upgrade the agents one at a time, and wait until each upgraded agent is back in the cluster before you upgrade the next one. On Kubernetes, a Deployment rolling update replaces the agents one at a time, and the Helm chart starts each new agent before it stops an old one. On Docker or Linux packages, upgrade one host at a time. Checks move between agents as each one restarts.
Verify an upgrade
- Verify the agent connection and check that the version shown in Testing & synthetics > Synthetics > Probes matches the version you installed.
- Verify executions from checks already assigned to the probe after the upgrade. Include each check type the probe runs, especially browser checks if you changed the image or runtime.
If the agent restarts repeatedly or executions stop arriving, use Troubleshoot private probes before upgrading other probes. If you use a systemd ExecStart override, compare it with the updated package unit so it doesn’t mask new startup settings. Assess configuration compatibility before reverting to a previous version.
Probe API server URL
Use the endpoint for the stack where you registered the probe, not the probe’s physical location or its Region label.
- In that stack, open Testing & synthetics > Synthetics > Configuration > General. Under Probe API Server URL, copy the displayed endpoint if it is available.
- If the endpoint isn’t available, find Your backend address is and match its hostname to the Backend address column in the following table. If the displayed address includes
https://, compare the hostname without that prefix. Some region and provider combinations have multiple rows, so match the backend address rather than selecting by region name alone. Copy the API server URL from the same row. - Use the API server value, including
:443and withouthttps://, forAPI_SERVERor--api-server-address. Don’t copy the backend address or secrets proxy address into this setting.


