Skip to main content

file log collection policies

A collection policy tells agents which files to read on the device, how to interpret them, and which devices it applies to. Lines collected this way become the file logs half of the stream.

Policies live in log settings, reached from the manage policies link in the logs header.

info

Creating, editing, deleting and syncing policies requires system:logs — supervisor and above. Anyone with a session can read the resulting logs.

the policy list​

Each policy shows enabled and priority badges, with per-policy actions:

ActionEffect
EditReopen the wizard
SyncPushes the policy to targeted agents. Confirms with "Policy sync initiated"
DeleteRemoves the policy
note

Sync is how a policy change reaches devices. If you have edited a policy and the collected content has not changed, sync it before investigating further.

the create wizard​

The create button opens a four-step wizard.

step 1 — basic info​

Name, description, and an enabled toggle.

step 2 — files​

One or more file entries. Each entry has:

FieldNotes
File pathSupports globs — a wildcard filename will match a set of files
Friendly nameHow it appears in the interface
Format hintHow to interpret the file
Multi-line patternA regex for entries that span more than one line
Include / exclude patternsWhich lines to keep and drop
Sampling rateDefault 100
Search filter modeHow search applies to this file
tip

Glob support in the file path is what makes a policy survive log rotation and per-day filenames. A wildcard on the filename picks up today's file without needing the policy edited each time.

tip

The multi-line pattern matters most for stack traces. Without it, a single exception arrives as a dozen disconnected lines, which makes it far harder to cluster usefully in patterns.

step 3 — settings​

SettingDefault
Collection interval300 seconds
Retention days30
Priority—

Retention offers options up to 60 and 90 days.

caution

Retention above 30 days requires the extended-logging feature. If the longer options are unavailable, that feature is not enabled for your organisation — see organisation settings for the features tab.

step 4 — targets​

Which devices the policy applies to, by:

  • Device tags
  • Device groups
  • Locations

retention behaviour​

A background job deletes file log entries older than each policy's retention days.

caution

For orphaned entries — those with no matching policy, usually because the policy was deleted — only entries older than 7 days are removed.

So deleting a policy does not clear its data immediately. Plan for roughly a week's tail before the entries disappear.

tip

Start a new policy disabled, or targeted at a single tag covering a handful of devices, and check the stream with the policy facet set to it before widening the targets. A policy pointed at a busy file across the whole estate is a lot of data to walk back.