#51001 Issue 50545 - Port dbmon.sh to dsconf
Closed by spichugi. Opened by mreynolds.
mreynolds/389-ds-base issue50545  into  master

Download 51001.patch

Description:

dbmon.sh has been ported to dsconf with basically the same feature set. You can continuously refresh the report at a specified interval, you can choose to get stats one multiple/specific backends, and the option to display individual index stats. There is now a human friendly report and a JSON version.

There was also other improvements made to lib389 to take into account the new bdb split configuration under cn=confg.

Design Doc: https://www.port389.org/docs/389ds/design/dbmon-design.html

Relates: https://pagure.io/389-ds-base/issue/50545

I'm happy with most of this, but I'm not sure about the while True loop - can't we just use "watch command" instead if someone wants this feature? What if someone just wants the monitor output once for a command like in nagios etc?

If I understand correctly, you have fixed the issue - https://pagure.io/389-ds-base/issue/50189
Not 'get_monitor' returns a dict. Could you please mention that in the issue and clean the cooments?

And a couple of lines here

The rest looks good to me

I'm happy with most of this, but I'm not sure about the while True loop - can't we just use "watch command" instead if someone wants this feature? What if someone just wants the monitor output once for a command like in nagios etc?

I don't know what you mean by "watch command". If you don't specify the "incr" then it prints the report once and exits.

If I understand correctly, you have fixed the issue - https://pagure.io/389-ds-base/issue/50189

Oh I guess I did, I didn't know this ticket was out there. So I fixed it by accident...

Now 'get_monitor' returns a dict. Could you please mention that in the issue and clean the cooments?

Yes I will update comments and tickets...

rebased onto a2d9f88a48ab687d457b5a4b639b017b6a1069e0

I'm happy with most of this, but I'm not sure about the while True loop - can't we just use "watch command" instead if someone wants this feature? What if someone just wants the monitor output once for a command like in nagios etc?

I don't know what you mean by "watch command". If you don't specify the "incr" then it prints the report once and exits.

For more information, I added the whole "--incr" option as that was available in dbmon.sh. I was trying to maintain/port the same functionality. Are suggesting to just remove it entirely?

Yeah, I think we shouldn't have the --incr?

Okay, question is - do we need 100% feature parity? Or can we trim something that we don't really need to maintain ourself? I guess that's the question here. I'll leave it up to you but I think "looping" is not our problem, that's up to tools like watch. :) I'll leave it to you to decide though....

Okay, question is - do we need 100% feature parity? Or can we trim something that we don't really need to maintain ourself? I guess that's the question here. I'll leave it up to you but I think "looping" is not our problem, that's up to tools like watch. :) I'll leave it to you to decide though....

To be honest, I know dbmon.sh was used by a lot of people, but I have no idea if the loop was a commonly used feature. I agree though there is no need to build in the loop, as there are other ways to accomplish the same thing. I'll remove it, and if people start to complain then we can discuss maybe adding it back.

rebased onto 2523f487118a8740927e7662dc0a2725671c8b79

Pull-Request has been merged by mreynolds

Sounds like a plan, thanks!

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4054

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata