From b0b4e1b0ccab3be4c0c9856fdea4554eb347ca2e Mon Sep 17 00:00:00 2001 From: Jo Palac Date: Thu, 19 Sep 2024 13:42:07 +1000 Subject: [PATCH 1/8] Added infmration about postgres for SC --- .../monitoring-instances/configuration.md | 2 ++ .../servicecontrol-instances/configuration.md | 17 +++++++++++++++++ servicepulse/usage-config.md | 10 ++++++++++ 3 files changed, 29 insertions(+) diff --git a/servicecontrol/monitoring-instances/configuration.md b/servicecontrol/monitoring-instances/configuration.md index 704c47d745c..5e11803d773 100644 --- a/servicecontrol/monitoring-instances/configuration.md +++ b/servicecontrol/monitoring-instances/configuration.md @@ -201,6 +201,8 @@ If running multiple setups of the Platform Tools (i.e. multiple versions of Serv If using [MSMQ transport](/transports/msmq) and the monitoring instance is installed on a different machine to the ServiceControl error instance, then only the monitoring instance setting needs to be modified to include the machine name of the error instance in the queue address. +If using [PostgreSQL transport](/transports//postgresql/) then the schema name needs to be included in the `Monitoring/ServiceControlThroughputDataQueue` setting + | Context | Name | | --- | --- | | **Environment variable** | `MONITORING_SERVICECONTROLTHROUGHPUTDATAQUEUE` | diff --git a/servicecontrol/servicecontrol-instances/configuration.md b/servicecontrol/servicecontrol-instances/configuration.md index eac69354bb2..5b34702484b 100644 --- a/servicecontrol/servicecontrol-instances/configuration.md +++ b/servicecontrol/servicecontrol-instances/configuration.md @@ -754,6 +754,23 @@ Specifies any additional databases on the same server that also contain NService | --- | --- | | string | | +## Usage Reporting when using the PostgreSQL transport + +### LicensingComponent/PostgreSQL/ConnectionString + +Version: 5.10.0+ + +The connection string that will provide at least read access to all queue tables. + +| Context | Name | +| --- | --- | +| **Environment variable** | `LICENSINGCOMPONENT_POSTGRESQL_CONNECTIONSTRING` | +| **App config key** | `LicensingComponent/PostgreSQL/ConnectionString` | + +| Type | Default value | +| --- | --- | +| string | obtained from ServiceControl | + ## Plugin-specific ### ServiceControl/HeartbeatGracePeriod diff --git a/servicepulse/usage-config.md b/servicepulse/usage-config.md index 0266dec79ba..b8eca8b87af 100644 --- a/servicepulse/usage-config.md +++ b/servicepulse/usage-config.md @@ -98,6 +98,16 @@ Refer to the [Usage Reporting when using the SqlServer transport](/servicecontro User with rights to query [INFORMATION_SCHEMA].[COLUMNS] table. +### PostgreSQL + +#### Settings + +Refer to the [Usage Reporting when using the PostgreSQL transport](/servicecontrol/servicecontrol-instances/configuration.md#usage-reporting-when-using-the-postgresql-transport) section of the ServiceControl config file for an explanation of the PostgreSQL Server-specific settings. + +#### Minimum Permissions + +User with rights to query [INFORMATION_SCHEMA].[COLUMNS] table. + ### RabbitMQ #### Settings From 0467968f54a5722552be58f18a415c5abb6a168e Mon Sep 17 00:00:00 2001 From: Jo Palac Date: Thu, 19 Sep 2024 13:46:03 +1000 Subject: [PATCH 2/8] add postgres to transport list --- transports/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/transports/index.md b/transports/index.md index bcbb3fff316..9ce059afe66 100644 --- a/transports/index.md +++ b/transports/index.md @@ -24,5 +24,6 @@ Initially, it's challenging to decide which queuing technology may be best for a - [Amazon SQS](/transports/sqs/) - [RabbitMQ](/transports/rabbitmq/) - [SQL Server](/transports/sql/) +- [PostgreSQL](/transports/postgresql/) - [MSMQ](/transports/msmq) - [Learning](/transports/learning/) From 2b99c30eea2c43d6509170ab340b23a236ad9b2c Mon Sep 17 00:00:00 2001 From: Jo Palac Date: Thu, 19 Sep 2024 13:47:40 +1000 Subject: [PATCH 3/8] fix link --- servicecontrol/monitoring-instances/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servicecontrol/monitoring-instances/configuration.md b/servicecontrol/monitoring-instances/configuration.md index 5e11803d773..8cbc8764fc3 100644 --- a/servicecontrol/monitoring-instances/configuration.md +++ b/servicecontrol/monitoring-instances/configuration.md @@ -201,7 +201,7 @@ If running multiple setups of the Platform Tools (i.e. multiple versions of Serv If using [MSMQ transport](/transports/msmq) and the monitoring instance is installed on a different machine to the ServiceControl error instance, then only the monitoring instance setting needs to be modified to include the machine name of the error instance in the queue address. -If using [PostgreSQL transport](/transports//postgresql/) then the schema name needs to be included in the `Monitoring/ServiceControlThroughputDataQueue` setting +If using [PostgreSQL transport](/transports/postgresql/) then the schema name needs to be included in the `Monitoring/ServiceControlThroughputDataQueue` setting | Context | Name | | --- | --- | From 068c39def500b022ee5f3d439031cd0c329bc227 Mon Sep 17 00:00:00 2001 From: Jo Palac Date: Thu, 19 Sep 2024 13:53:44 +1000 Subject: [PATCH 4/8] Add Postgresql to SC transports --- servicecontrol/transports.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/servicecontrol/transports.md b/servicecontrol/transports.md index 7b06eca5996..6fdf6859e47 100644 --- a/servicecontrol/transports.md +++ b/servicecontrol/transports.md @@ -19,6 +19,7 @@ The value for the `TransportType` settings can be any of the following: | [Amazon Simple Queue Service (SQS)](#amazon-sqs) | `AmazonSQS` | | [RabbitMQ](#rabbitmq)
See topology options below. | `RabbitMQ.QuorumConventionalRouting`
`RabbitMQ.ClassicConventionalRouting`
`RabbitMQ.QuorumDirectRouting`
`RabbitMQ.ClassicDirectRouting` | | [SQL Server](#sql) | `SQLServer` | +| [PostgreSQL](#postgresql) | `PostgreSQL` | | [Microsoft Message Queuing (MSMQ)](#msmq) | `MSMQ` | Follow the link for each transport for additional information on configuration options for that transport lower on this page. @@ -74,6 +75,14 @@ In addition to the [connection string options of the transport](/transports/sql/ * *Optional* `Subscriptions Table=@` - to specify the schema. * *Optional* `Subscriptions Table=@@` - to specify the schema and catalog. +## PostgreSQL + +In addition to the [connection string options of the transport](/transports/postgresql/connection-settings.md#connection-configuration) the following ServiceControl specific options are available in versions 5.10 and above: + +* `Queue Schema=` - Specifies custom schema for the ServiceControl input queue. +* `Subscriptions Table=` - Specifies PostgreSQL subscription table name. + * *Optional* `Subscriptions Table=@` - to specify the schema. + ## Amazon SQS The following ServiceControl connection string options are available: From 74fcb6ae1fd3b30163bbe7a870714e0791dd077c Mon Sep 17 00:00:00 2001 From: Jo Palac Date: Thu, 19 Sep 2024 15:28:52 +1000 Subject: [PATCH 5/8] Update servicecontrol/transports.md Co-authored-by: Phil Bastian <155411597+PhilBastian@users.noreply.github.com> --- servicecontrol/transports.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servicecontrol/transports.md b/servicecontrol/transports.md index 6fdf6859e47..ea41c2f8ab0 100644 --- a/servicecontrol/transports.md +++ b/servicecontrol/transports.md @@ -79,7 +79,7 @@ In addition to the [connection string options of the transport](/transports/sql/ In addition to the [connection string options of the transport](/transports/postgresql/connection-settings.md#connection-configuration) the following ServiceControl specific options are available in versions 5.10 and above: -* `Queue Schema=` - Specifies custom schema for the ServiceControl input queue. +* `Queue Schema=` - Specifies a custom schema for the ServiceControl input queue. * `Subscriptions Table=` - Specifies PostgreSQL subscription table name. * *Optional* `Subscriptions Table=@` - to specify the schema. From 7c70b8be5d7a20e827bb1d76d66ba56bc26a635b Mon Sep 17 00:00:00 2001 From: Jo Palac Date: Thu, 19 Sep 2024 15:38:47 +1000 Subject: [PATCH 6/8] Update servicecontrol/monitoring-instances/configuration.md Co-authored-by: Phil Bastian <155411597+PhilBastian@users.noreply.github.com> --- servicecontrol/monitoring-instances/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servicecontrol/monitoring-instances/configuration.md b/servicecontrol/monitoring-instances/configuration.md index 8cbc8764fc3..7acb02ef802 100644 --- a/servicecontrol/monitoring-instances/configuration.md +++ b/servicecontrol/monitoring-instances/configuration.md @@ -201,7 +201,7 @@ If running multiple setups of the Platform Tools (i.e. multiple versions of Serv If using [MSMQ transport](/transports/msmq) and the monitoring instance is installed on a different machine to the ServiceControl error instance, then only the monitoring instance setting needs to be modified to include the machine name of the error instance in the queue address. -If using [PostgreSQL transport](/transports/postgresql/) then the schema name needs to be included in the `Monitoring/ServiceControlThroughputDataQueue` setting +If using [PostgreSQL transport](/transports/postgresql/), and a schema other than `public` is required, then the schema name needs to be included in the `Monitoring/ServiceControlThroughputDataQueue` setting | Context | Name | | --- | --- | From f11371c32b8dee8cfa21c00d73aa78b8c932133f Mon Sep 17 00:00:00 2001 From: Jo Palac Date: Fri, 20 Sep 2024 15:40:20 +1000 Subject: [PATCH 7/8] Update servicecontrol/transports.md --- servicecontrol/transports.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servicecontrol/transports.md b/servicecontrol/transports.md index ea41c2f8ab0..506d3f508c3 100644 --- a/servicecontrol/transports.md +++ b/servicecontrol/transports.md @@ -81,7 +81,7 @@ In addition to the [connection string options of the transport](/transports/post * `Queue Schema=` - Specifies a custom schema for the ServiceControl input queue. * `Subscriptions Table=` - Specifies PostgreSQL subscription table name. - * *Optional* `Subscriptions Table=@` - to specify the schema. + * *Optional* `Subscriptions Table=schema.tablename` - to specify the schema. ## Amazon SQS From a9f18ec57dfd1aa0c8d8b6d6a030b028d92ed809 Mon Sep 17 00:00:00 2001 From: Jo Palac Date: Fri, 20 Sep 2024 15:49:12 +1000 Subject: [PATCH 8/8] update Subscriptions Table spec --- servicecontrol/transports.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servicecontrol/transports.md b/servicecontrol/transports.md index 506d3f508c3..af0e9a63c00 100644 --- a/servicecontrol/transports.md +++ b/servicecontrol/transports.md @@ -81,7 +81,9 @@ In addition to the [connection string options of the transport](/transports/post * `Queue Schema=` - Specifies a custom schema for the ServiceControl input queue. * `Subscriptions Table=` - Specifies PostgreSQL subscription table name. - * *Optional* `Subscriptions Table=schema.tablename` - to specify the schema. + * *Optional* `Subscriptions Table=schema.tablename` - to specify the schema with simple table name. + * *Optional* `Subscriptions Table=schema.multi.table.name` - to specify the schema with a table name containing `.`. + * *Optional* `Subscriptions Table=="multi.table.name="` - to specify a table name containing `.` without a schema. In this case, `Queue Schema` will be used if specified, otherwise the default schema (`public`) will be used. ## Amazon SQS