SNMP expressions?
SNMP expressions?
Hi,
I would like to get percentage of memory utilization from a firewall using snmp.
It doesn´t provide that but I can get Total RAM and Used/Free in MB.
Is it possible to create an expression with SNMP OIDs?
Something like:
(<Used OID value>/>Total OID value>)*100
Thanks
//Andreas..
I would like to get percentage of memory utilization from a firewall using snmp.
It doesn´t provide that but I can get Total RAM and Used/Free in MB.
Is it possible to create an expression with SNMP OIDs?
Something like:
(<Used OID value>/>Total OID value>)*100
Thanks
//Andreas..
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Starting from HostMonitor 9.18 SNMP Get test may request and calculate several OID counters at once.
You may specify the following expression, instead of OID in SNMP test properties dialog ("Alert when OID" field):
ram_percent = ([<used memory OID>]*100) div [<total memory OID>]
Please check for details at:
http://www.ks-soft.net/hostmon.eng/news.htm#v918
You may specify the following expression, instead of OID in SNMP test properties dialog ("Alert when OID" field):
ram_percent = ([<used memory OID>]*100) div [<total memory OID>]
Please check for details at:
http://www.ks-soft.net/hostmon.eng/news.htm#v918
Ok, I´m running 9.16 so I´ll look into doing an upgrade then since that feature is very useful 
BTW, I see that there are some fixes for SOAP in 9.18. Could that help my other problem? http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=7029
Thanks!
//Andreas..

BTW, I see that there are some fixes for SOAP in 9.18. Could that help my other problem? http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=7029
Thanks!
//Andreas..
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
In that case Web server couldn't accept double HTTP headers, sent by HostMonitor.BTW, I see that there are some fixes for SOAP in 9.18. Could that help my other problem? http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=7029
We have checked HostMonitor 9.16 with ESXi 4.1 and ESXi 5.1 with default settings and SOAP test works well on our systems.
Anyway, you may try to install trial version of newest HostMonitor on separate system and check if it works with your ESXi.
I´ve upgraded to v9.34 and started to test using an oid expression like you described above.
But I think I need some help getting this to work. I thought I could just replace the single oid in that field to [<used memory OID>]*100) div [<total memory OID>] with the relevant oids inplace, and get a value from that, but that didn´t work.
So how do I do that? Do I have to use the variable infront? If so, then how do I present that value and check if its above or below a static value?
Sorry for the n00b question..
But I think I need some help getting this to work. I thought I could just replace the single oid in that field to [<used memory OID>]*100) div [<total memory OID>] with the relevant oids inplace, and get a value from that, but that didn´t work.
So how do I do that? Do I have to use the variable infront? If so, then how do I present that value and check if its above or below a static value?
Sorry for the n00b question..

Yes, you have to use variable name - simply add anyname= in front of expression
HostMonitor can compare values returned by the device with a specified string and start alert actions if the returned value is:
- less/more than the specified value
- equal to/different from the specified number or string
- contains/doesn't contain the specified string
Also HostMonitor has 9 alert conditions to check how new value changes compare to the previous test:
- "increases by" - HM sets "Bad" status when value increases by specified number or more
- "decreases by" - HM sets "Bad" status when value decreases by specified number or more
- "changes by" - HM sets "Bad" status when value changes by specified number or more
- "increases by (%)" - HM sets "Bad" status when value increases by specified (or greater) percentage
- "decreases by (%)" - HM sets "Bad" status when value decreases by specified (or greater) percentage
- "changes by (%)" - HM sets "Bad" status when value changes by specified (or greater) percentage
- "increases /sec" - HM sets "Bad" status when average increase of the counter (per second) is greater than the specified limit ((new value - old value)/elapsed time >= specified limit)
- "decreases /sec" - HM sets "Bad" status when average decrease of the counter (per second) is greater than the specified limit ((old value - new value)/elapsed time >= specified limit)
- "changes /sec" - HM sets "Bad" status when average change of the counter (per second) is greater than the specified limit (abs(new value - old value)/elapsed time >= specified limit)
Regards
Alex
Starting from version 9.18 HostMonitor allows you to use expressions like
TotalTraffic1 = [1.3.6.1.2.1.2.2.1.10.1] + [1.3.6.1.2.1.2.2.1.16.1]
In such case HostMonitor will retrieve 2 counters (1.3.6.1.2.1.2.2.1.10.1 - total number of octets received on interface #1; 1.3.6.1.2.1.2.2.1.16.1 - total number of octets transmitted out of interface #1) calculate sum of these counters and check result.
When you are using this expression, %MIBNAME%, %MIBNAMESHORT% and %PATH% variables will be set to TotalTraffic1 (name of the variable specified in this expression); while %OBJECT% variable will be set to [1.3.6.1.2.1.2.2.1.10.1] + [1.3.6.1.2.1.2.2.1.16.1]
Condition for alertIf so, then how do I present that value and check if its above or below a static value?
HostMonitor can compare values returned by the device with a specified string and start alert actions if the returned value is:
- less/more than the specified value
- equal to/different from the specified number or string
- contains/doesn't contain the specified string
Also HostMonitor has 9 alert conditions to check how new value changes compare to the previous test:
- "increases by" - HM sets "Bad" status when value increases by specified number or more
- "decreases by" - HM sets "Bad" status when value decreases by specified number or more
- "changes by" - HM sets "Bad" status when value changes by specified number or more
- "increases by (%)" - HM sets "Bad" status when value increases by specified (or greater) percentage
- "decreases by (%)" - HM sets "Bad" status when value decreases by specified (or greater) percentage
- "changes by (%)" - HM sets "Bad" status when value changes by specified (or greater) percentage
- "increases /sec" - HM sets "Bad" status when average increase of the counter (per second) is greater than the specified limit ((new value - old value)/elapsed time >= specified limit)
- "decreases /sec" - HM sets "Bad" status when average decrease of the counter (per second) is greater than the specified limit ((old value - new value)/elapsed time >= specified limit)
- "changes /sec" - HM sets "Bad" status when average change of the counter (per second) is greater than the specified limit (abs(new value - old value)/elapsed time >= specified limit)
Regards
Alex
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: