Skip to content

ARTEMIS-2636: Introduce Disk Usage Metrics#3005

Closed
atris wants to merge 1 commit intoapache:masterfrom
atris:2636
Closed

ARTEMIS-2636: Introduce Disk Usage Metrics#3005
atris wants to merge 1 commit intoapache:masterfrom
atris:2636

Conversation

@atris
Copy link
Contributor

@atris atris commented Mar 6, 2020

No description provided.

@clebertsuconic
Copy link
Contributor

the PR test is failing.. can you check why it failed? running tests...

@clebertsuconic
Copy link
Contributor

sorry.. I closed it by accident.. reopened it.

@clebertsuconic
Copy link
Contributor

thjere's a test failure here:

MessageSerializerTest.testObjectMessageImportExport:202->CliTestBase.consumeMessages:147 null

Are you sure it's not related? I will have to take a look.

@clebertsuconic
Copy link
Contributor

can y ou run the test locally and let us know what you see?

@jbertram
Copy link
Contributor

jbertram commented Mar 6, 2020

I did some work in org.apache.activemq.cli.test.MessageSerializerTest for PR #3003, but every test in that class passes for me locally (both with and without the commit from this PR). Perhaps it's a spurious failure?

@atris
Copy link
Contributor Author

atris commented Mar 6, 2020

The test failed again -- doesnt seem associated to this PR. Is there a way I can help fix this?

@michaelandrepearce
Copy link
Contributor

michaelandrepearce commented Mar 7, 2020

@clebertsuconic i agree with @atris, i don't believe this PR is causing any failures. Master is failing with same issue.

@jbertram I'm getting test failures in CLI tests locally, when doing mvn clean install -Pfast-tests -Pextra-tests seems yours is the only change recently in the CLI area.

Failed tests:
MessageSerializerTest.testTextMessageImportExport:177->checkSentMessages:104->CliTestBase.consumeMessages:147 null
Tests in error:
MessageSerializerTest.testMapMessageImportExport:227 » InvalidDestination AMQ2...

@michaelandrepearce
Copy link
Contributor

michaelandrepearce commented Mar 7, 2020

checking build histories of master on travis, seems as soon as PR #3003 was merged, the build starting failing with the issue, as such does look like it is related to PR #3003

here is the failed build on master straight after 3003 was merged
https://travis-ci.org/apache/activemq-artemis/builds/658977926?utm_source=github_status&utm_medium=notification

@michaelandrepearce
Copy link
Contributor

michaelandrepearce commented Mar 7, 2020

Actually seems since 2999 was merged https://travis-ci.org/apache/activemq-artemis/builds/658977370?utm_source=github_status&utm_medium=notification

there seems to been a number of merges very close together as such could be any that were merged before 2999 as unfortunately as merges so close together previous builds cancelled for next.

merges between last success build and first build failed, as such these are the smoking guns
2973, 2992, 2993, 2997, 2999

Screenshot 2020-03-07 at 22 35 11

Copy link

@criew criew 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 adding the new features suggested in the ticket.
I was not sure where to add my comments, so I created a review, hope that's ok.
Would it be possible to add *_PERCENTAGE metrics as well?

builder.register(BrokerMetricNames.CONNECTION_COUNT, this, metrics -> Double.valueOf(getConnectionCount()), ActiveMQServerControl.CONNECTION_COUNT_DESCRIPTION);
builder.register(BrokerMetricNames.TOTAL_CONNECTION_COUNT, this, metrics -> Double.valueOf(getTotalConnectionCount()), ActiveMQServerControl.TOTAL_CONNECTION_COUNT_DESCRIPTION);
builder.register(BrokerMetricNames.ADDRESS_MEMORY_USAGE, this, metrics -> Double.valueOf(getPagingManager().getGlobalSize()), ActiveMQServerControl.ADDRESS_MEMORY_USAGE_DESCRIPTION);
builder.register(BrokerMetricNames.DISK_STORE_USAGE, this, metrics -> Double.valueOf(getPagingManager().getDiskTotalSpace() - getPagingManager().getDiskUsableSpace()), ActiveMQServerControl.DISK_STORE_USAGE_DESCRIPTION);
Copy link

Choose a reason for hiding this comment

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

Add two more metrics - ADDRESS_MEMORY_USAGE_PERCENTAGE and DISK_STORE_USAGE_PERCENTAGE here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since address memory usage is not exposed as a metric here, I think it warrants a separate PR (to add both percentage types to exposed metrics). I will follow up with a PR

Copy link
Contributor

Choose a reason for hiding this comment

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

You are duplicating the attributes here?

Also DISK_STORE_USAGE.. this seems to give you the amount of free space available, instead of DISK Usage. Isn't that a mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isnt disk usable space the free space?

Copy link
Contributor

@michaelandrepearce michaelandrepearce Mar 11, 2020

Choose a reason for hiding this comment

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

Typically the words used for disk reporting are used and free to avoid any confusion.

Youre using the word usage which to me suggest its the used space not the free

I would recommend we use clearer words like used and free

@atris
Copy link
Contributor Author

atris commented Mar 10, 2020

Thanks for adding the new features suggested in the ticket.
I was not sure where to add my comments, so I created a review, hope that's ok.
Would it be possible to add *_PERCENTAGE metrics as well?

Thanks, fixed your comments.

@atris
Copy link
Contributor Author

atris commented Mar 10, 2020

I dont understand the test failure -- the test passes locally for me

@jbertram
Copy link
Contributor

The failure is caused by a race condition from #3003. I believe that's now been resolved via #3009. Please rebase and squash your commits.

@atris
Copy link
Contributor Author

atris commented Mar 10, 2020

Done, please see.

@clebertsuconic
Copy link
Contributor

@atris you should rebase, and squash your commit

@atris
Copy link
Contributor Author

atris commented Mar 11, 2020

@clebertsuconic I believe I did that? (The PR is rebased on top of your latest commit to master, and is squashed to a single commit. What did I miss?)

@atris
Copy link
Contributor Author

atris commented Mar 12, 2020

Rebased

@michaelandrepearce
Copy link
Contributor

Have you sorted better naming so its clearer? See inline comments by clebert and myself

@atris atris force-pushed the 2636 branch 2 times, most recently from 92aa80e to 13b2223 Compare March 22, 2020 14:05
@atris
Copy link
Contributor Author

atris commented Mar 22, 2020

@jbertram @clebertsuconic @criew Fixed, please see and let me know your comments

@clebertsuconic
Copy link
Contributor

How did you come up with these formulas? did they come from the JIRA? or you made up them?
as an user I would prefer seeing how much space I have left.. and what's the percentage of the disk that it's used

ARTEMIS-2636: This commit introduces metrics to publish the amount of disk used currently
@atris
Copy link
Contributor Author

atris commented Mar 29, 2020

@clebertsuconic Updated, please see and let me know if it looks fine now

@asfgit asfgit closed this in 5518bcb Mar 31, 2020
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.

5 participants