---
title: "static_labels | Grafana Enterprise Logs documentation"
description: "The 'static_labels' Promtail pipeline stage."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# static\_labels

> Caution
> 
> Promtail has been deprecated and is in Long-Term Support (LTS) through February 28, 2026. Promtail will reach an End-of-Life (EOL) on March 2, 2026. You can find migration resources [here](/docs/alloy/latest/set-up/migrate/from-promtail/).

The static\_labels stage is an action stage that adds static-labels to the label set that is sent to Loki with the log entry.

## Schema

YAML ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```yaml
static_labels:
  [ <string>: [<string>] ... ]
```

### Examples

For the given pipeline:

YAML ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```yaml
- json:
    expressions:
      stream: stream
- labels:
    stream:
- static_labels:
    custom_key: custom_val
```

Given the following log line:

![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```none
{"log":"log message\n","stream":"stderr","time":"2019-04-30T02:12:41.8443515Z"}
```

The first stage would extract `stream` into the extracted map with a value of `stderr`. The `labels` stage would turn that key-value pair into a label. The `static_labels` stage would add the provided static labels into the label set.

The resulting entry that is sent to Loki will contain `stream="stderr"` and `custom_key="custom_val"` as labels.
