Discovery Zones Overview
Understand how discovery zones work, how they are scheduled and run, what the Zones page shows, and what happens to assets when a zone is deleted.
What is a Discovery Zone?
A discovery zone is one connection to an infrastructure source: a Kubernetes cluster, an Azure subscription, a GCP project, an AWS account, a DigitalOcean account, a vCenter, a network range (port scan or SNMP), a Prometheus, Zabbix or Grafana Tempo server, or a group of agents. A zone holds everything needed to reach the source: the connection configuration (credentials), the discovery schedule and the execution mode (local or relay). Its identifier (subscription ID, project ID, cluster name…) must be unique across zones.
- Local mode: the backend workers connect to the source and run the collector
- Relay mode: a relay installed inside the remote network picks up the job and sends the results back (see Relay Overview)
- Agent zones have no connection configuration: their assets are pushed by the agents installed on the hosts (see Agent-based Discovery)
The Zones Page
Open Zones in the Discovery section of the sidebar (/dashboard/discovery, managers and admins). The page header shows four counters (Discovery zones, Active zones, Assets in zones, Running jobs), then one card per zone and a Recent jobs table that refreshes on its own while jobs are running; "View all" opens Job History.
- Each card shows the zone name, type and identifier, an Active or Inactive badge, a Relay badge for relay-mode zones, an Auto badge when automatic discovery is enabled (hover for the interval), the status of the last discovery, the time of the last discovery and the number of active assets the zone sees
- When the last discovery failed, its error message is shown on the card
- Run Now queues a discovery immediately (managers and admins; disabled for inactive zones). Agent zones show "Agent Push" instead: they are filled by the agents
- Logs opens Job History filtered on the zone; the gear icon opens the zone settings
- Add zone opens the creation form (/dashboard/discovery/zones/new)

Creating and Editing a Zone
The zone form has three parts: Basic Information (zone name, environment type, identifier, optional description), Discovery Settings (Enable automatic discovery and the Discovery Interval in minutes) and the connection fields of the chosen type. Secret fields (passwords, tokens, keys) are never sent back to the browser: in edit mode they show "stored — leave blank to keep", and an empty field keeps the stored value. The edit page also has a Delete button.
Note: Some collectors accept extra connection_config keys that the form does not show (for example region or resource-type filters). They can be set through the discovery zones API; each collector page lists them.
How Discovery Works
A discovery run is a job. When a job runs, a Celery worker loads the collector of the zone type, the collector authenticates with the source and enumerates the resources it supports, and the results are persisted: assets are created or updated by their identifier, dependencies are recorded, and the assets of the zone that the run did not see are deactivated. Progress events (discovery started and completed) are pushed to the UI over WebSocket.
- A zone never has two jobs at once: Run Now on a zone with a pending or running job returns 409 "A discovery job is already pending or running for this zone."
- Every job counts Discovered (new assets), Updated, Removed (deactivated), Dependencies and Errors, and keeps the list of the assets it added and removed (see Job History)
- A job ends as completed, partial (some resource types could not be read), failed or cancelled
- Transient errors (connection resets, timeouts) are retried with back-off; the job goes back to pending while it waits
- Network scans with more than 100 ports are split into parallel scan tasks
Scheduling and Intervals
When "Enable automatic discovery" is on, the scheduler (Celery beat task run_scheduled_discoveries, every 5 minutes) queues a job for each active local-mode zone whose last discovery is older than its interval, and skips zones that already have a pending or running job. The interval is set in minutes, from 5 to 1440 (one day); the default is 60. Relay-mode zones receive the interval with their configuration and are scheduled by their relay.
- 5–15 minutes: fast-changing environments such as Kubernetes clusters
- 60 minutes (default): cloud subscriptions and projects
- 360–1440 minutes: stable infrastructure such as vCenter or SNMP devices
Note: Run Now triggers a discovery at any time, regardless of the schedule. Scheduled jobs are marked "scheduled" in the job detail; manual ones show who triggered them.
Removed and Purged Assets
An asset that a completed discovery no longer sees is deactivated (it counts as Removed in the job) but stays in the inventory as inactive. The daily purge_stale_assets task deletes discovered assets that have been inactive, unseen and unmodified for ASSET_PURGE_RETENTION_DAYS (default 30, never less than ASSET_PURGE_MIN_RETENTION_DAYS, 7). Manually created assets are never purged.
Stuck Jobs
A periodic task marks as failed the local jobs that stay running longer than DISCOVERY_JOB_STALE_MINUTES (default 50) — "Job exceeded the maximum run time and was marked failed" — and the local jobs still pending after DISCOVERY_PENDING_JOB_STALE_MINUTES (default 120) — "Job was never started and was marked failed" — so a crashed worker never blocks a zone. Jobs older than DISCOVERY_JOB_RETENTION_DAYS (default 90, 0 = keep forever) are deleted.
Deleting a Zone
Deleting a zone (zone settings → Delete → "Delete zone") removes the zone, its jobs and the assets whose primary source is that zone. An asset that was merged with assets of other zones (cross-zone deduplication, see /docs/assets/deduplication) is kept: before the delete it moves to its best source in another zone. Assets that only lose a secondary source in the deleted zone have their activity recomputed.
Warning: Deletion cannot be undone. To stop discovering a zone without losing its assets, disable automatic discovery or deactivate the zone instead.
Stalled Zones
An active zone with automatic discovery whose last completed job is older than COVERAGE_ZONE_STALL_FACTOR (default 3) × its interval is reported as a stalled source on the Blind spots page and in the "Needs attention now" tile of the Dashboard.
Best Practices
Follow these recommendations to get the most out of your discovery zones.
- Use descriptive zone names that include the environment and region (e.g., "Production Azure West Europe", "Staging K8s EKS")
- Create separate zones for production and non-production sources for clearer ownership
- Use read-only credentials for every zone
- Start with a longer interval and shorten it once you know how long a run takes
- Watch job durations in Job History: a sudden increase usually means growth or connectivity problems