Forum Discussion
Kalyan_Reddy_Da
Nimbostratus
Jul 13, 2010Can we Insert HTTP Header using HTTP Profile for a dynamic tranaction id generation
Can we Insert HTTP Header using HTTP Profile for a dynamic tranaction id generation.
Example:
The following code i am using in my irule to generate a random number for my transac...
I didn't test that first. It results in a runtime error as incr expects a variable--not a number:
expr { int(10000000 * rand()) }
4888651
incr 1
can't read "1": no such variable
Can you try this instead:
[expr { int(10000000 * rand()) }]
This will generate a random number for each HTTP request. It will not increment a past value, so the ID numbers won't be sequential. If you wanted to store the past value in a global variable, you'd need to use an iRule.
Aaron
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