bmarlow_10657
Feb 16, 2009Nimbostratus
SNMP query in iRule/SNMP monitor variable for iRule?
Okay, so I've been looking all over and there seems to be relatively little information regarding using SNMP or SNMP parameters in iRules. Mind you I am an iRule Rookie.
My question has two parts:
1. Is it possible to do an SNMP query within an iRule, and if so what is the command?
2. Is there a way to call the values of an SNMP monitor in an iRule?
My scenario is this:
We have several web proxies that sit behind an LTM. To make maximum use of our proxies caching mechanism we want to use a spill-over method triggered by CPU thresholds of the proxies.
I imagine that the iRule will look something similar to this (note the IP's have been replaced with *'s), but what would I used for variable?
when HTTP_REQUEST {
if{ [ usage 1sec] <= 75} {
LB::reselect node *.*.*.* 8080
} else {
if{ [ usage 1sec] <= 75} {
LB::reselect node *.*.*.* 8080
} else {
if{ [ usage 1sec] <= 75} {
LB::reselect node *.*.*.* 8080
} else {
if{ [ usage 1sec] <= 75} {
LB::reselect node *.*.*.* 8080
} else {
}
}
Any help would be greatly appreciated!
Thanks!