You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -15,7 +15,9 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
15
15
For Azure Cosmos DB for PostgreSQL, you can collect the following logs and metrics:
16
16
17
17
***PostgreSQL Server Logs**. These logs are available for every node of a cluster and can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance.
18
-
***Audit Logs**. Audit logging of database activities is available through [pgAudit](https://www.pgaudit.org/) extension. By default, pgAudit log statements are emitted along with your regular log statements by using Postgres's standard logging facility. To learn more about the audit log format, refer to the [pgAudit documentation](https://github.com/pgaudit/pgaudit/blob/master/README.md#format).
18
+
19
+
***Activity logs**. Provides insight into any subscription-level or management group level events that have occurred in the Azure. To learn more, refer to the [Azure documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log-schema).
20
+
19
21
***Metrics**. These metrics are available for every node of a cluster, and in aggregate across the nodes. For more information on supported metrics, refer to the [Azure documentation](https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/concepts-monitoring#list-of-metrics).
20
22
21
23
## Setup
@@ -29,32 +31,263 @@ You must explicitly enable diagnostic settings for each Azure Cosmos DB for Post
29
31
30
32
When you configure the event hubs source or HTTP source, plan your source category to ease the querying process. A hierarchical approach allows you to make use of wildcards. For example: `Azure/CosmosDBforPostgreSQL/Logs`, `Azure/CosmosDBforPostgreSQL/Metrics`.
31
33
34
+
35
+
### Configure field in field schema
36
+
37
+
1.[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Logs > Fields**. <br/>[**New UI**](/docs/get-started/sumo-logic-ui). In the top menu select **Configuration**, and then under **Logs** select **Fields**. You can also click the **Go To...** menu at the top of the screen and select **Fields**.
38
+
2. Search for the following fields:
39
+
-`tenant_name`. This field is tagged at the collector level. You can get the tenant name using the instructions in the [Microsoft Documentation](https://learn.microsoft.com/en-us/azure/active-directory-b2c/tenant-management-read-tenant-name#get-your-tenant-name).
40
+
-`location`. The region to which the resource name belongs to.
41
+
-`subscription_id`. ID associated with a subscription where the resource is present.
42
+
-`resource_group`. The resource group name where the Azure resource is present.
43
+
-`provider_name`. Azure resource provider name (for example, Microsoft.Network).
44
+
-`resource_type`. Azure resource type (for example, storage accounts).
45
+
-`resource_name`. The name of the resource (for example, storage account name).
46
+
-`service_type`. Type of the service that can be accessed with a Azure resource.
47
+
-`service_name`. Services that can be accessed with an Azure resource (for example, Azure SQL databases in Azure SQL Server).
48
+
3. Create the fields if they are not present. Refer to [Manage fields](/docs/manage/fields/#manage-fields).
49
+
50
+
### Configure Field Extraction Rules
51
+
52
+
Create the following Field Extraction Rules (FER) for Azure Storage by following the instructions in the [Create a Field Extraction Rule](/docs/manage/field-extractions/create-field-extraction-rule/). Create the below rules if they are not present.
Create the following metrics rules by following the instructions in [Create a metrics rule](/docs/metrics/metric-rules-editor/#create-a-metrics-rule). Create the below rules if they are not present.
95
+
96
+
#### Azure observability metadata extraction flexible postgresql server level
In this section, you will configure a pipeline for shipping metrics from Azure Monitor to an Event Hub, on to an Azure Function, and finally to an HTTP Source on a hosted collector in Sumo Logic.
35
118
36
-
1.[Configure an HTTP Source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-1-configure-an-http-source).
119
+
1. Create hosted collector and tag `tenant_name` field. <br/><img src={useBaseUrl('img/integrations/microsoft-azure/Azure-Storage-Tag-Tenant-Name.png')} alt="Azure Tag Tenant Name" style={{border: '1px solid gray'}} width="500" />
120
+
2. [Configure an HTTP Source](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-1-configure-an-http-source).
37
121
2. [Configure and deploy the ARM Template](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-2-configure-azure-resources-using-arm-template).
38
-
3.[Export metrics to Event Hub](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-3-export-metrics-for-a-particular-resource-to-event-hub). Perform below steps for each Azure Cosmos DB for PostgreSQL cluster that you want to monitor.
39
-
* Choose `Stream to an event hub` as destination.
40
-
* Select `AllMetrics`.
41
-
* Use the Event hub namespace created by the ARM template in Step 2 above. You can create a new Event hub or use the one created by ARM template. You can use the default policy `RootManageSharedAccessKey` as the policy name.
122
+
3. [Export metrics to Event Hub](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#step-3-export-metrics-for-a-particular-resource-to-event-hub). Perform below steps for each Flexible PostgreSQL Server resource that you want to monitor.
123
+
1. Choose `Stream to an event hub` as destination.
124
+
1. Select `AllMetrics`.
125
+
1. Use the Event hub namespace created by the ARM template in Step 2 above. You can create a new Event hub or use the one created by ARM template. You can use the default policy `RootManageSharedAccessKey` as the policy name. <br/><img src={useBaseUrl('img/send-data/export-metrics-diagnostic-settings-cosmosdbforpostgresql.png')} alt="Azure flexible postgresql server metrics" style={{border: '1px solid gray'}} width="800" />
126
+
1. Tag the location field in the source with right location value. <br/><img src={useBaseUrl('img/integrations/microsoft-azure/Azure-Storage-Tag-Location.png')} alt="Azure CosmosDB for PostgreSql Tag Location" style={{border: '1px solid gray'}} width="400" />
42
127
43
128
### Configure logs collection
44
129
45
130
In this section, you will configure a pipeline for shipping diagnostic logs from Azure Monitor to an Event Hub.
46
131
47
-
1. To enable audit logs perform below steps:
48
-
*[Install the pgAudit extension](https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/how-to-enable-audit#installing-pgaudit).
2. To set up the Azure Event Hubs source in Sumo Logic, refer to [Azure Event Hubs Source for Logs](/docs/send-data/collect-from-other-data-sources/azure-monitoring/ms-azure-event-hubs-source/).
51
-
3. To create the Diagnostic settings in Azure portal, refer to the [Azure documentation](https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/howto-logging#capture-logs). Perform below steps for each Azure Cosmos DB for PostgreSQL cluster that you want to monitor.
52
-
* Choose `Stream to an event hub` as the destination.
53
-
* Select `allLogs`.
54
-
* Use the Event hub namespace and Event hub name configured in previous step in destination details section. You can use the default policy `RootManageSharedAccessKey` as the policy name.
132
+
133
+
1. To set up the Azure Event Hubs source in Sumo Logic, refer to the [Azure Event Hubs Source for Logs](/docs/send-data/collect-from-other-data-sources/azure-monitoring/ms-azure-event-hubs-source/).
134
+
2. To create the diagnostic settings in Azure portal, refer to the [Azure documentation](https://learn.microsoft.com/en-gb/azure/data-factory/monitor-configure-diagnostics). Perform the steps below for each Azure Redis cache account that you want to monitor.
135
+
1. Choose **Stream to an event hub** as the destination.
136
+
1. Select `allLogs`.
137
+
1. Use the Event Hub namespace and Event Hub name configured in the previous step in the destination details section. You can use the default policy `RootManageSharedAccessKey` as the policy name.<br/><img src={useBaseUrl('img/send-data/export-logs-diagnostic-settings-cosmosdbforpostgresql.png')} alt="Azure flexible postgresql server logs" style={{border: '1px solid gray'}} width="800" />
138
+
3. Set server parameters as below:
139
+
- `log_statement`. Select **DDL**.
140
+
- `log_lock_waits`. Set to **ON**. You can also configure `deadlock_timeout` if required.
141
+
- `log_connections`. Set to **ON**.
142
+
- `log_disconnections`. Set to **ON**.
143
+
- `log_duration`. Set to **ON**. You can also configure `log_min_duration_statement` if required.
144
+
- `log_hostname`. Set to **ON**.
145
+
- `log_min_error_statement`. Set to **INFO**.
146
+
- `log_min_messages`. Set to **INFO**.
147
+
- `log_line_prefix`. Set to `%m [%p][%v] : %q[app=%a]`.
148
+
149
+
4. Tag the location field in the source with right location value. <br/><img src={useBaseUrl('img/integrations/microsoft-azure/Azure-Storage-Tag-Location.png')} alt="Azure Redis Cache Tag Location" style={{border: '1px solid gray'}} width="400" />
150
+
151
+
#### Activity Logs
152
+
153
+
To collect activity logs, follow the instructions [here](/docs/integrations/microsoft-azure/audit). Skip this step if you are already collecting activity logs for a subscription.
154
+
155
+
:::note
156
+
Since this source contains logs from multiple regions, ensure that you do not tag this source with the location tag.
157
+
:::
158
+
159
+
## Installing the Azure Cosmos DB for PostgreSQL app
160
+
161
+
Now that you have set up data collection, install the Azure Database for PostgreSQL Sumo Logic app to use the pre-configured dashboards that provide visibility into your environment for real-time analysis of overall usage.
162
+
163
+
import AppInstallNoDataSourceV2 from '../../reuse/apps/app-install-index-apps-v2.md';
164
+
165
+
### Overview
166
+
167
+
The **Azure Cosmos DB for PostgreSQL - Overview** dashboard provides details about replication lag, active connections and query duration distribution across clusters and servers.
168
+
169
+
Use this dashboard to:
170
+
* Track replication lag across replica clusters.
171
+
* Analyse query execution duration distribution and common errors across all servers.
172
+
* Identify clusters with max cpu usage, memory usage and storage usage.
173
+
174
+
<img src={useBaseUrl('https://sumologic-app-data-v2.s3.us-east-1.amazonaws.com/dashboards/Azure-CosmosDB-for-PostgreSQL/Azure-Cosmos-DB-for-PostgreSQL-Overview.png')} alt="Azure Cosmos DB for PostgreSQL - Overview dashboard" style={{border: '1px solid gray'}} width="800" />
175
+
176
+
### Network
177
+
178
+
The **Azure Cosmos DB for PostgreSQL - Network** dashboard provides insights on active connections, failed Ccnnections and network activity including ingress and egress bytes.
179
+
180
+
Use this dashboard to:
181
+
182
+
* Quickly identify connection errors across clusters.
183
+
* Monitor active connections, ingress and egress trends across clusters.
The **Azure Cosmos DB for PostgreSQL - Errors** dashboard provides insight into server error logs by specifically monitoring errors, and database shutdown/start events.
192
+
193
+
Use this dashboard to:
194
+
195
+
* Quickly identify top errors across clusters and servers.
196
+
* Monitor error trends and distribution across clusters and servers.
197
+
* Identify unexpected database shutdown or start activity.
The **Azure Cosmos DB for PostgreSQL - Security** dashboard provides insight into locations of incoming connections, failed authentications and top database errors and warnings.
The **Azure Cosmos DB for PostgreSQL - Storage** dashboard provides details about data usage, document count, and physical partition size by database.
216
+
217
+
Use this dashboard to:
218
+
* Monitor the storage utilisation to decide on scaling up storage or scaling out the nodes if this metric exceeds 85 percent consistently.
219
+
* Track total storage used across the clusters.
220
+
221
+
<img src={useBaseUrl('https://sumologic-app-data-v2.s3.us-east-1.amazonaws.com/dashboards/Azure-CosmosDB-for-PostgreSQL/Azure-Cosmos-DB-for-PostgreSQL-Storage.png')} alt="Azure Cosmos DB for PostgreSQL - Storage dashboard" style={{border: '1px solid gray'}} width="800" />
222
+
223
+
### Performance
224
+
225
+
The **Azure Cosmos DB for PostgreSQL - Performance** dashboard provides insights into the performance of your Azure Cosmos DB for PostgreSQL databases. This includes metrics on query duration, server side latency, and failed queries.
226
+
227
+
Use this dashboard to:
228
+
* Track clusters approaching the maximum IOPS capacity, to decide on adding worker nodes.
229
+
* Identify clusters using a high percentage of the cluster’s available memory to decide on scaling up the compute if this metric consistently exceeds 90 percent.
230
+
* Monitor the CPU usage to decide on scaling up compute if this metric exceeds 95 percent consistently.
231
+
232
+
<img src={useBaseUrl('https://sumologic-app-data-v2.s3.us-east-1.amazonaws.com/dashboards/Azure-CosmosDB-for-PostgreSQL/Azure-Cosmos-DB-for-PostgreSQL-Performance.png')} alt="Azure Cosmos DB for PostgreSQL - Performance dashboard" style={{border: '1px solid gray'}} width="800" />
233
+
234
+
235
+
### Queries
236
+
237
+
The **Azure Cosmos DB for PostgreSQL - Queries** dashboard provides insights into the queries executed in your Azure Cosmos DB for PostgreSQL databases.
238
+
239
+
Use this dashboard to:
240
+
* Analyze query execution duration distribution across servers.
241
+
* Identify query statements with errors.
242
+
* Monitor spike in query duration.
243
+
244
+
<img src={useBaseUrl('https://sumologic-app-data-v2.s3.us-east-1.amazonaws.com/dashboards/Azure-CosmosDB-for-PostgreSQL/Azure-Cosmos-DB-for-PostgreSQL-Queries.png')} alt="Azure Cosmos DB for PostgreSQL - Queries dashboard" style={{border: '1px solid gray'}} width="800" />
245
+
246
+
### Health
247
+
248
+
The **Azure Cosmos DB for PostgreSQL - Health** dashboard provides information of any service health incidents or resource health events associated with Azure Cosmos DB for PostgreSQL accounts in your azure account.
249
+
250
+
Use this dashboard to:
251
+
* View recent resource and service health incidents.
252
+
* View distribution of service and resource health by incident type.
253
+
* Monitor service availability.
254
+
255
+
<img src={useBaseUrl('https://sumologic-app-data-v2.s3.us-east-1.amazonaws.com/dashboards/Azure-CosmosDB-for-PostgreSQL/Azure-Cosmos-DB-for-PostgreSQL-Health.png')} alt="Azure Cosmos DB for PostgreSQL - Health dashboard" style={{border: '1px solid gray'}} width="800" />
256
+
257
+
### Administrative Operations
258
+
259
+
The **Azure Cosmos DB for PostgreSQL - Administrative Operations** dashboard provides details on users performing admin operations.
260
+
261
+
Use this dashboard to:
262
+
* Identify top users performing administrative operations.
263
+
* View top 10 operations that caused the most errors.
264
+
* View recent diagnostic, network, and replication settings updates operations.
265
+
266
+
<img src={useBaseUrl('https://sumologic-app-data-v2.s3.us-east-1.amazonaws.com/dashboards/Azure-CosmosDB-for-PostgreSQL/Azure-Cosmos-DB-for-PostgreSQL-Administrative-Operations.png')} alt="Azure Cosmos DB for PostgreSQL - Administrative Operations dashboard" style={{border: '1px solid gray'}} width="800" />
267
+
268
+
269
+
<AppInstallNoDataSourceV2/>
270
+
271
+
## Viewing the Azure Cosmos DB for PostgreSQL dashboards
272
+
273
+
import ViewDashboards from '../../reuse/apps/view-dashboards.md';
274
+
275
+
<ViewDashboards/>
55
276
56
277
## Troubleshooting
57
278
58
279
### HTTP Logs and Metrics Source used by Azure Functions
59
280
60
281
To troubleshoot metrics collection, follow the instructions in [Collect Metrics from Azure Monitor > Troubleshooting metrics collection](/docs/send-data/collect-from-other-data-sources/azure-monitoring/collect-metrics-azure-monitor/#troubleshooting-metrics-collection).
282
+
283
+
## Upgrade/Downgrade the Azure Cosmos DB for PostgreSQL app (Optional)
284
+
285
+
import AppUpdate from '../../reuse/apps/app-update.md';
286
+
287
+
<AppUpdate/>
288
+
289
+
## Uninstalling the Azure Cosmos DB for PostgreSQL app (Optional)
290
+
291
+
import AppUninstall from '../../reuse/apps/app-uninstall.md';
0 commit comments