Mongodb - number of connections per db?

Hello,

1)    i have this dbs, version 14 enterprise

Enterprise Prod [direct: primary] admin> show dbs

admin 260.00 KiB

config 176.00 KiB

local 696.98 MiB

dece-buz 1.00 MiB

dece-com 196.00 KiB

dece-epe 176.02 MiB

And I have this query also

number of connections per client IP

///////////////////////////////

Enterprise Prod [direct: primary] admin> db.currentOp(true).inprog.reduce((accumulator, connection) => { ipaddress = connection.client ? connection.client.split(":")[0] : “Internal”; accumulator[ipaddress] = (accumulator[ipaddress] || 0) + 1; accumulator[“TOTAL_CONNECTION_COUNT”]++; return accumulator; }, { TOTAL_CONNECTION_COUNT: 0 })

{

{
TOTAL_CONNECTION_COUNT: 102,
Internal: 30,
‘40.6.7.4’: 19,
‘172.168.110.43’: 13,
‘10.6.34.235’: 6,
‘172.168.110.42’: 16,
‘10.6.34.230’: 7,
‘10.6.34.234’: 4,
‘10.6.34.212’: 2,
‘10.6.34.239’: 2,
‘127.0.0.1’: 3
}

  1. Is there a way to get something like this, number of connections per db?

Enterprise Prod [direct: primary] admin> [consulta que se necesita para obtener lo solicitado]

admin 1

config 2

local 3

dece-buz 10

dece-com 11

dece-epe 7