SNMP Wrong Alert

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
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

SNMP Wrong Alert

Post by jromariz »

Hi Alex,

I´m facing a strange problem with SNMP test. I´ve configured one snmp test to alert if reply is > then 20. As I was receiving a lot of alerts I started to log the test results. For my surprise, no reply was above 5 but still hostmon logs all replies above 3 as "bad status"!

Do you have any ideas about what can cause this behavior?


Thanks for helping.


Regards,

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

Post by KS-Soft »

I assume you are checking string counter, that's why "5" > "20".
Probably your device offers similar integer counter.

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,


Once again you´re right, this was exactly the problem. Thanks a lot for your help.

Best regards,

Jromariz.
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,

Is it possible to force hostmon to treat reply as integer instead of string? I can´t find a way to make snmp to reply as integer.


Thanks for helping.

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

Post by KS-Soft »

Sorry, there is no such option.
Device does not provide appropriate integer counters?

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,


I´m using UCD-SNMP to run scripts on local computer and return result using exec option on SNMP server. This works ok but couldn´t find a away to change replies from string to integer... :cry:


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

Post by KS-Soft »

Technically we can add some "treat string as integer" option.. but it does not look right :roll:
Probably you can use Optional status processing to compare %SuggestedReply% to a number: %SuggestedReply% > 20
http://www.ks-soft.net/hostmon.eng/mfra ... processing

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,

Just one more question: how does Hostmon know what type of reply it received, string or number?

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

Post by KS-Soft »

SNMP Agent provides this information (data type for each variable)

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,

Just in case someone needs: I found a way to reply hostmonitor in integer format using "pass" directive for command execution in snmpd.conf.

This way is possible to determine the reply type and hostmon gets happy!

For more info read the snmpd.conf man page.


Regards,

Jromariz.
MichBeck
Posts: 3
Joined: Thu Apr 20, 2006 3:58 am

Post by MichBeck »

Hi. I'am writing to you to let you now that I although would have a usage for the "... "treat string as integer" option..." I'am using some barracuda network devices where I can't change the SNMP option to get integer values. I although contacted the barracuda support and the only answer I'am get is "Unfortunately the Barracuda SNMP will only give an output as a string value as it uses SNMP version 1" :cry: . So if you perhaps will include the "treat string as integer" option in future releases it would be nice :wink: . Furthermore I would be able to get warnings work correctly. The workaround with "%SuggestedReply%" in my case is not the best way to get it work.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Please post this request into "Whish list" forum
I'am get is "Unfortunately the Barracuda SNMP will only give an output as a string value as it uses SNMP version 1"
:roll: Actually SNMPv1 supports integer types. Probably this SNMP agent needs to return large 64bit integer number?

Regards
Alex
Post Reply