> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pangolin.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Network Logs

> Network logs are a record of TCP and UDP sessions between clients and private resources on sites

<div id="pangolin-toc-cta" className="pangolin-toc-cta-source">
  <Card title="Try free on Pangolin Cloud" icon="cloud" href="https://app.pangolin.net/auth/signup" arrow="true" cta="Sign up free">
    Fastest way to get started with Pangolin using the hosted control plane. No credit card required.
  </Card>
</div>

Network logs record each TCP and UDP session that traverses the tunnel between Pangolin clients and resources on your sites. They apply to private resources reached through the Pangolin client (and related tunnel traffic), not to public resources served only through the reverse proxy. You can see which clients and users opened sessions to which private resources, the source and destination addresses and protocols (TCP and UDP), the start and end times of the sessions, and more.

<Note>
  Network logs are only available in [Pangolin Cloud](https://app.pangolin.net/auth/signup) or self-hosted [Enterprise Edition](/self-host/enterprise-edition).
</Note>

## What are Network Logs?

Network logs capture tunnel sessions from clients to private resources. They are useful for:

* Observing which clients and users opened sessions to which private resources
* Reviewing source and destination addresses and protocols (TCP and UDP)
* Measuring traffic volume with transmitted and received byte counts
* Auditing session start and end times for troubleshooting and compliance

<Tip>Make sure to enable network logging in the org settings</Tip>

## Network Log Fields

Each network log entry contains the following fields:

| Field            | Type           | Description                                                                                                 |
| ---------------- | -------------- | ----------------------------------------------------------------------------------------------------------- |
| `timestamp`      | number         | Unix timestamp (in seconds) when the session started                                                        |
| `protocol`       | string         | Transport protocol for the session (`tcp` or `udp`)                                                         |
| `siteResourceId` | number \| null | The ID of the [private resource](/manage/resources/understanding-resources) for the session (if applicable) |
| `clientId`       | number \| null | The Pangolin [client ID](/manage/clients/understanding-clients) for the session                             |
| `userId`         | string \| null | The user ID when the session is tied to an authenticated user                                               |
| `sourceAddr`     | string         | Source address for the session (typically the client-side endpoint)                                         |
| `destAddr`       | string         | Destination address for the session (typically the resource-side endpoint)                                  |
| `duration`       | number \| null | How long the session lasted (in seconds), when the session has ended                                        |
| `bytesTx`        | number \| null | Bytes transmitted in the session                                                                            |
| `bytesRx`        | number \| null | Bytes received in the session                                                                               |

## Log Retention

Network log retention is controlled by the organization setting. By default, network logs are retained for 0 days (disabled).

<Note>
  Network logs can generate significant data volume depending on session churn and traffic. Consider your storage capacity when configuring retention periods.
</Note>

## Exporting

Logs can be exported into CSV format for external analysis and archival. Logs can be exported from the table view in the Pangolin dashboard or via the Pangolin API. When exporting, you can specify date ranges and filters to narrow down the logs you need.
