Skip to content

Commit 49a3a80

Browse files
committed
fix ordered list
1 parent fd98a74 commit 49a3a80

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

Diff for: site/content/how-to/monitoring/troubleshooting.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -82,59 +82,59 @@ Logs from the NGINX Gateway Fabric control plane and data plane can contain info
8282

8383
1. Container Logs
8484

85-
To see logs for Control plane container:
85+
To see logs for Control plane container:
8686

87-
```shell
88-
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx-gateway
89-
```
87+
```shell
88+
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx-gateway
89+
```
9090

91-
To see logs for Data plane container:
91+
To see logs for Data plane container:
9292

93-
```shell
94-
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx
95-
```
93+
```shell
94+
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx
95+
```
9696

9797
1. Error Logs
9898

99-
To see error logs for control plane and data plane containers:
99+
To see error logs for control plane and data plane containers:
100100

101-
For _nginx-gateway_ container, you can `grep` for the word `error` or change the log level to `error` by following steps in Modify log levels (Section 3). Once you have modified log levels, you can `grep` for the word `debug` to check debug logs for further investigation.
101+
For _nginx-gateway_ container, you can `grep` for the word `error` or change the log level to `error` by following steps in Modify log levels (Section 3). Once you have modified log levels, you can `grep` for the word `debug` to check debug logs for further investigation.
102102

103-
```shell
104-
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx-gateway | grep error
105-
```
103+
```shell
104+
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx-gateway | grep error
105+
```
106106

107-
For example, an error message when telemetry is not enabled for NGINX Plus installations:
107+
For example, an error message when telemetry is not enabled for NGINX Plus installations:
108108

109-
```text
110-
kubectl logs -n nginx-gateway nginx-gateway-nginx-gateway-fabric-77f8746996-j6z6v | grep error
111-
Defaulted container "nginx-gateway" out of: nginx-gateway, nginx
112-
{"level":"error","ts":"2024-06-13T18:22:16Z","logger":"usageReporter","msg":"Usage reporting must be enabled when using NGINX Plus; redeploy with usage reporting enabled","error":"usage reporting not enabled","stacktrace":"github.com/nginxinc/nginx-gateway-fabric/internal/mode/static.createUsageWarningJob.func1\n\tgithub.com/nginxinc/nginx-gateway-fabric/internal/mode/static/manager.go:616\nk8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:259\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:226\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:227\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:204\nk8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:259\ngithub.com/nginxinc/nginx-gateway-fabric/internal/framework/runnables.(*CronJob).Start\n\tgithub.com/nginxinc/nginx-gateway-fabric/internal/framework/runnables/cronjob.go:53\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\tsigs.k8s.io/controller-runtime@v0.18.4/pkg/manager/runnable_group.go:226"}
113-
```
109+
```text
110+
kubectl logs -n nginx-gateway nginx-gateway-nginx-gateway-fabric-77f8746996-j6z6v | grep error
111+
Defaulted container "nginx-gateway" out of: nginx-gateway, nginx
112+
{"level":"error","ts":"2024-06-13T18:22:16Z","logger":"usageReporter","msg":"Usage reporting must be enabled when using NGINX Plus; redeploy with usage reporting enabled","error":"usage reporting not enabled","stacktrace":"github.com/nginxinc/nginx-gateway-fabric/internal/mode/static.createUsageWarningJob.func1\n\tgithub.com/nginxinc/nginx-gateway-fabric/internal/mode/static/manager.go:616\nk8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:259\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:226\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:227\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:204\nk8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext\n\tk8s.io/apimachinery@v0.30.1/pkg/util/wait/backoff.go:259\ngithub.com/nginxinc/nginx-gateway-fabric/internal/framework/runnables.(*CronJob).Start\n\tgithub.com/nginxinc/nginx-gateway-fabric/internal/framework/runnables/cronjob.go:53\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\tsigs.k8s.io/controller-runtime@v0.18.4/pkg/manager/runnable_group.go:226"}
113+
```
114114

115-
For _nginx_ container you can `grep` for various [error](https://nginx.org/en/docs/ngx_core_module.html#error_log) log levels. They are logged with the`[emerg]` tag:
115+
For _nginx_ container you can `grep` for various [error](https://nginx.org/en/docs/ngx_core_module.html#error_log) log levels. They are logged with the`[emerg]` tag:
116116

117-
```shell
118-
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx | grep emerg
119-
```
117+
```shell
118+
kubectl -n nginx-gateway logs <ngf-pod-name> -c nginx | grep emerg
119+
```
120120

121-
For example, if a variable is too long, NGINX may display such an error message:
121+
For example, if a variable is too long, NGINX may display such an error message:
122122

123-
```text
124-
kubectl logs -n nginx-gateway ngf-nginx-gateway-fabric-bb8598998-jwk2m -c nginx | grep emerg
125-
2024/06/13 20:04:17 [emerg] 27#27: too long parameter, probably missing terminating """ character in /etc/nginx/conf.d/http.conf:78
126-
```
123+
```text
124+
kubectl logs -n nginx-gateway ngf-nginx-gateway-fabric-bb8598998-jwk2m -c nginx | grep emerg
125+
2024/06/13 20:04:17 [emerg] 27#27: too long parameter, probably missing terminating """ character in /etc/nginx/conf.d/http.conf:78
126+
```
127127
128128
1. Access Logs
129129
130-
NGINX access logs record all requests processed by the NGINX server. These logs provide detailed information about each request, which can be useful for troubleshooting and analyzing web traffic.
131-
Access logs can be viewed with the above method of using `kubectl logs`, or by viewing the access log file directly. To do that, get shell access to your NGINX container using these [steps](#get-shell-access-to-nginx-container). The access logs are located in the file `/var/log/nginx/access.log` in the NGINX container.
130+
NGINX access logs record all requests processed by the NGINX server. These logs provide detailed information about each request, which can be useful for troubleshooting and analyzing web traffic.
131+
Access logs can be viewed with the above method of using `kubectl logs`, or by viewing the access log file directly. To do that, get shell access to your NGINX container using these [steps](#get-shell-access-to-nginx-container). The access logs are located in the file `/var/log/nginx/access.log` in the NGINX container.
132132
133-
You can see logs for a crashed or killed container by adding the `-p` flag to the above commands.
133+
You can see logs for a crashed or killed container by adding the `-p` flag to the above commands.
134134
135135
1. Modify Log Levels
136136
137-
To see debug logs for control plane in NGINX Gateway Fabric, enable verbose logging by editing the `NginxGateway` configuration. This can be done either before or after deploying NGINX Gateway Fabric. Refer to this [guide](https://docs.nginx.com/nginx-gateway-fabric/how-to/configuration/control-plane-configuration) to do so.
137+
To see debug logs for control plane in NGINX Gateway Fabric, enable verbose logging by editing the `NginxGateway` configuration. This can be done either before or after deploying NGINX Gateway Fabric. Refer to this [guide](https://docs.nginx.com/nginx-gateway-fabric/how-to/configuration/control-plane-configuration) to do so.
138138
139139
#### Understanding the generated NGINX config
140140

0 commit comments

Comments
 (0)