You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/configuration/configuration-overview.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ Flags:
175
175
--metrics-collection-interval duration Sets the interval, in seconds, at which metrics are collected. (default 15s)
176
176
--metrics-mode string Sets the desired metrics collection mode: streaming or aggregation. (default "aggregated")
177
177
--metrics-report-interval duration The polling period specified for a single set of metrics being collected. (default 1m0s)
178
-
--nginx-config-reload-monitoring-period duration The duration the NGINX Agent will monitor error logs after a NGINX reload (default 10s)
178
+
--nginx-config-reload-monitoring-period duration The duration NGINX Agent will monitor error logs after a NGINX reload (default 10s)
179
179
--nginx-exclude-logs string One or more NGINX access log paths that you want to exclude from metrics collection. This key is formatted as a string and multiple values should be provided as a comma-separated list.
180
180
--nginx-socket string The NGINX Plus counting unix socket location. (default "unix:/var/run/nginx-agent/nginx.sock")
181
181
--nginx-treat-warnings-as-errors On nginx -t, treat warnings as failures on configuration application.
During installation, NGINX Agent detects the NGINX user (typically `nginx`) for the master and worker processes and adds this user to a group called `nginx-agent`.
15
+
16
+
If you change the NGINX username after installing the NGINX Agent, you'll need to add the new username to the `nginx-agent` group so that the NGINX socket has the proper permissions.
17
+
18
+
A failure to update the `nginx-agent` group when the NGINX username changes may result in non-compliance errors for NGINX Plus.
19
+
20
+
21
+
## NGINX Socket
22
+
23
+
NGINX Agent creates a socket in the default location `/var/run/nginx-agent/nginx.sock`. You can customize this location by editing the `nginx-agent.conf` file and setting the path similar to the following example:
24
+
25
+
```nginx configuration
26
+
nginx:
27
+
...
28
+
socket: "unix:/var/run/nginx-agent/nginx.sock"
29
+
```
30
+
31
+
The socket server starts when the NGINX socket configuration is enabled; the socket configuration is enabled by default.
32
+
33
+
34
+
## Add NGINX Users to nginx-agent Group
35
+
36
+
To manually add NGINX users to the `nginx-agent` group, take the following steps:
37
+
38
+
1. Verify the `nginx-agent` group exists:
39
+
40
+
```bash
41
+
sudo getent group | grep nginx-agent
42
+
```
43
+
44
+
The output looks similar to the following example:
45
+
46
+
```bash
47
+
nginx-agent:x:1001:root,nginx
48
+
```
49
+
50
+
If the group doesn't exist, create it by running the following command:
51
+
52
+
```bash
53
+
sudo groupadd nginx-agent
54
+
```
55
+
56
+
2. Verify the ownership of `/var/run/nginx-agent` directory:
57
+
58
+
```bash
59
+
ls -l /var/run/nginx-agent
60
+
```
61
+
62
+
The output looks similar to the following:
63
+
64
+
```bash
65
+
total 0
66
+
srwxrwxr-x 1 root nginx-agent 0 Jun 13 10:51 nginx.sockvv
67
+
```
68
+
69
+
If the group ownership is not `nginx-agent`, change the ownership by running the following command:
70
+
71
+
```bash
72
+
sudo chown :nginx-agent /var/run/nginx-agent
73
+
```
74
+
75
+
3. To add NGINX user(s) to the `nginx-agent` group, run the following command:
76
+
77
+
```bash
78
+
sudo usermod -a -G nginx-agent <username>
79
+
```
80
+
81
+
For example to add the `nginx` user, take the following step:
Copy file name to clipboardExpand all lines: site/content/installation-upgrade/container-environments/docker-images.md
+17-6
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Docker Images"
2
+
title: "Build Container Images"
3
3
draft: false
4
4
weight: 100
5
5
toc: true
@@ -10,13 +10,17 @@ doctypes: ["task"]
10
10
11
11
## Overview
12
12
13
-
Learn how to build and run NGINX Agent docker images
13
+
Learn how to build NGINX Agent container images with Docker.
14
14
15
15
## Prerequisites
16
16
1. Docker must be [installed and running](https://docs.docker.com/engine/install/)
17
17
1. (Optional) If you plan to use NGINX Plus, you will need the nginx-repo.crt and nginx-repo.key files. You can download them from [MyF5](https://my.f5.com).
18
18
19
-
## Building NGINX Agent image with NGINX Open Source
19
+
## Building NGINX Agent image with Docker
20
+
21
+
{{<tabsname="build-image">}}
22
+
23
+
{{%tab name="NGINX Open Source"%}}
20
24
21
25
To build an image that contains the latest NGINX Agent and the latest mainline version of NGINX run the following command:
22
26
@@ -30,8 +34,10 @@ To build an image that contains the latest NGINX Agent and the latest stable ver
30
34
$ cd scripts/docker/official/nginx-oss-with-nginx-agent/alpine/
1. Log in to [MyF5 Customer Portal](https://account.f5.com/myf5) and download your `nginx-repo.crt` and `nginx-repo.key` files. These files are also provided with the NGINX Plus trial package.
Copy file name to clipboardExpand all lines: site/content/installation-upgrade/container-environments/docker-support.md
+9-5
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Docker Support
2
+
title: Container Support and Troubleshooting
3
3
categories:
4
4
- installation
5
5
draft: false
@@ -12,13 +12,17 @@ docs: "DOCS-909"
12
12
13
13
## Overview
14
14
15
-
Learn about the limitations of NGINX Agent when running in a Docker environment.
15
+
The NGINX Agent repository includes [Dockerfiles](https://github.com/nginx/agent/tree/main/scripts/docker) that can be used to [build custom container images]({{< relref "installation-upgrade/container-environments/docker-images.md" >}}). Images are created with an NGINX Open Source or NGINX Plus instance and are available for various operating systems.
16
+
17
+
See the [Technical Specifications]({{< relref "/technical-specifications.md#container-support" >}}) for a list of supported operationg systems.
18
+
19
+
NGINX Agent running in a container has some limitations that need to be considered, and are listed below.
16
20
17
21
## Supported cgroups
18
22
19
-
To collect metrics about the Docker container that the NGINX Agent is running in, the NGINX Agent uses the available cgroup files to calculate metrics like CPU and memory usage.
23
+
To collect metrics about the Docker container that the NGINX Agent is running in, NGINX Agent uses the available cgroup files to calculate metrics like CPU and memory usage.
20
24
21
-
The NGINX Agent supports both versions of cgroups.
@@ -27,7 +31,7 @@ The NGINX Agent supports both versions of cgroups.
27
31
28
32
### Unsupported Metrics
29
33
30
-
The following system metrics are not supported when running the NGINX Agent in a Docker container. The NGINX Agent returns no values for these metrics:
34
+
The following system metrics are not supported when running NGINX Agent in a Docker container. NGINX Agent returns no values for these metrics:
NGINX Agent utilizes log files and formats to collect metrics. Increasing the log formats and instance counts will result in increased log file sizes. To prevent system storage issues due to a growing log directory, it is recommended to add a separate partition for `/var/log/nginx-agent` and enable [log rotation](http://nginx.org/en/docs/control.html#logs).
0 commit comments