| copyright |
|
||
|---|---|---|---|
| lastupdated | 2025-05-20 | ||
| keywords | |||
| subcollection | cloud-logs |
{{site.data.keyword.attribute-definition-list}}
{: #extensions-db-postgresql}
In {{site.data.keyword.logs_full_notm}}, you can use the {{site.data.keyword.databases-for-postgresql_full_notm}} extension to gain insights into logs that are generated in an {{site.data.keyword.cloud_notm}} account. {: shortdesc}
{: #extensions-db-postgresql-overview}
With this extension, you can create a dashboard designed to visualize and analyze logs from the {{site.data.keyword.databases-for-postgresql_full_notm}} service. The dashboard lets you track database performance, detect errors, analyze SQL queries, and provides insights to optimize system operations. The dashboard focuses on database stability and improving the efficiency of the database.
In {{site.data.keyword.logs_full_notm}}, logs that are generated by {{site.data.keyword.cloud_notm}} services (known as platform logs) include metadata fields that you can use to enhance searches and analyze the data.
applicationName: The application name is the environment that produces and sends logs to {{site.data.keyword.logs_full_notm}}. It is set toibm-platform-logs.subsystemName: The subsystem name is the service or application that produces and sends logs to {{site.data.keyword.logs_full_notm}}. It is set todatabase-for-postgresql:<instanceID>where<instanceID>is the {{site.data.keyword.databases-for-postgresql_full_notm}} instance ID.
In {{site.data.keyword.cloud_notm}}, you must configure {{site.data.keyword.logs_routing_full_notm}} to route logs to the {{site.data.keyword.logs_full_notm}} service.
Before you can monitor logs that are generated in an {{site.data.keyword.cloud_notm}} account, you must configure the {{site.data.keyword.logs_routing_full_notm}} service in the account to define the destination where you want to monitor the logs.
- You can configure 1 or more {{site.data.keyword.logs_full_notm}} instances in the account.
- Platform logs generated in the region are routed to the {{site.data.keyword.logs_full_notm}} instance configured in {{site.data.keyword.logs_routing_full_notm}}. The {{site.data.keyword.logs_full_notm}} instance can be in the same region, or in a different region, in the account.
- You must define a service to service authorization between {{site.data.keyword.logs_routing_full_notm}} and {{site.data.keyword.logs_full_notm}} to grant permissions to the {{site.data.keyword.logs_routing_full_notm}} service to send logs to the {{site.data.keyword.logs_full_notm}} service.
For more information, see:
- Getting started with {{site.data.keyword.logs_routing_full_notm}}
- {{site.data.keyword.databases-for-postgresql_full_notm}} logging
{: #extensions-db-postgresql-deploys}
This extension includes one or more items.
| Includes | Number |
|---|---|
| Alerts | 1 |
| Dashboards | 1 |
| Enrichments | 0 |
| Events to metrics | 0 |
| Rules | 6 |
| Views | 0 |
| {: caption="Items included when extension is deployed" caption-side="bottom"} |
Before deploying this extension, make sure that deploying the extension will not cause you to exceed limits for your {{site.data.keyword.logs_full_notm}} instance. If deploying the extension results in limits being exceeded, the deployment will fail. {: tip}
{: #extensions-db-postgresql-deploy}
You can deploy this extension in any {{site.data.keyword.logs_full_notm}} instance that collects {{site.data.keyword.databases-for-postgresql_full_notm}} logs. This extension includes a set of pre-configured resources such as dashboards, views, and alerts that help you monitor critical metrics, identify anomalies, and optimize your system's performance.
For more information about deploying the extension, see Deploying, managing, and removing {{site.data.keyword.logs_full_notm}} extensions.
{{/_include-segments/extensions-validate.md}}
{: #extensions-db-postgresql-dashboards}
One dashboard is provided providing data about {{site.data.keyword.databases-for-postgresql_full_notm}} logs including:
- Total log count
- Logs by severity
- Log trend over time
- The most frequent SQL queries
- The log stream: the stream of raw PostgreSQL logs, showing the timestamp, message, and subsystem
{: #extensions-db-postgresql-alerts}
You can deploy the following alert:
No logs are received from the service: No logs have been received from the PostgreSQL service, indicating potential issues with logging configuration, service downtime, or connectivity problems affecting log transmission.
{: #extensions-db-postgresql-rules}
You can deploy any of the following rules:
Extract SQL Statement: Extracts the SQL statement from the log message.Replace message text to avoid mapping exceptions: Replaces the message text to avoid mapping exceptions by renaming problematic messages keys.Replace password to SENSITIVE data: Replaces the password with the stringSENSITIVEto protect sensitive information.Extract SQLCode, SQLApp: Extracts the databaseSQLCode(SQL error codes) andSQLApp(originating application name) from the logs message.Extract DBUser, DBName, ClientIP: Extracts the databaseDBUser(user),DBName(database name), andClientIP(client IP address) data from the log message for auditing and analysis.Extract log message type: Identifies the type or category of the log message. For example,ERRORorWARNING.