---
title: "Attribute matching | Grafana Labs"
description: "How pipelines get assigned to collectors"
---

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

## Attribute matching

**Attribute matching** is the mechanism that connects pipelines to collectors. When you create a pipeline, you define matchers, which are rules that specify which collectors should receive that pipeline based on their attributes.

Matchers determine which collectors receive a pipeline.

[Attribute matching connects pipelines to collectors](fleet-management-attribute-matching.svg "Attribute matching connects pipelines to collectors")

## How matchers work

| You define…       | To target…                                              |
|-------------------|---------------------------------------------------------|
| `env=production`  | All collectors with `env` attribute set to `production` |
| `region=~"us-.*"` | All collectors in any US region                         |

## Matcher syntax

| Operator | Meaning         | Example            |
|----------|-----------------|--------------------|
| `=`      | Equals          | `env=production`   |
| `!=`     | Not equals      | `env!=development` |
| `=~`     | Regex match     | `region=~"us-.*"`  |
| `!~`     | Regex not match | `team!~"test-.*"`  |

## Matching rule: AND logic

All matchers must match for a collector to receive a pipeline.

| Matchers defined             | Collector receives pipeline if…               |
|------------------------------|-----------------------------------------------|
| `env=prod`                   | `env` is `prod`                               |
| `env=prod`, `region=us-east` | `env` is `prod` **AND** `region` is `us-east` |
