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

# Grafana Loki Source

> Configure the Grafana Loki source in Sawmills to receive log data over HTTP and gRPC with timestamp handling and multi-tenant header support.

## Supported Data Types

📘 **Logs**

## Configuration

| Field         | Type    | Default            | Required | Description                                                |
| :------------ | :------ | :----------------- | :------- | :--------------------------------------------------------- |
| Name          | String  | none               | true     | Unique identifier within Sawmills.                         |
| Enable HTTP   | Boolean | true               | true     | Enable the Loki source to accept telemetry data over HTTP. |
| HTTP Address  | String  | `${env:MY_POD_IP}` | true     | The address (IP or hostname) where HTTP data is received.  |
| Port (HTTP)   | Int     | 3500               | true     | The port for receiving OTLP data over gRPC.                |
| Enable gRPC   | Boolean | true               | true     | Enable the Loki source to accept telemetry data over gRPC. |
| gRPC Hostname | String  | `${env:MY_POD_IP}` | true     | The address (IP or hostname) where gRPC data is received.  |
| Port (gRPC)   | Int     | 4317               | true     | The port for receiving OTLP data over gRPC.                |

### Advanced Options

| Field                        | Type    | Default | Required | Description                                                                                                                                               |   |
| :--------------------------- | :------ | :------ | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| Use Incoming Timestamp       | Boolean | false   | true     | Use the source-provided log timestamp if reliable. When off, logs are assigned new timestamps at ingestion to maintain consistency in mixed environments. |   |
| Forward X-Scope-OrgID Header | Boolean | true    | true     | When enabled, the incoming X-Scope-OrgID header is preserved. This is often required for multi-tenant authentication to work properly.                    |   |

<Note> The pod’s IP address is retrieved by defining an environment variable `MY_POD_IP` from the pod’s status field `status.podIP`. You can access this value using `${env:MY_POD_IP}` in your configuration to dynamically reference the pod’s IP at runtime. </Note>
