SNMP test bug

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).
Igorek
Posts: 47
Joined: Wed Jul 06, 2005 8:55 pm
Location: Russia

SNMP test bug

Post by Igorek »

I have SNMP test for load system:

Code: Select all

Method      = SNMP 
;--- Common properties --- 
Title       = load system for 5 min
Comment     = 
RelatedURL  = 
ScheduleMode= Regular 
Schedule    = 
Interval    = 300 
Alerts      = Alert2 
ReverseAlert= No 
UnknownIsBad= No 
UseCommonLog= Yes 
PrivLogMode = Default 
CommLogMode = Reply 
SyncCounters= Yes 
SyncAlerts  = No 
DependsOn   = list 
MasterTest-Alive = 
;--- Test specific properties --- 
Agent       = xx.xx.xx.xx 
Community   = public 
Timeout     = 2000 
Retries     = 1 
OID         = 1.3.6.1.4.1.2021.10.1.3.2 
Condition   = MoreThan 
Value       = 5
My text log c:\Program Files\HostMonitor5\Logs\112006-log.txt:
[16.03.2006 7:56:15] load system for 5 min Ok 4.81 SNMP test
[16.03.2006 8:02:45] load system for 5 min Ok 4.06 SNMP test
[16.03.2006 8:07:51] load system for 5 min Bad 9.59 SNMP test
[16.03.2006 8:12:55] load system for 5 min Ok 11.31 SNMP test
[16.03.2006 8:17:56] load system for 5 min Bad 5.64 SNMP test
[16.03.2006 8:22:58] load system for 5 min Ok 3.24 SNMP test
[16.03.2006 8:28:05] load system for 5 min Ok 1.73 SNMP test

Why at value 11.25 of loading has been received status OK?
PS: Hostmonitor v5.71, Win2000 SP4+SecUpd
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Why at value 11.25 of loading has been received status OK?
Because 1.3.6.1.4.1.2021.10.1.3.2 returns string, not a number

Regards
Alex
Igorek
Posts: 47
Joined: Wed Jul 06, 2005 8:55 pm
Location: Russia

Post by Igorek »

It's right ?!?

How to receive Bad status with Reply> 9.99?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You should request counter that returns number, not a string value.
Is there integer counter? Do you have MIB file? What you are checking? Some UNIX system?

Regards
Alex
eurodrew555
Posts: 16
Joined: Thu Aug 25, 2005 5:29 am

Post by eurodrew555 »

Alex,

We also would like to request the option for SNMP GET to have an option to evaluate as INTEGER.

Our UNIX load monitoring is completely unreliable at present.
This should definately be a feature added to HostMonitor!!

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

Post by KS-Soft »

RMA for Linux, BSD and Solaris allows you to check UNIX systems
http://www.ks-soft.net/hostmon.eng/rma-unix/index.htm

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

Post by KS-Soft »

I think Linux returns normal integer value for the following counters
1.3.6.1.4.1.2021.10.1.5.1 (CPU-load-1)
1.3.6.1.4.1.2021.10.1.5.2 (CPU-load-5)
1.3.6.1.4.1.2021.10.1.5.3 (CPU-load-15)
You just need to use correct counter.
Am I wrong?

Regards
Alex
eurodrew555
Posts: 16
Joined: Thu Aug 25, 2005 5:29 am

Post by eurodrew555 »

I tested this an it was working OK on some red-hat servers, and yet some others were displaying strange values such as 0 and 1 when they should be at least 40-80 when idle.

It would definately be preferable for HostMonitor to be able to evaluate the 1.3.6.1.4.1.2021.10.1.5.x OID as integers as they represent load consistent with linux utilities and commands such as top, uptime, etc. These are the standard linux load counters.

Please add this into the next version of HostMonitor !!

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

Post by KS-Soft »

HostMonitor works correctly - it compares numbers as numbers and strings as strings. If we change this behaviour, it will not compare strings correctly.
If your systems do not work correctly, its not our fault. I would rather create some external utility (for Shell Script test method) just for you. But will not damage software logic.

Regards
Alex
Igorek
Posts: 47
Joined: Wed Jul 06, 2005 8:55 pm
Location: Russia

Post by Igorek »

KS-Soft wrote:I think Linux returns normal integer value for the following counters
1.3.6.1.4.1.2021.10.1.5.1 (CPU-load-1)
1.3.6.1.4.1.2021.10.1.5.2 (CPU-load-5)
1.3.6.1.4.1.2021.10.1.5.3 (CPU-load-15)
You just need to use correct counter.
Am I wrong?
1.3.6.1.4.1.2021.10.1.5.2 returns 399 instead 3.99, but top & prstat returns 3.99

1.3.6.1.4.1.2021.10.1.6.2 should return float 3.99, but returns in HM garbage (џx@А)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I believe there is no such thing as "float" or "real" when we are talking about SNMP protocol v1/v2.
If you have different information, please provide link to specification or RFC number.
1.3.6.1.4.1.2021.10.1.5.2 returns 399 instead 3.99, but top & prstat returns 3.99
Correct.
SNMP agent returns 399 because it cannot return 3.99 as a number (SNMP does not use real/float numbers). It may return 3, 399 or "3.99" as a string

Regards
Alex
Igorek
Posts: 47
Joined: Wed Jul 06, 2005 8:55 pm
Location: Russia

Post by Igorek »

KS-Soft wrote: SNMP agent returns 399 ...
Why not integer 3?
For 11.31 should return 11
This question not for you, Alex :wink:
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

KS-Soft wrote:HostMonitor works correctly - it compares numbers as numbers and strings as strings. If we change this behaviour, it will not compare strings correctly.
If your systems do not work correctly, its not our fault. I would rather create some external utility (for Shell Script test method) just for you. But will not damage software logic.

Regards
Alex
I agree, don't damage software logic.

But that could be a checkbox within the test's window (similar to "Treat unknown as bad)
[x] Evaluate answer as Integer
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

As you see there is no "float" data type (if we are talking about SNMP data transfer between SNMP agent and SNMP monitor). Yes, we can describe "float" type in MIB file as well as we can describe something like "my_favorite_data_type" or "very_small_number". However SNMP agent returns data type like INTEGER, STRING, OPAQUE. Opaque is used for "float" numbers however it is used for many different things as well.
Yes, I agree - we should do something, provide some new options or create external utility. Actually we have several tasks for SNMP test method. I think we start to improve some test methods after version 6.60
But I do not agree if you say there is bug in HostMonitor.
Why not integer 3? For 11.31 should return 11
399 gives you more precise value, its correct value multiplied by 100

Regards
Alex
Post Reply