-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[+] improve
pgwatch-demo
Docker image (#643)
[+] improve `pgwatch-demo` Docker image [+] bump PostgreSQL to v17 [*] make Grafana use standard storage instead of Postgres [*] use `full` preset for demo source instead of `exhaustive` [+] use `pgwatch metric print-init` to prepare test monitoring source [*] use normal log level [+] bump Grafana to v10.4.7 [+] preinstall `marcusolsson-treemap-panel` Grafana plugin
- Loading branch information
1 parent
df1f14a
commit b5ac9ea
Showing
5 changed files
with
13 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,3 @@ | ||
#!/bin/bash | ||
|
||
psql -v ON_ERROR_STOP=1 --username "postgres" --dbname "pgwatch" <<-EOSQL | ||
CREATE EXTENSION pg_qualstats; | ||
CREATE EXTENSION plpython3u; | ||
CREATE EXTENSION pg_stat_statements; | ||
GRANT EXECUTE ON FUNCTION pg_stat_file(text) TO pgwatch; | ||
GRANT EXECUTE ON FUNCTION pg_stat_file(text, boolean) TO pgwatch; | ||
EOSQL | ||
|
||
psql -v ON_ERROR_STOP=1 --username "postgres" --dbname "pgwatch" <<-EOSQL | ||
BEGIN; | ||
CREATE OR REPLACE FUNCTION get_load_average(OUT load_1min float, OUT load_5min float, OUT load_15min float) AS | ||
' | ||
from os import getloadavg | ||
la = getloadavg() | ||
return [la[0], la[1], la[2]] | ||
' LANGUAGE plpython3u VOLATILE; | ||
GRANT EXECUTE ON FUNCTION get_load_average() TO pgwatch; | ||
COMMENT ON FUNCTION get_load_average() is 'created for pgwatch'; | ||
COMMIT; | ||
EOSQL | ||
/pgwatch/pgwatch metric print-init full | psql -v ON_ERROR_STOP=1 --username "postgres" --dbname "pgwatch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters