postgresai 0.18.0-dev.7 → 0.18.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -9
- package/dist/bin/postgres-ai.js +11815 -14295
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -196,10 +196,7 @@ pgai mon deploy 'postgresql://postgres:<password>@<host>:5432/postgres'
|
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
It signs you in if needed, creates the `postgres_ai_mon` role (with an admin URL; otherwise it
|
|
199
|
-
prints the SQL), provisions monitoring in PostgresAI Cloud,
|
|
200
|
-
of `pgai checkup`, as `postgres_ai_mon`) while the box starts and prints its findings (in JSON:
|
|
201
|
-
`checkup`; skipped where PostgresAI keeps the role's password: no `checkup` key, no first report),
|
|
202
|
-
waits, and prints two links: the project's Health Matrix in the console
|
|
199
|
+
prints the SQL), provisions monitoring in PostgresAI Cloud, waits, and prints two links: the project's Health Matrix in the console
|
|
203
200
|
(`<console>/<org>/projects/<project>/health`, the next step) and Grafana, which signs you in
|
|
204
201
|
with your PostgresAI account (`https://<box>/login/generic_oauth?redirectTo=%2F`). Safe to re-run; a `--clickhouse-key` given on a
|
|
205
202
|
re-run is checked, and a rejected one is `action_required`. For ClickHouse Managed Postgres add `--clickhouse-key <key-id>:<key-secret>`
|
|
@@ -208,6 +205,29 @@ machine instead. When stdout is not a terminal the result is JSON with `status`,
|
|
|
208
205
|
`dashboard_url` and `next`. Then: `pgai mon instances list`, `pgai mon instances watch <id-or-name>`, `pgai mon instances delete <id-or-name>`,
|
|
209
206
|
and `pgai mon instances set <id-or-name> --vcpus <n>` to add or change the database server's vCPUs later (an org admin; AAS starts within a minute).
|
|
210
207
|
|
|
208
|
+
To use a direct PostgreSQL connection, explicitly select `--provider generic`:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
pgai mon deploy "$DATABASE_URL" --provider generic --org <alias> --json --no-wait
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
This is the existing `--provider self-managed` path under a clearer name; both spellings work,
|
|
215
|
+
and the result's `provider` remains `self-managed` for compatibility. It works with any reachable
|
|
216
|
+
PostgreSQL endpoint where the supplied user can create the monitoring role and grant privileges.
|
|
217
|
+
Use a direct endpoint, not a pooler.
|
|
218
|
+
|
|
219
|
+
The endpoint must be reachable from this machine, which prepares the database, and from
|
|
220
|
+
PostgresAI. Before provisioning, PostgresAI tests the connection from its platform, whose
|
|
221
|
+
address is not published, so the port must accept connections from the internet at that point.
|
|
222
|
+
After provisioning, the monitoring server connects from its own IP address, shown on its page in
|
|
223
|
+
the Console (Monitoring, then the instance). A database that must stay behind an IP allowlist
|
|
224
|
+
needs AWS PrivateLink (RDS) or self-hosted monitoring (`--self-hosted`).
|
|
225
|
+
|
|
226
|
+
Without `--provider`, RDS and Supabase hostnames still go to their console integration.
|
|
227
|
+
`generic` does not configure AWS PrivateLink, open a firewall, or remove TLS, permission, or
|
|
228
|
+
payment checks. A private endpoint needs a network path, or monitoring hosted in that network
|
|
229
|
+
(`--self-hosted`).
|
|
230
|
+
|
|
211
231
|
`pgai mon deploy` and `pgai dblab deploy` share their options and results: the database URL as the
|
|
212
232
|
argument (or `--db-url`), `--name` (default: from the database), `--location` (a Hetzner location;
|
|
213
233
|
default: any with capacity), `--wait <minutes>` / `--no-wait`, `--yes` (never prompt), `--json`, the
|
|
@@ -229,7 +249,7 @@ terminal, or with `--json`, it only points to `pgai mon deploy`.
|
|
|
229
249
|
|
|
230
250
|
| Option | |
|
|
231
251
|
|---|---|
|
|
232
|
-
| `--provider <provider>` | `clickhouse`, `rds
|
|
252
|
+
| `--provider <provider>` | `generic` (direct PostgreSQL; `self-managed` remains an alias), `clickhouse`, `rds` or `supabase`; default: detected from the host |
|
|
233
253
|
| `--clickhouse-key <key-id>:<key-secret>` | ClickHouse Cloud API key, for CPU, memory and disk |
|
|
234
254
|
| `--self-hosted` | run the stack on this machine (`mon local-install`) instead of PostgresAI Cloud |
|
|
235
255
|
| `--reset-password` | `postgres_ai_mon` exists and its password is lost: set a new one (see below) |
|
|
@@ -272,8 +292,7 @@ Another database on a server PostgresAI already monitors for the organization ne
|
|
|
272
292
|
`sslmode=require` or `verify-*` in the URL, the role keeps its password, the box's URL carries
|
|
273
293
|
none, and PostgresAI fills in the one it kept from the first `mon deploy` (only over TLS, each query
|
|
274
294
|
parameter once, and only while a box on that server is not deleted, being deleted, or failed to
|
|
275
|
-
delete).
|
|
276
|
-
admin. The full checkup follows on the box. On a server without TLS the kept password cannot be
|
|
295
|
+
delete). On a server without TLS the kept password cannot be
|
|
277
296
|
used: set `PGAI_MON_PASSWORD`, or turn TLS on; if nobody has the password, delete the server's
|
|
278
297
|
other instances, then `--reset-password` with `PGAI_MON_PASSWORD` set to a new one, and deploy
|
|
279
298
|
them again with it (`mon deploy` names them).
|
|
@@ -404,8 +423,9 @@ PGPASSWORD=<password> pgai dblab deploy 'postgresql://<user>@<host>:5432/<db>' -
|
|
|
404
423
|
```
|
|
405
424
|
|
|
406
425
|
The same options as `pgai mon deploy` (`--db-url`, `--name`, `--location`, `--wait`, `--no-wait`, `--yes`, `--json`),
|
|
407
|
-
plus `--size S|M|L` (default `S`), `--disk <GiB>` (default 50)
|
|
408
|
-
SSH keys, for reaching the server and its clones)
|
|
426
|
+
plus `--size S|M|L` (default `S`), `--disk <GiB>` (default 50), `--ssh-key` (required: one of the organization's
|
|
427
|
+
SSH keys, for reaching the server and its clones) and `--provider generic|rds|supabase` (default: detected; `self-managed`
|
|
428
|
+
remains an alias of `generic`). `--name` defaults to the database's name; `--wait` to 120 minutes.
|
|
409
429
|
It shows the estimated monthly cost before asking; with no payment method it stops with the billing page (exit 3).
|
|
410
430
|
`pgai dblab instances list | watch (status) | delete` take an id or a name.
|
|
411
431
|
|