Metricset 'postgresql/bgwriter' is not registered, module not found

What command are you using to start Metricbeat?

/etc/init.d/metricbeat start

but to avoid the error i had to edit that file and add at the top:

### END INIT INFO

unset -v PGSERVICEFILE
unset -v PGSYSCONFDIR
unset -v PGSSLMODE

If metricbeat is incompatible with those vars i think the start script should unset them by default to avoid this error to users using it.

That job is generally left to service on SysV. From man service:

service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /.

So try running sudo service metricbeat start. That should execute the service from a clean environment.

This topic was automatically closed after 21 days. New replies are no longer allowed.