From f58472d66f19a1b14ebcef57e988a6f2618b3889 Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Wed, 24 Jan 2024 13:11:10 -0700 Subject: [PATCH] docs(config): Add comment about single vs double quotes (#14621) --- docs/CONFIGURATION.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index f28fe1aa4..6a1bed27b 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -58,6 +58,12 @@ them with `${}`. Replacement occurs before file parsing. For strings the variable must be within quotes, e.g., `"${STR_VAR}"`, for numbers and booleans they should be unquoted, e.g., `${INT_VAR}`, `${BOOL_VAR}`. +Users need to keep in mind that when using double quotes the user needs to +escape any backslashes (e.g. `"C:\\Program Files"`) or other special characters. +If using an environment variable with a single backslash, then enclose the +variable in single quotes which signifies a string literal (e.g. +`'C:\Program Files'`). + In addition to this, Telegraf also supports Shell parameter expansion for environment variables which allows syntax such as: