Forum Discussion
dave_jensen_201
Nimbostratus
Mar 23, 2010iRule to log browser type (client)
I've got a thread running on Adv. Config about an issue I'm having with SSL connections and Apple Safari for a website we host. I'm looking to track down the behavior of the F5 when a connection request comes through the F5 but am having trouble in a few areas. First I'd like to log the ssl sessionid but none of my iRules that I'm trying ever get executed.
NEW
when CLIENT_ACCEPTED {
log local0. "SSL sessionid is: [SSL::sessionid]"
}
NEW
when HTTP_REQUEST {
log local0. "SSL sessionid is: [SSL::sessionid]"
}
NEW
when SERVER_CONNECTED {
log local0. "SSL sessionid is: [SSL::sessionid]"
}
As for logging a client browser type I don't know where to start as the list of events and what to log tell me this isn't possible (but I hope I'm wrong).
Thanks,
- Dave
6 Replies
- naladar_65658
Altostratus
For the client browser type you will want to use:
HTTP::header User-Agent - naladar_65658
Altostratus
Sorry, the line that you would want to add to your iRule code is:
log local0. "The User Agent String is: [HTTP::header User-Agent]"
I checked out your other post and left you a URL that explains how to obtain that Session ID that you are looking for. - dave_jensen_201
Nimbostratus
What event should I trigger off of to write this log out?
- Dave - naladar_65658
Altostratus
when HTTP_REQUEST would be the event trigger.
What is your level of access on the BIG-IP device you are running? I have a QA F5 for testing stuff on, but when I have to test something on the production unit, I just set up another virtual server using a private IP and utilize all the same iRules, pools and profiles of the Virtual Server that I am debugging. Then I create an entry on my windows unit's host file that aims the url to the new virtual sever that I created. Then you can send requests back and forth from your own machine, using a valid url to analyze and debug things at will.
I had to get approved to have my own test VIP on the unit, but it can save a lot of time when troubleshooting things like this and keeps you from stepping on production traffic. - hoolio
Cirrostratus
What is your level of access on the BIG-IP device you are running? I have a QA F5 for testing stuff on, but when I have to test something on the production unit, I just set up another virtual server using a private IP and utilize all the same iRules, pools and profiles of the Virtual Server that I am debugging. Then I create an entry on my windows unit's host file that aims the url to the new virtual sever that I created. Then you can send requests back and forth from your own machine, using a valid url to analyze and debug things at will.
This is a great option if you don't have a separate test unit. It limits the impact of errors on a test iRule affecting a live virtual server.
Aaron - For sure, you have to love the flexibility of the bigip software..
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