Manage Collector Fleets

In Graylog 7.2, Graylog Collector has been released as a preview feature for evaluation and feedback purposes. This feature's design and behavior could change significantly in future releases. To share feedback on your experience with Graylog Collector, email feedback@graylog.com.

A fleet is a group of collectors that share one configuration, and that configuration is a set of collector sources defining what to collect. Adding or changing a source reaches every collector in the fleet within seconds. This article explains how to create fleets, add sources to them, and change what your collectors collect.

Prerequisites

Before proceeding, ensure that the following prerequisites are met:

  • You must be a Graylog administrator or have the Collectors Manager role to manage fleets. A user with the Collectors Reader role can view fleets and their sources but cannot add or change them.

Create a Fleet

Plan fleets around what hosts should collect rather than where they are, so that hosts needing the same sources belong together. For information about how fleets and source interact, see Graylog Collector.

To create a fleet, go to System > Collectors, then select the Fleets tab:

  1. Select Create fleet.

  2. In the New Fleet dialog, enter a unique Name and an optional Description.

  3. Select Create fleet.

A new fleet has no sources and collects nothing until you add them.

Add a Source to a Fleet

A source defines what a collector reads. That is, a source identifies the log data you want to collect from a host. A fleet can hold any number of sources.

To add a source, go to System > Collectors, then select the Fleets tab:

  1. Select the fleet.

  2. On the Sources tab, select Add Source.

  3. Enter a Name and an optional Description.

  4. Leave Enabled selected, or clear it to define the source without collecting from it.

  5. Select a Source Type and complete its options.

  6. Select Create source.

The new source reaches every collector in the fleet within seconds. No restart is required.

Some source types apply to one platform only. If a fleet contains hosts running different operating systems, Graylog sends each source only to the hosts that support it. For example, a fleet holding a journald source and a Windows Event Log source delivers the journald source to its Linux hosts and the event log source to its Windows hosts.

Edit a Source

To edit a source, go to System > Collectors, then select the Fleets tab:

  1. Select the fleet.

  2. On the Sources tab, select Edit on the source's row.

  3. Change the options you need.

  4. Select Update source.

You cannot change a source's type after creating it, because Source Type is read-only when editing. To switch types, delete the source and add a new one.

To pause collection without losing the definition, clear Enabled and update the source. Use this option to quiet a noisy source temporarily. Edit the source and select Enabled again to resume collection.

Delete a Source

To delete a source, go to System > Collectors, then select the Fleets tab:

  1. Select the fleet.

  2. On the Sources tab, select More on the source's row.

  3. Select Delete.

Deleting a source removes it from the fleet permanently and stops its collection on every collector. To stop collection temporarily, disable the source instead. A source belongs to one fleet and cannot be moved. To collect the same data in another fleet, create a matching source there.

Delete a Fleet

You cannot delete a fleet while collectors are assigned to it. Reassign those collectors to another fleet or delete them first. Use delete if all collectors have been uninstalled from their hosts. Otherwise, a collector that is still running reappears. See Manage Collectors.

To delete a fleet, go to System > Collectors, then select the Fleets tab:

  1. Select More on the fleet's row.

  2. Select Delete.

Use Case

A team runs a group of Ubuntu web servers and wants both authentication activity and web traffic from all of them.

They create a fleet named linux-web, then add a Journald source with Priority set to Info and Match Pattern set to _SYSTEMD_UNIT=ssh.service, and a File source with File Path(s) set to /var/log/nginx/*.log and Read Mode set to From end. They generate an enrollment token scoped to linux-web and install collectors on each host.

Every host enrolled with that token collects both sources. Adding a third source later applies to all of them without anyone touching a host again.

Troubleshooting and Common Issues

The following section outlines troubleshooting steps for common issues to assist you in resolving potential challenges you may encounter.

Source Collects Nothing

Confirm the source is enabled and that the fleet is the one the collectors actually joined, then check the cause for its type.

Source type

Common cause

File

The path matches no files. Check the pattern on the host itself, because the collector matches it directly against the file system. On Linux, paths under /home, /root, or /run/user are unreadable by the service and fail silently.

Journald

Priority is set more severe than the entries being written, or Match Pattern matches no unit.

Windows Event Log

A channel name is misspelled, or the channel is empty.

macOS Unified Logging

The default predicate is deliberately narrow, so a quiet host legitimately produces nothing. Widen it to confirm the source works, then narrow it again. A predicate matching only info or debug entries also yields nothing, because those levels are never collected.

Read Mode set to From end means nothing is collected until new entries are written. On a quiet host, that could be indistinguishable from a broken source.

Further Reading

Explore the following additional resources and recommended readings to expand your knowledge on related topics: