The --agent flag allows you to define a deployment using a specific string format. This is the preferred method for deploying multiple agent types in a single command, which is not possible with the legacy flag syntax.
Format: "AgentType:Version:ConfigVersionID1,ConfigVersionID2,..."
Rules:
- No spaces: Do not include spaces within the string.
- Version Wildcards: The
* wildcard is only supported for KUBERNETESCLUSTER managed entity types. For HOST fleets, you must specify an explicit version (e.g., 1.70.0). - Mutual Exclusivity: The
--agent flag cannot be mixed with legacy flags (--agent-type, --agent-version, --configuration-version-ids).
Examples:
- Single agent:
--agent "NRInfra:1.70.0:version-1" - Multiple agents:
--agent "NRInfra:1.70.0:v1" --agent "NRDOT:2.0.0:v2" - Kubernetes wildcard:
--agent "NRInfra:*:v1" (Valid only for K8s clusters)
# Single agent with one configuration version
--agent "NRInfra:1.70.0:version-abc-123"
# Single agent with multiple configuration versions
--agent "NRInfra:1.70.0:version-1,version-2,version-3"
# Multiple agents (Infrastructure and .NET)
--agent "NRInfra:1.70.0:version-1,version-2" \
--agent "NRDOT:2.0.0:version-3"
# Wildcard version for Kubernetes fleet (only valid for KUBERNETESCLUSTER type)
--agent "NRInfra:*:config-k8s-v1"