SNMP Get "is < than" fails when value is modifi

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
User avatar
Bobzbobz
Posts: 30
Joined: Tue Nov 30, 2010 4:01 am
Location: Denmark

SNMP Get "is < than" fails when value is modifi

Post by Bobzbobz »

Hello

HM 10.08 Beta.

I am experiencing a problem with the SNMP GET-test, when I use the "is < than" (is lower than, right?) and changes the alert-value from 1TB to eg. 3TB.

I am using the test on 2x QNAP-NAS.
This one fails:
Image

If I then change the alert-value to 1TB, then it works..

Regards,
Soren
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Looks like your SNMP agent returns string, not a number.
String "24.22 TB" < "3 TB" because "2"<"3"

Perhaps this device can provide correct int64 counter as well?

Otherwise you will need to use Optional status processing options, e.g. Use warning status if (('%SuggestedReply%' getnumberwithdot 1)>2) and ('%SuggestedReply%' getword 2)=="TB"))

Regards
Alex
User avatar
Bobzbobz
Posts: 30
Joined: Tue Nov 30, 2010 4:01 am
Location: Denmark

Post by Bobzbobz »

Hello

I have added the text:
(('%SuggestedReply%' getnumberwithdot 1)>2) and (('%SuggestedReply%' getword 2)=="TB")
to "Optional status processing" (Use 'Warning' status if:).

But now I receive status "Warning" all the time.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

All the time? Even if Reply='1 TB'? or "2.00 TB"?

Regards
Alex
User avatar
Bobzbobz
Posts: 30
Joined: Tue Nov 30, 2010 4:01 am
Location: Denmark

Post by Bobzbobz »

Yes - I have also tried adding () arround the whole text.

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

Post by KS-Soft Europe »

Please use the following expression for "Use Warning status if" expression:
(('%SuggestedReply%' getnumberwithdot 1)<3) and (('%SuggestedReply%' getword 2)=="TB")
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

>>All the time? Even if Reply='1 TB'? or "2.00 TB"?
>Yes

Your screen shot shows "24.22 TB"
24.22 > 2 so everything works correctly.

Regards
Alex
User avatar
Bobzbobz
Posts: 30
Joined: Tue Nov 30, 2010 4:01 am
Location: Denmark

Post by Bobzbobz »

Hello again

I inserted the new expression.
If I change the value to "2 TB", then it says "GOOD".
If I change it to anything above "2 TB", then it says "BAD".

This seems to work - thank you.

But how will the test reply (good/bad), when the reply-value changes to below 20 TB?

Regards
Soren
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

When Optional status processing module "sees" numbers it compares them as numbers. That's why I recommended to use Optional status processing.
2, 20, or 200 - no problem.

If Reply can use some other units, e.g. KB, MB, then adjust expression to your needs

Regards
Alex
Post Reply