File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ the build script will push the image to your private registry once build is comp
78
78
- ` NIM_ADVANCED_METRICS ` - set to ` "true" ` to enable advanced metrics collection
79
79
- ` NAP_WAF ` - set to ` "true" ` to enable NGINX App Protect WAF (docker image built using ` -w ` )
80
80
- ` 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 `
81
82
82
83
2 . Start and stop using
83
84
@@ -102,6 +103,7 @@ docker run --rm --name nginx -p [PORT_TO_EXPOSE] \
102
103
-e "NIM_ADVANCED_METRICS=[true|false]" \
103
104
-e "NAP_WAF=[true|false]" \
104
105
-e "NAP_WAF_PRECOMPILED_POLICIES=[true|false]" \
106
+ -e "AGENT_LOGLEVEL=[panic|fatal|error|info|debug|trace]" \
105
107
<NGINX_DOCKER_IMAGE_NAME:TAG>
106
108
```
107
109
Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ if [[ ! -z "$NIM_TOKEN" ]]; then
31
31
' /etc/nginx-agent/nginx-agent.conf
32
32
fi
33
33
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
+
34
40
if [[ " $NIM_ADVANCED_METRICS " == " true" ]]; then
35
41
yq -i '
36
42
.advanced_metrics.socket_path="/var/run/nginx-agent/advanced-metrics.sock" |
Original file line number Diff line number Diff line change 39
39
- name : NIM_ADVANCED_METRICS
40
40
value : " true"
41
41
42
+ # Optional to set NGINX Agent loglevel - default is "info"
43
+ # - name: AGENT_LOGLEVEL
44
+ # value: "info"
45
+
42
46
# Optional if NGINX App Protect WAF is available in the docker image - set to "true" to enable
43
47
# - name: NAP_WAF
44
48
# value: "true"
You can’t perform that action at this time.
0 commit comments