- Documentation
- Learning Hub
- Module 3 of 4 Remote configuration
Attribute anti-patterns
What not to do
| Anti-pattern | Why it’s a problem |
|---|---|
| Too many attributes | Hard to manage, attribute limits per collector or API call |
| Frequently changing values | Use remote attributes in UI instead |
| Sensitive information | Attributes are visible in the Fleet Management UI |
| Duplicating reserved attributes | collector.os, collector.version, and collector.ID already exist |
| Inconsistent naming | myEnv vs my_env vs my-env causes confusion |
| Overly specific values | hostname=server-123 — use collector.ID instead |
Tips for beginners
| Tip | Why it helps |
|---|---|
| Start simple | Begin with env and maybe one or two others |
| Be consistent | Pick a naming convention and stick to it |
| Document your schema | Note down what each attribute means |
| Think about targeting | Every attribute should help you target pipelines |
Script
Knowing what NOT to do is just as important as knowing what to do. Here are the most common mistakes teams make with attributes.
First, don’t create too many attributes. There’s a hard limit of 22 local attributes per API request and 100 remote attributes. But the real issue is complexity. Too many attributes become hard to manage and remember.
Don’t use attributes for values that change frequently. If something does change often, use remote attributes in the Fleet Management UI rather than baking them into the local config.
Never put sensitive information in attributes—they’re visible in the Fleet Management interface to anyone with access.
Don’t duplicate reserved attributes. Fleet Management already provides collector.os, collector.version, and collector.ID automatically. Creating custom versions just adds confusion.
Be consistent with naming. Pick a convention (lowercase with hyphens, or snake_case) and stick with it across all collectors. Inconsistent naming leads to mistakes when creating pipeline matchers.
Finally, avoid overly specific values like individual hostnames. That’s what collector.ID is for. In most cases, attributes should describe groups, not individual instances.