Skip to content

Commit

Permalink
metricbeat/module/postgresql: Improve healthcheck for Postgres (#36182)
Browse files Browse the repository at this point in the history
  • Loading branch information
shmsr authored Aug 1, 2023
1 parent 0a655a1 commit 4ae13d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions metricbeat/module/postgresql/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ version: '2.3'

services:
postgresql:
image: docker.elastic.co/integrations-ci/beats-postgresql:${POSTGRESQL_VERSION:-13.2}-2
image: docker.elastic.co/integrations-ci/beats-postgresql:${POSTGRESQL_VERSION:-13.11}-2
build:
context: ./_meta
args:
POSTGRESQL_VERSION: ${POSTGRESQL_VERSION:-13.2}
POSTGRESQL_VERSION: ${POSTGRESQL_VERSION:-13.11}
environment:
POSTGRES_PASSWORD: postgres
ports:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -p 5432"]
interval: 5s
timeout: 5s
test: ['CMD-SHELL', 'psql -h localhost -p 5432 -U postgres -c select 1 -d postgres']
interval: 15s
timeout: 30s
retries: 5
start_period: 15s
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
)

func TestFetch(t *testing.T) {
t.Skip("Flaky test: https://github.com/elastic/beats/issues/35995")
service := compose.EnsureUp(t, "postgresql")

f := mbtest.NewReportingMetricSetV2Error(t, getConfig(service.Host()))
Expand Down

0 comments on commit 4ae13d9

Please sign in to comment.