---
title: "How to Verify the Discovery Agent's Status"
url: "https://dm0bkdes5q7a2ls.productfruits.help/en/article/how-to-verify-the-discovery-agents-status"
language: "en"
last_updated: "2026-10-14T14:00:20.511Z"
---

# How to Verify the Discovery Agent's Status

To verify the status of the Discovery Agent in a distributed scan, you need to check services and the internal database queue health.

To verify the status of the **Discovery Agent** in a Spirion Sensitive Data Platform distributed scan, you need to check both the machine-level services and the internal database queue health. In the Postgres-backed architecture (Agent version 13.6+), the Discovery Agent acts as the "host" for the work.

### 1\. Check the Windows Services

Log onto the machine designated as the **Discovery Agent** and verify the following:

-   **Spirion Agent Service:** Ensure this is "Running."
-   **PostgreSQL (Spirion):** This service must be "Running" on the Discovery machine, as it hosts the job queue.
-   **pgBouncer (Spirion):** This service must be "Running" to allow Search Agents to connect to the database.

### 2\. Inspect the Local Postgres Queue (via pgAdmin)

The most accurate way to see if the Discovery Agent is actually working is to look at the database tables it creates.

-   **Tools:** Use **pgAdmin 4** on the Discovery Agent VM.
-   **Connection:** Connect to `localhost` on port **5433**. (Get credentials from the SDP Console under **Manage Agents > Get Postgres Creds**).
-   **Look for the Table:** You should see a table named `public.search_queue_<GUID>`.
-   -   **If the table is missing:** The Discovery Agent has not yet initialized the scan or failed during startup.
    -   **If the table exists:** Run this query to see if it's "stuck":
        
        ```sql
        SELECT status, COUNT(*) AS row_count
        FROM public.search_queue_<GUID>
        GROUP BY status;
        ```
        
-   **Interpreting Status Codes:**
-   -   **0 (Pending):** Discovery has found these items, but no Search Agent has claimed them yet.
    -   **1 (Processing):** An agent is currently working on these.
    -   **2 (Processed):** These are finished.

### 3\. Review Agent Logs

On the Discovery Agent machine, open `C:\ProgramData\Spirion\Logs\AgentService.log`:

-   **Look for "Discovery Phase":** You should see logs indicating the agent is crawling the target (e.g., "Enumerating files" or "Scanning SQL metadata").
-   **Look for Error 5433/6433:** If you see "Database connection failed," the Discovery Agent cannot talk to its own local queue.

### 4\. Network/Firewall Verification

If the Discovery Agent *looks* healthy but the Search Agents still can't find the queue:

-   **Port Check:** Ensure the Discovery Agent's firewall allows inbound traffic on port **6433** (pgBouncer). This is the "front door" for all other agents in the distributed scan.
-   **IP Binding:** Ensure the Discovery Agent is reachable by the Search Agents via the IP address registered in the SDP console.

### 5\. Check for "Discovery Lag"

-   Note that in large environments, there is a known issue where **Search Agents** might time out (default 5-60 mins) before the **Discovery Agent** finishes building the initial queue.
-   If the Discovery Agent is still "Processing" but the Search Agents have stopped, you may need to restart the scan to allow them to re-connect to the now-populated queue.
