File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,35 @@ A complete PostgreSQL monitoring solution with automated performance analysis an
4
4
5
5
## 🚀 Quick Start
6
6
7
+ Create a new DB user in database to be monitored (skip this if you want just to check out ` postgres_ai ` monitoring with a synthetic ` demo ` database):
8
+ ``` sql
9
+ -- Create a user for Postgres AI monitoring
10
+ create user postgres_ai_mon with password ' <password>' ;
11
+
12
+ grant connect on database < database_name> to postgres_ai_mon;
13
+
14
+ grant pg_monitor to postgres_ai_mon;
15
+ grant usage on schema public to postgres_ai_mon;
16
+ grant select on all tables in schema public to postgres_ai_mon; -- TEMPORARY; TODO: get rid of this
17
+ grant select on all sequences in schema public to postgres_ai_mon;
18
+
19
+ grant select on pg_stat_statements to postgres_ai_mon;
20
+ grant select on pg_stat_database to postgres_ai_mon;
21
+ grant select on pg_stat_user_tables to postgres_ai_mon;
22
+ ```
23
+
7
24
** One command setup:**
8
25
9
26
``` bash
10
27
# Download the CLI
11
28
curl -o postgres_ai https://gitlab.com/postgres-ai/postgres_ai/-/raw/main/postgres_ai && chmod +x postgres_ai
29
+ ```
12
30
31
+ Now, start it and wait for a few minutes. Two optional adjustments:
32
+ - remove ` --demo ` unless you want to see it in action without monitoring an actual Postgres DB (this option creates a demo DB)
33
+ - get an Postgres AI access token for your organization at https://console.postgres.ai (` Your org name → Manage → Access tokens ` )
34
+
35
+ ``` bash
13
36
# Complete setup with demo database
14
37
./postgres_ai quickstart --demo
15
38
You can’t perform that action at this time.
0 commit comments