From 0c4c7be68b34165f95b51bf8552b2f7871b0967c Mon Sep 17 00:00:00 2001 From: Ravind Kumar Date: Wed, 23 Nov 2022 09:56:36 -0500 Subject: [PATCH] BUGFIX: PostgreSQL and MySQL Bucket Notification Examples have incorrect values --- .../monitoring/publish-events-to-mysql.rst | 15 ++--- .../publish-events-to-postgresql.rst | 61 +++++++++--------- .../minio-mc-admin/mc-admin-config.rst | 30 ++++----- .../reference/minio-server/minio-server.rst | 62 +++++++++---------- 4 files changed, 85 insertions(+), 83 deletions(-) diff --git a/source/administration/monitoring/publish-events-to-mysql.rst b/source/administration/monitoring/publish-events-to-mysql.rst index 2c36517a..c644611b 100644 --- a/source/administration/monitoring/publish-events-to-mysql.rst +++ b/source/administration/monitoring/publish-events-to-mysql.rst @@ -66,13 +66,14 @@ You can configure a new MySQL service endpoint using either environment variable .. code-block:: shell :class: copyable - set MINIO_NOTIFY_MYSQL_DSN_STRING_="on" - set MINIO_NOTIFY_MYSQL_TABLE_="" - set MINIO_NOTIFY_MYSQL_FORMAT_="" - set MINIO_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS_="" - set MINIO_NOTIFY_MYSQL_QUEUE_DIR_="" - set MINIO_NOTIFY_MYSQL_QUEUE_LIMIT_="" - set MINIO_NOTIFY_MYSQL_COMMENT_="" + set MINIO_NOTIFY_MYSQL_ENABLE_="on" + set MINIO_NOTIFY_MYSQL_DSN_STRING_="user:password@tcp(hostname:port)/database" + set MINIO_NOTIFY_MYSQL_TABLE_="minio-events" + set MINIO_NOTIFY_MYSQL_FORMAT_="namespace|access" + set MINIO_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS_="2" + set MINIO_NOTIFY_MYSQL_QUEUE_DIR_="/opt/minio/events" + set MINIO_NOTIFY_MYSQL_QUEUE_LIMIT_="100000" + set MINIO_NOTIFY_MYSQL_COMMENT_="MySQL Event Notification Logging for MinIO" - Replace ```` with a unique descriptive string for the MySQL service endpoint. Use the same ```` value for all diff --git a/source/administration/monitoring/publish-events-to-postgresql.rst b/source/administration/monitoring/publish-events-to-postgresql.rst index 8ffc56e3..0457229f 100644 --- a/source/administration/monitoring/publish-events-to-postgresql.rst +++ b/source/administration/monitoring/publish-events-to-postgresql.rst @@ -61,20 +61,21 @@ variables *or* by setting runtime configuration settings. related to configuring a PostgreSQL service endpoint. The minimum *required* variables are: - - :envvar:`MINIO_NOTIFY_POSTGRESQL_CONNECTION_STRING` - - :envvar:`MINIO_NOTIFY_POSTGRESQL_TABLE` - - :envvar:`MINIO_NOTIFY_POSTGRESQL_FORMAT` + - :envvar:`MINIO_NOTIFY_POSTGRES_CONNECTION_STRING` + - :envvar:`MINIO_NOTIFY_POSTGRES_TABLE` + - :envvar:`MINIO_NOTIFY_POSTGRES_FORMAT` .. code-block:: shell :class: copyable - set MINIO_NOTIFY_CONNECTION_STRING_="on" - set MINIO_NOTIFY_TABLE_="ENDPOINT" - set MINIO_NOTIFY_FORMAT_="" - set MINIO_NOTIFY_MAX_OPEN_CONNECTIONS_="" - set MINIO_NOTIFY_QUEUE_DIR_="" - set MINIO_NOTIFY_QUEUE_LIMIT_="" - set MINIO_NOTIFY_COMMENT_="" + set MINIO_NOTIFY_POSTGRES_ENABLE_="on" + set MINIO_NOTIFY_POSTGRES_CONNECTION_STRING_="host=postgresql-endpoint.example.net port=4222" + set MINIO_NOTIFY_POSTGRES_TABLE_="minioevents" + set MINIO_NOTIFY_POSTGRES_FORMAT_="namespace|access" + set MINIO_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS_="2" + set MINIO_NOTIFY_POSTGRES_QUEUE_DIR_="/opt/minio/events" + set MINIO_NOTIFY_POSTGRES_QUEUE_LIMIT_="100000" + set MINIO_NOTIFY_POSTGRES_COMMENT_="PostgreSQL Notification Event Logging for MinIO" - Replace ```` with a unique descriptive string for the @@ -85,7 +86,7 @@ variables *or* by setting runtime configuration settings. If the specified ```` matches an existing PostgreSQL service endpoint on the MinIO deployment, the new settings *override* any existing settings for that endpoint. Use - :mc-cmd:`mc admin config get notify_postgresql ` to + :mc-cmd:`mc admin config get notify_postgres ` to review the currently configured PostgreSQL endpoints on the MinIO deployment. - Replace ```` with the |postgresql-uri-reference| @@ -105,22 +106,22 @@ variables *or* by setting runtime configuration settings. MinIO supports adding or updating PostgreSQL endpoints on a running :mc:`minio server` process using the :mc-cmd:`mc admin config set` command - and the :mc-conf:`notify_postgresql` configuration key. You must restart the + and the :mc-conf:`notify_postgres` configuration key. You must restart the :mc:`minio server` process to apply any new or updated configuration settings. The following example code sets *all* settings related to configuring an PostgreSQL service endpoint. The minimum *required* setting are: - - :mc-conf:`notify_postgresql connection_string - ` - - :mc-conf:`notify_postgresql table ` - - :mc-conf:`notify_postgresql format ` + - :mc-conf:`notify_postgres connection_string + ` + - :mc-conf:`notify_postgres table ` + - :mc-conf:`notify_postgres format ` .. code-block:: shell :class: copyable - mc admin config set ALIAS/ notify_postgresql:IDENTIFIER \ + mc admin config set ALIAS/ notify_postgres:IDENTIFIER \ connection_string="ENDPOINT" \ table="" \ format="" \ @@ -136,7 +137,7 @@ variables *or* by setting runtime configuration settings. If the specified ``IDENTIFIER`` matches an existing PostgreSQL service endpoint on the MinIO deployment, the new settings *override* any existing settings for that endpoint. Use - :mc-cmd:`mc admin config get notify_postgresql ` to + :mc-cmd:`mc admin config get notify_postgres ` to review the currently configured PostgreSQL endpoints on the MinIO deployment. - Replace ```` with the `PostgreSQL URI connection string @@ -255,7 +256,7 @@ configured PostgreSQL service endpoints in the deployment: .. code-block:: shell :class: copyable - mc admin config get ALIAS/ notify_postgresql + mc admin config get ALIAS/ notify_postgres Replace ``ALIAS`` with the :ref:`alias ` of the MinIO deployment. @@ -263,14 +264,14 @@ The command output resembles the following: .. code-block:: shell - notify_postgresql:primary queue_dir="" connection_string="postgresql://" queue_limit="0" table="" format="namespace" - notify_postgresql:secondary queue_dir="" connection_string="" queue_limit="0" table="" format="namespace" + notify_postgres:primary queue_dir="" connection_string="postgresql://" queue_limit="0" table="" format="namespace" + notify_postgres:secondary queue_dir="" connection_string="" queue_limit="0" table="" format="namespace" -The :mc-conf:`notify_postgresql` key is the top-level configuration key for an +The :mc-conf:`notify_postgres` key is the top-level configuration key for an :ref:`minio-server-config-bucket-notification-postgresql`. The -:mc-conf:`connection_string ` key specifies -the PostgreSQL service endpoint for the given `notify_postgresql` key. The -``notify_postgresql:`` suffix describes the unique identifier for +:mc-conf:`connection_string ` key specifies +the PostgreSQL service endpoint for the given `notify_postgres` key. The +``notify_postgres:`` suffix describes the unique identifier for that PostgreSQL service endpoint. Note the identifier for the PostgreSQL service endpoint you want to update for @@ -285,7 +286,7 @@ for the PostgreSQL service endpoint: .. code-block:: shell :class: copyable - mc admin config set ALIAS/ notify_postgresql:IDENTIFIER \ + mc admin config set ALIAS/ notify_postgres:IDENTIFIER \ connection_string="ENDPOINT" \ table="" \ format="" \ @@ -297,10 +298,10 @@ for the PostgreSQL service endpoint: The following configuration settings are the *minimum* required for a PostgreSQL service endpoint: -- :mc-conf:`notify_postgresql connection_string - ` -- :mc-conf:`notify_postgresql table ` -- :mc-conf:`notify_postgresql format ` +- :mc-conf:`notify_postgres connection_string + ` +- :mc-conf:`notify_postgres table ` +- :mc-conf:`notify_postgres format ` All other configuration settings are *optional*. See :ref:`minio-server-config-bucket-notification-postgresql` for a complete list of diff --git a/source/reference/minio-mc-admin/mc-admin-config.rst b/source/reference/minio-mc-admin/mc-admin-config.rst index 56f5b866..27dd52bb 100644 --- a/source/reference/minio-mc-admin/mc-admin-config.rst +++ b/source/reference/minio-mc-admin/mc-admin-config.rst @@ -1295,7 +1295,7 @@ service as a target for :ref:`Bucket Nofitications ` :ref:`minio-bucket-notifications-publish-postgresql` for a tutorial on using these environment variables. -.. mc-conf:: notify_postgresql +.. mc-conf:: notify_postgres The top-level configuration key for defining an PostgreSQL service endpoint for use with :ref:`MinIO bucket notifications `. @@ -1303,9 +1303,9 @@ using these environment variables. Use :mc-cmd:`mc admin config set` to set or update an PostgreSQL service endpoint. The following arguments are *required* for each target: - - :mc-conf:`~notify_postgresql.connection_string` - - :mc-conf:`~notify_postgresql.table` - - :mc-conf:`~notify_postgresql.format` + - :mc-conf:`~notify_postgres.connection_string` + - :mc-conf:`~notify_postgres.table` + - :mc-conf:`~notify_postgres.format` Specify additional optional arguments as a whitespace (``" "``)-delimited list. @@ -1313,7 +1313,7 @@ using these environment variables. .. code-block:: shell :class: copyable - mc admin config set notify_postgresql \ + mc admin config set notify_postgres \ connection_string="host=postgresql.example.com port=5432..." table="minioevents" \ format="namespace" \ @@ -1325,19 +1325,19 @@ using these environment variables. .. code-block:: shell - mc admin config set notify_postgresql:primary \ + mc admin config set notify_postgres:primary \ connection_string="host=postgresql.example.com port=5432..." table="minioevents" \ format="namespace" \ [ARGUMENT=VALUE ...] - mc admin config set notify_postgresql:secondary \ + mc admin config set notify_postgres:secondary \ connection_string="host=postgresql.example.com port=5432..." table="minioevents" \ format="namespace" \ [ARGUMENT=VALUE ...] - The :mc-conf:`notify_postgresql` configuration key supports the following + The :mc-conf:`notify_postgres` configuration key supports the following arguments: .. mc-conf:: connection_string @@ -1350,7 +1350,7 @@ using these environment variables. :end-before: end-minio-notify-postgresql-connection-string This configuration setting corresponds to the - :envvar:`MINIO_NOTIFY_POSTGRESQL_CONNECTION_STRING` environment + :envvar:`MINIO_NOTIFY_POSTGRES_CONNECTION_STRING` environment variable. .. mc-conf:: table @@ -1363,7 +1363,7 @@ using these environment variables. :end-before: end-minio-notify-postgresql-table This configuration setting corresponds to the - :envvar:`MINIO_NOTIFY_POSTGRESQL_TABLE` environment + :envvar:`MINIO_NOTIFY_POSTGRES_TABLE` environment variable. .. mc-conf:: format @@ -1376,7 +1376,7 @@ using these environment variables. :end-before: end-minio-notify-postgresql-format This configuration setting corresponds to the - :envvar:`MINIO_NOTIFY_POSTGRESQL_FORMAT` environment + :envvar:`MINIO_NOTIFY_POSTGRES_FORMAT` environment variable. .. mc-conf:: max_open_connections @@ -1389,7 +1389,7 @@ using these environment variables. :end-before: end-minio-notify-postgresql-max-open-connections This configuration setting corresponds to the - :envvar:`MINIO_NOTIFY_POSTGRESQL_MAX_OPEN_CONNECTIONS` environment + :envvar:`MINIO_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS` environment variable. @@ -1403,7 +1403,7 @@ using these environment variables. :end-before: end-minio-notify-postgresql-queue-dir This configuration setting corresponds to the - :envvar:`MINIO_NOTIFY_POSTGRESQL_QUEUE_DIR` environment variable. + :envvar:`MINIO_NOTIFY_POSTGRES_QUEUE_DIR` environment variable. .. mc-conf:: queue_limit :delimiter: " " @@ -1416,7 +1416,7 @@ using these environment variables. :end-before: end-minio-notify-postgresql-queue-limit This configuration setting corresponds to the - :envvar:`MINIO_NOTIFY_POSTGRESQL_QUEUE_LIMIT` environment variable. + :envvar:`MINIO_NOTIFY_POSTGRES_QUEUE_LIMIT` environment variable. .. mc-conf:: comment @@ -1429,7 +1429,7 @@ using these environment variables. :end-before: end-minio-notify-postgresql-comment This configuration setting corresponds to the - :envvar:`MINIO_NOTIFY_POSTGRESQL_COMMENT` environment variable. + :envvar:`MINIO_NOTIFY_POSTGRES_COMMENT` environment variable. .. _minio-server-config-bucket-notification-mysql: diff --git a/source/reference/minio-server/minio-server.rst b/source/reference/minio-server/minio-server.rst index baa22199..1187aa04 100644 --- a/source/reference/minio-server/minio-server.rst +++ b/source/reference/minio-server/minio-server.rst @@ -1575,7 +1575,7 @@ an NATS service endpoint with ID of ``PRIMARY``. PostgreSQL Service for Bucket Notifications +++++++++++++++++++++++++++++++++++++++++++ -The following section documents environment variables for configuring an POSTGRESQL +The following section documents environment variables for configuring an POSTGRES service as a target for :ref:`Bucket Nofitications `. See :ref:`minio-bucket-notifications-publish-postgresql` for a tutorial on using these environment variables. @@ -1588,21 +1588,21 @@ service endpoints as ``PRIMARY`` and ``SECONDARY`` respectively: .. code-block:: shell :class: copyable - set MINIO_NOTIFY_POSTGRESQL_ENABLE_PRIMARY="on" - set MINIO_NOTIFY_POSTGRESQL_CONNECTION_STRING_PRIMARY="host=postgresql-endpoint.example.net port=4222..." - set MINIO_NOTIFY_POSTGRESQL_TABLE_PRIMARY="minioevents" - set MINIO_NOTIFY_POSTGRESQL_FORMAT_PRIMARY="namespace" + set MINIO_NOTIFY_POSTGRES_ENABLE_PRIMARY="on" + set MINIO_NOTIFY_POSTGRES_CONNECTION_STRING_PRIMARY="host=postgresql-endpoint.example.net port=4222..." + set MINIO_NOTIFY_POSTGRES_TABLE_PRIMARY="minioevents" + set MINIO_NOTIFY_POSTGRES_FORMAT_PRIMARY="namespace" - set MINIO_NOTIFY_POSTGRESQL_ENABLE_SECONDARY="on" - set MINIO_NOTIFY_POSTGRESQL_CONNECTION_STRING_SECONDARY="host=postgresql-endpoint.example.net port=4222..." - set MINIO_NOTIFY_POSTGRESQL_TABLE_SECONDARY="minioevents" - set MINIO_NOTIFY_POSTGRESQL_FORMAT_SECONDARY="namespace" + set MINIO_NOTIFY_POSTGRES_ENABLE_SECONDARY="on" + set MINIO_NOTIFY_POSTGRES_CONNECTION_STRING_SECONDARY="host=postgresql-endpoint.example.net port=4222..." + set MINIO_NOTIFY_POSTGRES_TABLE_SECONDARY="minioevents" + set MINIO_NOTIFY_POSTGRES_FORMAT_SECONDARY="namespace" -For example, :envvar:`MINIO_NOTIFY_POSTGRESQL_ENABLE_PRIMARY -` indicates the environment variable is +For example, :envvar:`MINIO_NOTIFY_POSTGRES_ENABLE_PRIMARY +` indicates the environment variable is associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. -.. envvar:: MINIO_NOTIFY_POSTGRESQL_ENABLE +.. envvar:: MINIO_NOTIFY_POSTGRES_ENABLE *Required* @@ -1613,14 +1613,14 @@ associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. Requires specifying the following additional environment variables if set to ``on``: - - :envvar:`MINIO_NOTIFY_POSTGRESQL_CONNECTION_STRING` - - :envvar:`MINIO_NOTIFY_POSTGRESQL_TABLE` - - :envvar:`MINIO_NOTIFY_POSTGRESQL_FORMAT` + - :envvar:`MINIO_NOTIFY_POSTGRES_CONNECTION_STRING` + - :envvar:`MINIO_NOTIFY_POSTGRES_TABLE` + - :envvar:`MINIO_NOTIFY_POSTGRES_FORMAT` This environment variable corresponds with the - :mc-conf:`notify_postgresql ` configuration setting. + :mc-conf:`notify_postgres ` configuration setting. -.. envvar:: MINIO_NOTIFY_POSTGRESQL_CONNECTION_STRING +.. envvar:: MINIO_NOTIFY_POSTGRES_CONNECTION_STRING *Required* @@ -1629,11 +1629,11 @@ associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. :end-before: end-minio-notify-postgresql-connection-string This environment variable corresponds with the - :mc-conf:`notify_postgresql connection_string ` + :mc-conf:`notify_postgres connection_string ` configuration setting. -.. envvar:: MINIO_NOTIFY_POSTGRESQL_TABLE +.. envvar:: MINIO_NOTIFY_POSTGRES_TABLE *Required* @@ -1642,11 +1642,11 @@ associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. :end-before: end-minio-notify-postgresql-table This environment variable corresponds with the - :mc-conf:`notify_postgresql table ` + :mc-conf:`notify_postgres table ` configuration setting. -.. envvar:: MINIO_NOTIFY_POSTGRESQL_FORMAT +.. envvar:: MINIO_NOTIFY_POSTGRES_FORMAT *Required* @@ -1655,11 +1655,11 @@ associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. :end-before: end-minio-notify-postgresql-format This environment variable corresponds with the - :mc-conf:`notify_postgresql format ` + :mc-conf:`notify_postgres format ` configuration setting. -.. envvar:: MINIO_NOTIFY_POSTGRESQL_MAX_OPEN_CONNECTIONS +.. envvar:: MINIO_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS *Optional* @@ -1668,11 +1668,11 @@ associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. :end-before: end-minio-notify-postgresql-max-open-connections This environment variable corresponds with the - :mc-conf:`notify_postgresql max_open_connections - ` + :mc-conf:`notify_postgres max_open_connections + ` configuration setting. -.. envvar:: MINIO_NOTIFY_POSTGRESQL_QUEUE_DIR +.. envvar:: MINIO_NOTIFY_POSTGRES_QUEUE_DIR *Optional* @@ -1681,10 +1681,10 @@ associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. :end-before: end-minio-notify-postgresql-queue-dir This environment variable corresponds with the - :mc-conf:`notify_postgresql queue_dir ` + :mc-conf:`notify_postgres queue_dir ` configuration setting. -.. envvar:: MINIO_NOTIFY_POSTGRESQL_QUEUE_LIMIT +.. envvar:: MINIO_NOTIFY_POSTGRES_QUEUE_LIMIT *Optional* @@ -1693,10 +1693,10 @@ associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. :end-before: end-minio-notify-postgresql-queue-limit This environment variable corresponds with the - :mc-conf:`notify_postgresql queue_limit ` + :mc-conf:`notify_postgres queue_limit ` configuration setting. -.. envvar:: MINIO_NOTIFY_POSTGRESQL_COMMENT +.. envvar:: MINIO_NOTIFY_POSTGRES_COMMENT *Optional* @@ -1705,7 +1705,7 @@ associated to an PostgreSQL service endpoint with ID of ``PRIMARY``. :end-before: end-minio-notify-postgresql-comment This environment variable corresponds with the - :mc-conf:`notify_postgresql comment ` + :mc-conf:`notify_postgres comment ` configuration setting. .. _minio-server-envvar-bucket-notification-mysql: