Skip to content

Commit 99260bd

Browse files
authored
Merge pull request #553 from nginx/DOC-40B
feat: move NMS agent docs
2 parents 6e333f6 + dea1b89 commit 99260bd

File tree

8 files changed

+141
-67
lines changed

8 files changed

+141
-67
lines changed

site/content/configuration/configuration-overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Flags:
175175
--metrics-collection-interval duration Sets the interval, in seconds, at which metrics are collected. (default 15s)
176176
--metrics-mode string Sets the desired metrics collection mode: streaming or aggregation. (default "aggregated")
177177
--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)
179179
--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.
180180
--nginx-socket string The NGINX Plus counting unix socket location. (default "unix:/var/run/nginx-agent/nginx.sock")
181181
--nginx-treat-warnings-as-errors On nginx -t, treat warnings as failures on configuration application.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: "Add NGINX Users to nginx-agent Group"
3+
draft: false
4+
weight: 300
5+
toc: true
6+
tags: [ "docs" ]
7+
docs: "DOCS-933"
8+
categories: ["configuration"]
9+
doctypes: ["task"]
10+
---
11+
12+
## Overview
13+
14+
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:
82+
83+
```bash
84+
sudo usermod -a -G nginx-agent nginx
85+
```
86+
87+
Repeat for all NGINX users.

site/content/configuration/encrypt-communication.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ docs: "DOCS-802"
99

1010
## Overview
1111

12-
Follow the steps in this guide to encrypt communication between the NGINX Agent and Instance Manager with TLS.
12+
Follow the steps in this guide to encrypt communication between NGINX Agent and Instance Manager with TLS.
1313

1414
## Before You Begin
1515

@@ -21,7 +21,7 @@ See the examples below for how to set these values using a configuration file, C
2121

2222
### Enabling mTLS via Config Values
2323

24-
You can edit the `/etc/nginx-agent/nginx-agent.conf` file to enable mTLS for the NGINX Agent. Make the following changes:
24+
You can edit the `/etc/nginx-agent/nginx-agent.conf` file to enable mTLS for NGINX Agent. Make the following changes:
2525

2626
```yaml
2727
server:
@@ -47,7 +47,7 @@ nginx-agent --tls-cert "path-to-cert" --tls-key "path-to-key" --tls-ca "path-to-
4747

4848
### Enabling mTLS with Environment Variables
4949

50-
To enable mTLS for the NGINX Agent using environment variables, run the following commands:
50+
To enable mTLS for NGINX Agent using environment variables, run the following commands:
5151

5252
```bash
5353
NMS_TLS_CA="my-env-ca"

site/content/installation-upgrade/container-environments/docker-images.md

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Docker Images"
2+
title: "Build Container Images"
33
draft: false
44
weight: 100
55
toc: true
@@ -10,13 +10,17 @@ doctypes: ["task"]
1010

1111
## Overview
1212

13-
Learn how to build and run NGINX Agent docker images
13+
Learn how to build NGINX Agent container images with Docker.
1414

1515
## Prerequisites
1616
1. Docker must be [installed and running](https://docs.docker.com/engine/install/)
1717
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).
1818

19-
## Building NGINX Agent image with NGINX Open Source
19+
## Building NGINX Agent image with Docker
20+
21+
{{<tabs name="build-image">}}
22+
23+
{{%tab name="NGINX Open Source"%}}
2024

2125
To build an image that contains the latest NGINX Agent and the latest mainline version of NGINX run the following command:
2226

@@ -30,8 +34,10 @@ To build an image that contains the latest NGINX Agent and the latest stable ver
3034
$ cd scripts/docker/official/nginx-oss-with-nginx-agent/alpine/
3135
$ docker build -t nginx-agent . --no-cache -f ./Dockerfile.stable
3236
```
33-
34-
## Building NGINX Agent image with NGINX Plus
37+
38+
{{% /tab %}}
39+
40+
{{%tab name="NGINX Plus"%}}
3541

3642
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.
3743

@@ -46,10 +52,15 @@ $ docker build -t nginx-agent . \
4652
--secret id=nginx-crt,src=nginx-repo.crt \
4753
--secret id=nginx-key,src=nginx-repo.key
4854
```
55+
{{% /tab %}}
56+
{{% /tabs %}}
57+
58+
<hr>
59+
4960

5061
## Running NGINX Agent container
5162

52-
Here is an example of how to run a NGINX Agent container:
63+
Here is an example of how to run a NGINX Agent container with Docker:
5364

5465
```console
5566
$ docker run --name nginx-agent -d nginx-agent

site/content/installation-upgrade/container-environments/docker-support.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Docker Support
2+
title: Container Support and Troubleshooting
33
categories:
44
- installation
55
draft: false
@@ -12,13 +12,17 @@ docs: "DOCS-909"
1212

1313
## Overview
1414

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.
1620

1721
## Supported cgroups
1822

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.
2024

21-
The NGINX Agent supports both versions of cgroups.
25+
NGINX Agent supports both versions of cgroups.
2226

2327
- https://www.kernel.org/doc/Documentation/cgroup-v1/
2428
- https://www.kernel.org/doc/Documentation/cgroup-v2.txt
@@ -27,7 +31,7 @@ The NGINX Agent supports both versions of cgroups.
2731

2832
### Unsupported Metrics
2933

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:
3135

3236
- system.cpu.idle
3337
- system.cpu.iowait

site/content/technical-specifications.md

+21-51
Original file line numberDiff line numberDiff line change
@@ -12,56 +12,21 @@ doctypes: ["task"]
1212

1313
## Supported Distributions
1414

15-
NGINX Agent can run in most environments. The below list are the supported distributions.
16-
17-
AlmaLinux
18-
- 8 (x86_64, aarch64)
19-
- 9 (x86_64, aarch64)
20-
21-
Alpine Linux
22-
- 3.16 (x86_64, aarch64)
23-
- 3.17 (x86_64, aarch64)
24-
- 3.18 (x86_64, aarch64)
25-
- 3.19 (x86_64, aarch64)
26-
27-
Amazon Linux
28-
- 2023 (x86_64, aarch64)
29-
30-
Amazon Linux 2
31-
- LTS (x86_64, aarch64)
32-
33-
CentOS
34-
- 7.4+ (x86_64, aarch64)
35-
36-
Debian
37-
- 11 (x86_64, aarch64)
38-
- 12 (x86_64, aarch64)
39-
40-
FreeBSD
41-
- 13 (amd64)
42-
- 14 (amd64)
43-
44-
Oracle Linux
45-
- 7.4+ (x86_64)
46-
- 8.1+ (x86_64)
47-
- 9 (x86_64)
48-
49-
Red Hat Enterprise Linux (RHEL)
50-
- 7.4+ (x86_64, aarch64)
51-
- 8.1+ (x86_64, aarch64)
52-
- 9.0+ (x86_64, aarch64)
53-
54-
Rocky Linux
55-
- 8 (x86_64, aarch64)
56-
- 9 (x86_64, aarch64)
57-
58-
SUSE Linux Enterprise Server (SLES)
59-
- 12 SP5 (x86_64)
60-
- 15 SP2 (x86_64)
61-
62-
Ubuntu
63-
- 20.04 LTS (x86_64, aarch64)
64-
- 22.04 LTS (x86_64, aarch64)
15+
NGINX Agent can run in most environments. We support the following distributions:
16+
17+
{{< bootstrap-table "table table-striped table-bordered" >}}
18+
| | AlmaLinux | Alpine Linux | Amazon Linux | Amazon Linux 2 | CentOS | Debian |
19+
|-|-----------|--------------|--------------|----------------|--------|--------|
20+
|**Version**|8 <br><br>9 | 3.16<br><br>3.17<br><br> 3.18<br><br> 3.19| 2023| LTS| 7.4+| 11<br><br> 12|
21+
|**Architecture**| x86_84<br><br>aarch64| x86_64<br><br>aarch64 | x86_64<br><br>aarch64 | x86_64<br><br>aarch64 | x86_64<br><br>aarch64 | x86_64<br><br>aarch64 |
22+
{{< /bootstrap-table >}}
23+
24+
{{< bootstrap-table "table table-striped table-bordered" >}}
25+
| |FreeBSD | Oracle Linux | Red Hat <br>Enterprise Linux (RHEL) | Rocky Linux | SUSE Linux <br>Enterprise Server (SLES) | Ubuntu |
26+
|-|--------|--------------|---------------------------------|-------------|-------------------------------------|--------|
27+
|**Version**|13<br><br>14|7.4+<br><br>8.1+<br><br>9|7.4+<br><br>8.1+<br><br>9.0+|8<br><br>9|12 SP5<br><br>15 SP2|20.04 LTS<br><br>22.04 LTS|
28+
|**Architecture**|amd64|x86_64|x86_64<br><br>aarch64|x86_64<br><br>aarch64|x86_64|x86_64<br><br>aarch64|
29+
{{< /bootstrap-table >}}
6530

6631
## Supported Deployment Environments
6732

@@ -80,7 +45,12 @@ NGINX Agent works with all supported versions of NGINX Open Source and NGINX Plu
8045
## Sizing Recommendations
8146

8247
Minimum system sizing recommendations for NGINX Agent:
83-
48+
{{< bootstrap-table "table table-striped table-bordered" >}}
8449
| CPU | Memory | Network | Storage |
8550
|------------|----------|-----------|---------|
8651
| 1 CPU core | 1 GB RAM | 1 GbE NIC | 20 GB |
52+
{{< /bootstrap-table >}}
53+
54+
## Logging
55+
56+
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).

site/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/nginx/agent/site
22

33
go 1.18
44

5-
require github.com/nginxinc/nginx-hugo-theme v0.35.0 // indirect
5+
require github.com/nginxinc/nginx-hugo-theme v0.40.8 // indirect

site/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ github.com/nginxinc/nginx-hugo-theme v0.34.0 h1:G7LPVq7w1ls6IS4+OkTwjhFb67rLCzPd
88
github.com/nginxinc/nginx-hugo-theme v0.34.0/go.mod h1:DPNgSS5QYxkjH/BfH4uPDiTfODqWJ50NKZdorguom8M=
99
github.com/nginxinc/nginx-hugo-theme v0.35.0 h1:7XB2GMy6qeJgKEJy9wOS3SYKYpfvLW3/H+UHRPLM4FU=
1010
github.com/nginxinc/nginx-hugo-theme v0.35.0/go.mod h1:DPNgSS5QYxkjH/BfH4uPDiTfODqWJ50NKZdorguom8M=
11+
github.com/nginxinc/nginx-hugo-theme v0.40.8 h1:VtoSAtf9k67tI2jzbLRo0oFBAMHZBUPRh/xV4MYullI=
12+
github.com/nginxinc/nginx-hugo-theme v0.40.8/go.mod h1:DPNgSS5QYxkjH/BfH4uPDiTfODqWJ50NKZdorguom8M=

0 commit comments

Comments
 (0)