Configure and deploy log profiles
Use this guide to configure log profiles for F5 WAF for NGINX security logs in NGINX Instance Manager. Security logs (also called Request logs or Traffic logs) provide visibility into what F5 WAF detects and how F5 WAF processes traffic according to your policies. F5 WAF uses its own logging mechanism rather than NGINX’s default access logging.
With log profiles, you control:
- Filtering: Which requests are logged (all requests, requests with violations, or blocked requests only)
- Format: How log messages are structured (default, custom, Splunk, ArcSight, or BIG-IQ formats)
- Destination: Where logs are sent (file or syslog server)
- Content: What information is included in each log message (request details, violations, attack signatures, and more)
- Size limits: Maximum sizes for log messages and request data
For detailed information about security logging capabilities and available log attributes, see Security Logs and Security logs examples.
Before you begin, ensure you have:
- F5 NGINX Instance Manager access: An account with sufficient permissions to create and manage WAF log profiles. See Manage roles and permissions.
- F5 WAF for NGINX license: A valid license with WAF capabilities enabled on your NGINX Instance Manager deployment.
- NGINX instances: One or more NGINX instances registered in NGINX Instance Manager that you intend to deploy the log profile to.
- In NGINX Instance Manager, select WAF > Log Profiles.
- Select Add Log Profile. The log profile configuration screen opens.
- In General Settings, enter a name and optional description for the log profile.
Next, configure the filter settings to determine which requests are logged.
The Request Type filter determines which requests are logged based on what F5 WAF detects:
- All: Logs all requests, both legal and illegal.
- Illegal: Logs requests with violations (alerted or blocked).
- Blocked: Logs requests with violations that were blocked.
Select the filter option that matches your monitoring and compliance needs. For production environments, start with Blocked to reduce log volume, then expand to Illegal or All as needed for troubleshooting.
Next, configure the content format and options for how log messages are structured.
The content section specifies the format and structure of log messages.
Select one of the following log formats:
- Default: Default format for F5 WAF with comma-separated key-value pairs.
- GRPC: Variant of the default format suited for gRPC traffic.
- User-defined: Custom format that you define using a format string with placeholders.
- Splunk: Formatted for Splunk SIEM with F5 plugin.
- ArcSight: Formatted according to ArcSight Common Event Format (CEF) with custom fields adapted for F5.
- BIG-IQ: Formatted for BIG-IQ, the F5 centralized management platform for BIG-IP.
Configure size restrictions for log messages:
- Max request size: Limit in bytes for the
requestandrequest_body_base64fields. The accepted range is 1–10240 bytes, with a default of 2000 bytes. You can also set this toany, which is equivalent to 10240 bytes. - Max message size: Total size limit in KB for the entire log message. The accepted range is 1k–64k, with a default of 2k. This value must not be smaller than
max_request_size.
If you select User-defined format, create a custom format string using placeholders for log attributes. Each attribute name is delimited by percent signs. For example:
Request ID %support_id%: %method% %uri% received on %date_time% from IP %ip_client% had the following violations: %violations%Available placeholders include attributes such as %ip_client%, %request%, %violations%, %attack_type%, and others. See Available security log attributes.
Configure additional options for how list values appear in your logs:
- List delimiter: Character or string that separates list elements (default: comma).
- List prefix: Character or string that starts a list (default: none).
- List suffix: Character or string that ends a list (default: none).
- Escaping characters: Replace specific characters in log values with alternative characters. Configure the
fromcharacter to be replaced and thetoresult character.
For detailed information about the JSON structure of security log configuration files, see Security log configuration file.
Finally, select Add Profile to save the log profile. Next, you can optionally compile the log profile into a bundle before deploying it to your NGINX instances.
Before deploying a log profile, you can optionally compile the JSON configuration file into a bundle. If you do not compile manually, the deployment process automatically compiles the log profile.
The compiled bundle is in compressed tar format (.tgz) and contains all the necessary configuration to enable security logging on your NGINX instances.
-
Go to WAF > Log Profiles.
A list of all log profiles appears.
-
In the Actions column for a log profile, select one of the following:
- Edit: Open the log profile configuration editor to reconfigure settings.
- Make a Copy: Create a new log profile by copying the JSON content.
- Export as JSON: Download the log profile JSON configuration.
- Manage Bundles: View and manage compiled bundles for different WAF compiler versions.
- Delete: Remove the log profile.
-
Select Manage Bundles to view all supported WAF compiler versions.
For each version, you can see whether the log profile is compiled for that version.
-
For a specific compiler version, select one of the following:
- Compile: Compile the log profile into a bundle for that compiler version.
- Download: Download an existing compiled bundle for that compiler version.
This allows you to maintain compatibility with different versions of F5 WAF across your infrastructure.
After saving a log profile, deploy it to your NGINX instances to enable logging of WAF security events. See Deploy log profiles for detailed deployment steps.
The deployment process configures the required NGINX directives (app_protect_security_log_enable and app_protect_security_log) and ensures the log profile bundle is accessible to your instances. For detailed information about these directives and their configuration options, see Security log directives.
For container-specific setup requirements, see the Log profiles configuration section in the overview.
From NGINX Instance Manager, you can review the log profiles you have saved. For detailed information about reviewing and managing log profiles, see Update log profiles.
For more information, see: