Hosts with different roles often need different logs and metrics. A new Elastic Agent policy in Fleet gives a host group its own set of integrations and collection settings.

Fleet Server distributes saved policies to the agents enrolled in them. The System integration collects host logs and metrics, while the policy's default namespace groups the resulting data streams. Separate namespaces can distinguish production data from staging data without changing the integration.

The signed-in Kibana account needs permission to create Fleet agent policies and add integrations. Creating a policy does not move existing agents or enroll new ones, so a new policy can be prepared before any hosts use it.

Steps to create an Elastic Agent policy in Fleet:

  1. Enter Fleet in Kibana's global search.
  2. Select Fleet / Agent policies from the search results.
  3. Click Create agent policy.
  4. Enter a unique policy name such as linux-baseline in Name.

    The selected Collect system logs and metrics option adds the System integration. If the hosts do not need baseline system telemetry, this option can be cleared to create a policy without that integration.

  5. Expand Advanced options.

    The description is optional; a host-group name usually provides enough context for a small deployment.

  6. Replace default in Default namespace with production for a production host group.

    This field is farther down the expanded panel. The namespace becomes part of the integrations' data stream names, such as metrics-system.cpu-production. The value default is also valid when no environment separation is needed.

  7. Click Create agent policy to save the policy.
  8. Open linux-baseline from the Agent policies list.

    The new row shows its first revision and one integration when system collection was left selected. Zero enrolled agents is expected for a new policy.

  9. Confirm that the saved policy lists the System integration with the chosen namespace.

    The policy is ready for agent enrollment. Host data starts arriving only after an agent enrolls in this policy and can reach its configured output.
    Related: How to install a Fleet-managed Elastic Agent

Share this guide