Sources
A rule’ssource declares what the rule matches on the device: which files it manages,
and when a matching file is considered finished.
string
required
An absolute glob pattern that selects the files this rule manages.Must satisfy the following criteria:See glob patterns for
supported syntax, examples, and matching behavior.
- Absolute path — it starts with
/(Linux) or a drive letter such asC:\(Windows) - At most 1024 bytes, with no control characters
- No
..segments, and no empty segments (//or a trailing/); Windows patterns treat both\and/as separators
- Linux
- Windows
/var/log/robot/*.log/home/myapp/configs/*.yaml
integer
default:"60"
How long, in seconds, a matching file’s size and modification time must stay unchanged
(quiescent) before it is considered stable. Going quiescent is what makes a file
eligible for upload and deletion.
source.glob to select the files that Miru manages on a device. The
Miru Agent evaluates the pattern on every scan, so files that appear after a rule is
deployed can still match it.
Glob patterns
File rule glob patterns select the files that Miru manages on a device. Every pattern must:- Be absolute (e.g. start with
/on Linux or a drive letter such asC:\on Windows) - Be at most 1024 bytes and contain no control characters
- Contain no
..segments or empty segments (//or a trailing/)
Brace expansion (
{a,b}), backslash escapes (\*), and extended patterns such as
!(x) are not supported. Braces match literally. On Linux, backslashes also match
literally; on Windows, \ is a path separator. To match a literal
*, ?, or [, wrap it in brackets: [*], [?], or [[].
Examples
- Linux
- Windows
- a trailing
**matches only directories, so/var/log/robot/**matches no files — use/var/log/robot/**/*instead - only regular files match; a directory never matches even if its name does
- symbolic links to files and directories are followed
- matching is case-sensitive (
*.logdoes not matchAPP.LOG); on Windows, path segments without wildcards follow the file system and match regardless of case, but segments with wildcards remain case-sensitive *and**match hidden files and directories whose names start with.- keep the part of the pattern before the first wildcard as specific as possible; a broad pattern such as
/**/*.logwalks large parts of the file system on every scan
Uploads
A rule’supload block declares which registered bucket matching files are written to, and the object path within it.
The upload block is optional. If omitted, the rule only manages local retention.
string
required
Slug of the upload collection the resulting uploads are grouped into.Example:
robot-logsstring
required
Name of the registered bucket this rule uploads to.Example:
my-uploads-bucketstring
The template which defines the object path to which the uploaded file is written.The following variables are supported, which are filled in when each upload’s
object key is rendered:
Retention
A rule’sretention block governs deletion of the local copies of matching files. When
absent, the device retains matching files indefinitely (Miru never deletes them).
The retention block doesn’t go into effect until a file is considered stable. That is, its size and modification time have stayed unchanged for source.stability_window_secs.
Files that already matched the rule when it was deployed to the device are never
deleted unless they change afterward. See
deployment.
boolean
Whether a file must have its upload durably confirmed before it may be deleted. Must be set when the rule has an
upload block.true— files are never deleted before their upload is confirmed.false— upload is best-effort; files may be deleted once they are eligible, even if their upload has not completed.
integer
required
How long, in seconds, the file lives on the device before it is scheduled for deletion. The clock starts as soon as the file is considered stable.Use
0 to delete the file as soon as it becomes eligible.Example: 604800
