Skip to content

Commit 8caa620

Browse files
committed
Prelim audit edits
1 parent 5e36533 commit 8caa620

File tree

4 files changed

+67
-1
lines changed

4 files changed

+67
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Audit logging in Azure Database for PostgreSQL - Single Server
3+
description: Concepts for pgAudit audit logging in Azure Database for PostgreSQL - Single Server.
4+
author: rachel-msft
5+
ms.author: raagyema
6+
ms.service: postgresql
7+
ms.topic: conceptual
8+
ms.date: 09/10/2019
9+
---
10+
11+
# Audit logging using pgAudit in Azure Database for PostgreSQL - Single Server
12+
13+
14+
15+
16+
## Next steps
17+
* [Learn how to set up auditing using the Azure portal]()
18+
* [Learn how to set up auditing using the Azure CLI]()

articles/postgresql/concepts-extensions.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: rachel-msft
55
ms.author: raagyema
66
ms.service: postgresql
77
ms.topic: conceptual
8-
ms.date: 08/23/2019
8+
ms.date: 09/10/2019
99
---
1010
# PostgreSQL extensions in Azure Database for PostgreSQL - Single Server
1111
PostgreSQL provides the ability to extend the functionality of your database using extensions. Extensions bundle multiple related SQL objects together in a single package that can be loaded or removed from your database with a single command. After being loaded in the database, extensions function like built-in features.
@@ -38,6 +38,7 @@ The following extensions are available in Azure Database for PostgreSQL servers
3838
> |[isn](https://www.postgresql.org/docs/11/isn.html) | 1.2 | data types for international product numbering standards|
3939
> |[ltree](https://www.postgresql.org/docs/11/ltree.html) | 1.1 | data type for hierarchical tree-like structures|
4040
> |[orafce](https://github.com/orafce/orafce) | 3.7 | Functions and operators that emulate a subset of functions and packages from commercial RDBMS|
41+
> |[pgaudit](https://www.pgaudit.org/) | 1.3 | provides auditing functionality|
4142
> |[pgcrypto](https://www.postgresql.org/docs/11/pgcrypto.html) | 1.3 | cryptographic functions|
4243
> |[pgrouting](https://pgrouting.org/) | 2.6.2 | pgRouting Extension|
4344
> |[pgrowlocks](https://www.postgresql.org/docs/11/pgrowlocks.html) | 1.2 | show row-level locking information|
@@ -82,6 +83,7 @@ The following extensions are available in Azure Database for PostgreSQL servers
8283
> |[isn](https://www.postgresql.org/docs/10/isn.html) | 1.1 | data types for international product numbering standards|
8384
> |[ltree](https://www.postgresql.org/docs/10/ltree.html) | 1.1 | data type for hierarchical tree-like structures|
8485
> |[orafce](https://github.com/orafce/orafce) | 3.7 | Functions and operators that emulate a subset of functions and packages from commercial RDBMS|
86+
> |[pgaudit](https://www.pgaudit.org/) | 1.3 | provides auditing functionality|
8587
> |[pgcrypto](https://www.postgresql.org/docs/10/pgcrypto.html) | 1.3 | cryptographic functions|
8688
> |[pgrouting](https://pgrouting.org/) | 2.5.2 | pgRouting Extension|
8789
> |[pgrowlocks](https://www.postgresql.org/docs/10/pgrowlocks.html) | 1.2 | show row-level locking information|
@@ -127,6 +129,7 @@ The following extensions are available in Azure Database for PostgreSQL servers
127129
> |[isn](https://www.postgresql.org/docs/9.6/isn.html) | 1.1 | data types for international product numbering standards|
128130
> |[ltree](https://www.postgresql.org/docs/9.6/ltree.html) | 1.1 | data type for hierarchical tree-like structures|
129131
> |[orafce](https://github.com/orafce/orafce) | 3.7 | Functions and operators that emulate a subset of functions and packages from commercial RDBMS|
132+
> |[pgaudit](https://www.pgaudit.org/) | 1.3 | provides auditing functionality|
130133
> |[pgcrypto](https://www.postgresql.org/docs/9.6/pgcrypto.html) | 1.3 | cryptographic functions|
131134
> |[pgrouting](https://pgrouting.org/) | 2.3.2 | pgRouting Extension|
132135
> |[pgrowlocks](https://www.postgresql.org/docs/9.6/pgrowlocks.html) | 1.2 | show row-level locking information|
@@ -172,6 +175,7 @@ The following extensions are available in Azure Database for PostgreSQL servers
172175
> |[isn](https://www.postgresql.org/docs/9.5/isn.html) | 1.0 | data types for international product numbering standards|
173176
> |[ltree](https://www.postgresql.org/docs/9.5/ltree.html) | 1.0 | data type for hierarchical tree-like structures|
174177
> |[orafce](https://github.com/orafce/orafce) | 3.7 | Functions and operators that emulate a subset of functions and packages from commercial RDBMS|
178+
> |[pgaudit](https://www.pgaudit.org/) | 1.3 | provides auditing functionality|
175179
> |[pgcrypto](https://www.postgresql.org/docs/9.5/pgcrypto.html) | 1.2 | cryptographic functions|
176180
> |[pgrouting](https://pgrouting.org/) | 2.3.0 | pgRouting Extension|
177181
> |[pgrowlocks](https://www.postgresql.org/docs/9.5/pgrowlocks.html) | 1.1 | show row-level locking information|
@@ -207,6 +211,9 @@ Currently, outbound connections from Azure Database for PostgreSQL are not suppo
207211
If you are planning to use `uuid_generate_v4()` from the uuid-ossp extension, consider comparing with `gen_random_uuid()` from the pgcrypto extension for performance benefits.
208212

209213

214+
## pgAudit
215+
The pgAudit extension provides session and object audit logging. To learn how to use this extension in Azure Database for PostgreSQL, visit the [auditing concepts article](concepts-audit-logs.md).
216+
210217
## TimescaleDB
211218
TimescaleDB is a time-series database that is packaged as an extension for PostgreSQL. TimescaleDB provides time-oriented analytical functions, optimizations, and scales Postgres for time-series workloads.
212219

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Configure audit logging using the Azure CLI in Azure Database for PostgreSQL - Single Server
3+
description: How to configure pgAudit audit logs using the Azure CLI in Azure Database for PostgreSQL - Single Server.
4+
author: rachel-msft
5+
ms.author: raagyema
6+
ms.service: postgresql
7+
ms.topic: conceptual
8+
ms.date: 09/10/2019
9+
---
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Configure audit logging using the Azure portal in Azure Database for PostgreSQL - Single Server
3+
description: How to configure and access pgAudit audit logs using the Azure portal in Azure Database for PostgreSQL - Single Server.
4+
author: rachel-msft
5+
ms.author: raagyema
6+
ms.service: postgresql
7+
ms.topic: conceptual
8+
ms.date: 09/10/2019
9+
---
10+
11+
# How to configure audit logging using the Azure portal in Azure Database for PostgreSQL - Single Server
12+
13+
Audit logging can cause a high volume of logs to be generated on your server. These logs are by default sent to server logs storage using standard Postgres logging. This storage space is auxiliary to your server and not charged as part of the server storage you provision. This storage space is capped at 1 GB.
14+
15+
If you want to use audit logging, we recommend that you turn off logging. Instead, you can direct the logs to Azure M
16+
17+
### Preload pgaudit files
18+
Load the pgAudit extension into the shared preload files.
19+
20+
1. In the Azure portal, select your Azure Database for PostgreSQL server.
21+
2. In the server's navigation bar, select **Server Parameters**.
22+
3. Use the search bar to find the `shared_preload_libraries` parameter.
23+
4. Select **pgaudit** in the drop down.
24+
5. **Save** your change.
25+
6. [Restart](howto-restart-server-portal.md) the server to apply this change. A restart is required because shared_preload_libraries is a static parameter.
26+
27+
### Install the extension on your Postgres server
28+
Connect to your server (using a client like psql) and install the pgAudit extension with the following:
29+
`CREATE EXTENSION pgaudit;`
30+
31+
>[!TIP]
32+
> If you see an error, confirm that you restarted your server after adding pgaudit to shared_preload_libraries.

0 commit comments

Comments
 (0)