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: content/nginx-one/agent/metrics/configure-otel-metrics.md
+88Lines changed: 88 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,3 +39,91 @@ You can validate that metrics are successfully exported by using the methods bel
39
39
```text
40
40
Everything is ready. Begin running and processing data.
41
41
```
42
+
43
+
### Custom OTel Configuration
44
+
45
+
NGINX Agent generates a default OpenTelemetry config to send metrics to your management plane located at `/etc/nginx-agent/opentelemetry-collector-agent.yaml`. An option is provided to
46
+
bring your own OpenTelemetry configs which will be merged with the NGINX Agent default config.
47
+
48
+
OpenTelemetry will merge your [OpenTelemetry Config](https://opentelemetry.io/). The order of the OpenTelemetry config files matters,
49
+
the last config in the list will take priority over others listed if they have the same value configured.
50
+
51
+
To have NGINX Agent use your own OpenTelemetry config:
52
+
53
+
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
54
+
2. Add the collector property
55
+
56
+
```yaml
57
+
collector:
58
+
additional_config_paths:
59
+
- "/my_config.yaml"
60
+
```
61
+
62
+
### Example usage:
63
+
64
+
{{< call-out "important" >}} NGINX Agent uses `/default` for naming its default processors, exporters and pipelines using the same naming in your own config might cause issues with sending metrics to your management plane {{< /call-out >}}
65
+
66
+
#### Add Prometheus Exporter
67
+
```yaml
68
+
exporters:
69
+
prometheus:
70
+
endpoint: "127.0.0.1:5643"
71
+
resource_to_telemetry_conversion:
72
+
enabled: true
73
+
74
+
service:
75
+
pipelines:
76
+
metrics/prometheus-example-pipeline:
77
+
receivers:
78
+
- containermetrics
79
+
- hostmetrics
80
+
processors:
81
+
- resource/default
82
+
exporters:
83
+
- prometheus
84
+
```
85
+
86
+
#### Add Debug Exporter
87
+
```yaml
88
+
exporters:
89
+
debug:
90
+
verbosity: detailed
91
+
sampling_initial: 5
92
+
sampling_thereafter: 200
93
+
94
+
service:
95
+
pipelines:
96
+
metrics/debug-example-pipeline:
97
+
receivers:
98
+
- containermetrics
99
+
- hostmetrics
100
+
processors:
101
+
- resource/default
102
+
exporters:
103
+
- debug
104
+
```
105
+
106
+
107
+
#### Debug Merging Configs
108
+
109
+
To view the merged OpenTelemetry configuration set the Agent log level to debug in `/etc/nginx-agent/nginx-agent.conf` and restart NGINX Agent
110
+
111
+
1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf`
0 commit comments