From 15c552b59a9a45473585157c7aeada3b6325709b Mon Sep 17 00:00:00 2001 From: Dkairu <40675135+Dkairu@users.noreply.github.com> Date: Tue, 12 Mar 2024 12:10:15 -0400 Subject: [PATCH 1/6] Update host-integrations-standard-configuration-format.mdx Put an example for escaping backslashes in windows --- .../host-integrations-standard-configuration-format.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx index 9fca3890df4..f2b230b979e 100644 --- a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx +++ b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx @@ -249,7 +249,11 @@ integrations: If there is no executable with this name in the above folders the agent logs an error and the integration is not executed. - In Windows, do not append the `.exe` extension to the name. The agent does this for you (for example, `name: nri-mysql` would look for `nri-mysql.exe` in the above folders). + In Windows, do not append the `.exe` extension to the name. The agent does this for you (for example, `name: nri-mysql` would look for `nri-mysql.exe` in the above folders). You also need to escape the backslashes when entering this parameter. For example + ``` + - name: nri-mysql + exec: '"D:\\CustomFolder\\NewRelic\\Newrelic-infra\\newrelic-integrations\\bin\\nri-mysql"' + ``` From 8fc6763cf351276c903f8d25aa4d9d346fe0c716 Mon Sep 17 00:00:00 2001 From: Rob Siebens Date: Tue, 12 Mar 2024 13:38:05 -0700 Subject: [PATCH 2/6] fix(Infrastructure agent): Add colon --- .../host-integrations-standard-configuration-format.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx index f2b230b979e..cfd82f69942 100644 --- a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx +++ b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx @@ -249,7 +249,7 @@ integrations: If there is no executable with this name in the above folders the agent logs an error and the integration is not executed. - In Windows, do not append the `.exe` extension to the name. The agent does this for you (for example, `name: nri-mysql` would look for `nri-mysql.exe` in the above folders). You also need to escape the backslashes when entering this parameter. For example + In Windows, do not append the `.exe` extension to the name. The agent does this for you (for example, `name: nri-mysql` would look for `nri-mysql.exe` in the above folders). You also need to escape the backslashes when entering this parameter. For example: ``` - name: nri-mysql exec: '"D:\\CustomFolder\\NewRelic\\Newrelic-infra\\newrelic-integrations\\bin\\nri-mysql"' From aca5a16f282608e731048aac01a245d2f3087c10 Mon Sep 17 00:00:00 2001 From: Rob Siebens Date: Tue, 12 Mar 2024 16:44:58 -0700 Subject: [PATCH 3/6] fix(Infrastructure agent): Temporarily back out the escape section --- .../host-integrations-standard-configuration-format.mdx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx index cfd82f69942..90b023089b7 100644 --- a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx +++ b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx @@ -249,11 +249,7 @@ integrations: If there is no executable with this name in the above folders the agent logs an error and the integration is not executed. - In Windows, do not append the `.exe` extension to the name. The agent does this for you (for example, `name: nri-mysql` would look for `nri-mysql.exe` in the above folders). You also need to escape the backslashes when entering this parameter. For example: - ``` - - name: nri-mysql - exec: '"D:\\CustomFolder\\NewRelic\\Newrelic-infra\\newrelic-integrations\\bin\\nri-mysql"' - ``` + In Windows, do not append the `.exe` extension to the name. The agent does this for you (for example, `name: nri-mysql` would look for `nri-mysql.exe` in the above folders). From 86347160f81a796836bfc8ac113968e59e8790cf Mon Sep 17 00:00:00 2001 From: Rob Siebens Date: Fri, 29 Mar 2024 12:45:26 -0700 Subject: [PATCH 4/6] fix(on-host): Clarify escape characters --- .../host-integrations-standard-configuration-format.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx index 90b023089b7..d525284f531 100644 --- a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx +++ b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx @@ -264,12 +264,12 @@ integrations: exec: /usr/bin/python /opt/integrations/my-script.py --host=127.0.0.1 ``` - If any of the path/arguments have spaces that are part of a single element, you can use a YAML array notation: + If any of the paths or arguments have spaces that are part of a single element, you can use a YAML array notation (use quotation marks to escape backslashes): ``` - name: my-integration exec: - - C:\Program Files\My Integration\integration.exe + - '"C:\Program Files\My Integration\integration.exe"' - --host - 127.0.0.1 - --port From 15f8b2bb8e7d083477031e4dfde466174321984a Mon Sep 17 00:00:00 2001 From: Rob Siebens Date: Fri, 29 Mar 2024 13:13:46 -0700 Subject: [PATCH 5/6] fix(on-host): Add "Windows" to clarify escape usage --- .../host-integrations-standard-configuration-format.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx index d525284f531..4d5a7ab77ba 100644 --- a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx +++ b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx @@ -264,7 +264,7 @@ integrations: exec: /usr/bin/python /opt/integrations/my-script.py --host=127.0.0.1 ``` - If any of the paths or arguments have spaces that are part of a single element, you can use a YAML array notation (use quotation marks to escape backslashes): + If any of the paths or arguments have spaces that are part of a single element, you can use a YAML array notation (use quotation marks to escape Windows backslashes): ``` - name: my-integration From cdaa5b5593c2e01e82a1c1dfd552d1f04dc8dcb7 Mon Sep 17 00:00:00 2001 From: Rob Siebens Date: Fri, 29 Mar 2024 13:22:11 -0700 Subject: [PATCH 6/6] fix(on-host): Second try at escape language --- .../host-integrations-standard-configuration-format.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx index 4d5a7ab77ba..def559cc7fd 100644 --- a/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx +++ b/src/content/docs/infrastructure/host-integrations/infrastructure-integrations-sdk/specifications/host-integrations-standard-configuration-format.mdx @@ -264,7 +264,7 @@ integrations: exec: /usr/bin/python /opt/integrations/my-script.py --host=127.0.0.1 ``` - If any of the paths or arguments have spaces that are part of a single element, you can use a YAML array notation (use quotation marks to escape Windows backslashes): + If any of the paths or arguments have spaces that are part of a single element, you can use a YAML array notation. For Windows, be sure to escape backslashes with quotation marks like this: ``` - name: my-integration