mirror of
https://github.com/juspay/services-flake.git
synced 2024-07-14 15:40:29 +03:00
docs(pgadmin): system_stats postgres extension
This commit is contained in:
parent
fb6de01eb6
commit
f276f5985a
BIN
doc/pgadmin-system-stats.png
Normal file
BIN
doc/pgadmin-system-stats.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 346 KiB |
@ -16,3 +16,34 @@
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## Guide
|
||||
|
||||
### Visualize system statistics
|
||||
|
||||
`pgAdmin` uses the functions exposed by [system_stats](https://github.com/EnterpriseDB/system_stats) [[postgresql]] extension to monitor the system metrics such as CPU, memory and disk information. Use this in your config:
|
||||
|
||||
```nix
|
||||
# In `perSystem.process-compose.<name>`
|
||||
{
|
||||
services.postgres."pg1" = {
|
||||
enable = true;
|
||||
extensions = exts: [
|
||||
exts.system_stats
|
||||
];
|
||||
# This creates the extensions for the `postgres` database, if you need it for a custom database,
|
||||
# ensure to add the below script in `schemas` of the database of your choice under `initialDatabses`.
|
||||
initialScript.before = ''
|
||||
CREATE EXTENSION system_stats;
|
||||
'';
|
||||
};
|
||||
services.pgadmin."pgad1" = {
|
||||
enable = true;
|
||||
initialEmail = "email@gmail.com";
|
||||
initialPassword = "password";
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Open the pgAdmin dashboard, establish a connection with your database and you will see:
|
||||
![[pgadmin-system-stats.png]]
|
||||
|
Loading…
Reference in New Issue
Block a user