mongodb_exporter icon indicating copy to clipboard operation
mongodb_exporter copied to clipboard

Restore server status collector

Open trvrnrth opened this issue 2 years ago • 7 comments

PMM-7947

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.

trvrnrth avatar Sep 12 '22 12:09 trvrnrth

@anton-bystrov How would this affect the dashboards?

percona-csalguero avatar Oct 06 '22 11:10 percona-csalguero

@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.

anton-bystrov avatar Oct 06 '22 13:10 anton-bystrov

@ShashankSinha252 @denisok Please be careful before merging this since it will affect the dashboards

percona-csalguero avatar Oct 06 '22 15:10 percona-csalguero

@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?

trvrnrth avatar May 30 '23 08:05 trvrnrth

@rnovikovP please check

denisok avatar May 31 '23 09:05 denisok

@denisok @rnovikovP I've rebased to keep this PR up to date. Is this something that could be looked at?

trvrnrth avatar Sep 28 '23 16:09 trvrnrth

@BupycHuk please check it out

denisok avatar Sep 29 '23 09:09 denisok