Forum Discussion
mega_kas_60204
Nimbostratus
Feb 25, 2009snmpget test in iRule
Hiya
First off thanks to the dev's for contributing to this forum. Can anyone help us out here?
We have a VS with an iRule that stops ping responses being routed back to an external server if too many of our slave nodes are down. This works well to stop the external server sending us too much load if we have failures.
However, we now need to incorporate another test into our iRule to check if both the master and N number of slave nodes are available.
So the test we want is:
master server available and N number of slave servers
then route pings
else reject pings
The only way we can test the master server is with an snmpget like this:
request: /opt/bmi/bin/snmpget -v1 -c public 10.65.201.131 1.3.6.1.4.1.8521.4.10.2.0
response: SNMPv2-SMI::enterprises.8521.4.10.2.0 = INTEGER: 1
Does anyone know how to incoporate this snmpget into our iRule?
Cheers, Kas
when CLIENT_ACCEPTED {
if {([IP::protocol] == 1) && ([IP::local_addr] == "10.222.333.44")} {
if {[active_members slave_pool] < 1} {
reject
log local0. "External ping failed"
}
}
}
- The_Bhattman
Nimbostratus
iRules don't allow you to look at SNMPGETS, atleast from what I read :-) - mega_kas_60204
Nimbostratus
Thanks very much for the reply
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects