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

Add IO operations in progress to be exported in diskio module #22066

Merged
merged 2 commits into from
Nov 23, 2020

Conversation

VertexC
Copy link
Contributor

@VertexC VertexC commented Oct 22, 2020

What does this PR do?

Add io.ops in fields exported by system.diskio in metricbeat.

Why is it important?

As #20691 points out, we may need to calculate the queue time based on this new field system.diskio.io.ops.

Checklist

- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation

  • My code follows the style guidelines of this project
  • 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.

Related issues

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

1 similar comment
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

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

cla-checker-service bot commented Oct 22, 2020

💚 CLA has been signed

@VertexC
Copy link
Contributor Author

VertexC commented Oct 22, 2020

@andresrc @unixsurfer Could you kindly review this PR?

@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 22, 2020

💚 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

Expand to view the summary

Build stats

  • Build Cause: [Started by user Alex K., Replayed #13]

  • Start Time: 2020-11-23T16:35:39.187+0000

  • Duration: 62 min 55 sec

Test stats 🧪

Test Results
Failed 0
Passed 2254
Skipped 522
Total 2776

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 2254
Skipped 522
Total 2776

@andresrc andresrc added the Team:Services (Deprecated) Label for the former Integrations-Services team label Oct 22, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 22, 2020
@unixsurfer
Copy link

@VertexC I am sorry but I'm not familiar with the development of metricbeats and therefore I can't perform a proper review.
I would like to thank you for taking the time to add support for IO operations in progress metric.

@VertexC
Copy link
Contributor Author

VertexC commented Oct 23, 2020

@VertexC I am sorry but I'm not familiar with the development of metricbeats and therefore I can't perform a proper review.
I would like to thank you for taking the time to add support for IO operations in progress metric.

It is okay :) And thanks for posting this good-for-first issue.

metricbeat/module/system/diskio/diskio.go Outdated Show resolved Hide resolved
metricbeat/module/system/test_system.py Outdated Show resolved Hide resolved
@VertexC VertexC force-pushed the feature-addIOsInProgress branch 2 times, most recently from 3570760 to 157d073 Compare November 4, 2020 03:17
@VertexC
Copy link
Contributor Author

VertexC commented Nov 4, 2020

The diskio_linux fails in CI due to timeout issue. I only have mac (unix) environment and relevant tests might just skip locally. Do you have any idea on this timeout error? @fearful-symmetry

=================================== FAILURES ===================================
____________________________ Test.test_diskio_linux ____________________________
self = <test_system.Test testMethod=test_diskio_linux>
    @unittest.skipUnless(re.match("(?i)linux", sys.platform), "os")
    def test_diskio_linux(self):
        """
        Test system/diskio output on linux.
        """
        self.render_config_template(modules=[{
            "name": "system",
            "metricsets": ["diskio"],
            "period": "5s"
        }])
        proc = self.start_beat()
>       self.wait_until(lambda: self.output_lines() > 0)
module/system/test_system.py:251: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <test_system.Test testMethod=test_diskio_linux>
cond = <function Test.test_diskio_linux.<locals>.<lambda> at 0x7f9365a1f510>
max_timeout = 10, poll_interval = 0.1, name = 'cond'
    def wait_until(self, cond, max_timeout=10, poll_interval=0.1, name="cond"):
        """
        Waits until the cond function returns true,
        or until the max_timeout is reached. Calls the cond
        function every poll_interval seconds.
    
        If the max_timeout is reached before cond() returns
        true, an exception is raised.
        """
        start = datetime.now()
        while not cond():
            if datetime.now() - start > timedelta(seconds=max_timeout):
                raise TimeoutError("Timeout waiting for '{}' to be true. ".format(name) +
>                                  "Waited {} seconds.".format(max_timeout))
E               beat.beat.TimeoutError: Timeout waiting for 'cond' to be true. Waited 10 seconds.
../libbeat/tests/system/beat/beat.py:363: TimeoutError

@fearful-symmetry
Copy link
Contributor

Not sure, I imagine it's a deeper failure that the CI is just reporting as a timeout.

@fearful-symmetry
Copy link
Contributor

Not sure why we're running into CI issues here....

@fearful-symmetry
Copy link
Contributor

jenkins, test this

@elasticmachine
Copy link
Collaborator

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 2248
Skipped 508
Total 2756

@VertexC
Copy link
Contributor Author

VertexC commented Nov 17, 2020

@fearful-symmetry Hi, do you have any plan to merge this pr? I'm happy to merge from master and rebuild fields, but if it is not merged for certain time, new conflicts will occur.

@fearful-symmetry
Copy link
Contributor

Hey, sorry about dropping this last week. We're good to go, it looks like. Just rebase the PR and I can approve it. @VertexC

@VertexC VertexC force-pushed the feature-addIOsInProgress branch 2 times, most recently from 6a77ed4 to 73d33cb Compare November 18, 2020 05:44
@fearful-symmetry
Copy link
Contributor

jenkins, test this

@VertexC
Copy link
Contributor Author

VertexC commented Nov 19, 2020

It looks like Lint is somehow blocked. Shall I force push again? @fearful-symmetry

@fearful-symmetry
Copy link
Contributor

Try to merge from master again, yah. Not sure why the CI is blocked now.

@fearful-symmetry
Copy link
Contributor

jenkins, test this

@fearful-symmetry
Copy link
Contributor

@VertexC while I fight with CI, one last thing: Can you add a changelog entry to CHANGELOG.next.asciidoc ?

@VertexC
Copy link
Contributor Author

VertexC commented Nov 23, 2020

@VertexC while I fight with CI, one last thing: Can you add a changelog entry to CHANGELOG.next.asciidoc ?

Done :)

@fearful-symmetry
Copy link
Contributor

jenkins, test this

@fearful-symmetry fearful-symmetry merged commit 5bd19e0 into elastic:master Nov 23, 2020
@andresrc
Copy link
Contributor

@fearful-symmetry does this need a backport?

fearful-symmetry pushed a commit to fearful-symmetry/beats that referenced this pull request Dec 1, 2020
…c#22066)

* add IO operations in progress to be exported in diskio module

* update changelog

(cherry picked from commit 5bd19e0)
fearful-symmetry added a commit that referenced this pull request Dec 2, 2020
…ed in diskio module (#22843)

* Add IO operations in progress to be exported in diskio module (#22066)

* add IO operations in progress to be exported in diskio module

* update changelog

(cherry picked from commit 5bd19e0)

* fix changelog

Co-authored-by: Bowen Chen <bob2420083992@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Services (Deprecated) Label for the former Integrations-Services team v7.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[metricbeat] Add IopsInProgress metric in the list of exported fields for diskio system module
5 participants