Forum Discussion

smp_86112's avatar
smp_86112
Icon for Cirrostratus rankCirrostratus
Oct 02, 2012

v10 GTM - log request and response

I'm looking for an iRule I can apply to a GTM running v10 that will log the client address, WIP name requested, and the GTM response for each DNS request. I thought I had it:

 

 


when LB_SELECTED {

  log local0. " [IP::client_addr] -> [DNS::rrname] -> [LB::server addr]"

}

 

It seems to log what I expect when I submit a small number of requests. But when I apply this to a WIP that gets a lot of requests, the response address ("[LB::server addr]") doesn't always seem to match up. What I mean by that is intermittently, the logged value isn't even a member of the WIP pool. It doesn't seem like the GTM always maintains a correlation between the DNS_REQUESTED request and the LB_SELECTED event. I tried applying the same logic in the DNS_REQUESTED event, but got similar results - responses with members not in the pool.

 

 

This seems like it would be a pretty trivial thing to log. Anyone have some v10 sample code they are willing to share?

 

2 Replies

  • Why are you using LB_SELECTED event? does DNS_RESPONSE not work in v10?

     

     

    I wrote this to log my DNS traffic handled by v11.2 GTM: https://gist.github.com/3730440

     

     

    Thanks,

     

    Mohamed.
  • Thanks for your response.

     

     

    > does DNS_RESPONSE not work in v10?

     

     

    No, unfortunately it does not - I tried that first. And according to the Wiki doc, "Introduced: LTM-11.1.0, GTM-11.1.0".