mongodb_exporter
mongodb_exporter copied to clipboard
Restore server status collector
This PR allows use of the serverStatus
and replSetGetStatus
collectors for scenarios where fetching all the data provided by getDiagnosticData
is either not desirable (or in the case of mongos not possible).
Metric naming conventions and labels will now be consistent regardless of the collector in use (eg. metric prefixes will always be mongodb_ss_
and mongodb_rs_
).
Note that this is a breaking change for users running with --collector.replicasetstatus
as mongodb_members_uptime
will now be mongodb_rs_members_uptime
for example.
- [ ] Links to other linked pull requests (optional).
- [x] Tests passed.
- [x] Fix conflicts with target branch.
- [ ] Update jira ticket description if needed.
- [ ] Attach screenshots/console output to confirm new behavior to jira ticket, if applicable.
Once all checks pass and the code is ready for review, please add pmm-review-exporters
team as the reviewer. That would assign people from the review team automatically. Report any issues on our Forum or Discord.
@anton-bystrov How would this affect the dashboards?
@anton-bystrov How would this affect the dashboards?
I think this is critical, because we have queries with mongodb_. mongodb_rs is another metric. But we can add "or" to prevent this.
@ShashankSinha252 @denisok Please be careful before merging this since it will affect the dashboards
@anton-bystrov @percona-csalguero @ShashankSinha252 @denisok Do you need anything from me to facilitate moving forward with this in order to restore the ability to fetch server status for mongos instances?
@rnovikovP please check
@denisok @rnovikovP I've rebased to keep this PR up to date. Is this something that could be looked at?
@BupycHuk please check it out