33[ ![ Go Build & Test] ( https://github.com/cybertec-postgresql/pgwatch/actions/workflows/build.yml/badge.svg )] ( https://github.com/cybertec-postgresql/pgwatch/actions/workflows/build.yml )
44[ ![ Coverage Status] ( https://coveralls.io/repos/github/cybertec-postgresql/pgwatch/badge.svg?branch=master&service=github )] ( https://coveralls.io/github/cybertec-postgresql/pgwatch?branch=master )
55
6+ # pgwatch: PostgreSQL monitoring solution
67
7- # pgwatch v3-beta. Please test it as much as possible!
8-
9- This is the next generation of [ pgwatch2] ( https://github.com/cybertec-postgresql/pgwatch2/ ) .
8+ This is the next generation of [ pgwatch2] ( https://github.com/cybertec-postgresql/pgwatch2/ ) .
109
1110## Quick Start
1211
13- To fetch and run the latest ** demo** Docker image, exposing
14- - Grafana on port 3000,
12+ To fetch and run the latest ** demo** Docker image, exposing
13+
14+ - Grafana on port 3000,
1515- the administrative web UI on port 8080,
1616- the internal configuration and metrics database on port 5432:
1717
@@ -23,18 +23,17 @@ After some minutes you could open the ["Database Overview"](http://127.0.0.1:300
2323
2424If you don't want to add the test database for monitoring, remove the ` PW_TESTDB ` parameter when launching the container.
2525
26-
27-
2826## Development and production use
2927
30- For production and long term installation ` cybertecpostgresql/pgwatch ` Docker image should be used.
28+ For production and long term installation ` cybertecpostgresql/pgwatch ` Docker image should be used.
3129For the fastest development and deployment experience the Docker compose files are provided:
3230
3331``` shell
3432git clone https://github.com/cybertec-postgresql/pgwatch.git && cd pgwatch
3533
3634docker compose -f ./docker/docker-compose.yml up --detach
3735```
36+
3837``` console
3938 ✔ Network pgwatch_default Created
4039 ✔ Container pgwatch-postgres-1 Healthy
@@ -43,6 +42,7 @@ docker compose -f ./docker/docker-compose.yml up --detach
4342```
4443
4544These commands will build and start services listed in the compose file:
45+
4646- configuration and metric database;
4747- pgwatch monitoring agent with WebUI;
4848- Grafana with dashboards.
@@ -54,6 +54,7 @@ looking at metrics.
5454
5555To add a test database under monitoring, you can use [ built-in WebUI] ( http://localhost:8080/ ) . Or simply
5656execute from command line:
57+
5758``` shell
5859docker/compose.add-test-db.sh
5960```
@@ -71,9 +72,11 @@ INSERT 0 1
7172## Produce Workload
7273
7374To emulate workload for added test database execute:
75+
7476``` shell
7577docker/compose.pgbench.sh
7678```
79+
7780``` console
7881dropping old tables...
7982creating tables...
@@ -122,16 +125,17 @@ dropping old tables...
122125done in 0.11 s (drop tables 0.11 s).
123126```
124127
125-
126128## Inspect database
127129
128130> [ !IMPORTANT]
129131 pgAdmin uses port 80. If you want it to use another port, change it in ` docker/compose.pgadmin.yml ` file.
130132
131133To look what is inside ` pgwatch ` database, you can spin up pgAdmin4:
134+
132135``` shell
133136docker compose -f ./docker/docker-compose.yml up --detach pgadmin
134137```
138+
135139Go to
` localhost ` in your favorite browser and login as
` [email protected] ` , password
` admin ` .
136140Server ` pgwatch ` should be already added in ` Servers ` group.
137141
@@ -148,11 +152,13 @@ The command above will rebuild the `pgwatch` agent from sources and relaunch the
148152## Logs
149153
150154If you are running containers in detached mode, you still can follow the logs:
155+
151156``` shell
152157docker compose -f ./docker/docker-compose.yml logs --follow
153158```
154159
155160Or you may check the log of a particular service:
161+
156162``` shell
157163docker compose -f ./docker/docker-compose.yml logs pgwatch --follow
158164```
0 commit comments