cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1368
Views
0
Helpful
4
Replies

ACE/ACE4710 DateTime variable insert in http request

bmlakar
Level 1
Level 1

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

4 Replies 4

Kanwaljeet Singh
Cisco Employee
Cisco Employee

Hi Branko,

Could you please share the "action-list" you used and it didn't work?

Regards,

Kanwal

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

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

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

Review Cisco Networking for a $25 gift card