Configuration overview
This page describes how to configure F5 NGINX Agent using configuration files, CLI (Command line interface) flags, and environment variables.
NGINX Agent interprets configuration values set by configuration files, CLI flags, and environment variables in the following priorities:
- CLI flags overwrite configuration files and environment variable values.
- Environment variables overwrite configuration file values.
- Config files are the lowest priority and config settings are superseded if either of the other options is used.
You must open any required firewall ports or add SELinux/AppArmor rules for the ports and IPs you want to use.
Configuration via Configuration Files
The NGINX Agent configuration file is created using a YAML structure and can be found in /etc/nginx-agent/nginx-agent.conf
- Edit the configuration file
sudo vim /etc/nginx-agent/nginx-agent.conf
- Add the log property
log:
level: debug
- Save and exit
sudo systemctl restart nginx-agent
Configuration via CLI Parameters
From a command line terminal:
sudo nginx-agent \
--log-level=debug
Configuration via Environment Variables
Environment variables are another way to set configuration values, especially in containerized deployments or CI/CD pipelines.
sudo docker run \
--env=NGINX_AGENT_LOG_LEVEL=debug \
-d agent