Depending on the type of traffic you want to be logged, and the components that you are using, you have some different options.
All starts with the following:
Message Action (under
Message actions), and use the following expression:
You also have to define the
log level under which the message should be logged. I'd recommend to use at least the
INFORMATIONAL level, as
DEBUG will generate massive amounts of log entries over time.
Of course, it is possible to add additional data to the log message.
Second, if you want to push messages to an external syslog server, you should add the syslog server as well:
- Go to
Servers and add the server.
- Make sure you enable the option:
"User Configurable Log Messages".
- Next, create the
logging policy, and set it to
If you are using Content Switching, you can attach the log message to the content switching policy, by selecting the appropriate message in the dropdown box while editing the policy.
If you are using plain load balancing, you can create a responder policy, with the policy expression set to
true, selecting the log message in the dropdown box, and last but not least: setting the action to
You can then bind the responder policy to the load balancers that require logging of the client source IP.
Note: Beware of NAT, as it might obfuscate the real client IP!