Hi. ELK stack version 6.6.2. I deployed a new server with PostgreSQL and I use Filebeat to send PostgreSQL logs the the elasticsearch cluster. I added the pluggin PostgreSQL and imported the dashboard (filebeat setup -e).
Dont have:
Query count and cumulated duration [Filebeat PostgreSQL]
Query Durations [Filebeat PostgreSQL]
Slow Queries [Filebeat PostgreSQL]
cat modules.d/postgresql.yml
- module: postgresql
# All logs
log:
enabled: true
var.paths:
- /var/lib/pgsql/11/data/log/*.log
cat /var/lib/pgsql/11/data/postgresql.conf | grep -v "^#" | grep -v "^$"
max_connections = 100
shared_buffers = 128MB
dynamic_shared_memory_type = posix
max_wal_size = 1GB
min_wal_size = 80MB
log_destination = 'stderr'
logging_collector = on
log_directory = 'log'
log_filename = 'postgresql-%a.log'
log_truncate_on_rotation = on
log_rotation_age = 1d
log_rotation_size = 0
log_duration = on
log_line_prefix = '%m [%p] '
log_timezone = 'W-SU'
datestyle = 'iso, mdy'
timezone = 'W-SU'
lc_messages = 'en_US.UTF-8'
lc_monetary = 'en_US.UTF-8'
lc_numeric = 'en_US.UTF-8'
lc_time = 'en_US.UTF-8'
default_text_search_config = 'pg_catalog.english'