Problem firing mails constantly when disk space falls

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Robert_in_MTL
Posts: 229
Joined: Tue Jun 20, 2006 1:20 pm
Location: Montreal, Quebec

Problem firing mails constantly when disk space falls

Post by Robert_in_MTL »

Hi!

I have some tests that alert me when disk space falls below... lets say 15 GB and this works perfectly: We get the mail.
- The test is done every 10 minutes

What I am trying to do is this:

When disk space falls below xyz (lets say 10 GB) send a mail every 30 minutes.
So... What I did is this: set up another send mail action with an expression to start the action in [advanced mode] with this expression:

(%Reply_Integer% < 10737418240) and ('%SimpleStatus%'=='DOWN') and (%Recurrences% mod 3==1)

If I remove the Reply_Integer part, it works...

10737418240 is from (10 GB * 1024MB * 1024KB * 1024b) right?
(I also tested with 999999999999 just to make sure)

In the help file I read
for the Reply field containing '12.01 Kb', %Reply_Integer% will return '12298'
So I tried this: ('%Reply_Integer%' < '10737418240'), no luck

And since I read this in the advance mode help:
((%Reply%>200) and (%Reply%<800))
I tried (%Reply_Integer% < 10737418240)

but I can't get it to work.

Can you help me?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You don't need %Reply_Integer%. Use %Reply% variable and compare it to '10 Gb'. Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... ncedaction
============================
Advanced mode allows you to use logical expression as a condition that triggers the alert action. An alert action is performed when a logical expression of a condition is true. In these expressions you can use:
* numbers and strings (in quotes). Strings that contain a number plus one of the following unit specificators [ms, Kb, Mb, Gb, %] are compared as numbers, so that '900 Kb' is less than '9 Mb'
============================

So, your expression should be like the following:
('%Reply%' < '10 Gb') AND ('%SimpleStatus%'=='DOWN') and (%Recurrences% mod 3==1)

Another solution is to setup one more "Drive Free Space" test that should check the disk space and alert you when disk space goes below 10Gb.

Regards,
Max
Robert_in_MTL
Posts: 229
Joined: Tue Jun 20, 2006 1:20 pm
Location: Montreal, Quebec

Post by Robert_in_MTL »

Right on!

Thanks, it works!!!

I didn't know that I could compare results including 'KB' with results including 'GB'... Wow!

1 last thing... is there a way to display a math calculation with Macros in an e-mail? (ex: display the result of (%Recurrences% mod 3==1) that would show 0 or 1? ... Or ('%Reply%' < '10 Gb') that would display true or false)

Thanks for your time
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1 last thing... is there a way to display a math calculation with Macros in an e-mail? (ex: display the result of (%Recurrences% mod 3==1) that would show 0 or 1? ... Or ('%Reply%' < '10 Gb') that would display true or false)
No, it does not work in this way

Regards
Alex
Robert_in_MTL
Posts: 229
Joined: Tue Jun 20, 2006 1:20 pm
Location: Montreal, Quebec

Post by Robert_in_MTL »

Ok then

Thank you very much for solving my problem!

Cheers!
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Robert_in_MTL wrote:Thank you very much for solving my problem!
You are welcome! ;-)

Regards,
Max
Post Reply