From f8aacb51622503637042aec26121105500d58fd2 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Fri, 25 Aug 2023 14:06:08 -0400 Subject: [PATCH 01/11] chore(config, docs): Replace 'vector.toml' with 'vector.yaml' --- Cargo.toml | 3 +- config/vector.yaml | 47 +++++++++++++++++++ distribution/docker/README.md | 4 +- distribution/docker/alpine/Dockerfile | 2 +- .../docker/distroless-static/Dockerfile | 2 +- distribution/init.d/vector | 2 +- distribution/install.sh | 2 +- distribution/rpm/vector.spec | 2 +- rfcs/2021-07-19-8216-multiple-pipelines.md | 2 +- rfcs/2021-10-12-9568-automatic-namespacing.md | 2 +- src/cli.rs | 2 +- src/config/cmd.rs | 2 +- src/config/loading/mod.rs | 2 +- src/graph.rs | 2 +- src/unit_test.rs | 2 +- src/validate.rs | 2 +- website/content/en/_index.md | 2 +- .../en/docs/administration/management.md | 4 +- .../en/docs/administration/validating.md | 4 +- .../en/docs/reference/configuration/_index.md | 4 +- .../reference/configuration/unit-tests.md | 2 +- .../installation/manual/from-archives.md | 10 ++-- .../setup/installation/manual/from-source.md | 4 +- .../setup/installation/platforms/docker.md | 2 +- .../en/guides/level-up/transformation.md | 2 +- .../en/guides/level-up/troubleshooting.md | 6 +-- .../administration/interfaces/docker_cli.cue | 2 +- website/cue/reference/cli.cue | 10 ++-- website/cue/reference/components/sinks.cue | 2 +- website/cue/reference/configuration.cue | 2 +- website/cue/reference/urls.cue | 2 +- 31 files changed, 93 insertions(+), 45 deletions(-) create mode 100644 config/vector.yaml diff --git a/Cargo.toml b/Cargo.toml index e8cc2e7844172..7594e67d71aee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,9 +48,10 @@ debug = true name = "vector" section = "admin" maintainer-scripts = "distribution/debian/scripts/" +conf-files = ["/etc/vector/vector.yaml", "/etc/default/vector"] assets = [ ["target/release/vector", "/usr/bin/", "755"], - ["config/vector.toml", "/etc/vector/vector.toml", "644"], + ["config/vector.yaml", "/etc/vector/vector.yaml", "644"], ["config/examples/*", "/etc/vector/examples/", "644"], ["distribution/systemd/vector.service", "/lib/systemd/system/vector.service", "644"], ["distribution/systemd/vector.default", "/etc/default/vector", "600"], diff --git a/config/vector.yaml b/config/vector.yaml new file mode 100644 index 0000000000000..6e83ddf5332a4 --- /dev/null +++ b/config/vector.yaml @@ -0,0 +1,47 @@ +# __ __ __ +# \ \ / / / / +# \ V / / / +# \_/ \/ +# +# V E C T O R +# Configuration +# +# ------------------------------------------------------------------------------ +# Website: https://vector.dev +# Docs: https://vector.dev/docs +# Chat: https://chat.vector.dev +# ------------------------------------------------------------------------------ + +# Change this to use a non-default directory for Vector data storage: +# data_dir = "/var/lib/vector" + +# Random Syslog-formatted logs +sources: + dummy_logs: + type: "demo_logs" + format: "syslog" + interval: 1 + +# Parse Syslog logs +# See the Vector Remap Language reference for more info: https://vrl.dev +transforms: + parse_logs: + type: "remap" + inputs: ["dummy_logs"] + source: | + . = parse_syslog!(string!(.message)) + +# Print parsed logs to stdout +sinks: + print: + type: "console" + inputs: ["parse_logs"] + encoding: + codec: "json" + +# Vector's GraphQL API (disabled by default) +# Uncomment to try it out with the `vector top` command or +# in your browser at http://localhost:8686 +# api: +# enabled: true +# address: "127.0.0.1:8686" diff --git a/distribution/docker/README.md b/distribution/docker/README.md index fd445a43cd499..249e76c43b2df 100644 --- a/distribution/docker/README.md +++ b/distribution/docker/README.md @@ -36,7 +36,7 @@ observability data with Vector. As shown above, you can pass a custom [Vector configuration file][docs.setup.configuration] via the `-c` flag. You'll want to do this since the -[default `/etc/vector/vector.toml` configuration file][urls.default_configuration] +[default `/etc/vector/vector.yaml` configuration file][urls.default_configuration] doesn't do anything. ## Deploying @@ -128,7 +128,7 @@ Vector's Docker source files are located [docs.transforms]: https://vector.dev/docs/reference/transforms/ [pages.index#correctness]: https://vector.dev/#correctness [pages.index#performance]: https://vector.dev/#performance -[urls.default_configuration]: https://github.com/vectordotdev/vector/blob/master/config/vector.toml +[urls.default_configuration]: https://github.com/vectordotdev/vector/blob/master/config/vector.yaml [urls.docker_alpine]: https://hub.docker.com/_/alpine [urls.docker_debian]: https://hub.docker.com/_/debian [urls.rust]: https://www.rust-lang.org/ diff --git a/distribution/docker/alpine/Dockerfile b/distribution/docker/alpine/Dockerfile index c749e9fc0540a..cca2d5cb75272 100644 --- a/distribution/docker/alpine/Dockerfile +++ b/distribution/docker/alpine/Dockerfile @@ -13,7 +13,7 @@ FROM docker.io/alpine:3.18 RUN apk --no-cache add ca-certificates tzdata COPY --from=builder /vector/bin/* /usr/local/bin/ -COPY --from=builder /vector/config/vector.toml /etc/vector/vector.toml +COPY --from=builder /vector/config/vector.yaml /etc/vector/vector.yaml COPY --from=builder /var/lib/vector /var/lib/vector # Smoke test diff --git a/distribution/docker/distroless-static/Dockerfile b/distribution/docker/distroless-static/Dockerfile index 280c7d6be25d0..882b728f5dcb3 100644 --- a/distribution/docker/distroless-static/Dockerfile +++ b/distribution/docker/distroless-static/Dockerfile @@ -12,7 +12,7 @@ RUN mkdir -p /var/lib/vector FROM gcr.io/distroless/static:latest COPY --from=builder /vector/bin/* /usr/local/bin/ -COPY --from=builder /vector/config/vector.toml /etc/vector/vector.toml +COPY --from=builder /vector/config/vector.yaml /etc/vector/vector.yaml COPY --from=builder /var/lib/vector /var/lib/vector # Smoke test diff --git a/distribution/init.d/vector b/distribution/init.d/vector index 81f48df7be68b..2aeb28b640822 100644 --- a/distribution/init.d/vector +++ b/distribution/init.d/vector @@ -4,7 +4,7 @@ # # description: A lightweight and ultra-fast tool for building observability pipelines # processname: vector -# config: /etc/vector/vector.toml +# config: /etc/vector/vector.yaml # pidfile: /var/run/vector.pid ### BEGIN INIT INFO diff --git a/distribution/install.sh b/distribution/install.sh index 52833b896775d..6dbee0190ae83 100755 --- a/distribution/install.sh +++ b/distribution/install.sh @@ -224,7 +224,7 @@ install_from_archive() { printf "%s Install succeeded! 🚀\n" "$_prompt" printf "%s To start Vector:\n" "$_prompt" printf "\n" - printf "%s vector --config $prefix/config/vector.toml\n" "$_indent" + printf "%s vector --config $prefix/config/vector.yaml\n" "$_indent" printf "\n" printf "%s More information at https://vector.dev/docs/\n" "$_prompt" diff --git a/distribution/rpm/vector.spec b/distribution/rpm/vector.spec index 3a895ace15f21..82cd7f09cfad8 100644 --- a/distribution/rpm/vector.spec +++ b/distribution/rpm/vector.spec @@ -56,7 +56,7 @@ mkdir -p %{buildroot}%{_datadir}/%{_name} mkdir -p %{buildroot}%{_unitdir} cp -a %{_builddir}/bin/vector %{buildroot}%{_bindir} -cp -a %{_builddir}/config/vector.toml %{buildroot}%{_sysconfdir}/%{_name}/vector.toml +cp -a %{_builddir}/config/vector.yaml %{buildroot}%{_sysconfdir}/%{_name}/vector.toml cp -a %{_builddir}/config/examples/. %{buildroot}%{_sysconfdir}/%{_name}/examples cp -a %{_builddir}/systemd/vector.service %{buildroot}%{_unitdir}/vector.service cp -a %{_builddir}/systemd/vector.default %{buildroot}%{_sysconfdir}/default/vector diff --git a/rfcs/2021-07-19-8216-multiple-pipelines.md b/rfcs/2021-07-19-8216-multiple-pipelines.md index a628fe1843e08..4e25a74d0a57f 100644 --- a/rfcs/2021-07-19-8216-multiple-pipelines.md +++ b/rfcs/2021-07-19-8216-multiple-pipelines.md @@ -112,7 +112,7 @@ The components coming from the pipeline will be cloned inside the final `Config` For example, the following configuration and pipeline, and its **equivalent** once built. ```toml -# /etc/vector/vector.toml +# /etc/vector/vector.yaml [sources.in] # ... diff --git a/rfcs/2021-10-12-9568-automatic-namespacing.md b/rfcs/2021-10-12-9568-automatic-namespacing.md index c8471558dd820..d9ece9bc4d43c 100644 --- a/rfcs/2021-10-12-9568-automatic-namespacing.md +++ b/rfcs/2021-10-12-9568-automatic-namespacing.md @@ -37,7 +37,7 @@ To solve for above, we'd like to introduce implicit configuration namespacing ba - When loading Vector's configuration using `--config-dir` (let say `--config-dir /etc/vector`), it will look in every subfolder for any component configuration file, with their filenames being their component ID. ```toml -# /etc/vector/vector.toml +# /etc/vector/vector.yaml [sinks.foo] type = "anything" ``` diff --git a/src/cli.rs b/src/cli.rs index 6d21421d2a1c1..06640508a1a6b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -63,7 +63,7 @@ pub struct RootOpts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. /// If zero files are specified the default config path - /// `/etc/vector/vector.toml` will be targeted. + /// `/etc/vector/vector.yaml` will be targeted. #[arg( id = "config", short, diff --git a/src/config/cmd.rs b/src/config/cmd.rs index 078426cbe7bf2..d29d1e703246c 100644 --- a/src/config/cmd.rs +++ b/src/config/cmd.rs @@ -21,7 +21,7 @@ pub struct Opts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. /// If zero files are specified the default config path - /// `/etc/vector/vector.toml` will be targeted. + /// `/etc/vector/vector.yaml` will be targeted. #[arg( id = "config", short, diff --git a/src/config/loading/mod.rs b/src/config/loading/mod.rs index 731099710fdae..b01fe80f414f3 100644 --- a/src/config/loading/mod.rs +++ b/src/config/loading/mod.rs @@ -307,7 +307,7 @@ where #[cfg(not(windows))] fn default_config_paths() -> Vec { vec![ConfigPath::File( - "/etc/vector/vector.toml".into(), + "/etc/vector/vector.yaml".into(), Some(Format::Toml), )] } diff --git a/src/graph.rs b/src/graph.rs index e2cfd8ceef568..cf5f009b3a8f2 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -11,7 +11,7 @@ pub struct Opts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. /// If zero files are specified the default config path - /// `/etc/vector/vector.toml` will be targeted. + /// `/etc/vector/vector.yaml` will be targeted. #[arg( id = "config", short, diff --git a/src/unit_test.rs b/src/unit_test.rs index fe675f6fb88ae..9e3f9416ef1b4 100644 --- a/src/unit_test.rs +++ b/src/unit_test.rs @@ -23,7 +23,7 @@ pub struct Opts { paths_yaml: Vec, /// Any number of Vector config files to test. If none are specified the - /// default config path `/etc/vector/vector.toml` will be targeted. + /// default config path `/etc/vector/vector.yaml` will be targeted. #[arg(value_delimiter(','))] paths: Vec, diff --git a/src/validate.rs b/src/validate.rs index 5800db5355b79..cc3898fe3036a 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -53,7 +53,7 @@ pub struct Opts { /// Any number of Vector config files to validate. /// Format is detected from the file name. - /// If none are specified the default config path `/etc/vector/vector.toml` + /// If none are specified the default config path `/etc/vector/vector.yaml` /// will be targeted. #[arg(env = "VECTOR_CONFIG", value_delimiter(','))] pub paths: Vec, diff --git a/website/content/en/_index.md b/website/content/en/_index.md index bbe3d02dc2258..a8cbdb0512887 100644 --- a/website/content/en/_index.md +++ b/website/content/en/_index.md @@ -45,7 +45,7 @@ platform: configure: title: "Easy to configure" description: "A simple, composable format enables you to build flexible pipelines" - filename: "/etc/vector/vector.toml" + filename: "/etc/vector/vector.yaml" below: "Configuration examples are in [TOML](https://toml.io) but Vector also supports [YAML](https://yaml.org) and [JSON](https://json.org)" # Example configs are specified in cue/examples.cue diff --git a/website/content/en/docs/administration/management.md b/website/content/en/docs/administration/management.md index 8dfc2cb51953b..178f663cac4c2 100644 --- a/website/content/en/docs/administration/management.md +++ b/website/content/en/docs/administration/management.md @@ -23,7 +23,7 @@ To manage the Vector executable directly, without a process manager: {{< tab title="Start" >}} ```bash -vector --config /etc/vector/vector.toml +vector --config /etc/vector/vector.yaml # Or supply a JSON or YAML config file ``` @@ -147,7 +147,7 @@ If you're running Vector using [Docker], the command interface is the same acros ```bash docker run \ -d \ - -v ~/vector.toml:/etc/vector/vector.toml:ro \ + -v ~/vector.toml:/etc/vector/vector.yaml:ro \ -p 8686:8686 \ timberio/vector:{{< version >}}-alpine ``` diff --git a/website/content/en/docs/administration/validating.md b/website/content/en/docs/administration/validating.md index 774868936bc0e..e00ae9e210cec 100644 --- a/website/content/en/docs/administration/validating.md +++ b/website/content/en/docs/administration/validating.md @@ -8,7 +8,7 @@ Vector provides a subcommand, [`validate`][validate], that checks the validity o Here's an example: ```bash -vector validate /etc/vector/vector.toml +vector validate /etc/vector/vector.yaml ``` You can also check multiple files: @@ -52,7 +52,7 @@ configured topology: These environment checks can be disabled using the [`--no-environment`][no_environment] flag: ```bash -vector validate --no-environment /etc/vector/vector.toml +vector validate --no-environment /etc/vector/vector.yaml ``` [components]: /components diff --git a/website/content/en/docs/reference/configuration/_index.md b/website/content/en/docs/reference/configuration/_index.md index 285bb6f7a875d..90c60bed02c00 100644 --- a/website/content/en/docs/reference/configuration/_index.md +++ b/website/content/en/docs/reference/configuration/_index.md @@ -213,7 +213,7 @@ vector --config /etc/vector/vector.yaml {{< tab title="TOML" >}} ```shell -vector --config /etc/vector/vector.toml +vector --config /etc/vector/vector.yaml ``` {{< /tab >}} @@ -295,7 +295,7 @@ data templating languages such as [ytt], [Jsonnet] and [Cue]. The location of your Vector configuration file depends on your installation method. For most Linux-based systems, the file can be found at -`/etc/vector/vector.toml`. +`/etc/vector/vector.yaml`. ### Multiple files diff --git a/website/content/en/docs/reference/configuration/unit-tests.md b/website/content/en/docs/reference/configuration/unit-tests.md index 80f37ffc3fa6e..3a292058bca56 100644 --- a/website/content/en/docs/reference/configuration/unit-tests.md +++ b/website/content/en/docs/reference/configuration/unit-tests.md @@ -28,7 +28,7 @@ You can execute tests within a [configuration](#configuring) file using Vector's [`test`][vector_test] subcommand: ```bash -vector test /etc/vector/vector.toml +vector test /etc/vector/vector.yaml ``` You can also specify multiple configuration files to test: diff --git a/website/content/en/docs/setup/installation/manual/from-archives.md b/website/content/en/docs/setup/installation/manual/from-archives.md index 0c6c9b00a81e5..841e778ef8b93 100644 --- a/website/content/en/docs/setup/installation/manual/from-archives.md +++ b/website/content/en/docs/setup/installation/manual/from-archives.md @@ -44,7 +44,7 @@ source $HOME/.profile Start Vector: ```shell -vector --config config/vector.toml +vector --config config/vector.yaml ``` ### Linux (ARMv7) @@ -79,7 +79,7 @@ source $HOME/.profile Start Vector: ```shell -vector --config config/vector.toml +vector --config config/vector.yaml ``` ### macoS (x86_64) @@ -114,7 +114,7 @@ source $HOME/.profile Start Vector: ```shell -vector --config config/vector.toml +vector --config config/vector.yaml ``` ### Windows (x86_64) @@ -180,7 +180,7 @@ source $HOME/.profile Start Vector: ```shell -vector --config config/vector.toml +vector --config config/vector.yaml ``` ## Next steps @@ -190,7 +190,7 @@ vector --config config/vector.toml The Vector configuration file is located at: ```shell -config/vector.toml +config/vector.yaml ``` Example configurations are located in `config/vector/examples/*`. You can learn more about configuring Vector in the [Configuration] documentation. diff --git a/website/content/en/docs/setup/installation/manual/from-source.md b/website/content/en/docs/setup/installation/manual/from-source.md index 8a59b9a602ca3..c1c2b27efae25 100644 --- a/website/content/en/docs/setup/installation/manual/from-source.md +++ b/website/content/en/docs/setup/installation/manual/from-source.md @@ -59,7 +59,7 @@ When finished, the Vector binary is placed in `target//release/vector`. Finally, you can start Vector: ```shell -target//release/vector --config config/vector.toml +target//release/vector --config config/vector.yaml ``` ### Windows @@ -146,7 +146,7 @@ The command above builds a Docker image with a Rust toolchain for a Linux target The Vector configuration file is located at: ```shell -config/vector.toml +config/vector.yaml ``` Example configurations are located in `config/vector/examples/*`. You can learn more about configuring Vector in the [Configuration] documentation. diff --git a/website/content/en/docs/setup/installation/platforms/docker.md b/website/content/en/docs/setup/installation/platforms/docker.md index 8028886063e23..e2fe62b28df81 100644 --- a/website/content/en/docs/setup/installation/platforms/docker.md +++ b/website/content/en/docs/setup/installation/platforms/docker.md @@ -59,7 +59,7 @@ EOF ```shell docker run \ -d \ - -v $PWD/vector.toml:/etc/vector/vector.toml:ro \ + -v $PWD/vector.toml:/etc/vector/vector.yaml:ro \ -p 8686:8686 \ timberio/vector:{{< version >}}-debian ``` diff --git a/website/content/en/guides/level-up/transformation.md b/website/content/en/guides/level-up/transformation.md index 643c10170868a..366188d22d8f9 100644 --- a/website/content/en/guides/level-up/transformation.md +++ b/website/content/en/guides/level-up/transformation.md @@ -86,7 +86,7 @@ supports JSON and YAML. To start Vector using this topology: ```bash -vector --config-toml /etc/vector/vector.toml +vector --config-toml /etc/vector/vector.yaml ``` You should see lines like this emitted via stdout (formatted for readability diff --git a/website/content/en/guides/level-up/troubleshooting.md b/website/content/en/guides/level-up/troubleshooting.md index 732ab910d7167..2853179d3ca8f 100644 --- a/website/content/en/guides/level-up/troubleshooting.md +++ b/website/content/en/guides/level-up/troubleshooting.md @@ -75,7 +75,7 @@ If you see an exception in Vector's logs then we've clearly found the issue. Before you report a bug, please enable backtraces: ```bash -RUST_BACKTRACE=full vector --config=/etc/vector/vector.toml +RUST_BACKTRACE=full vector --config=/etc/vector/vector.yaml ``` Backtraces are _critical_ for debugging errors. Once you have the backtrace @@ -95,14 +95,14 @@ Vector rate limits logs in the hot path. As a result, dropping to the {{< tab title="Env Var" >}} ```shell -VECTOR_LOG=debug vector --config=/etc/vector/vector.toml +VECTOR_LOG=debug vector --config=/etc/vector/vector.yaml ``` {{< /tab >}} {{< tab title="Flag" >}} ```bash -vector --verbose --config=/etc/vector/vector.toml +vector --verbose --config=/etc/vector/vector.yaml ``` {{< /tab >}} diff --git a/website/cue/reference/administration/interfaces/docker_cli.cue b/website/cue/reference/administration/interfaces/docker_cli.cue index f3a41f2571675..f46e36007fb3d 100644 --- a/website/cue/reference/administration/interfaces/docker_cli.cue +++ b/website/cue/reference/administration/interfaces/docker_cli.cue @@ -30,7 +30,7 @@ administration: interfaces: docker_cli: { start: #""" docker run \ -d \ - -v \#(paths.config):/etc/vector/vector.toml:ro \ + -v \#(paths.config):/etc/vector/vector.yaml:ro \ -p \#(_api_port):\#(_api_port) \{flags} timberio/vector:{version}-{variant} """# diff --git a/website/cue/reference/cli.cue b/website/cue/reference/cli.cue index eb9072083449d..c8b37f629fff0 100644 --- a/website/cue/reference/cli.cue +++ b/website/cue/reference/cli.cue @@ -281,7 +281,7 @@ cli: { paths: _paths_arg & { description: """ Any number of Vector config files to test. If none are specified - the default config path `/etc/vector/vector.toml` will be targeted + the default config path `/etc/vector/vector.yaml` will be targeted """ } } @@ -443,7 +443,7 @@ cli: { paths: _paths_arg & { description: """ Any number of Vector config files to validate. If none are specified - the default config path `/etc/vector/vector.toml` will be targeted + the default config path `/etc/vector/vector.yaml` will be targeted """ } } @@ -535,13 +535,13 @@ cli: { VECTOR_CONFIG: { description: """ Read configuration from one or more files. Wildcard paths are supported. If no files are - specified the default config path `/etc/vector/vector.toml` is targeted. TOML, YAML and + specified the default config path `/etc/vector/vector.yaml` is targeted. TOML, YAML and JSON file formats are supported. The format to interpret the file with is determined from the file extension (`.yaml`, `.toml`, `.json`). Vector falls back to YAML if it can't detect a supported format. """ type: string: { - default: "/etc/vector/vector.toml" + default: "/etc/vector/vector.yaml" } } VECTOR_CONFIG_DIR: { @@ -649,6 +649,6 @@ cli: { // Helpers _paths_arg: { type: "list" - default: "/etc/vector/vector.toml" + default: "/etc/vector/vector.yaml" } } diff --git a/website/cue/reference/components/sinks.cue b/website/cue/reference/components/sinks.cue index 6223a396b3859..2b313dd14a2e4 100644 --- a/website/cue/reference/components/sinks.cue +++ b/website/cue/reference/components/sinks.cue @@ -559,7 +559,7 @@ components: sinks: [Name=string]: { `--require-healthy` flag: ```bash - vector --config /etc/vector/vector.toml --require-healthy + vector --config /etc/vector/vector.yaml --require-healthy ``` """ }, diff --git a/website/cue/reference/configuration.cue b/website/cue/reference/configuration.cue index cb501633edb63..83a64684bbb96 100644 --- a/website/cue/reference/configuration.cue +++ b/website/cue/reference/configuration.cue @@ -711,7 +711,7 @@ configuration: { title: "Location" body: """ The location of your Vector configuration file depends on your installation method. For most Linux - based systems, the file can be found at `/etc/vector/vector.toml`. + based systems, the file can be found at `/etc/vector/vector.yaml`. All files in `/etc/vector` are user configuration files and can be safely overridden to craft your desired Vector configuration. diff --git a/website/cue/reference/urls.cue b/website/cue/reference/urls.cue index 6528af723cfd3..059f7dff61dd1 100644 --- a/website/cue/reference/urls.cue +++ b/website/cue/reference/urls.cue @@ -143,7 +143,7 @@ urls: { date: "https://man7.org/linux/man-pages/man1/date.1.html" debian: "https://www.debian.org/" debian_system_groups: "https://wiki.debian.org/SystemGroups" - default_configuration: "\(vector_repo)/blob/master/config/vector.toml" + default_configuration: "\(vector_repo)/blob/master/config/vector.yaml" dnstap: "http://dnstap.info/" docker: "https://www.docker.com/" docker_alpine: "\(docker_hub)/_/alpine" From 678c20ff0f5a39e67f5b2d3e8c5d8c34fbab2862 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Fri, 25 Aug 2023 15:51:08 -0400 Subject: [PATCH 02/11] keep both vector.toml and vector.yaml --- Cargo.toml | 3 ++- distribution/docker/alpine/Dockerfile | 1 + .../docker/distroless-static/Dockerfile | 1 + distribution/rpm/vector.spec | 3 ++- rfcs/2021-07-19-8216-multiple-pipelines.md | 2 +- rfcs/2021-10-12-9568-automatic-namespacing.md | 2 +- src/config/loading/mod.rs | 19 ++++++++++--------- .../en/docs/administration/management.md | 6 +++--- .../installation/manual/from-archives.md | 10 +++++----- .../setup/installation/manual/from-source.md | 4 ++-- website/cue/reference/urls.cue | 2 +- 11 files changed, 29 insertions(+), 24 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7594e67d71aee..737f8f528c857 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,9 +48,10 @@ debug = true name = "vector" section = "admin" maintainer-scripts = "distribution/debian/scripts/" -conf-files = ["/etc/vector/vector.yaml", "/etc/default/vector"] +conf-files = ["/etc/vector/vector.toml", "/etc/vector/vector.yaml", "/etc/default/vector"] assets = [ ["target/release/vector", "/usr/bin/", "755"], + ["config/vector.toml", "/etc/vector/vector.toml", "644"], ["config/vector.yaml", "/etc/vector/vector.yaml", "644"], ["config/examples/*", "/etc/vector/examples/", "644"], ["distribution/systemd/vector.service", "/lib/systemd/system/vector.service", "644"], diff --git a/distribution/docker/alpine/Dockerfile b/distribution/docker/alpine/Dockerfile index cca2d5cb75272..e91732fca66d0 100644 --- a/distribution/docker/alpine/Dockerfile +++ b/distribution/docker/alpine/Dockerfile @@ -13,6 +13,7 @@ FROM docker.io/alpine:3.18 RUN apk --no-cache add ca-certificates tzdata COPY --from=builder /vector/bin/* /usr/local/bin/ +COPY --from=builder /vector/config/vector.toml /etc/vector/vector.toml COPY --from=builder /vector/config/vector.yaml /etc/vector/vector.yaml COPY --from=builder /var/lib/vector /var/lib/vector diff --git a/distribution/docker/distroless-static/Dockerfile b/distribution/docker/distroless-static/Dockerfile index 882b728f5dcb3..b76494f3ced1e 100644 --- a/distribution/docker/distroless-static/Dockerfile +++ b/distribution/docker/distroless-static/Dockerfile @@ -12,6 +12,7 @@ RUN mkdir -p /var/lib/vector FROM gcr.io/distroless/static:latest COPY --from=builder /vector/bin/* /usr/local/bin/ +COPY --from=builder /vector/config/vector.toml /etc/vector/vector.toml COPY --from=builder /vector/config/vector.yaml /etc/vector/vector.yaml COPY --from=builder /var/lib/vector /var/lib/vector diff --git a/distribution/rpm/vector.spec b/distribution/rpm/vector.spec index 82cd7f09cfad8..228b33034f66e 100644 --- a/distribution/rpm/vector.spec +++ b/distribution/rpm/vector.spec @@ -56,7 +56,8 @@ mkdir -p %{buildroot}%{_datadir}/%{_name} mkdir -p %{buildroot}%{_unitdir} cp -a %{_builddir}/bin/vector %{buildroot}%{_bindir} -cp -a %{_builddir}/config/vector.yaml %{buildroot}%{_sysconfdir}/%{_name}/vector.toml +cp -a %{_builddir}/config/vector.toml %{buildroot}%{_sysconfdir}/%{_name}/vector.toml +cp -a %{_builddir}/config/vector.yaml %{buildroot}%{_sysconfdir}/%{_name}/vector.yaml cp -a %{_builddir}/config/examples/. %{buildroot}%{_sysconfdir}/%{_name}/examples cp -a %{_builddir}/systemd/vector.service %{buildroot}%{_unitdir}/vector.service cp -a %{_builddir}/systemd/vector.default %{buildroot}%{_sysconfdir}/default/vector diff --git a/rfcs/2021-07-19-8216-multiple-pipelines.md b/rfcs/2021-07-19-8216-multiple-pipelines.md index 4e25a74d0a57f..a628fe1843e08 100644 --- a/rfcs/2021-07-19-8216-multiple-pipelines.md +++ b/rfcs/2021-07-19-8216-multiple-pipelines.md @@ -112,7 +112,7 @@ The components coming from the pipeline will be cloned inside the final `Config` For example, the following configuration and pipeline, and its **equivalent** once built. ```toml -# /etc/vector/vector.yaml +# /etc/vector/vector.toml [sources.in] # ... diff --git a/rfcs/2021-10-12-9568-automatic-namespacing.md b/rfcs/2021-10-12-9568-automatic-namespacing.md index d9ece9bc4d43c..c8471558dd820 100644 --- a/rfcs/2021-10-12-9568-automatic-namespacing.md +++ b/rfcs/2021-10-12-9568-automatic-namespacing.md @@ -37,7 +37,7 @@ To solve for above, we'd like to introduce implicit configuration namespacing ba - When loading Vector's configuration using `--config-dir` (let say `--config-dir /etc/vector`), it will look in every subfolder for any component configuration file, with their filenames being their component ID. ```toml -# /etc/vector/vector.yaml +# /etc/vector/vector.toml [sinks.foo] type = "anything" ``` diff --git a/src/config/loading/mod.rs b/src/config/loading/mod.rs index b01fe80f414f3..a5c41a6a7cb7d 100644 --- a/src/config/loading/mod.rs +++ b/src/config/loading/mod.rs @@ -306,21 +306,22 @@ where #[cfg(not(windows))] fn default_config_paths() -> Vec { - vec![ConfigPath::File( - "/etc/vector/vector.yaml".into(), - Some(Format::Toml), - )] + vec![ + ConfigPath::File("/etc/vector/vector.yaml".into(), Some(Format::Yaml)), + ConfigPath::File("/etc/vector/vector.toml".into(), Some(Format::Toml)), + ] } #[cfg(windows)] fn default_config_paths() -> Vec { let program_files = std::env::var("ProgramFiles").expect("%ProgramFiles% environment variable must be defined"); - let config_path = format!("{}\\Vector\\config\\vector.toml", program_files); - vec![ConfigPath::File( - PathBuf::from(config_path), - Some(Format::Toml), - )] + let toml_config_path = format!("{}\\Vector\\config\\vector.toml", program_files); + let yaml_config_path = format!("{}\\Vector\\config\\vector.yaml", program_files); + vec![ + ConfigPath::File(PathBuf::from(yaml_config_path), Some(Format::Yaml)), + ConfigPath::File(PathBuf::from(toml_config_path), Some(Format::Toml)), + ] } #[cfg(all( diff --git a/website/content/en/docs/administration/management.md b/website/content/en/docs/administration/management.md index 178f663cac4c2..735dd62ec112e 100644 --- a/website/content/en/docs/administration/management.md +++ b/website/content/en/docs/administration/management.md @@ -129,9 +129,9 @@ If you're running Vector on Windows (perhaps you installed it using [MSI]), you ```powershell C:\Program Files\Vector\bin\vector \ - --config C:\Program Files\Vector\config\vector.toml + --config C:\Program Files\Vector\config\vector.yaml -# Or supply a JSON or YAML config file +# Or supply a TOML or JSON config file ``` {{< /tab >}} @@ -147,7 +147,7 @@ If you're running Vector using [Docker], the command interface is the same acros ```bash docker run \ -d \ - -v ~/vector.toml:/etc/vector/vector.yaml:ro \ + -v ~/vector.yaml:/etc/vector/vector.yaml:ro \ -p 8686:8686 \ timberio/vector:{{< version >}}-alpine ``` diff --git a/website/content/en/docs/setup/installation/manual/from-archives.md b/website/content/en/docs/setup/installation/manual/from-archives.md index 841e778ef8b93..0c6c9b00a81e5 100644 --- a/website/content/en/docs/setup/installation/manual/from-archives.md +++ b/website/content/en/docs/setup/installation/manual/from-archives.md @@ -44,7 +44,7 @@ source $HOME/.profile Start Vector: ```shell -vector --config config/vector.yaml +vector --config config/vector.toml ``` ### Linux (ARMv7) @@ -79,7 +79,7 @@ source $HOME/.profile Start Vector: ```shell -vector --config config/vector.yaml +vector --config config/vector.toml ``` ### macoS (x86_64) @@ -114,7 +114,7 @@ source $HOME/.profile Start Vector: ```shell -vector --config config/vector.yaml +vector --config config/vector.toml ``` ### Windows (x86_64) @@ -180,7 +180,7 @@ source $HOME/.profile Start Vector: ```shell -vector --config config/vector.yaml +vector --config config/vector.toml ``` ## Next steps @@ -190,7 +190,7 @@ vector --config config/vector.yaml The Vector configuration file is located at: ```shell -config/vector.yaml +config/vector.toml ``` Example configurations are located in `config/vector/examples/*`. You can learn more about configuring Vector in the [Configuration] documentation. diff --git a/website/content/en/docs/setup/installation/manual/from-source.md b/website/content/en/docs/setup/installation/manual/from-source.md index c1c2b27efae25..8a59b9a602ca3 100644 --- a/website/content/en/docs/setup/installation/manual/from-source.md +++ b/website/content/en/docs/setup/installation/manual/from-source.md @@ -59,7 +59,7 @@ When finished, the Vector binary is placed in `target//release/vector`. Finally, you can start Vector: ```shell -target//release/vector --config config/vector.yaml +target//release/vector --config config/vector.toml ``` ### Windows @@ -146,7 +146,7 @@ The command above builds a Docker image with a Rust toolchain for a Linux target The Vector configuration file is located at: ```shell -config/vector.yaml +config/vector.toml ``` Example configurations are located in `config/vector/examples/*`. You can learn more about configuring Vector in the [Configuration] documentation. diff --git a/website/cue/reference/urls.cue b/website/cue/reference/urls.cue index 059f7dff61dd1..6528af723cfd3 100644 --- a/website/cue/reference/urls.cue +++ b/website/cue/reference/urls.cue @@ -143,7 +143,7 @@ urls: { date: "https://man7.org/linux/man-pages/man1/date.1.html" debian: "https://www.debian.org/" debian_system_groups: "https://wiki.debian.org/SystemGroups" - default_configuration: "\(vector_repo)/blob/master/config/vector.yaml" + default_configuration: "\(vector_repo)/blob/master/config/vector.toml" dnstap: "http://dnstap.info/" docker: "https://www.docker.com/" docker_alpine: "\(docker_hub)/_/alpine" From 2ea0e32800999101f4c3e57b3edf2ed165724d90 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Mon, 28 Aug 2023 15:44:19 -0400 Subject: [PATCH 03/11] remove vector.toml from asserts, still attempt to load it first and finally fallback to vector.yaml --- Cargo.toml | 1 - distribution/docker/alpine/Dockerfile | 1 - .../docker/distroless-static/Dockerfile | 1 - distribution/rpm/vector.spec | 1 - src/config/loading/mod.rs | 47 ++++++++++++++----- 5 files changed, 35 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 737f8f528c857..2d7df89fcba8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,6 @@ maintainer-scripts = "distribution/debian/scripts/" conf-files = ["/etc/vector/vector.toml", "/etc/vector/vector.yaml", "/etc/default/vector"] assets = [ ["target/release/vector", "/usr/bin/", "755"], - ["config/vector.toml", "/etc/vector/vector.toml", "644"], ["config/vector.yaml", "/etc/vector/vector.yaml", "644"], ["config/examples/*", "/etc/vector/examples/", "644"], ["distribution/systemd/vector.service", "/lib/systemd/system/vector.service", "644"], diff --git a/distribution/docker/alpine/Dockerfile b/distribution/docker/alpine/Dockerfile index e91732fca66d0..cca2d5cb75272 100644 --- a/distribution/docker/alpine/Dockerfile +++ b/distribution/docker/alpine/Dockerfile @@ -13,7 +13,6 @@ FROM docker.io/alpine:3.18 RUN apk --no-cache add ca-certificates tzdata COPY --from=builder /vector/bin/* /usr/local/bin/ -COPY --from=builder /vector/config/vector.toml /etc/vector/vector.toml COPY --from=builder /vector/config/vector.yaml /etc/vector/vector.yaml COPY --from=builder /var/lib/vector /var/lib/vector diff --git a/distribution/docker/distroless-static/Dockerfile b/distribution/docker/distroless-static/Dockerfile index b76494f3ced1e..882b728f5dcb3 100644 --- a/distribution/docker/distroless-static/Dockerfile +++ b/distribution/docker/distroless-static/Dockerfile @@ -12,7 +12,6 @@ RUN mkdir -p /var/lib/vector FROM gcr.io/distroless/static:latest COPY --from=builder /vector/bin/* /usr/local/bin/ -COPY --from=builder /vector/config/vector.toml /etc/vector/vector.toml COPY --from=builder /vector/config/vector.yaml /etc/vector/vector.yaml COPY --from=builder /var/lib/vector /var/lib/vector diff --git a/distribution/rpm/vector.spec b/distribution/rpm/vector.spec index 228b33034f66e..8373c4ebc6ff2 100644 --- a/distribution/rpm/vector.spec +++ b/distribution/rpm/vector.spec @@ -56,7 +56,6 @@ mkdir -p %{buildroot}%{_datadir}/%{_name} mkdir -p %{buildroot}%{_unitdir} cp -a %{_builddir}/bin/vector %{buildroot}%{_bindir} -cp -a %{_builddir}/config/vector.toml %{buildroot}%{_sysconfdir}/%{_name}/vector.toml cp -a %{_builddir}/config/vector.yaml %{buildroot}%{_sysconfdir}/%{_name}/vector.yaml cp -a %{_builddir}/config/examples/. %{buildroot}%{_sysconfdir}/%{_name}/examples cp -a %{_builddir}/systemd/vector.service %{buildroot}%{_unitdir}/vector.service diff --git a/src/config/loading/mod.rs b/src/config/loading/mod.rs index a5c41a6a7cb7d..e66fe579d4515 100644 --- a/src/config/loading/mod.rs +++ b/src/config/loading/mod.rs @@ -305,23 +305,46 @@ where } #[cfg(not(windows))] -fn default_config_paths() -> Vec { - vec![ - ConfigPath::File("/etc/vector/vector.yaml".into(), Some(Format::Yaml)), - ConfigPath::File("/etc/vector/vector.toml".into(), Some(Format::Toml)), - ] +fn default_path() -> PathBuf { + "/etc/vector/vector.toml".into() } #[cfg(windows)] -fn default_config_paths() -> Vec { +fn default_path() -> PathBuf { let program_files = std::env::var("ProgramFiles").expect("%ProgramFiles% environment variable must be defined"); - let toml_config_path = format!("{}\\Vector\\config\\vector.toml", program_files); - let yaml_config_path = format!("{}\\Vector\\config\\vector.yaml", program_files); - vec![ - ConfigPath::File(PathBuf::from(yaml_config_path), Some(Format::Yaml)), - ConfigPath::File(PathBuf::from(toml_config_path), Some(Format::Toml)), - ] + format!("{}\\Vector\\config\\vector.toml", program_files).into() +} + +fn default_config_paths() -> Vec { + #[cfg(not(windows))] + let default_path = default_path(); + + #[cfg(windows)] + let default_path = default_path(); + + let yaml_path = default_path.with_extension("yaml"); + if default_path.exists() { + warn!("Using the deprecated {:?} config path as the default config location. Vector is migrating to YAML as the \ + default config format. Future Vector versions will use {:?} as the default config location.", + default_path, + yaml_path); + + vec![ConfigPath::File( + PathBuf::from(default_path), + Some(Format::Toml), + )] + } else { + warn!( + "The {:?} config path does not exist. Vector will attempt to use new default {:?} instead.", + default_path, yaml_path + ); + + vec![ConfigPath::File( + PathBuf::from(yaml_path), + Some(Format::Yaml), + )] + } } #[cfg(all( From ef427b99c24a55bc74f3c27b0386673db4fe1642 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Mon, 28 Aug 2023 15:47:21 -0400 Subject: [PATCH 04/11] update conf-files and docs as well --- Cargo.toml | 2 +- src/cli.rs | 4 +++- src/config/cmd.rs | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2d7df89fcba8d..7594e67d71aee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ debug = true name = "vector" section = "admin" maintainer-scripts = "distribution/debian/scripts/" -conf-files = ["/etc/vector/vector.toml", "/etc/vector/vector.yaml", "/etc/default/vector"] +conf-files = ["/etc/vector/vector.yaml", "/etc/default/vector"] assets = [ ["target/release/vector", "/usr/bin/", "755"], ["config/vector.yaml", "/etc/vector/vector.yaml", "644"], diff --git a/src/cli.rs b/src/cli.rs index 06640508a1a6b..3ebe44ddec90c 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -63,7 +63,9 @@ pub struct RootOpts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. /// If zero files are specified the default config path - /// `/etc/vector/vector.yaml` will be targeted. + /// `/etc/vector/vector.toml` will be targeted. + /// And if the aforementioned file does not exist, + /// then `/etc/vector/vector.yaml` will be used. #[arg( id = "config", short, diff --git a/src/config/cmd.rs b/src/config/cmd.rs index d29d1e703246c..62c607ece6269 100644 --- a/src/config/cmd.rs +++ b/src/config/cmd.rs @@ -21,7 +21,9 @@ pub struct Opts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. /// If zero files are specified the default config path - /// `/etc/vector/vector.yaml` will be targeted. + /// `/etc/vector/vector.toml` will be targeted. + /// And if the aforementioned file does not exist, + /// then `/etc/vector/vector.yaml` will be used. #[arg( id = "config", short, From f2d6374d93241866246d50286d2e60cf44e3066f Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Mon, 28 Aug 2023 16:08:54 -0400 Subject: [PATCH 05/11] clippy fixes --- src/config/loading/mod.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/config/loading/mod.rs b/src/config/loading/mod.rs index e66fe579d4515..b7925e92b610b 100644 --- a/src/config/loading/mod.rs +++ b/src/config/loading/mod.rs @@ -330,20 +330,14 @@ fn default_config_paths() -> Vec { default_path, yaml_path); - vec![ConfigPath::File( - PathBuf::from(default_path), - Some(Format::Toml), - )] + vec![ConfigPath::File(default_path, Some(Format::Toml))] } else { warn!( "The {:?} config path does not exist. Vector will attempt to use new default {:?} instead.", default_path, yaml_path ); - vec![ConfigPath::File( - PathBuf::from(yaml_path), - Some(Format::Yaml), - )] + vec![ConfigPath::File(yaml_path, Some(Format::Yaml))] } } From 70a23a9e8b50b648ac4de6d6f98938ef9d923b5a Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Wed, 6 Sep 2023 10:09:27 -0400 Subject: [PATCH 06/11] Update src/cli.rs Co-authored-by: Jesse Szwedko --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 3ebe44ddec90c..d6d655e47f148 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -62,7 +62,7 @@ impl Opts { pub struct RootOpts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. - /// If zero files are specified the default config path + /// If zero files are specified the deprecated default config path /// `/etc/vector/vector.toml` will be targeted. /// And if the aforementioned file does not exist, /// then `/etc/vector/vector.yaml` will be used. From 7f344c28b898e2f5cfbde705aa2da995a12df59d Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Wed, 6 Sep 2023 10:09:35 -0400 Subject: [PATCH 07/11] Update src/config/cmd.rs Co-authored-by: Jesse Szwedko --- src/config/cmd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/cmd.rs b/src/config/cmd.rs index 62c607ece6269..f3c3104cfe5e8 100644 --- a/src/config/cmd.rs +++ b/src/config/cmd.rs @@ -20,7 +20,7 @@ pub struct Opts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. - /// If zero files are specified the default config path + /// If zero files are specified the deprecated default config path /// `/etc/vector/vector.toml` will be targeted. /// And if the aforementioned file does not exist, /// then `/etc/vector/vector.yaml` will be used. From 34eb5bb66474c5f9c8bfcd6a6e8a8f37c2b6f6bc Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Wed, 6 Sep 2023 12:23:31 -0400 Subject: [PATCH 08/11] address Jesse's review points --- src/config/loading/mod.rs | 4 +-- src/validate.rs | 5 ++-- .../2023-09-06-0-33-0-upgrade-guide.md | 26 +++++++++++++++++++ website/cue/reference/configuration.cue | 3 ++- 4 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 website/content/en/highlights/2023-09-06-0-33-0-upgrade-guide.md diff --git a/src/config/loading/mod.rs b/src/config/loading/mod.rs index b7925e92b610b..7bd8d27624afd 100644 --- a/src/config/loading/mod.rs +++ b/src/config/loading/mod.rs @@ -325,8 +325,8 @@ fn default_config_paths() -> Vec { let yaml_path = default_path.with_extension("yaml"); if default_path.exists() { - warn!("Using the deprecated {:?} config path as the default config location. Vector is migrating to YAML as the \ - default config format. Future Vector versions will use {:?} as the default config location.", + warn!("DEPRECATED Using the deprecated {:?} config path as the default config location. Vector is migrating \ + to YAML as the default config format. Future Vector versions will use {:?} as the default config location.", default_path, yaml_path); diff --git a/src/validate.rs b/src/validate.rs index cc3898fe3036a..121b8a161a813 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -53,8 +53,9 @@ pub struct Opts { /// Any number of Vector config files to validate. /// Format is detected from the file name. - /// If none are specified the default config path `/etc/vector/vector.yaml` - /// will be targeted. + /// If none are specified the default config path `/etc/vector/vector.toml` + /// will be targeted. And if the aforementioned file does not exist, + // then `/etc/vector/vector.yaml` will be used. #[arg(env = "VECTOR_CONFIG", value_delimiter(','))] pub paths: Vec, diff --git a/website/content/en/highlights/2023-09-06-0-33-0-upgrade-guide.md b/website/content/en/highlights/2023-09-06-0-33-0-upgrade-guide.md new file mode 100644 index 0000000000000..e1b7009209440 --- /dev/null +++ b/website/content/en/highlights/2023-09-06-0-33-0-upgrade-guide.md @@ -0,0 +1,26 @@ +--- +date: "2023-09-06" +title: "0.33 Upgrade Guide" +description: "An upgrade guide that addresses breaking changes in 0.33.0" +authors: ["pront"] +release: "0.33.0" +hide_on_release_notes: false +badges: + type: breaking change +--- + +Vector's 0.33.0 release includes **deprecations**: + +1. [Default config location change](#default-config-location-change) + +We cover them below to help you upgrade quickly: + +## Upgrade guide + +### Deprecations + +#### Default config location change {#default-config-location-change} + +The default config location `/etc/vector/vector.toml` which is used by Vector `0.32.0` is now deprecated. This location will still be used in `0.33.0`. The new default path is `/etc/vector/vector.yaml`, please migrate to this new default path or specify the config path explicitly. + +Vector `0.33.0` will attempt to load `/etc/vector/vector.toml` first, and if it is not present, it will fallback to `/etc/vector/vector.yaml`. However, Vector release `0.34.0` will automatically load `/etc/vector/vector.yaml` only. diff --git a/website/cue/reference/configuration.cue b/website/cue/reference/configuration.cue index 83a64684bbb96..c93b155256803 100644 --- a/website/cue/reference/configuration.cue +++ b/website/cue/reference/configuration.cue @@ -711,7 +711,8 @@ configuration: { title: "Location" body: """ The location of your Vector configuration file depends on your installation method. For most Linux - based systems, the file can be found at `/etc/vector/vector.yaml`. + based systems, the file can be found at `/etc/vector/vector.toml`. And if the aforementioned file does + not exist, then `/etc/vector/vector.yaml` will be used. All files in `/etc/vector` are user configuration files and can be safely overridden to craft your desired Vector configuration. From 3f7532906f2d2caf3772877767510044dff1483e Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Wed, 6 Sep 2023 12:37:30 -0400 Subject: [PATCH 09/11] add 'pront' to dictionary --- .github/actions/spelling/allow.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt index 9a11826b00bef..360f67b173aed 100644 --- a/.github/actions/spelling/allow.txt +++ b/.github/actions/spelling/allow.txt @@ -148,6 +148,7 @@ Podcast Podkicker Positivo Prestigio +pront Proscan Qmobilevn RPZ From 8ef64bfd1f78c697da3d075c041cd5e89938eda6 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Wed, 6 Sep 2023 13:42:33 -0400 Subject: [PATCH 10/11] small fixes --- website/content/en/docs/setup/installation/platforms/docker.md | 2 +- website/content/en/guides/level-up/transformation.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/en/docs/setup/installation/platforms/docker.md b/website/content/en/docs/setup/installation/platforms/docker.md index e2fe62b28df81..dea01371a7fb5 100644 --- a/website/content/en/docs/setup/installation/platforms/docker.md +++ b/website/content/en/docs/setup/installation/platforms/docker.md @@ -59,7 +59,7 @@ EOF ```shell docker run \ -d \ - -v $PWD/vector.toml:/etc/vector/vector.yaml:ro \ + -v $PWD/vector.yaml:/etc/vector/vector.yaml:ro \ -p 8686:8686 \ timberio/vector:{{< version >}}-debian ``` diff --git a/website/content/en/guides/level-up/transformation.md b/website/content/en/guides/level-up/transformation.md index 366188d22d8f9..643c10170868a 100644 --- a/website/content/en/guides/level-up/transformation.md +++ b/website/content/en/guides/level-up/transformation.md @@ -86,7 +86,7 @@ supports JSON and YAML. To start Vector using this topology: ```bash -vector --config-toml /etc/vector/vector.yaml +vector --config-toml /etc/vector/vector.toml ``` You should see lines like this emitted via stdout (formatted for readability From cf7dc577b26961003e3f6ba9df4651e2ba5757c2 Mon Sep 17 00:00:00 2001 From: Pavlos Rontidis Date: Fri, 8 Sep 2023 10:28:48 -0400 Subject: [PATCH 11/11] remove conf-files --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7594e67d71aee..c3f449eff1549 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,6 @@ debug = true name = "vector" section = "admin" maintainer-scripts = "distribution/debian/scripts/" -conf-files = ["/etc/vector/vector.yaml", "/etc/default/vector"] assets = [ ["target/release/vector", "/usr/bin/", "755"], ["config/vector.yaml", "/etc/vector/vector.yaml", "644"],