Skip to content

Commit 5c7c341

Browse files
committed
feat: add third party otel collector example
1 parent b94a78d commit 5c7c341

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed

content/nginx-one/agent/metrics/configure-otel-metrics.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ collector:
6464
{{< 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 >}}
6565

6666
- **Add Prometheus Exporter**
67+
68+
{{< tabs name="prometheus-exporter" >}}
69+
{{% tab name="NGINX Plus" %}}
70+
6771
```yaml
6872
exporters:
6973
prometheus:
@@ -77,13 +81,132 @@ service:
7781
receivers:
7882
- containermetrics
7983
- hostmetrics
84+
- nginxplus
8085
processors:
8186
- resource/default
8287
exporters:
8388
- prometheus
8489
```
8590
91+
{{% /tab %}}
92+
{{% tab name="NGINX OSS" %}}
93+
94+
```yaml
95+
exporters:
96+
prometheus:
97+
endpoint: "127.0.0.1:5643"
98+
resource_to_telemetry_conversion:
99+
enabled: true
100+
101+
service:
102+
pipelines:
103+
metrics/prometheus-example-pipeline:
104+
receivers:
105+
- containermetrics
106+
- hostmetrics
107+
- nginx
108+
processors:
109+
- resource/default
110+
exporters:
111+
- prometheus
112+
```
113+
114+
{{% /tab %}}
115+
{{< /tabs >}}
116+
117+
118+
- **Third-party OTel Collector**
119+
120+
{{< tabs name="third-party-collector" >}}
121+
{{% tab name="NGINX Plus" %}}
122+
123+
```yaml
124+
exporters:
125+
otlp/local-collector:
126+
endpoint: "my-local-collector.com:443"
127+
timeout: 10s
128+
retry_on_failure:
129+
enabled: true
130+
initial_interval: 10s
131+
max_interval: 60s
132+
max_elapsed_time: 10m
133+
tls:
134+
insecure: true
135+
136+
service:
137+
pipelines:
138+
metrics/otlp-example-pipeline:
139+
receivers:
140+
- containermetrics
141+
- hostmetrics
142+
- nginxplus
143+
processors:
144+
- resource/default
145+
exporters:
146+
- otpl/local-collector
147+
```
148+
149+
{{% /tab %}}
150+
{{% tab name="NGINX OSS" %}}
151+
152+
```yaml
153+
exporters:
154+
otlp/local-collector:
155+
endpoint: "my-local-collector.com:443"
156+
timeout: 10s
157+
retry_on_failure:
158+
enabled: true
159+
initial_interval: 10s
160+
max_interval: 60s
161+
max_elapsed_time: 10m
162+
tls:
163+
insecure: true
164+
165+
service:
166+
pipelines:
167+
metrics/otlp-example-pipeline:
168+
receivers:
169+
- containermetrics
170+
- hostmetrics
171+
- nginx
172+
processors:
173+
- resource/default
174+
exporters:
175+
- otpl/local-collector
176+
```
177+
178+
{{% /tab %}}
179+
{{< /tabs >}}
180+
181+
86182
- **Add Debug Exporter**
183+
184+
{{< tabs name="debug-exporter" >}}
185+
{{% tab name="NGINX Plus" %}}
186+
187+
```yaml
188+
exporters:
189+
debug:
190+
verbosity: detailed
191+
sampling_initial: 5
192+
sampling_thereafter: 200
193+
194+
service:
195+
pipelines:
196+
metrics/debug-example-pipeline:
197+
receivers:
198+
- containermetrics
199+
- hostmetrics
200+
- nginxplus
201+
processors:
202+
- resource/default
203+
exporters:
204+
- debug
205+
```
206+
207+
{{% /tab %}}
208+
{{% tab name="NGINX OSS" %}}
209+
87210
```yaml
88211
exporters:
89212
debug:
@@ -97,12 +220,17 @@ service:
97220
receivers:
98221
- containermetrics
99222
- hostmetrics
223+
- nginx
100224
processors:
101225
- resource/default
102226
exporters:
103227
- debug
104228
```
105229
230+
{{% /tab %}}
231+
{{< /tabs >}}
232+
233+
106234
107235
### Debug Merging Configs
108236

0 commit comments

Comments
 (0)