Slide 7 of 14

Attribute examples

Example 1: Minimal starting schema

This example shows the recommended starting point for new Fleet Management users: just two attributes:

Alloy
remotecfg {
    // ... other configuration ...
    
    attributes = {
        "env"  = "production",   // Which environment: production, staging, or dev
        "team" = "platform"      // Who owns this collector
    }
}
AttributeValueWhat it means
envproductionThis collector monitors production infrastructure
teamplatformThe platform team owns and manages this collector

What you can target with this schema

  • All production collectors → env=production
  • All collectors owned by platform team → team=platform
  • Production collectors owned by platform → env=production, team=platform

Example 2: Expanded schema for larger deployments

As your fleet grows, you may need more precise targeting. This example adds a region attribute:

Alloy
remotecfg {
    // ... other configuration ...
    
    attributes = {
        "env"    = "production",
        "region" = "us-east-1",
        "team"   = "platform"
    }
}
AttributeValueWhat it means
envproductionThis collector monitors production infrastructure
regionus-east-1This collector is located in the US East region
teamplatformThe platform team owns and manages this collector

What you can target with this schema

  • All US East collectors → region=us-east-1
  • Production collectors in US East → env=production, region=us-east-1
  • Platform team’s US East production collectors → all three attributes

Start simple, expand as needed. Begin with Example 1. Add more attributes when you need that level of targeting precision.

Script

Let’s look at some concrete examples of how attributes work in practice. Seeing real configurations helps make these concepts stick.

The first example shows a minimal starting schema. This is what’s recommended for getting started—just two attributes. The env attribute identifies whether this collector is in production, staging, or development. The team attribute shows who owns this collector. With just these two, you can already target pipelines to all production collectors, or all collectors owned by a specific team.

The second example shows a more complete schema for a larger deployment. This collector has three attributes: env for the environment, region for geographic location, and team for ownership. With this schema, you could target pipelines very precisely. For example, “apply this pipeline to all production collectors in us-east-1 owned by the platform team.”

Notice that both examples are defined in the attributes block within the remotecfg configuration. You can also assign attributes with API calls or in the Fleet Management UI. More importantly, notice that the examples follow the same pattern: the keys are lowercase with no spaces. The values are simple, descriptive strings.

Start with the minimal example. As your fleet grows and you need more precise targeting, you can expand to something like the second example.