From a2477420da9f68fb4666b2fde5526d9f90a358e7 Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Fri, 10 Jun 2022 13:30:05 -0400 Subject: [PATCH] chore: Clarify event file sink doc (#2162) Updated examples to show the common use case of specifying a directory path and file name for a file sink. This should hopefully prevent users from making the mistake of putting a full path for the file_name field and seeing an error like: [ERROR] unable to send event: operation="event.(Eventer).retrySend" warning= | 1 error occurred: | * mkdir : no such file or directory | --- website/content/docs/configuration/events/file.mdx | 13 +++++++------ .../content/docs/configuration/events/overview.mdx | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/website/content/docs/configuration/events/file.mdx b/website/content/docs/configuration/events/file.mdx index bc98443a4..420f9adf2 100644 --- a/website/content/docs/configuration/events/file.mdx +++ b/website/content/docs/configuration/events/file.mdx @@ -16,7 +16,8 @@ sink { event_types = ["observation"] format = "cloudevents-json" file { - file_name = "file-name" + path = "/var/log/boundary" + file_name = "events.ndjson" } } ``` @@ -33,14 +34,14 @@ These parameters are shared across all sink types: [common sink parameters](/doc These parameters are only valid for a `file` sink. -- `path` - Specifies the file path for the sink. - - `file_name` - Specifies the file name for the sink. -- `rotate_bytes` - Specifies the number of bytes that should trigger rotation of +- `path` - Optionally specifies the file path for the sink. + +- `rotate_bytes` - Optionally specifies the number of bytes that should trigger rotation of a file sink. -- `rotate_duration` - Specifies how often a file sink should be rotated. +- `rotate_duration` - Optionally specifies how often a file sink should be rotated. -- `rotate_max_files` - Specifies how many historical rotated files should be kept +- `rotate_max_files` - Optionally specifies how many historical rotated files should be kept for a file sink. diff --git a/website/content/docs/configuration/events/overview.mdx b/website/content/docs/configuration/events/overview.mdx index fb7182217..2f3c43f3f 100644 --- a/website/content/docs/configuration/events/overview.mdx +++ b/website/content/docs/configuration/events/overview.mdx @@ -27,7 +27,8 @@ events { event_types = ["observation"] format = "cloudevents-json" file { - file_name = "file-name" + path = "/var/log/boundary" + file_name = "events.ndjson" } } }