Hosting a new Plugin - Percentage DiskSpace usage column

132 views
Skip to first unread message

Victor Martinez

unread,
Sep 1, 2015, 5:26:35 PM9/1/15
to Jenkins Developers

Hi there,

I've been working on some Jenkins automation to monitor those slaves and have some specific disk space cleanup policy, rather than using absolute diskspace usage metrics I wanted to use % disk space usage column in the Manage Nodes page.

Looking forward for having some feedback.

Thanks,

Víctor

Victor Martinez

unread,
Sep 2, 2015, 5:58:07 AM9/2/15
to Jenkins Developers

domi

unread,
Sep 2, 2015, 7:29:22 AM9/2/15
to Jenkins Developers
would this not make more sense to be included in https://wiki.jenkins-ci.org/display/JENKINS/Disk+Usage+Plugin ?
/Domi

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/11ecf834-9753-4fd7-a1a1-9311d69ccb57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Bywater

unread,
Sep 2, 2015, 7:52:22 AM9/2/15
to Jenkins Developers
I'm not sure they are the same thing. If I read it correctly, one (Disk Usage Plugin) appears to be the amount of usage a job uses, whilst the % Disk Space plugin proposed here simply translates the free/total disk space to a percentage on the Nodes list.

Richard.

Victor Martinez

unread,
Sep 2, 2015, 10:31:00 AM9/2/15
to Jenkins Developers
Exactly, it does provide a simple use case for monitoring total disk space & percentage of usage since Jenkins doesn't provide those details
Víctor

domi

unread,
Sep 2, 2015, 10:40:44 AM9/2/15
to Jenkins Developers
From an enduser perspective I think these two things provide similar information (one just more fine grained) and I would rather have both in the same plugin - the name DiskUsage Plugin just screens for this functionality
…just my 2 cents
/Domi

Daniel Beck

unread,
Sep 2, 2015, 11:01:21 AM9/2/15
to jenkin...@googlegroups.com

> On 02.09.2015, at 07:40, domi <do...@fortysix.ch> wrote:
>
> From an enduser perspective I think these two things provide similar information (one just more fine grained) and I would rather have both in the same plugin - the name DiskUsage Plugin just screens for this functionality

Disk Usage generates significant load while this does not. It's also about the usage of jobs rather than ensuring that nodes have free space.

Victor Martinez

unread,
Sep 2, 2015, 2:22:28 PM9/2/15
to Jenkins Developers
I agree, disk space usage plugin is causing some performance issues AFAIK besides of that it is job focus. IMO its Name should be more descriptive for that plugin rather than merging that functionality.
What do you thing?

Christopher Orr

unread,
Sep 2, 2015, 5:21:10 PM9/2/15
to jenkin...@googlegroups.com
Or at least it could be part of the Extra Columns plugin, which is an
existing collection of various useful columns.
https://wiki.jenkins-ci.org/display/JENKINS/Extra+Columns+Plugin

If this does get added as a new plugin, it would really need to have a
different name, as "PercentageColumn" gives zero information.

Also, it seems like it would make more sense if the column was called "%
Free Disk Space", and showed the percentage of *remaining* disk space —
consistent with the other disk space and memory usage columns.


On 02/09/15 16:40, domi wrote:
> From an enduser perspective I think these two things provide similar
> information (one just more fine grained) and I would rather have both in
> the same plugin - the name DiskUsage Plugin just screens for this
> functionality
> …just my 2 cents
> /Domi
>
> On 02 Sep 2015, at 16:31, Victor Martinez <victormar...@gmail.com
> <mailto:victormar...@gmail.com>> wrote:
>
>> Exactly, it does provide a simple use case for monitoring total disk
>> space & percentage of usage since Jenkins doesn't provide those details
>> Víctor
>>
>> On Wednesday, 2 September 2015 13:52:22 UTC+2, Richard Bywater wrote:
>>
>> I'm not sure they are the same thing. If I read it correctly, one
>> (Disk Usage Plugin) appears to be the amount of usage a job uses,
>> whilst the % Disk Space plugin proposed here simply translates the
>> free/total disk space to a percentage on the Nodes list.
>>
>> Richard.
>>
>> On Wed, 2 Sep 2015 at 23:29 domi <do...@fortysix.ch <javascript:>>
>> wrote:
>>
>> would this not make more sense to be included
>> in https://wiki.jenkins-ci.org/display/JENKINS/Disk+Usage+Plugin
>> <https://wiki.jenkins-ci.org/display/JENKINS/Disk+Usage+Plugin> ?
>> /Domi
>>
>> On 02 Sep 2015, at 11:58, Victor Martinez
>> <victormar...@gmail.com <javascript:>> wrote:
>>
>>> I've already created the wiki
>>> page: *https://wiki.jenkins-ci.org/display/JENKINS/PercentageColumn+Plugin
>>> <https://wiki.jenkins-ci.org/display/JENKINS/PercentageColumn+Plugin>*
>>>
>>> Cheers
>>> *
>>> *On Tuesday, 1 September 2015 23:26:35 UTC+2, Victor Martinez
>>> wrote:
>>>
>>> Hi there,
>>>
>>> I've been working on some Jenkins automation to monitor
>>> those slaves and have some specific disk space cleanup
>>> policy, rather than using absolute diskspace usage
>>> metrics I wanted to use % disk space usage column in the
>>> Manage Nodes page.
>>>
>>> * Github
>>> repo: *https://github.com/v1v/percentagecolumn-plugin
>>> <https://github.com/v1v/percentagecolumn-plugin>*
>>> * repository name:* percentagecolumn-plugin*
>>> * Github user: *v1v*
>>> * jenkins-ci.org <http://jenkins-ci.org/>: *v2v*
>>> * Description: *This plugin just shows the percentage
>>> of disk space usage column on "Manage Nodes" page.*
>>> * Wiki: *https://wiki.jenkins-ci.org/display/JENKINS/PercentageColumn+Plugin
>>> <https://wiki.jenkins-ci.org/display/JENKINS/PercentageColumn+Plugin> (Not
>>> Yet)*
>>>
>>> Looking forward for having some feedback.
>>>
>>> Thanks,
>>>
>>> Víctor
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the
>>> Google Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from
>>> it, send an email to jenkinsci-de...@googlegroups.com
>>> <javascript:>.
>>> <https://groups.google.com/d/msgid/jenkinsci-dev/11ecf834-9753-4fd7-a1a1-9311d69ccb57%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> For more options, visit https://groups.google.com/d/optout
>>> <https://groups.google.com/d/optout>.
>>
>>
>> --
>> You received this message because you are subscribed to the
>> Google Groups "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from
>> it, send an email to jenkinsci-de...@googlegroups.com
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/7FE97DEE-386C-4931-8382-99E398FF26D7%40fortysix.ch
>> <https://groups.google.com/d/msgid/jenkinsci-dev/7FE97DEE-386C-4931-8382-99E398FF26D7%40fortysix.ch?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to jenkinsci-de...@googlegroups.com
>> <mailto:jenkinsci-de...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/f4d74d56-0b16-4e66-aabb-1edac0d13b02%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/f4d74d56-0b16-4e66-aabb-1edac0d13b02%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-de...@googlegroups.com
> <mailto:jenkinsci-de...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/8D1061BF-9985-4E4F-8680-77083F85358A%40fortysix.ch
> <https://groups.google.com/d/msgid/jenkinsci-dev/8D1061BF-9985-4E4F-8680-77083F85358A%40fortysix.ch?utm_medium=email&utm_source=footer>.

Victor Martinez

unread,
Sep 2, 2015, 5:53:22 PM9/2/15
to Jenkins Developers
Hi,
 
 - The Extra Columns plugin is job based I'm afraid, does it make sense to merge those functionalities? 
 - Does it make sense to use % of remaining free disk space or % disk usage? 
 - Regarding the name of that plugin, what do you think about "PercentageFreeDiskSpaceColumn" and "PercentageDiskUsageColumn"? Is it too long? 
 - Finally, Do you think it should handle some thresholds based on % in order to monitor each slave as DiskSpace does? Is it a valuable use case?

Cheers
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/f4d74d56-0b16-4e66-aabb-1edac0d13b02%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/f4d74d56-0b16-4e66-aabb-1edac0d13b02%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-de...@googlegroups.com

Victor Martinez

unread,
Sep 4, 2015, 3:11:06 PM9/4/15
to Jenkins Developers
Hi,
 
 Any updates on this? Please let me know your thoughts and if you need further details.

Thanks

Victor Martinez

unread,
Sep 14, 2015, 5:28:38 PM9/14/15
to Jenkins Developers
Hi,

 any feedback?

Thanks

Daniel Beck

unread,
Sep 14, 2015, 6:25:20 PM9/14/15
to jenkin...@googlegroups.com

On 02.09.2015, at 23:53, Victor Martinez <victormar...@gmail.com> wrote:

> - The Extra Columns plugin is job based I'm afraid, does it make sense to merge those functionalities?

No. You cannot actually hide node columns AFAIK, so every installed + enabled plugin always contributes its columns to the list. Until this changes, having a plugin collecting node columns would be bad. Like only having the AllView and all columns being visible by default.

> - Does it make sense to use % of remaining free disk space or % disk usage?

Do you have options for slave columns like list view columns do, or do you need to decide on one or the other? If the latter, I'd go for % used like `df` does.

> - Regarding the name of that plugin, what do you think about "PercentageFreeDiskSpaceColumn" and "PercentageDiskUsageColumn"? Is it too long?

FWIW in general the pattern is foo-bar-baz rather than FooBarBaz.

Otherwise this seems to be fine. It's a very narrow scoped plugin so the name should be descriptive.

> - Finally, Do you think it should handle some thresholds based on % in order to monitor each slave as DiskSpace does? Is it a valuable use case?

Yes, absolutely. If you have very different slaves, a fixed threshold in MB or GB may be useless, but something like 90% fill level across all slaves before taking them offline may work.

Assuming nobody objects (I explained why a collection plugin, or really any integration with something related, would be bad here) I'll fork this tomorrow.

Victor Martinez

unread,
Sep 17, 2015, 5:51:17 PM9/17/15
to Jenkins Developers, m...@beckweb.net
Awesome Thanks Daniel, 

Regarding your question, I just wanted a tiny plugin with simple functionality rather than a complex one which might be harder to maintain. Thanks for the advice of the plugin name, I've just renamed it as "percentage-du-column"


Let me know if you need further clarification

Thanks again

Robert Sandell

unread,
Sep 18, 2015, 4:13:04 AM9/18/15
to jenkin...@googlegroups.com
Using the word column in the plugin is probably what made the initial discussion in this thread a bit confusing, since it can be confused with a ListViewColumn for when displaying Jobs and other items, which is the more common type of "column", and that could confuse users as well.
Maybe using node-column in the name could ease the confusion?
I'm not intending to block the forking here, just a suggestion :)

/B

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4d6546cc-9eed-4d71-8468-7e14066e2f76%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.

Kanstantsin Shautsou

unread,
Sep 18, 2015, 10:30:15 AM9/18/15
to Jenkins Developers
Have no time to read code, but isn't it the same that internal NodeMonitor do? It checks disk space on different OSs. 

Daniel Beck

unread,
Sep 18, 2015, 10:33:27 AM9/18/15
to jenkin...@googlegroups.com
It uses % rather than the absolute byte value, and is therefore more useful when you have vastly different nodes.

E.g. the 50GB workspaces on the 2TB slave will require a different take-this-offline threshold than the 20MB workspaces on the 20GB VM.

OTOH is doesn't tell you exactly how much is free.

On 18.09.2015, at 16:30, Kanstantsin Shautsou <kanstan...@gmail.com> wrote:

> Have no time to read code, but isn't it the same that internal NodeMonitor do? It checks disk space on different OSs.
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e14407cc-8a1b-49c0-a454-6df8164d5c06%40googlegroups.com.

Victor Martinez

unread,
Sep 18, 2015, 3:05:09 PM9/18/15
to Jenkins Developers, m...@beckweb.net
It's exactly the same implementation as NodeMonitor except the % part without any threshold yet. I'll code that part later on. 

I believe the Percentage-du-node-column-plugin name is more descriptive, so thanks for that suggestion. If we agree about that name then I'll rename it again.

Thanks again

Daniel Beck

unread,
Sep 18, 2015, 7:52:31 PM9/18/15
to jenkin...@googlegroups.com
The general naming convention (often broken, but still) would result in percentage-du-node-column as the artifactID, and percentage-du-node-column-plugin as the GitHub repo name.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/817c2b9b-476d-4341-9e22-81506221b882%40googlegroups.com.

Victor Martinez

unread,
Sep 19, 2015, 7:44:52 AM9/19/15
to Jenkins Developers, m...@beckweb.net
Alright, I've already renamed, further details:
Let me know if you need anything else.

Cheers

Victor Martinez

unread,
Sep 24, 2015, 6:43:56 AM9/24/15
to Jenkins Developers, m...@beckweb.net
Hi,
   any news?
Thanks

Daniel Beck

unread,
Sep 24, 2015, 8:08:19 AM9/24/15
to jenkin...@googlegroups.com

Victor Martinez

unread,
Sep 25, 2015, 1:46:37 AM9/25/15
to Jenkins Developers, m...@beckweb.net
Awesome, Thanks Daniel! 
Reply all
Reply to author
Forward
0 new messages