Forum Discussion
Eric_Oakeson_68
Nimbostratus
Mar 11, 2010GTM response irule
We have an iRule that gives out a summary of what IP it answered with, what the IP of the LDNS is, and what topology it thinks the client is in. I was wondering if anyone knows how to get the metric it used in there also, like RTT, Topology, etc.
Here is the iRule:
when LB_SELECTED { log local0. "LDNS;[IP::client_addr]; assigned;[LB::server addr]; request;[DNS::rrname]; topology;[whereis [IP::client_addr]]"}
Here is the the log output looks like:
Mar 11 15:10:32 VCOENG1-GTM-1 gtmd[2443]: Rule Log_DNS: LDNS;x.x.x.x; assigned;x.x.x.x; request;site.com; topology;{North America} US
We would like to have it tell us 'why' it handed out the "assigned" IP...can anyone help?
9 Replies
- The_Bhattman
Nimbostratus
Hi Eric,
I think that all depends on your logic. The F5 iRule can't tell you exactly why it's working based on your logic. YOu would need to know how it actually works - which could be many different ways. From there you can create log statements that would log on specific known situatons so you can tell which one happened.
I hope that helps
Bhattman - Eric_Oakeson_68
Nimbostratus
All I want is to be able to tell what metric the GTM used to hand out an IP. I want to know if it used the "primary, secondary, or fallback" method to send a DNS server a response. Because I want to know if it's using my primary method (Round Trip-Time) or if it's falling back to the secondary method to hand out an IP. - The_Bhattman
Nimbostratus
Hi Eric,
I am not sure the iRules is going to provide you that level of information simply because it doesn't have enough commands to provide you the specific reasons. However, if you know the end result you can possibly log that and assume that it choose "Primary, Secondary or fallback". For example you assume that if secondary was chosen it it was because the Primary became unavailable due to a Health-check issue or someone might have changed the logic. However, you might also want to look into iControl to see if that would provide you greater depth which I defer to other members of this forum that know it like the back of their hand.
Bhattman - Eric_Oakeson_68
Nimbostratus
I don't mean primary and secondary in regards to the pool IPs and something being up or down. I'm meaning primary, alternate, and fallback load balancing method. So if you have 3 datacenters: A,B, and C, and all three are up and fine. I want to know why a user went to datacenter A. Meaning, did the GTM give them that IP based on a topology table entry, or based on round trip time metrics (mostly trying to troubleshoot why people are going to the wrong data center). - JRahm
Admin
You might try enabling query logging:
b db gtm.querylogging enable
I don't recall if the pick source is logged or not, but it's a shot. - JRahm
Admin
Oh, I should caution this is expensive, so proceed with caution on a busy system. - RiverFish
Altostratus
In the GUI just go to Statistics > Module Statistics > Global Traffic > Wide IP
- Yoshi_126949
Nimbostratus
I can't see that section. Is that in 11.4+
- Yoshi_126949
Nimbostratus
Oops nevermind, looked at the release notes for 11.4 and that's when it went in.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
