KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

More flexible Drive Free Space test
Goto page 1, 2  Next
 
Post new topic   Reply to topic    KS-Soft Forum Index -> Wish list
View previous topic :: View next topic  
Author Message
Kapz



Joined: 06 Dec 2004
Posts: 216
Location: Denmark

PostPosted: Tue Mar 11, 2008 8:39 am    Post subject: More flexible Drive Free Space test Reply with quote

Hi !

I'd like to wishlist a more flexible Drive Free Space test that could contain these options:

* Send alert when free drive space falls ____ [[MB/GB] or [Percent]] in ____ consecutive tests.

* Regardless of the above always send an alert when free drive space reaches ____ [MB/GB]

Of course this brings up quite a few questions on how exactly the first options should be calculated but I hope you'll consider these features for a later release.

Thanks in advance !

Kasper
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Tue Mar 11, 2008 8:59 am    Post subject: Re: More flexible Drive Free Space test Reply with quote

Kapz wrote:
I'd like to wishlist a more flexible Drive Free Space test that could contain these options:

* Send alert when free drive space falls ____ [[MB/GB] or [Percent]] in ____ consecutive tests.

* Regardless of the above always send an alert when free drive space reaches ____ [MB/GB]
I think, you may implement such a behavior by adding two "Send Email" actions into alert profile, assigned to the "Drive Free Space test". First "Send Email" action should be configured with "Start when N consecutive Bad esults occur". Second action should be configured with "Start when 1 consecutive Bad esults occur".

If the amount of [MB/GB] should be different in first and second case, you may setup two "Drive Free Space" tests. In this case, just one "Send email" action should be added to the alert profile, assigned to each test. Please, read the following article for details:
http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#standardaction

Regards,
Max
Back to top
View user's profile Send private message Send e-mail Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12085
Location: USA

PostPosted: Tue Mar 11, 2008 3:58 pm    Post subject: Reply with quote

Single test item can be used as well. You may configure HostMonitor to use Warning status (optional status processing)

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Kapz



Joined: 06 Dec 2004
Posts: 216
Location: Denmark

PostPosted: Wed Mar 12, 2008 1:54 pm    Post subject: Reply with quote

Hi !

Thanks for the suggestions !

> If the amount of [MB/GB] should be different in first and second case ...
Perhaps I should clarify. In the first case I don't have any fixed size to monitor.

Example:

Many of our newer webservers have a data drive with a capacity at about 120 GB. Our average customer will never use that much space for their website and/or SQL Server bases so I setup a drive check that checks if the capacity falls below 100 GB. Not because 100 GB free drive space is critical in any way but because this could indicate that the server is beeing used for other purposes than our agreement with the customer specifies, e.g. file sharing.

It's not interesting for me to get an alert at 2 o'clock in the middle of the night if free drive space drops from 100 GB to e.g. 97 GB within one test interval and then stops falling because an SQL Server expands a log file with a few GB's - I'm sure I can deal with that the next day and adjust my free space test.
But what could be interesting and worth having an alert on is if there is a pattern in the way the free space decreases.
If HM detects that at 01:37 free drive space was 101 GB, at 01:38 it was 99 GB, at 01:39 it was 97 GB, at 01:40 it was 95 GB and so on the drive may very well run out of space within an hour and something could break on the server.

So my idea is to built in some kind of intelligent monitoring of free space - but together with the current option to check for a fixed size if either 1) Intelligent monitoring doesn't catch a pattern or 2) It simply isn't needed for the particular drive that's beeing monitored.

Hope I was able to clarify.

Thanks !

/Kasper
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12085
Location: USA

PostPosted: Wed Mar 12, 2008 5:02 pm    Post subject: Reply with quote

I think if we implement '-' operator, you will be able to use optional status processing option and expression like ('%LastReply%' - '%Reply%) > '2 GB'. You may setup HostMonitor to use Warning status when free space decreases by 2 or more GB and start alert when test returns Warning status several times in a row.
May be in next version...

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Kapz



Joined: 06 Dec 2004
Posts: 216
Location: Denmark

PostPosted: Thu Mar 13, 2008 3:31 am    Post subject: Reply with quote

Alex,

> I think if we implement '-' operator, you will be able to use optional status processing option
Yes, that might do the trick.

> May be in next version...
Already looking forward to it

Thanks !

/Kasper
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12085
Location: USA

PostPosted: Thu Mar 13, 2008 10:44 am    Post subject: Reply with quote

www.ks-soft.net/download/hm715d.zip
You may do the following
1) Unmark "Treat Warning as bad" test option
2) Set Use Warning status if ('%SuggestedSimpleStatus%'<>'DOWN') and ('%Reply%' - '%SuggestedReply%') > '2 Gb' option
3) Add "advanced" mode action using expression like (%Status%'=='Warning') and (%Recurrences%==3)

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Kapz



Joined: 06 Dec 2004
Posts: 216
Location: Denmark

PostPosted: Thu Mar 13, 2008 3:02 pm    Post subject: Reply with quote

Alex,

> www.ks-soft.net/download/hm715d.zip
You never stop surprising me, do you ?

Thanks a lot for the update - I will see if I get a chance to test it tomorrow and then let you know how things work out.
For now I've downloaded version 7.15d and it's seems to be running without any problems.

/Kasper
Back to top
View user's profile Send private message
Kapz



Joined: 06 Dec 2004
Posts: 216
Location: Denmark

PostPosted: Wed Feb 18, 2009 8:01 am    Post subject: Reply with quote

Hi !

Finally I'm trying to implement this but I'm having some difficulties.

I'm trying to set up a Drive Free Space test with a threshold of e.g. 15 Gb that ...

A) Goes into status Warning if drive space falls below the threshold but only by up to 1/3 (meaning that if my threshold is 15 Gb Warning status will be retained as long as free space is between 10 to 15 Gb)

B) Goes into status Bad if drive space falls below the threshold by more than 1/3 (meaning that if my threshold is 15 Gb the status goes Bad if free space is between 0 to 10 Gb)

Actually I'm able to accomplish this by using the following string for "Use Warning status if":

('%SuggestedSimpleStatus%' == 'DOWN') and ('15 Gb' - '%SuggestedReply%') < '6 Gb'

By using static variables like '15 Gb' and '6 Gb' everything works fine but when I try to make the expression more general I run into some problems.

1) I was hoping to replace '15 Gb' with a macro for the threshold entered.
%AlertThreshold% is the one to use I suppose, but it expands to "MinSpace: 15 Gb" rather than just "15" or "15 Gb" making it impossible to use.
Just to clarify, what I was hoping for is this:

('%SuggestedSimpleStatus%' == 'DOWN') and ('%AlertThreshold%'-'%SuggestedReply%') < '6 Gb'

In the following I'll be using %AlertThreshold% as if it actually expanded to '15 Gb' as this will help explaining things.

2) I was hoping to replace '6 Gb' with a percentage - in this case just calculated as 0.66 rather than 66%. While the 'Gb' appended to 0.66 in the following example looks pretty strange I suppose it's necessary to comply with the 'Gb' beeing used within the %SuggestedReply% and %AlertThreshold% variables:

('%SuggestedSimpleStatus%' == 'DOWN') and ('%SuggestedReply%' / '%AlertThreshold%') > '0.66 Gb'

However, this kind of division is not supported. I have tested with both "div" and "mod" but I can't find a combination of these that gives me the results that I need if the expression is meant to be used on any DriveFreeTest regardless of the threshold.

Also, I've simply tried to multiply:

('%SuggestedSimpleStatus%' == 'DOWN') and (0.66 * '%AlertThreshold%') > '%SuggestedReply%'

- but neither 0.66 or 0,66 is accepted by HM; I'm told that it's an unknown operator.

So, at the moment I'm stuck with two problems:

1) %AlertThreshold% is beeing expanded to "MinSpace: 15 Gb" which I obviously can't use in arithmetic operations

2) Division where 10 is beeing divided with 15 giving a result of approximately 0.66 is not supported. In addition I cannot get HM to multiply a number by 0.66 as a workaround.

Can you bring any clues on how I could get closer to the goal ?
Although I belive that I really have read the manual covering this part of HM I might just have missed something - or perhaps you can turn the whole thing upside down showing a way to accomplish the results wanted.
This wouldn't be the first time by the way ...

Thanks in advance !

/Kasper
Back to top
View user's profile Send private message
greyhat64



Joined: 14 Mar 2008
Posts: 246
Location: USA

PostPosted: Wed Feb 18, 2009 11:36 am    Post subject: Reply with quote

Kapz,
I know when I see a post from you it's going to be interesting!

I posted a VBScript in the Library many moons ago that, with some adjustments, might help.
I wanted a single test that would scan all volumes and alarm if the threshold (percentage or physical) is exceeded on ANY volume.
It returns a status (OK,Bad) and a string listing each volume and it's stats.
If you enter a value < 1 it assumes percentage and delivers a reply similar to C:28%(15.27), D:12%(8.73).
If you enter a value > 1 it assumes physical size and delivers a reply similar to C:15.27(28%), D:8.73(12%).

So, to reiterate, in essence you need to be able to set a warning threshold as well as an alarm threshold.
If I'm on the right track the core of the script does some of the calculations for you, it's just a matter of delivering the appropriate status and a workable reply to AHM so that you can do the 'Warning' optional processing. You may also want it to work on a specified volume, not all volumes, so an additional parameter is needed. It sounds simple enough.

Do you want to take a whack at this? The code posted is a bit 'fat'. I borrowed, with acknowledgement, from another scripter and simply left in the excess and added my own 'excesses'. A cleanup is probably in order.

If your not interested I may in my 'free time' take a stab at this. I'll post results when I have them.
Back to top
View user's profile Send private message Send e-mail
KS-Soft



Joined: 03 Apr 2002
Posts: 12085
Location: USA

PostPosted: Wed Feb 18, 2009 1:07 pm    Post subject: Reply with quote

There is no '/' operator while 'div' or '*' operators could work as you need.
If you want to use real numbers (with decimal dot), use question marks for such numbers, e.g. '0.66'
So, basically you need new variable that should return just a number instead of description of the threshold... Ok, may be in next version (8.00)

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Kapz



Joined: 06 Dec 2004
Posts: 216
Location: Denmark

PostPosted: Wed Feb 18, 2009 1:55 pm    Post subject: Reply with quote

@greyhat64:

Thanks for showing me that script !
Just took a brief look at it and it could very well lead me in the right direction.
It seems like the WMIService is able to supply the data that I need so I'll take a closer look at the code and try to adjust as necessary.

@Alex:

> There is no '/' operator while 'div' or '*' operators could work as you need.
Okay - could you kindly show me an example ?
I messed around with 'div', 'mod' and '*' quite a lot today and even though I found a few combinations that actually worked they had to be adjusted for the individual thresholds for the individual tests.
I didn't have the brain to figure out some general arithmetic that could produce the exact same percentage calculations needed no matter which threshold value was beeing used.

> If you want to use real numbers (with decimal dot), use question marks for such numbers, e.g. '0.66'
I'm not sure I understand where the question marks come in in the example ... did you mean quotation marks ?

> So, basically you need new variable that should return just a number instead of description of the threshold...
Yes, a new macro - e.g. %AlertThresholdValue% - would be great for this purpose

> Ok, may be in next version (8.00)
Given that we're now @ 7.78 it shouldn't take too long, should it ?

Thanks both for your answers !

/Kasper
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12085
Location: USA

PostPosted: Wed Feb 18, 2009 2:16 pm    Post subject: Reply with quote

Quote:
Okay - could you kindly show me an example ?

if alert threshold is 10Gb and you want to set Warning status between 15 and 10Gb
('%SuggestedSimpleStatus%' == 'UP') and ('%SuggestedReply%'*'0.66 < '%AlertThresholdValue%')

if alert threshold is 15Gb and you want to set Warning status between 15 and 10Gb
('%SuggestedSimpleStatus%' == 'DOWN') and ('%SuggestedReply%'*'1.5' > '%AlertThresholdValue%')

Quote:
I'm not sure I understand where the question marks come in in the example ... did you mean quotation marks ?

Yes, quotation marks. My mistake.

Quote:
Given that we're now @ 7.78 it shouldn't take too long, should it ?

At least a month, more likely 2.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
greyhat64



Joined: 14 Mar 2008
Posts: 246
Location: USA

PostPosted: Wed Feb 18, 2009 4:18 pm    Post subject: Reply with quote

Kapz,
Just a thought. . .
If you're trying to generalize your tests wouldn't it be much easier to use percentages as opposed to hard limits. Most recommendations regarding good disk maintenance I've read suggest 15-20% freespace as a target goal, regardless of size. Any less and you run into issues trying to defrag, not to mention that I prefer it from a planning and acquisition standpoint.
Back to top
View user's profile Send private message Send e-mail
KS-Soft



Joined: 03 Apr 2002
Posts: 12085
Location: USA

PostPosted: Wed Feb 18, 2009 4:40 pm    Post subject: Reply with quote

PS
Within 2 weeks we plan to upload unofficial Advanced Host Monitor 7.90 Beta, probabaly we implement %ALERTTHRESHOLDVALUE% variable in this version

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Wish list All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index