From 579ccc98a0b5f08542c521023ff61f08ea9d1a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Jurczak?= Date: Thu, 6 Mar 2025 15:12:56 +0100 Subject: [PATCH 1/2] Update sql-query-receiver.rst --- gdi/opentelemetry/components/sqlquery-receiver.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gdi/opentelemetry/components/sqlquery-receiver.rst b/gdi/opentelemetry/components/sqlquery-receiver.rst index b1f39c1b0..6d475271e 100644 --- a/gdi/opentelemetry/components/sqlquery-receiver.rst +++ b/gdi/opentelemetry/components/sqlquery-receiver.rst @@ -50,6 +50,20 @@ Next, include the receiver in the ``metrics`` pipeline of the ``service`` sectio See :ref:`sql-query-receiver-queries-example` for a complete config example. +Sample configuration following MySQL datasource format using tcp +---------------------------------------------------------------- + +.. code-block:: yaml + + receivers: + sqlquery: + driver: mysql + datasource: "user:password@tcp(host:port)/schema" + queries: + - sql: "your_query" + +Example of MySQL datasource to connect to database through socket with autocommit mode enabled ``user@unix(/mysql/run/mysql.sock)/schema/autocommit=true`` + Advanced configuration ---------------------------------- From 4a6f81acf3431c72602d8bd980a0b8a1eb0a1369 Mon Sep 17 00:00:00 2001 From: Anna U <104845867+aurbiztondo-splunk@users.noreply.github.com> Date: Wed, 26 Mar 2025 06:31:39 +0100 Subject: [PATCH 2/2] Update sqlquery-receiver.rst Edits --- gdi/opentelemetry/components/sqlquery-receiver.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdi/opentelemetry/components/sqlquery-receiver.rst b/gdi/opentelemetry/components/sqlquery-receiver.rst index 6d475271e..6c7dbe567 100644 --- a/gdi/opentelemetry/components/sqlquery-receiver.rst +++ b/gdi/opentelemetry/components/sqlquery-receiver.rst @@ -50,9 +50,11 @@ Next, include the receiver in the ``metrics`` pipeline of the ``service`` sectio See :ref:`sql-query-receiver-queries-example` for a complete config example. -Sample configuration following MySQL datasource format using tcp +Sample configuration for a MySQL datasource using TCP ---------------------------------------------------------------- +This is an example to connect a MySQL datasource to a database through a socket with autocommit mode enabled with ``user@unix(/mysql/run/mysql.sock)/schema/autocommit=true``: + .. code-block:: yaml receivers: @@ -62,8 +64,6 @@ Sample configuration following MySQL datasource format using tcp queries: - sql: "your_query" -Example of MySQL datasource to connect to database through socket with autocommit mode enabled ``user@unix(/mysql/run/mysql.sock)/schema/autocommit=true`` - Advanced configuration ----------------------------------