Add ability to mongodb_exporter expose whether it's enterprise or not
Description
How to test
Prepare environment:
1. Run PMM Server
2. Setup and run PMM Agent
3. Run MongoDB Community instance on 127.0.0.1:27017
4. Run MongoDB Enterprise instance on 127.0.0.1:27018 (guide how to create Enterprise image: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-with-docker/
5. Add MongoDB Community instance to monitoring
6. Add MobgoDB Enterprise instance to monitoring
7. Check port of exporter for Community instance and open the page: http://127.0.0.1:{EXPORTER_PORT}/metrics
8. Authorize and find "mongodb_version_info" metric, label should have "Community" value
9. Check port of exporter for Enterprise instance and open the page: http://127.0.0.1:{EXPORTER_PORT}/metrics
10. Authorize and find "mongodb_version_info" metric, label should have "Enterprise" value
How to document
Attachments
relates to
Smart Checklist
hideActivity

Ihor Cherkasov September 6, 2022 at 8:27 PM
Verified on FB – https://github.com/Percona-Lab/pmm-submodules/pull/2748#issuecomment-1235326240
Server Docker – perconalab/pmm-server-fb:PR-2748-8b2c396
Now mongodb_version_info has edition label with "Community" or "Enterprise" value:
Community:
Enterprise:
In the scope of this ticket we want that mongodb_exporter show whether Mongo DB Enterprise or Community edition.
For this we can extend mongodb_exprorter by adding additional label `edition` to the `mongodb_version_info` metric which shows this info.