I have configure metricbeat to send postgresql metric but get this error when starting filebeat:
2016/09/20 13:54:29.102566 metricbeat.go:26: INFO Register [ModuleFactory:[], MetricSetFactory:[apache/status, mongodb/status, mysql/status, nginx/stubstatus, redis/info, redis/keyspace, system/core, system/cpu, system/diskio, system/filesystem, system/fsstat, system/load, system/memory, system/network, system/process, zookeeper/mntr]]
2016/09/20 13:54:29.201255 beat.go:284: CRIT Exiting: 1 error: metricset 'postgresql/bgwriter' is not registered, module not found
Exiting: 1 error: metricset 'postgresql/bgwriter' is not registered, module not found
config
- module: postgresql
metricsets:
# Stats about every PostgreSQL database
# - database
# Stats about the background writer process's activity
- bgwriter
# Stats about every PostgreSQL process
# - activity
# enabled: true
period: 60s
# The host must be passed as PostgreSQL DSN. Example:
# postgres://pqgotest:password@localhost:5432?sslmode=disable
# The available parameters are documented here:
# https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters
hosts: ["postgres://postgres@localhost:5432"]
6.0-alpha1 is currently the right one. We had to do some branch renaming in preparation for beta1. You are fine with this snapshot for the moment to test postgres.
Most environment variables as specified at PostgreSQL: Documentation: 16: 34.15. Environment Variables supported by libpq are also supported by pq. If any of the environment variables not supported by pq are set, pq will panic during connection establishment. Environment variables have a lower precedence than explicitly provided connection parameters.
That's probably caused by having PGSSLMODE=allow in your environment. I'd unset that one as well. It appears the the Golang lib/pq doesn't agree with the C libpq on what the options are for this setting.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.