> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/p/palo-alto-log-collector.md).

# Palo Alto Log Collector

Palo Alto Networks Panorama collects logs from managed firewalls. OctoXLabs reads recent User-ID logs through the Panorama XML API and reconstructs the users that appear in them.

## Use cases

* List users reconstructed from User-ID logs.

```
Adapters = palo-alto-log-collector
```

## Before you begin

### Network

| Source              | Destination   | Port               | Protocol                         |
| ------------------- | ------------- | ------------------ | -------------------------------- |
| OctoXLabs connector | Panorama host | 443 (configurable) | HTTPS (HTTP if Is Secure is off) |

### Required permissions

| Scope or role                                                                 | Permission                         | Needed for   |
| ----------------------------------------------------------------------------- | ---------------------------------- | ------------ |
| Administrator with XML API **Log** privilege (Device > Admin Roles > XML API) | Read. A read-only admin is enough. | User-ID logs |

## Create credentials in Palo Alto Log Collector

{% stepper %}
{% step %}

### Create or choose an administrator

Use a Panorama administrator account for OctoXLabs.
{% endstep %}

{% step %}

### Enable the Log privilege

In **Device > Admin Roles > XML API**, enable the **Log** privilege for the role. Read-only is enough.
{% endstep %}

{% step %}

### Check User-ID logging

User-ID logging must be active on the managed firewalls, because users are rebuilt from User-ID logs.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter      | Required | Type    | Default | Description                                                  |
| -------------- | -------- | ------- | ------- | ------------------------------------------------------------ |
| IP             | Yes      | String  |         | IP address or FQDN of the Panorama host.                     |
| Port           | No       | Integer | 443     | Port number.                                                 |
| Username       | Yes      | String  |         | XML API administrator username used to generate the API key. |
| Password       | Yes      | String  |         | Password of the user.                                        |
| Is Secure      | No       | Boolean | True    | Use HTTPS.                                                   |
| Log Fetch Days | No       | Integer | 7       | Days of User-ID logs to read on each run.                    |
| Timeout        | No       | Integer | 30      | Seconds to wait for API responses.                           |

## Troubleshooting

| Error message                                | Cause                                                | Fix                                              |
| -------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------ |
| PAN-OS API error (code=`):`                  | Panorama returned an XML error, often with HTTP 200. | Check credentials and the XML API Log privilege. |
| PAN-OS log job did not finish after 30 polls | The log job did not finish in time.                  | Lower Log Fetch Days or try again later.         |

## Change history

{% hint style="info" %}
Available starting from version 6.6.0.
{% endhint %}
