Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collector for working with data from the system profile #710

Merged
merged 5 commits into from Sep 15, 2023

Conversation

mikle7771
Copy link
Contributor

This implementation allows you to get metrics on slow queries.

mongodb_profile_slow_query_count{cl_id="58ffb6f25ee88911bb439499",cl_role="",database="admin",rs_state="2"} 1
mongodb_profile_slow_query_count{cl_id="58ffb6f25ee88911bb439499",cl_role="",database="config",rs_state="2"} 3
mongodb_profile_slow_query_count{cl_id="58ffb6f25ee88911bb439499",cl_role="",database="local",rs_state="2"} 0

--collector.profile-time-ts=30 Set time for scrape slow queries. This interval must be synchronized with the Prometheus scrape interval

For the collector to work, you must enable the profiler
https://www.mongodb.com/docs/manual/tutorial/manage-the-database-profiler/

This PR implements the functionality from this issue #707

  • Tests passed.
  • Fix conflicts with target branch.

@mikle7771 mikle7771 requested a review from a team as a code owner September 13, 2023 13:02
@mikle7771 mikle7771 requested review from ademidoff and JiriCtvrtka and removed request for a team September 13, 2023 13:02
@it-percona-cla
Copy link

it-percona-cla commented Sep 13, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@tregubov-av tregubov-av left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
I think I like to it.

Copy link
Member

@BupycHuk BupycHuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. Should we add to documentation how to enable profile?

@mikle7771
Copy link
Contributor Author

looks good to me. Should we add to documentation how to enable profile?

Where is the best place to describe this?

@BupycHuk
Copy link
Member

@mikle7771 I think somewhere here will be ok

@mikle7771
Copy link
Contributor Author

@mikle7771 I think somewhere here will be ok

Done

@BupycHuk BupycHuk merged commit fcb3850 into percona:main Sep 15, 2023
2 of 8 checks passed
@tregubov-av
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants