diff --git a/reference/ingestion-tools/fleet/filesource-provider.md b/reference/ingestion-tools/fleet/filesource-provider.md new file mode 100644 index 0000000000..f0bae3128b --- /dev/null +++ b/reference/ingestion-tools/fleet/filesource-provider.md @@ -0,0 +1,21 @@ +# Filesource provider [filesource-provider] + +Watches for changes of specified files and updates the values of the variables when the content of the files changes. + +This allows information from the filesystem to be used as variables in the {{agent}} configuration. This information is allowed only when the provider has been explicitly configured to read this information from the disk. The policy cannot just read any file, it has to be explicitly configured to allow it. + +For example, the following configuration watches for changes to `file1`: + +```yaml +provides: + filesource: + sources: + file1: + path: ./file1 + +inputs: + - id: filestream + type: filestream + paths: + - ${filesource.file1} +``` \ No newline at end of file diff --git a/reference/toc.yml b/reference/toc.yml index 1674199d35..af5f47f803 100644 --- a/reference/toc.yml +++ b/reference/toc.yml @@ -125,6 +125,7 @@ toc: - file: ingestion-tools/fleet/agent-provider.md - file: ingestion-tools/fleet/host-provider.md - file: ingestion-tools/fleet/env-provider.md + - file: ingestion-tools/fleet/filesource-provider.md - file: ingestion-tools/fleet/kubernetes_secrets-provider.md - file: ingestion-tools/fleet/kubernetes_leaderelection-provider.md - file: ingestion-tools/fleet/local-dynamic-provider.md