Skip to content

Commit 75d84d7

Browse files
authored
Merge pull request #1044 from Altinity/655-add-docker-compose-healthcheck-using-sink-connector-client
Added monitoring of sink connector using docker compose
2 parents a956936 + 6f2334d commit 75d84d7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

doc/production_setup.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[MySQL Setup](#mysql-production-setup) \
88
[PostgreSQL Setup](#postgresql-production-setup) \
99
[ClickHouse Setup](#clickhouse-setup)
10+
[Sink Connector Monitoring(#sink-connector-monitoring)]
1011

1112
### Improving throughput and/or Memory usage.
1213
![](img/production_setup.jpg)
@@ -141,3 +142,30 @@ grant SELECT, INSERT, CREATE TABLE, TRUNCATE on replicated_d
141142
142143
One of the common problems with PostgreSQL is the WAL size increasing.
143144
[Handling PostgreSQL WAL Growth with Debezium Connectors](postgres_wal_growth.md)
145+
146+
## Sink Connector Monitoring
147+
148+
The sink connector provides monitoring capabilities through health checks. You can configure health checks in your deployment to ensure the connector is functioning properly.
149+
150+
### Health Check Configuration
151+
152+
Add the following health check configuration to your deployment:
153+
154+
```yaml
155+
healthcheck:
156+
test: ["CMD-SHELL", "if [ \"$$(/sink-connector-client show_replica_status)\" == \"\" ]; then exit 1; fi; exit 0"]
157+
interval: 60s
158+
timeout: 20s
159+
retries: 10
160+
start_period: 600s
161+
```
162+
163+
This configuration:
164+
- Runs the health check every 60 seconds
165+
- Times out after 20 seconds
166+
- Retries up to 10 times before marking the container as unhealthy
167+
- Allows a 600-second grace period during startup before beginning health checks
168+
169+
The health check uses the `show_replica_status` command to verify the connector is operational. If the command returns an empty result, the container is considered unhealthy.
170+
171+
##

0 commit comments

Comments
 (0)