# Configuration Parameters

The plugin receives all parameters directly via the command line:

```
pandora_logparser --dir <path> [options]
```

> **Important**: Always quote parameters containing `*`, `?`, `|` or other shell metacharacters. Example: `'*.log'`, `'(?i)error'`.

### Parameters

<table border="1" style="border-collapse: collapse; width: 100%;">
<tbody>
<tr><td style="width: 30%;"><strong>Parameter</strong></td><td style="width: 70%;"><strong>Description</strong></td></tr>
<tr><td><code>--dir</code> *</td><td>Directory containing the log files to process.</td></tr>
<tr><td><code>--name-regex</code></td><td>Regular expression to filter file names. Default: <code>.*</code> (all files).</td></tr>
<tr><td><code>--content-regex</code></td><td>Regular expression to filter lines within the log content. Default: <code>.*</code> (all lines).</td></tr>
<tr><td><code>--source-type</code></td><td>Value of the <code>&lt;source&gt;</code> field in the log module. Identifies the data source in Pandora FMS.</td></tr>
<tr><td><code>--idx-dir</code></td><td>Directory where index files are stored. Default: <code>/tmp</code>.</td></tr>
</tbody>
</table>

\* Required parameter.

### Regular Expression Examples

**File name filter (`name_regex`):**

```
.*\.log              → only files with .log extension
access.*\.log        → files starting with "access" and ending in ".log"
(app|sys)\.log       → files named "app.log" or "sys.log"
```

**Content filter (`content_regex`):**

```
(?i)error                → lines containing "error" (case-insensitive)
(?i)error|critical|fail  → lines containing error, critical, or fail
^ERROR                   → lines starting with ERROR
[0-9]{3}\s               → lines containing a 3-digit code followed by a space
```