Skip to content

Commit 360c8ab

Browse files
Added NGINX Agent loglevel configuration support (#141)
* Added API Connectivity Manager 1.5.0 support * Ownership fix * Startup script fix * NGINX App Protect WAF updates * Tested with NGINX Instance Manager 2.9.1 * Added docker-compose support * Tested with NGINX Instance Manager 2.10.0 and Security Monitoring 1.4.0 * Tested with NGINX Instance Manager 2.10.0 and API Connectivity Manager 1.5.0 * Tested with API Connectivity Manager 1.6.0 * Tested with API Connectivity Manager 1.6.0 * README updated * Added support for NGINX Instance Manager 2.10.1 and App Delivery Manager 4.0.0 * Fixed NGINX App Protect detection bug for NGINX Instance Manager 2.10.0+ * Fixed agent syslog receiver bug * README updated * Tested with NGINX Instance Manager 2.11.0 and Security Monitoring 1.5.0 * Tested with NGINX Instance Manager 2.11.0 * Tested with NGINX API Connectivity Manager 1.7.0 * Tested with NGINX Instance Manager 2.12.0 and Security Monitoring 1.6.0 * Tested with API Connectivity Manager 1.8.0 * Tested with API Connectivity Manager 1.8.0 * Tested with NGINX Instance Manager 2.12.0 * Dockerfile updated * Support for NGINX Instance Manager 2.13 * Tested with NGINX Instance Manager 2.13 * Tested with NIM 2.14.0 and SM 1.7.0 * Tested with NIM 2.14.0 and SM 1.7.0 * Tested with NGINX Instance Manager 2.14.0 * Tested with NGINX Instance Manager 2.14.0 * Tested with NGINX App Protect compiler v4.583.0 * Start script updated * Advanced metrics support added * Advanced metrics support added * Removed Application Delivery Manger, tested with NGINX Instance Manager 2.15.0 * Removed devportal, tested with NGINX Instance Manager 2.15.0 * Removed API Connectivity Manager * Dockerfile and container start updated * Dockerfile and container start updated * README updated * Tested with NGINX Instance Manager 2.15.1 * NGINX Agent updates * Manifest fix * NGINX Agent updates * README updated * Added NGINX agent loglevel support --------- Signed-off-by: 65397 <[email protected]>
1 parent 624ac7a commit 360c8ab

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

nginx-agent-docker/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ the build script will push the image to your private registry once build is comp
7878
- `NIM_ADVANCED_METRICS` - set to `"true"` to enable advanced metrics collection
7979
- `NAP_WAF` - set to `"true"` to enable NGINX App Protect WAF (docker image built using `-w`)
8080
- `NAP_WAF_PRECOMPILED_POLICIES` - set to `"true"` to enable NGINX App Protect WAF precompiled policies (docker image built using `-w`)
81+
- `AGENT_LOGLEVEL` - NGINX Agent loglevel, optional. If not specified defaults to `info`
8182

8283
2. Start and stop using
8384

@@ -102,6 +103,7 @@ docker run --rm --name nginx -p [PORT_TO_EXPOSE] \
102103
-e "NIM_ADVANCED_METRICS=[true|false]" \
103104
-e "NAP_WAF=[true|false]" \
104105
-e "NAP_WAF_PRECOMPILED_POLICIES=[true|false]" \
106+
-e "AGENT_LOGLEVEL=[panic|fatal|error|info|debug|trace]" \
105107
<NGINX_DOCKER_IMAGE_NAME:TAG>
106108
```
107109

nginx-agent-docker/container/start.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ if [[ ! -z "$NIM_TOKEN" ]]; then
3131
' /etc/nginx-agent/nginx-agent.conf
3232
fi
3333

34+
if [[ ! -z "$AGENT_LOGLEVEL" ]]; then
35+
yq -i '
36+
.log.level=strenv(AGENT_LOGLEVEL)
37+
' /etc/nginx-agent/nginx-agent.conf
38+
fi
39+
3440
if [[ "$NIM_ADVANCED_METRICS" == "true" ]]; then
3541
yq -i '
3642
.advanced_metrics.socket_path="/var/run/nginx-agent/advanced-metrics.sock" |

nginx-agent-docker/manifests/1.nginx-with-agent.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ spec:
3939
- name: NIM_ADVANCED_METRICS
4040
value: "true"
4141

42+
# Optional to set NGINX Agent loglevel - default is "info"
43+
#- name: AGENT_LOGLEVEL
44+
# value: "info"
45+
4246
# Optional if NGINX App Protect WAF is available in the docker image - set to "true" to enable
4347
#- name: NAP_WAF
4448
# value: "true"

0 commit comments

Comments
 (0)