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

feat(inputs.ceph): Use perf schema to determine metric type #15233

Merged
merged 1 commit into from
May 2, 2024

Conversation

awojno-bloomberg
Copy link
Contributor

Summary

Run ceph perf schema to determine the metric types and use that information to correctly parse metrics.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #

Sorry, something went wrong.

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Apr 25, 2024
@awojno-bloomberg awojno-bloomberg force-pushed the ceph-perf-schema branch 3 times, most recently from 6216e7a to 9373440 Compare April 25, 2024 16:19
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks @awojno-bloomberg for your contribution! I have some comments regarding handling of errors in the code...

plugins/inputs/ceph/ceph.go Outdated Show resolved Hide resolved
plugins/inputs/ceph/ceph.go Outdated Show resolved Hide resolved
plugins/inputs/ceph/ceph.go Outdated Show resolved Hide resolved
plugins/inputs/ceph/ceph.go Outdated Show resolved Hide resolved
plugins/inputs/ceph/ceph.go Outdated Show resolved Hide resolved
plugins/inputs/ceph/ceph.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Apr 25, 2024
@awojno-bloomberg awojno-bloomberg force-pushed the ceph-perf-schema branch 3 times, most recently from 3ab8071 to 2f817b6 Compare April 29, 2024 19:41
@awojno-bloomberg
Copy link
Contributor Author

Thanks @awojno-bloomberg for your contribution! I have some comments regarding handling of errors in the code...

Hi, thanks for taking a look at this PR. I am new to Go/Telegraf so I appreciate all of the comments. Please let me know if there is anything I can do for this PR.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for the nice update @awojno-bloomberg!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Apr 30, 2024
@srebhan srebhan assigned powersj and DStrand1 and unassigned srebhan Apr 30, 2024
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Hi,

Thanks for the PR! Can you please add some tests that cover the parseSchema function?

As far as backwards compatibility, it does look like all the recent versions of Ceph have supported the ability to dump the performance schema. I did have a concern about printing the warning out at every collection interval, if older versions did not.
 
Thanks!

@awojno-bloomberg
Copy link
Contributor Author

Hi,

Thanks for the PR! Can you please add some tests that cover the parseSchema function?

As far as backwards compatibility, it does look like all the recent versions of Ceph have supported the ability to dump the performance schema. I did have a concern about printing the warning out at every collection interval, if older versions did not.   Thanks!

Thanks for taking a look. I added a test case for parseSchema. Let me know if anything else is needed there.

For the second point, because performance schema has been supported for a while, should I change it so that instead of the warning, I instead add a message to acc.AddError and continue similar to what happens when perfDump errors?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@telegraf-tiger
Copy link
Contributor

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for taking a look. I added a test case for parseSchema. Let me know if anything else is needed there.

Thanks!

For the second point, because performance schema has been supported for a while, should I change it so that instead of the warning, I instead add a message to acc.AddError and continue similar to what happens when perfDump errors?

I generally prefer we keep things as backwards compatible as possible in case someone somewhere still has a version that doesn't support it or the format is different. Let's leave it as-is with the warning for now.

Thanks again for the PR!

@powersj powersj removed their assignment Apr 30, 2024
@awojno-bloomberg
Copy link
Contributor Author

Thanks for taking a look. I added a test case for parseSchema. Let me know if anything else is needed there.

Thanks!

For the second point, because performance schema has been supported for a while, should I change it so that instead of the warning, I instead add a message to acc.AddError and continue similar to what happens when perfDump errors?

I generally prefer we keep things as backwards compatible as possible in case someone somewhere still has a version that doesn't support it or the format is different. Let's leave it as-is with the warning for now.

Thanks again for the PR!

Sounds good to me! What would be the next steps to get this PR merged?

@powersj
Copy link
Contributor

powersj commented Apr 30, 2024

Sounds good to me! What would be the next steps to get this PR merged?

@DStrand1 is up to review and if he is happy, then he gets to click merge.

@awojno-bloomberg
Copy link
Contributor Author

Sounds good to me! What would be the next steps to get this PR merged?

@DStrand1 is up to review and if he is happy, then he gets to click merge.

Great, looking forward to your review @DStrand1 !

Copy link
Member

@DStrand1 DStrand1 left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks!

@DStrand1 DStrand1 merged commit 62509da into influxdata:master May 2, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.31.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants