Skip to content

Commit

Permalink
docs: mention implicitly watched directories in documentation (promet…
Browse files Browse the repository at this point in the history
…heus#14019)

* docs: mention implicitly watched directories in documentation

Signed-off-by: Rens Groothuijsen <[email protected]>

* Add mention of atomic file renaming

Co-authored-by: Ayoub Mrini <[email protected]>
Signed-off-by: Rens Groothuijsen <[email protected]>

---------

Signed-off-by: Rens Groothuijsen <[email protected]>
Co-authored-by: Ayoub Mrini <[email protected]>
Co-authored-by: Björn Rabenstein <[email protected]>
  • Loading branch information
3 people authored Jun 18, 2024
1 parent fd1a89b commit 1c3f322
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,16 @@ and serves as an interface to plug in custom service discovery mechanisms.

It reads a set of files containing a list of zero or more
`<static_config>`s. Changes to all defined files are detected via disk watches
and applied immediately. Files may be provided in YAML or JSON format. Only
and applied immediately.

While those individual files are watched for changes,
the parent directory is also watched implicitly. This is to handle [atomic
renaming](https://github.com/fsnotify/fsnotify/blob/c1467c02fba575afdb5f4201072ab8403bbf00f4/README.md?plain=1#L128) efficiently and to detect new files that match the configured globs.
This may cause issues if the parent directory contains a large number of other files,
as each of these files will be watched too, even though the events related
to them are not relevant.

Files may be provided in YAML or JSON format. Only
changes resulting in well-formed target groups are applied.

Files must contain a list of static configs, using these formats:
Expand Down

0 comments on commit 1c3f322

Please sign in to comment.