PostgreSQL Replication Data Metricbeat

According to https://github.com/elastic/beats/issues/11234 the Metricbeat PostgreSQL module does not support pulling replication data.

Is there a workaround to get important metrics like Replication Lag from PostgreSQL using Metricbeat or Filebeat?