I’m experiencing this issue as well with percona/mongodb_exporter. It works fine for configs and shards.
It seems like we have the following related jira https://jira.percona.com/browse/PMM-12350
time="2023-07-26T14:40:38Z" level=debug msg="MongoDB edition: Community" │
│ time="2023-07-26T14:40:38Z" level=error msg="cannot retrieve engine type: Engine is unavailable" │
│ time="2023-07-26T14:40:38Z" level=warning msg="cannot create metrics for oplog: (IllegalOperation) Can't use 'local' database through mongos" │
│ time="2023-07-26T14:40:38Z" level=debug msg="getting stats for databases: [admin config db_name]" │
│ time="2023-07-26T14:40:53Z" level=debug msg="getDiagnosticData result"