1
0
mirror of https://github.com/minio/docs.git synced 2025-04-21 08:05:59 +03:00

BUGFIX: PostgreSQL and MySQL Bucket Notification Examples have incorrect values

This commit is contained in:
Ravind Kumar 2022-11-23 09:56:36 -05:00
parent 0a68ca4ff9
commit 0c4c7be68b
4 changed files with 85 additions and 83 deletions

View File

@ -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_<IDENTIFIER>="on"
set MINIO_NOTIFY_MYSQL_TABLE_<IDENTIFIER>="<ENDPOINT>"
set MINIO_NOTIFY_MYSQL_FORMAT_<IDENTIFIER>="<string>"
set MINIO_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS_<IDENTIFIER>="<string>"
set MINIO_NOTIFY_MYSQL_QUEUE_DIR_<IDENTIFIER>="<string>"
set MINIO_NOTIFY_MYSQL_QUEUE_LIMIT_<IDENTIFIER>="<string>"
set MINIO_NOTIFY_MYSQL_COMMENT_<IDENTIFIER>="<string>"
set MINIO_NOTIFY_MYSQL_ENABLE_<IDENTIFIER>="on"
set MINIO_NOTIFY_MYSQL_DSN_STRING_<IDENTIFIER>="user:password@tcp(hostname:port)/database"
set MINIO_NOTIFY_MYSQL_TABLE_<IDENTIFIER>="minio-events"
set MINIO_NOTIFY_MYSQL_FORMAT_<IDENTIFIER>="namespace|access"
set MINIO_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS_<IDENTIFIER>="2"
set MINIO_NOTIFY_MYSQL_QUEUE_DIR_<IDENTIFIER>="/opt/minio/events"
set MINIO_NOTIFY_MYSQL_QUEUE_LIMIT_<IDENTIFIER>="100000"
set MINIO_NOTIFY_MYSQL_COMMENT_<IDENTIFIER>="MySQL Event Notification Logging for MinIO"
- Replace ``<IDENTIFIER>`` with a unique descriptive string for the
MySQL service endpoint. Use the same ``<IDENTIFIER>`` value for all

View File

@ -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_<IDENTIFIER>="on"
set MINIO_NOTIFY_TABLE_<IDENTIFIER>="ENDPOINT"
set MINIO_NOTIFY_FORMAT_<IDENTIFIER>=""
set MINIO_NOTIFY_MAX_OPEN_CONNECTIONS_<IDENTIFIER>=""
set MINIO_NOTIFY_QUEUE_DIR_<IDENTIFIER>=""
set MINIO_NOTIFY_QUEUE_LIMIT_<IDENTIFIER>=""
set MINIO_NOTIFY_COMMENT_<IDENTIFIER>=""
set MINIO_NOTIFY_POSTGRES_ENABLE_<IDENTIFIER>="on"
set MINIO_NOTIFY_POSTGRES_CONNECTION_STRING_<IDENTIFIER>="host=postgresql-endpoint.example.net port=4222"
set MINIO_NOTIFY_POSTGRES_TABLE_<IDENTIFIER>="minioevents"
set MINIO_NOTIFY_POSTGRES_FORMAT_<IDENTIFIER>="namespace|access"
set MINIO_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS_<IDENTIFIER>="2"
set MINIO_NOTIFY_POSTGRES_QUEUE_DIR_<IDENTIFIER>="/opt/minio/events"
set MINIO_NOTIFY_POSTGRES_QUEUE_LIMIT_<IDENTIFIER>="100000"
set MINIO_NOTIFY_POSTGRES_COMMENT_<IDENTIFIER>="PostgreSQL Notification Event Logging for MinIO"
- Replace ``<IDENTIFIER>`` with a unique descriptive string for the
@ -85,7 +86,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 <mc admin config get>` to
:mc-cmd:`mc admin config get notify_postgres <mc admin config get>` to
review the currently configured PostgreSQL endpoints on the MinIO deployment.
- Replace ``<ENDPOINT>`` 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
<notify_postgresql.connection_string>`
- :mc-conf:`notify_postgresql table <notify_postgresql.table>`
- :mc-conf:`notify_postgresql format <notify_postgresql.format>`
- :mc-conf:`notify_postgres connection_string
<notify_postgres.connection_string>`
- :mc-conf:`notify_postgres table <notify_postgres.table>`
- :mc-conf:`notify_postgres format <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="<string>" \
format="<string>" \
@ -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 <mc admin config get>` to
:mc-cmd:`mc admin config get notify_postgres <mc admin config get>` to
review the currently configured PostgreSQL endpoints on the MinIO deployment.
- Replace ``<ENDPOINT>`` 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 <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 <notify_postgresql.connection_string>` key specifies
the PostgreSQL service endpoint for the given `notify_postgresql` key. The
``notify_postgresql:<IDENTIFIER>`` suffix describes the unique identifier for
:mc-conf:`connection_string <notify_postgres.connection_string>` key specifies
the PostgreSQL service endpoint for the given `notify_postgres` key. The
``notify_postgres:<IDENTIFIER>`` 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="<string>" \
format="<string>" \
@ -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
<notify_postgresql.connection_string>`
- :mc-conf:`notify_postgresql table <notify_postgresql.table>`
- :mc-conf:`notify_postgresql format <notify_postgresql.format>`
- :mc-conf:`notify_postgres connection_string
<notify_postgres.connection_string>`
- :mc-conf:`notify_postgres table <notify_postgres.table>`
- :mc-conf:`notify_postgres format <notify_postgres.format>`
All other configuration settings are *optional*. See
:ref:`minio-server-config-bucket-notification-postgresql` for a complete list of

View File

@ -1295,7 +1295,7 @@ service as a target for :ref:`Bucket Nofitications <minio-bucket-notifications>`
: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 <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:

View File

@ -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 <minio-bucket-notifications>`. 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
<MINIO_NOTIFY_POSTGRESQL_ENABLE>` indicates the environment variable is
For example, :envvar:`MINIO_NOTIFY_POSTGRES_ENABLE_PRIMARY
<MINIO_NOTIFY_POSTGRES_ENABLE>` 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 <notify_postgresql>` configuration setting.
:mc-conf:`notify_postgres <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 <notify_postgresql.connection_string>`
:mc-conf:`notify_postgres connection_string <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 <notify_postgresql.table>`
:mc-conf:`notify_postgres table <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 <notify_postgresql.format>`
:mc-conf:`notify_postgres format <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
<notify_postgresql.max_open_connections>`
:mc-conf:`notify_postgres max_open_connections
<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 <notify_postgresql.queue_dir>`
:mc-conf:`notify_postgres queue_dir <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 <notify_postgresql.queue_limit>`
:mc-conf:`notify_postgres queue_limit <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 <notify_postgresql.comment>`
:mc-conf:`notify_postgres comment <notify_postgres.comment>`
configuration setting.
.. _minio-server-envvar-bucket-notification-mysql: