Deploy log profiles
Use this guide to deploy a security log profile to NGINX instances or instance groups in NGINX Instance Manager. A log profile does not capture security events until it is deployed. You can deploy a log profile directly from the Log Profiles screen, or as part of editing the NGINX configuration for an instance or instance group.
Before you begin, ensure you have:
- A configured log profile: A log profile already created and saved in NGINX Instance Manager. See Configure a log profile.
- A target instance or instance group: One or more NGINX instances or instance groups registered in NGINX Instance Manager to deploy the log profile to.
- NGINX Instance Manager access: An account with sufficient permissions to deploy WAF log profiles. See Manage roles and permissions.
-
In NGINX Instance Manager, select WAF > Log Profiles.
-
Select the log profile that you want to deploy.
-
From Actions, select Deploy.
The Deploy Log Profile window opens.
-
Confirm the name of the log profile shown. NGINX Instance Manager defaults to the selected log profile.
-
In the Target section, select Instance or Instance Group.
-
In the drop-down menu that appears, select the instance or instance group to deploy to.
-
Choose how to deploy the log profile:
- Add a new log profile path: Specify a new file path where the log profile bundle should be deployed.
- Update all log profiles: Sync all log profiles on the target instance or instance group. This updates all existing log profiles by compiling their latest JSON contents into bundles and deploying them to all existing file paths.
If the log profile has not already been compiled for the WAF compiler version used by the target instance or instance group, NGINX Instance Manager automatically compiles it into a bundle before deployment.
You can also deploy a log profile directly when editing the NGINX configuration for an instance or instance group. Use this method to integrate log profile deployment into your regular configuration workflow.
-
In NGINX Instance Manager, select Instances or Instance Groups and choose the target instance or instance group.
-
Select the Configuration tab, then select Edit Configuration.
-
Select Apply security and select which log profile to deploy.
-
Copy the code snippet with the required directives and paste it into your NGINX configuration. The snippet includes:
app_protect_security_log_enable onapp_protect_security_logwith the log profile bundle path and destination
For example:
nginx app_protect_security_log_enable on; app_protect_security_log /etc/nginx/log-profile-bundle.tgz syslog:server=localhost:514; -
Select Save, then select Publish.
After deployment, verify that the log profile is active on the target instances or instance groups.
-
Confirm that the NGINX configuration includes the required directives:
app_protect_security_log_enable onapp_protect_security_logwith the correct log profile bundle path and destination
-
Check that security logs are being generated at the configured destination (file path or syslog server).
-
Review the log entries to confirm they match the format and filter settings configured in the log profile.
To troubleshoot log profile deployment issues, see the Container-related configuration requirements section to ensure volumes and paths are correctly configured.
For more information, see: