---
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 match…                                               |
|-------------------|---------------------------------------------------------|
| `env=production`  | All collectors with `env` attribute set to `production` |
| `region=~"us-.*"` | All collectors in any US region                         |

## Matcher syntax

Each matcher combines an attribute name, an operator, and a value. Matchers follow the same syntax as Prometheus Alertmanager matchers, so they may look familiar.

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

## Matching rule: AND logic

When you assign multiple matchers to a pipeline, Fleet Management combines them with AND logic. All matchers must match for a collector to receive the 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` |

This lets you be precise about which collectors receive a configuration. The more matchers you add, the narrower your matching becomes.
