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

Get each command stats from INFO all command on redis module #29662

Merged
merged 8 commits into from
Mar 14, 2022

Conversation

zanyou
Copy link
Contributor

@zanyou zanyou commented Jan 1, 2022

What does this PR do?

This PR makes to collect redis commandstats on redis module.
This PR overlaps in purpose with #28012, but that PR looked like it needed a lot of fixing and had stopped being updated, so I created a new one.

Why is it important?

The current redis module are collect only default metrics from INFO command.
commandstats provide stats of each commands. It includes the number of calls and The total CPU time consumed by these commands. The information is very important for monitoring of redis.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

I had run only below commands. If need another tests, Please let me know.

style@FO-951 beats % go test -tags=integration ./metricbeat/module/redis/info/ -data
ok      github.com/elastic/beats/v7/metricbeat/module/redis/info        26.385s

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 1, 2022
@cla-checker-service
Copy link

cla-checker-service bot commented Jan 1, 2022

💚 CLA has been signed

@mergify
Copy link
Contributor

mergify bot commented Jan 1, 2022

This pull request does not have a backport label. Could you fix it @zanyou? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Jan 1, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 1, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-03-14T01:05:50.807+0000

  • Duration: 85 min 39 sec

Test stats 🧪

Test Results
Failed 0
Passed 7746
Skipped 2031
Total 9777

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@zanyou
Copy link
Contributor Author

zanyou commented Jan 2, 2022

I have signed the Contributor Agreement.

@aspacca aspacca self-requested a review January 4, 2022 09:44
@aspacca aspacca added the Team:Integrations Label for the Integrations team label Jan 4, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 4, 2022
Copy link

@aspacca aspacca left a comment

Choose a reason for hiding this comment

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

on my redis version (6.2.6) I have also rejected_calls and failed_calls in cmdstat

what do you think about adding them as well?

metricbeat/module/redis/info/_meta/fields.yml Outdated Show resolved Hide resolved
metricbeat/module/redis/info/data.go Outdated Show resolved Hide resolved
@aspacca
Copy link

aspacca commented Jan 4, 2022

@zanyou thanks for the contribution!

please, see my comments

@zanyou
Copy link
Contributor Author

zanyou commented Jan 14, 2022

@aspacca
Thank you for comments!

on my redis version (6.2.6) I have also rejected_calls and failed_calls in cmdstat
what do you think about adding them as well?

These fields were added in redis 6.2 rc2 redis/redis#8305. But I didn't add it because the current module only tested with versions up to 5.0-rc4. I think it's a useful field, so I'll add it along with testing with 6.2.6.

@mergify mergify bot assigned zanyou Feb 8, 2022
@aspacca
Copy link

aspacca commented Feb 10, 2022

/test

@aspacca aspacca added needs CLA User must sign the Elastic Contributor License before review. and removed needs CLA User must sign the Elastic Contributor License before review. labels Feb 10, 2022
@aspacca
Copy link

aspacca commented Feb 10, 2022

hi @zanyou , sorry for taking so long in review the last commits.

all good on my side: once the CI is green we can merge

@aspacca
Copy link

aspacca commented Feb 10, 2022

@zanyou could please fix the python integration test?
thanks

@aspacca
Copy link

aspacca commented Feb 10, 2022

and also add an entry in the changelog :)

@zanyou
Copy link
Contributor Author

zanyou commented Mar 11, 2022

/test

@zanyou
Copy link
Contributor Author

zanyou commented Mar 11, 2022

Hi @aspacca , sorry for taking so long time.
I fixed the python integration test and add entry to changelog.

@aspacca
Copy link

aspacca commented Mar 12, 2022

/test

@aspacca
Copy link

aspacca commented Mar 14, 2022

/test

@aspacca aspacca added the backport-v8.2.0 Automated backport with mergify label Mar 14, 2022
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Mar 14, 2022
@aspacca aspacca merged commit 048fb17 into elastic:main Mar 14, 2022
@aspacca
Copy link

aspacca commented Mar 14, 2022

all good @zanyou , thanks for the contribution!

@aspacca aspacca added backport-v8.2.0 Automated backport with mergify and removed backport-v8.2.0 Automated backport with mergify labels Mar 17, 2022
@zanyou zanyou deleted the redis-get-info-all branch April 7, 2022 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.2.0 Automated backport with mergify Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Metricbeat] Add Redis commandstats (INFO all) to metricset
3 participants