Metricbeat couchdb module crash with CouchDB 3.x

The metricbeat module for CouchDB crash when targetting CouchDB 3.1

Metricbeat version: 7.8.1
CouchDB version: 3.1.0 (6 nodes cluster)
OS: RedHat 7.8

# /etc/metricbeat/modules.d/couchdb.yaml
- module: couchdb
  metricsets ["server"]
  period: 10s
  hosts: ["localhost:5984/_node/_local/_stats"]
  username: admin
  password: ******

Starting metricbeat metricbeat -e shows:

ERROR   runtime/panic.go:199   recovered from panic while fetching 'couchdb/server' for host 'localhost:5984'. Recovering, but please report this.
{ 
  "panic": "runtime error: invalid memory address or nil pointer dereference",
  "stack": "
    github.com/elastic/beats/v7/libbeat/logp.Recover
      /go/src/github.com/elastic/beats/libbeat/logp/global.go:101
    runtime.gopanic
      /usr/local/go/src/runtime/panic.go:679
    runtime.panicmem
      /usr/local/go/src/runtime/panic.go:199
    runtime.sigpanic
      /usr/local/go/src/runtime/signal_unix.go:394
    github.com/elastic/beats/v7/metricbeat/module/couchdb/server.(*MetricSet).Fetch
      /go/src/github.com/elastic/beats/metricbeat/module/couchdb/server/server.go:101
    github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).fetch
      /go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:256
    github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).startPeriodicFetching
      /go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:224
    github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).run
      /go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:208
    github.com/elastic/beats/v7/metricbeat/mb/module.(*Wrapper).Start.func1
      /go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:147
"}

I'm having the exact same issue with CouchDb 3.1.0 and Metricbeat 7.9.1.