PMM 1 mongo_exporter does not support authorization for MongoDB 5.0

Description

Our compatibility matrix states PMM 1 supports MongoDB 5.0. But it seems the mongo_exporter bundled with PMM 1 server/client uses a MongoDB Go driver version which does not support authorization for connections to MongoDB 5.0. 

The following error appears:

./mongodb_exporter -mongodb.uri="mongodb://mongodb_exporter:Admin123@localhost:27017/admin" -test ERRO[0000] Cannot connect to server using url mongodb://****:****@localhost:27017: server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field. source="connection.go:84" ERRO[0000] Can't connect to MongoDB: Cannot connect using uri: mongodb://mongodb_exporter:AdminPa5sw0rd@localhost:27017/admin source="mongodb_exporter.go:104"

If no login/password is specified, it can connect:

./mongodb_exporter -mongodb.uri="mongodb://localhost:27017/admin" -test { "Version": "5.0.5", "VersionArray": [ 5, 0, 5, 0 ], "GitVersion": "d65fd89df3fc039b5c55933c0f71d647a54510ae", "OpenSSLVersion": "", "SysInfo": "", "Bits": 64, "Debug": false, "MaxObjectSize": 16777216 }

It seems the necessary changes were made in MongoDB Go driver 1.4.0 with commit https://github.com/mongodb/mongo-go-driver/commit/5d11dfab990acb6259bcaa6973af706d9403975d

The node_exporter in PMM 1 client should be updated to fully support MongoDB 5.0

How to test

None

How to document

None

AFFECTED CS IDs

CS0024290

Smart Checklist

Activity

Show:

Nurlan Moldomurov July 24, 2024 at 9:48 AM

PMM 1 is EOLed, so won't be fixed

Won't Do

Details

Assignee

Reporter

Priority

Labels

Needs QA

Yes

Needs Doc

Yes

Affects versions

Smart Checklist

Created January 19, 2022 at 8:52 PM
Updated November 13, 2024 at 9:49 AM
Resolved July 24, 2024 at 9:48 AM

Flag notifications