Skip to content

Commit 8382b32

Browse files
JTorreGADubhlaoich
andauthored
docs: transfer N4A docs (#196)
* docs: transfer N4A docs * docs: add url meta * docs: convert markdown images to shortcode images --------- Co-authored-by: Alan Dooley <[email protected]>
1 parent 85c65cd commit 8382b32

File tree

105 files changed

+10449
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+10449
-4
lines changed

.github/workflows/linkchecker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
7373
with:
7474
creds: ${{secrets.AZURE_CREDENTIALS_DOCS}}
75-
75+
7676
- name: Retrieve secrets from Keyvault
7777
if: env.isProduction != 'true'
7878
id: keyvault

config/_default/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ enableGitInfo = true
1616
ngf = '/nginx-gateway-fabric/:sections[1:]/:filename'
1717
nim = '/nginx-instance-manager/:sections[1:]/:filename'
1818
nms = '/nginx-management-suite/:sections[1:]/:filename'
19+
unit = '/nginx-unit/:sections[1:]/:filename'
1920
agent = '/nginx-agent/:sections[1:]/:filename'
21+
nginxaas = '/nginxaas/azure/:sections[1:]/:filename'
2022

2123
[caches]
2224
[caches.modules]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
If the diagnostic setting destination details included a storage account, logs show up in the storage container "insights-logs-nginxlogs" with the following format: `resourceID=/<NGINXaaS-resourceID>/y=<YYYY>/m=<MM>/d=<DD>/h=<HH>/PT1H.json`
6+
7+
{{<bootstrap-table "table table-striped table-bordered">}}
8+
| **Attribute** | **Description** |
9+
|-----------------------------|-----------------|
10+
| `<NGINXaaS-resourceID>` | The resourceID of the NGINXaaS deployment in upper case.|
11+
| `<YYYY>` | The four-digit year when the log batch was generated.|
12+
| `<MM>` | The two-digit month when the log batch was generated.|
13+
| `<DD>` | The two-digit day when the log batch was generated.|
14+
| `<HH>` | The two-digit hour value that indicates the starting hour for the log batch, in 24 hour UTC format|
15+
{{</bootstrap-table>}}
16+
17+
{{<note>}}It can take up to 90 minutes after adding diagnostic settings for logs to appear in the provided Azure Storage container.{{</note>}}
18+
19+
Each log event in the "PT1H.json" file is written in a new line delimited JSON text format. The properties that show up in each log line are described in the [Top Level Common Schema](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/resource-logs-schema#top-level-common-schema) documentation.
20+
21+
For instance, an access log event logging to a particular file path will have attributes similar to this example:
22+
23+
```yaml
24+
{
25+
"category": "NginxLogs",
26+
"location": "westcentralus",
27+
"operationName": "NGINX.NGINXPLUS/NGINXDEPLOYMENTS/LOG",
28+
"properties": {
29+
"message": "172.92.129.50 - \"-\" [18/Jan/2024:17:59:00 +0000] \"GET / HTTP/1.1\" 200 11232 \"-\" \"curl/8.4.0\" \"-\" \"20.69.58.179\" sn=\"localhost\" rt=0.000 ua=\"-\" us=\"-\" ut=\"-\" ul=\"-\" cs=\"-\" ",
30+
"filePath": "/var/log/nginx/access.log"
31+
},
32+
"resourceId": "/SUBSCRIPTIONS/FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF/RESOURCEGROUPS/RESOURCEGROUP1/PROVIDERS/NGINX.NGINXPLUS/NGINXDEPLOYMENTS/TEST1",
33+
"time": "2024-01-18T17:59:00.363956795Z"
34+
}
35+
```
36+
37+
If [syslog-based](#logging-to-syslog) logs are used, the log event entry has different **properties** sub-fields:
38+
39+
```yaml
40+
#...
41+
"properties": {
42+
"message": "172.92.129.50 - - [16/Jan/2024:18:00:00 +0000] \"GET / HTTP/1.1\" 200 11232 \"-\" \"curl/8.4.0\"",
43+
"tag": "nginx",
44+
"severity": "info",
45+
"facility": "local7"
46+
},
47+
#...
48+
```
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
If the diagnostic setting destination details included a Logs Analytics workspace, logs show up in the table "NGXOperationLogs" with the following non-standard attributes:
6+
7+
{{<bootstrap-table "table table-striped table-bordered">}}
8+
| **Attribute** | **Description** |
9+
|-----------------------------|-----------------|
10+
| **Location** | The location of the NGINXaaS resource.|
11+
| **Message** | The generated NGINX log line. |
12+
| **FilePath** | The path to which NGINX logs were configured to be logged to if the nginx config used file-based logs. |
13+
| **Tag** | The tag with which NGINX logs were generated if syslog-based log configuration is used. By default this is nginx |
14+
| **Facility** | The syslog facility with which NGINX logs were generated if syslog-based log configuration is used. |
15+
| **Severity** | The syslog severity with which NGINX logs were generated if syslog-based log configuration is used. |
16+
17+
{{</bootstrap-table>}}
18+
19+
Using a [KQL](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/), a custom query can be run to view the logs:
20+
21+
```
22+
NGXOperationLogs
23+
| where Location contains "eastus"
24+
```
25+
26+
For more information on the standard attributes that appear in Logs Analytics,see the [Standard columns in Azure Monitor Logs](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/log-standard-columns) documentation.
27+
28+
For more information on using [KQL](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/) see [Queries in Log Analytics](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/queries?tabs=groupby).
29+
30+
{{<note>}}It can take up to 90 minutes after adding diagnostic settings for logs to appear in the provided Logs Analytics Workspace.{{</note>}}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
NGINX access logs are disabled by default. You can enable access logs by adding **access_log** directives to your NGINX configuration to specify the location of the logs and formats. The log path should always be configured to be inside **/var/log/nginx**.
6+
7+
```nginx
8+
http {
9+
log_format myfmt '$remote_addr - $remote_user [$time_local] '
10+
'"$request" $status $body_bytes_sent '
11+
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
12+
13+
access_log /var/log/nginx/nginx-access.log myfmt;
14+
# ...
15+
}
16+
```
17+
18+
{{<note>}} The **$time_local** variable includes the date and time for each log. It helps with ordering logs after export. {{</note>}}
19+
20+
To explicitly disable access logs, apply the following config:
21+
22+
```nginx
23+
http {
24+
access_log off;
25+
}
26+
```
27+
28+
or
29+
30+
```nginx
31+
http {
32+
access_log /dev/null;
33+
}
34+
```
35+
36+
To learn more about how to specify `access__log` in different configuration levels and their effect, see [access_log](https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log)
37+
38+
{{<warning>}}Unless you use **syslog**, keep NGINX logs in the **/var/log/nginx** directory. Otherwise, you may lose data from your logs.
39+
{{</warning>}}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
By default, NGINXaaS for Azure puts the error log at **/var/log/nginx/error.log**. It includes messages with severity **error** and above.
6+
7+
While you should configure log files in the **/var/log/nginx** directory, you can change the filename and severity level. For example, the following line in the NGINX configuration sends errors to the `nginx-error.log` file, and limits messages to a severity level of **emerg**:
8+
9+
```nginx
10+
error_log /var/log/nginx/nginx-error.log emerg;
11+
```
12+
13+
Alternatively, you can disable error logs completely with the following line:
14+
15+
```nginx
16+
error_log /dev/null;
17+
```
18+
19+
To learn more about how to specify `error_log` in different configuration levels, see the documentation of the [error_log](https://nginx.org/en/docs/ngx_core_module.html?#error_log) directive.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
1. File-based logs must be configured to use the path **/var/log/nginx**.
6+
1. The **gzip** parameter for the **access_log** directive is not supported, and uploading a config with this parameter will cause an error.
7+
1. Logging **error_log** to a cyclic memory buffer using the **memory:** prefix is not allowed and will cause a config upload error.
8+
1. Egress Networking charges apply for traffic sent from the NGINX deployment to a syslog server present in a different VNet.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
docs: "DOCS-1476"
3+
---
4+
5+
An NGINX Capacity Unit (NCU) quantifies the capacity of an NGINX instance based on the underlying compute resources. This abstraction allows you to specify the desired capacity in NCUs without having to consider the regional hardware differences.
6+
7+
An NGINX Capacity Unit consists of the following parameters:
8+
9+
* CPU: an NCU provides 20 [Azure Compute Units](https://learn.microsoft.com/en-us/azure/virtual-machines/acu) (ACUs)
10+
* Bandwidth: an NCU provides 60 Mbps of network throughput
11+
* Concurrent connections: an NCU provides 400 concurrent connections. This performance is not guaranteed when NGINX App Protect WAF is used with NGINXaaS
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
- AKV to store certificates that you want to add to the deployment.
6+
7+
- A user or system assigned identity associated with your NGINXaaS deployment. Ensure that your managed identity (MI) has read access to secrets stored in AKV:
8+
9+
- If using Azure RBAC for AKV, ensure that your MI has [Key Vault Secrets User](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#key-vault-secrets-user) or higher permissions.
10+
11+
- If using Access Policies for AKV, ensure that your MI has *GET secrets* or higher permissions.
12+
13+
- In addition to the MI permissions, if using the Azure portal to manage certificates, ensure that you have read access to list certificates inside the Key Vault:
14+
15+
- If using Azure RBAC for AKV, ensure that you have [Key Vault Reader](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#key-vault-reader) or higher permissions.
16+
17+
- If using Access Policies for AKV, ensure that you have *LIST certificates* or higher permissions.
18+
19+
- If public access is disabled on your key vault, [configure Network Security Perimeter]({{< relref "/nginxaas-azure/quickstart/security-controls/certificates.md#configure-network-security-perimeter-nsp" >}}) and add an inbound access rule to allow your client IP address.
20+
21+
- If you're unfamiliar with Azure Key Vault, check out the [Azure Key Vault concepts](https://docs.microsoft.com/en-us/azure/key-vault/general/basic-concepts) documentation from Microsoft.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
docs: "DOCS-000"
3+
---
4+
5+
- Confirm that you meet the [NGINXaaS Prerequisites]({{< relref "/nginxaas-azure/getting-started/prerequisites.md" >}}).
6+
- [Authenticate Terraform to Azure](https://learn.microsoft.com/en-us/azure/developer/terraform/authenticate-to-azure)
7+
- [Install Terraform](https://learn.hashicorp.com/tutorials/terraform/install)
8+
9+
{{< caution >}} The examples in the NGINXaaS for Azure Snippets GitHub repository use the prerequisites module [available in the same repository](https://github.com/nginxinc/nginxaas-for-azure-snippets/tree/main/terraform/prerequisites). {{< /caution >}}

0 commit comments

Comments
 (0)