Add ability to mongodb_exporter expose whether it's enterprise or not

Description

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.

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

None

Attachments

2

Smart Checklist

hide

Activity

Show:

Ihor Cherkasov September 6, 2022 at 8:27 PM

Verified on FB – https://github.com/Percona-Lab/pmm-submodules/pull/2748#issuecomment-1235326240

 

Now mongodb_version_info has edition label with "Community" or "Enterprise" value:

  • Community:

  • Enterprise:

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Yes

Needs Doc

No

Planned Version/s

Fix versions

Story Points

Smart Checklist Progress

Smart Checklist

Created August 31, 2022 at 2:53 PM
Updated November 13, 2024 at 9:45 AM
Resolved November 9, 2022 at 8:12 AM