All 8 log categories available in Diagnostic Settings · Fields · KQL queries
Click a category card to see its fields and KQL examples.
| Field | Description | Example value |
|---|---|---|
| TimeGenerated | UTC timestamp when log was recorded | 2024-06-01T12:34:56Z |
| Resource | Server name in UPPERCASE (AzureDiagnostics) | MYPGSERVER |
| LogicalServerName_s | Server name lowercase (resource-specific tables) | mypgserver |
| Category | Log category name | PostgreSQLLogs |
| SubscriptionId | Azure subscription GUID | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| ResourceGroup | Resource group name | rg-prod-db |
| ResourceProvider | Always MICROSOFT.DBFORPOSTGRESQL | — |
| ResourceType | Always FlexibleServers | — |
| OperationName | Operation type | LogEvent |
| TenantId | Azure AD tenant GUID | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Type | AzureDiagnostics or resource-specific table name | AzureDiagnostics |
| _ResourceId | Full ARM resource URI | /subscriptions/.../flexibleServers/mypgserver |
| Field | Description | Example value |
|---|---|---|
| errorLevel_s | PostgreSQL severity level | LOG, ERROR, NOTICE, WARNING, FATAL, PANIC |
| processId_d | PostgreSQL backend process ID | 12345 |
| sqlerrcode_s | SQLSTATE code (SQL standard conventions) | 42P01 (undefined_table), 08006 (connection failure), 00000 (success) |
| Message | Primary log message text | connection received: host=10.0.0.5 port=54321 |
| Detail | Secondary detail message (if applicable) | Key (id)=(42) already exists. |
| ColumnName | Column name involved (if applicable) | user_id |
| SchemaName | Schema name involved (if applicable) | public |
| DatatypeName | Data type name involved (if applicable) | integer |
| Mode | Tables | Notes |
|---|---|---|
| AzureDiagnostics | AzureDiagnostics (single mixed table) | All categories merged. Column names get _s / _d suffixes. Legacy — not recommended. |
| Resource-specific ✅ | PGSQLServerLogs, PGSQLPgStatActivitySessions, PGSQLQueryStoreRuntime, etc. | One table per category. Better performance, clean schema. Strongly recommended. |
| Group | Includes |
|---|---|
| audit | PostgreSQLLogs only |
| allLogs | All 8 categories |