12-18-2013 01:16 AM
Hello;
Is there a way to insert date and time into http request like:
http://myserver.lan:2719/201312100806
or something like that.
I have tried with action-list + uri rewrite + some % variations but without success.
Thanks for answer.
Branko
12-18-2013 08:29 AM
Hi Branko,
Could you please share the "action-list" you used and it didn't work?
Regards,
Kanwal
12-19-2013 04:02 AM
Hi Kanwal;
In my test lab action-list goes like this:
action-list type modify http HTTP_INSERT_TIME
description Insert Date and Time
url rewrite "/exec/show/log/CR" replace "/exec/show/log/%t/CR"
I have tried also %time, %DateTime, etc
By monitor traffic at RealServer, I noticed that rewrite is working, except that particular letters /%t.. are shown in uri.
There is no time/date extracted from system and put into ure. Obviously wrong variable.
Kind regards,
Branko
12-19-2013 08:51 AM
Hi Branko,
This is something i have never come across. But i am pretty sure you cannot do this by url rewriting. Url rewriting will just replace the original string with whatever you have told it to replace with. It is just modifying.
I was looking for some more information and i found that there is a "Date" http header which indicates which date and time this message was sent. ACE can insert HTTP header. We get request for inserting original client IP (ace is doing src nat) and we always do X-forwarded-for and equivalent values like %is for client IP, %id for destination IP etc. Now i am not sure which variable will make the ACE to insert date and time. I would suggest opening a TAC case for the same. But if you have idea about variables you can surely give a try yourself.
policy-map type loadbalance first-match XXX
class xxx
sticky-serverfarm xxx
insert-http x-forwarded-for header-value "%is"
The header x-forwarded-for can be anything. You can use Date there and header value should be the variable that the ACE will insert.
Regards,
Kanwal
12-20-2013 05:21 AM
Hi Kanwal;
I have already tried to do this also via action-list +header insert, but with no luck.
As per your advice I agree it would be best to open tac case.
Thanks for your help provided.
Kind regards,
Branko
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide