Monitoring and logging

You can monitor your Postgres clusters by viewing the metrics and logs from Azure. For existing Postgres Enterprise Manager (PEM) users who wish to monitor BigAnimal clusters alongside self-managed Postgres clusters, you can use the remote Remote Monitoring capability of PEM. For more information on using PEM to monitor your clusters see Remote Monitoring.

The following sections describe viewing metrics and logs directly from Azure. See Metrics details for more information.

Viewing metrics and logs from Azure

BigAnimal sends all metrics and logs from PostgreSQL clusters to Azure. The following describes what metrics and logs are sent and how to view them.

Azure log analytics

When BigAnimal deploys workloads on Azure, the logs from the PostgreSQL clusters are forwarded to the Azure Log Workspace. To query BigAnimal logs, you must use Azure Log Analytics and Kusto Query language.

Querying PostgreSQL cluster logs

All logs from your PostgreSQL clusters are stored in the Customer Log Analytics workspace. To find your Customer Log Analytics workspace:

  1. Sign in to the Azure portal.

  2. Select Resource Groups.

  3. Select the Resource Group corresponding to the region where you choose to deploy your BigAnimal cluster. You will see resources included in that Resource Group.

  4. Select the resource of type Log Analytics workspace with the suffix -customer.

  5. Select the Logs in the menu on the left in the General section.

  6. Close the dashboard with prebuilt queries. This will bring you to the KQL Editor.

The following tables are available in the Customer Log Analytic workspace.

Table nameDescriptionLogger
PostgresLogs_CLLogs of the Customer clusters databases (all postgres related logs)logger = postgres
PostgresAuditLogs_CLAudit Logs of the Customer clusters databaseslogger = pgaudit or edb_audit

You can use the KQL Query editor to compose your queries over these tables. For example,

PostgresLogs_CL
| project record_log_time_s, record_error_severity_s, record_detail_s
| sort by record_log_time_s desc

PostgresAuditLogs_CL
| where logger_s == "pgaudit"
| project record_log_time_s, record_error_severity_s, record_audit_statement_s
| sort by record_log_time_s desc

PostgresAuditLogs_CL
| where logger_s == "edb_audit"
| project record_log_time_s, record_error_severity_s, record_message_s
| sort by record_log_time_s desc

Using shared dashboards to view PostgreSQL cluster logs

To view logs from your PostgreSQL clusters using Shared Dashboard:

  1. Sign in to the Azure portal.

  2. Select Resource Groups.

  3. Select the Resource Group corresponding to the region where you choose to deploy your BigAnimal cluster. You will see resources included in that Resource Group.

  4. Select the resource of type Shared Dashboard with the suffix -customer.

  5. Select the Go to dashboard link located at the top of the page.