Forum Discussion
Nate_Sternberg_
Nimbostratus
Jan 14, 2005Using a monitor with a user-agent string?
This isn't exactly an iControl question, but it seemed relevant. Sorry if this is off-topic.
We have a web app that expect a user agent string with every request; it considers a missing user agent string to be a bad request and logs an error.
Our F5 monitors don't supply a user agent string. Is it possible to make it do so, perhaps by using a shell script as an external monitor? Anyone have a sample?
2 Replies
- bknotwell_12713Historic F5 AccountHi Nate--
Assuming I understand your problem correctly, you should be able to do something like the following:
bigpipe monitor http2 '{ use http send "GET /index.shtml\r\nUser-Agent: firefox\r\n\r\n" }'
FWIW, this is 4.X syntax but I'm pretty sure 9.X should be essentially the same.
--Brad - Nate_Sternberg_
Nimbostratus
Thanks Brad! We didn't try it through the command prompt like that, but your post made us realize that we could probably just change the monitor string in the web GUI. So we set it like this:
GET / HTTP/1.1
User-Agent: Mozilla/4.0 (compatible;.MSIE.6.0; Windows NT 5.2; NET CLR 1.1.4322; F5 BipIP V9.0.3)
We noticed that if we didn't add the HTTP/1.1 in the string, the user agent wouldn't be picked up by the app. Not sure why that is. Anyway, thanks for the suggestion.
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
