# Discovery task configuration

The wizard contains four visible steps.

### 1. Task definition

This step configures the general Discovery task settings:

- Task name.
- Agent group.
- Execution interval.

A real Pandora FMS group must be selected. Do not use `All`, as the plugin rejects empty or non-positive group identifiers.

### 2. Azure credentials

| Field | Required | Description |
| --- | --- | --- |
| **Tenant ID** | Yes | Microsoft Entra ID tenant. |
| **Client ID** | Yes | Identifier of the registered application. |
| **Client secret** | Yes | Application secret. |
| **API endpoint** | No | When empty, `https://management.azure.com` is used. Change it only for sovereign clouds or custom environments. |
| **Login endpoint** | No | When empty, `https://login.microsoftonline.com` is used. Change it only for sovereign clouds or custom environments. |

### 3. Azure event query and filters

| Field | Default value | Description |
| --- | ---: | --- |
| **Event history in days** | `15` | Query period, from 1 to 365 days. |
| **Azure API filter** | Empty | Expression sent to Azure through `$filter`. |
| **Subscription allow regexp** | Empty | Expressions matched against the subscription ID and name. |
| **Region allow regexp** | Empty | Regions accepted by the plugin. |
| **Service allow regexp** | Empty | Impacted services accepted by the plugin. |
| **Event type allow regexp** | Empty | Allowed event types. |
| **Status allow regexp** | Empty | Allowed regional or general statuses. |
| **Level allow regexp** | Empty | Allowed event levels. |
| **Event search allow regexp** | Empty | At least one expression must match the complete event text. |
| **Event search deny regexp** | Empty | Discards matching events. |
| **First run events are new** | Disabled | When enabled, every event found during the first execution is treated as new. |

### 4. Agents modules and execution

| Field | Default value | Description |
| --- | ---: | --- |
| **Create agent per impacted region** | Enabled | Creates one agent per region. When disabled, **Target agent** is used. |
| **Target agent** | `Azure Service Health Events` | Single agent used when agents are not created per region. |
| **Agent prefix** | `Azure Service Health ` | Prefix for regional agents. |
| **Module prefix** | Empty | Prefix added to final module names. |
| **State modules** | Enabled | Creates the `Connection` module. |
| **Event count modules** | Enabled | Creates the five event counter modules. |
| **Event detail modules** | Enabled | Creates `Events` and `New events`. |
| **Maximum event detail length** | `16000` | Maximum size of detail modules. The effective minimum is 1000 characters. |
| **Modules allow regexp** | Empty | Only creates modules whose final name matches. |
| **Modules deny regexp** | Empty | Discards modules whose final name matches. |
| **Write event log** | Enabled | Enables the JSONL event log. |
| **Maximum event log size** | `20` | Rotates the log when it reaches this size. |
| **HTTP timeout** | `30` | Maximum time per request. Zero or negative values are replaced with 30 seconds. |
| **Maximum retries** | `2` | Retries for HTTP 429 and transient Azure errors. |
| **Verify SSL certificates** | Enabled | Keep enabled in production. |
| **Proxy URL** | Empty | Optional HTTP or HTTPS proxy. |
| **Mock Azure API URL** | Empty | Reserved for testing and must remain empty in production. |