|
1 | 1 | --- |
2 | | -title: Newbie to Ninja - OpenTelemetry Collector |
3 | | -linkTitle: Newbie to Ninja - OpenTelemetry Collector |
4 | | -description: This workshop will equip you with the basic understanding of monitoring Kubernetes using the Splunk OpenTelemetry Collector |
5 | | -weight: 1 |
| 2 | +archetype: "home" |
| 3 | +title: .conf Workshops |
| 4 | +linkTitle: .conf Workshops |
| 5 | +description: .conf 2023 - Workshops |
| 6 | +weight: 11 |
6 | 7 | alwaysopen: false |
7 | | -draft: true |
| 8 | +hidden: true |
8 | 9 | --- |
9 | 10 |
|
10 | | -## Overview |
11 | | - |
12 | | -[https://docs.splunk.com/Observability/gdi/other-ingestion-methods/upstream-collector.html#nav-Send-telemetry-using-OpenTelemetry-Collector-Contrib](https://docs.splunk.com/Observability/gdi/other-ingestion-methods/upstream-collector.html#nav-Send-telemetry-using-OpenTelemetry-Collector-Contrib) |
13 | | - |
14 | | -- OpenTelemetry Collector Contrib - https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.75.0 |
15 | | - |
16 | | -[https://opentelemetry.io/docs/collector/configuration/](https://opentelemetry.io/docs/collector/configuration/) |
17 | | - |
18 | | -- Extensions |
19 | | -- Recievers |
20 | | -- Processors |
21 | | - - [https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor) |
22 | | -- Exporters |
23 | | -- Pipelines |
24 | | - |
25 | | - |
26 | | - |
27 | | -Vanilla/Contrib/Vendor |
28 | | - |
29 | | -- Host metrics and metadata into O11y Cloud |
30 | | -- Research using OTel Log Collection |
31 | | - |
32 | | -- Metrics into O11y |
33 | | -- Logs into Core |
34 | | - |
35 | | -- Building a custom component |
36 | | -- Edit config to include new component |
37 | | -- Demonstate metrics from new component |
38 | | - |
39 | | -**Default configuration** |
40 | | - |
41 | | -```yaml |
42 | | -extensions: |
43 | | - health_check: |
44 | | - pprof: |
45 | | - endpoint: 0.0.0.0:1777 |
46 | | - zpages: |
47 | | - endpoint: 0.0.0.0:55679 |
48 | | - |
49 | | -receivers: |
50 | | - otlp: |
51 | | - protocols: |
52 | | - grpc: |
53 | | - http: |
54 | | - |
55 | | - opencensus: |
56 | | - |
57 | | - # Collect own metrics |
58 | | - prometheus: |
59 | | - config: |
60 | | - scrape_configs: |
61 | | - - job_name: 'otel-collector' |
62 | | - scrape_interval: 10s |
63 | | - static_configs: |
64 | | - - targets: ['0.0.0.0:8888'] |
65 | | - |
66 | | - jaeger: |
67 | | - protocols: |
68 | | - grpc: |
69 | | - thrift_binary: |
70 | | - thrift_compact: |
71 | | - thrift_http: |
72 | | - |
73 | | - zipkin: |
74 | | - |
75 | | -processors: |
76 | | - batch: |
77 | | - |
78 | | -exporters: |
79 | | - logging: |
80 | | - verbosity: detailed |
81 | | - |
82 | | -service: |
83 | | - |
84 | | - pipelines: |
85 | | - |
86 | | - traces: |
87 | | - receivers: [otlp, opencensus, jaeger, zipkin] |
88 | | - processors: [batch] |
89 | | - exporters: [logging] |
90 | | - |
91 | | - metrics: |
92 | | - receivers: [otlp, opencensus, prometheus] |
93 | | - processors: [batch] |
94 | | - exporters: [logging] |
95 | | - |
96 | | - extensions: [health_check, pprof, zpages] |
97 | | -``` |
98 | | -
|
99 | | -**Splunk OTel Host install default configuration** |
100 | | -
|
101 | | -```yaml |
102 | | -# Default configuration file for the Linux (deb/rpm) and Windows MSI collector packages |
103 | | - |
104 | | -# If the collector is installed without the Linux/Windows installer script, the following |
105 | | -# environment variables are required to be manually defined or configured below: |
106 | | -# - SPLUNK_ACCESS_TOKEN: The Splunk access token to authenticate requests |
107 | | -# - SPLUNK_API_URL: The Splunk API URL, e.g. https://api.us0.signalfx.com |
108 | | -# - SPLUNK_BUNDLE_DIR: The path to the Smart Agent bundle, e.g. /usr/lib/splunk-otel-collector/agent-bundle |
109 | | -# - SPLUNK_COLLECTD_DIR: The path to the collectd config directory for the Smart Agent, e.g. /usr/lib/splunk-otel-collector/agent-bundle/run/collectd |
110 | | -# - SPLUNK_HEC_TOKEN: The Splunk HEC authentication token |
111 | | -# - SPLUNK_HEC_URL: The Splunk HEC endpoint URL, e.g. https://ingest.us0.signalfx.com/v1/log |
112 | | -# - SPLUNK_INGEST_URL: The Splunk ingest URL, e.g. https://ingest.us0.signalfx.com |
113 | | -# - SPLUNK_TRACE_URL: The Splunk trace endpoint URL, e.g. https://ingest.us0.signalfx.com/v2/trace |
114 | | - |
115 | | -extensions: |
116 | | - health_check: |
117 | | - endpoint: 0.0.0.0:13133 |
118 | | - http_forwarder: |
119 | | - ingress: |
120 | | - endpoint: 0.0.0.0:6060 |
121 | | - egress: |
122 | | - endpoint: "${SPLUNK_API_URL}" |
123 | | - # Use instead when sending to gateway |
124 | | - #endpoint: "${SPLUNK_GATEWAY_URL}" |
125 | | - smartagent: |
126 | | - bundleDir: "${SPLUNK_BUNDLE_DIR}" |
127 | | - collectd: |
128 | | - configDir: "${SPLUNK_COLLECTD_DIR}" |
129 | | - zpages: |
130 | | - #endpoint: 0.0.0.0:55679 |
131 | | - memory_ballast: |
132 | | - # In general, the ballast should be set to 1/3 of the collector's memory, the limit |
133 | | - # should be 90% of the collector's memory. |
134 | | - # The simplest way to specify the ballast size is set the value of SPLUNK_BALLAST_SIZE_MIB env variable. |
135 | | - size_mib: ${SPLUNK_BALLAST_SIZE_MIB} |
136 | | - |
137 | | -receivers: |
138 | | - fluentforward: |
139 | | - endpoint: 127.0.0.1:8006 |
140 | | - hostmetrics: |
141 | | - collection_interval: 10s |
142 | | - scrapers: |
143 | | - cpu: |
144 | | - disk: |
145 | | - filesystem: |
146 | | - memory: |
147 | | - network: |
148 | | - # System load average metrics https://en.wikipedia.org/wiki/Load_(computing) |
149 | | - load: |
150 | | - # Paging/Swap space utilization and I/O metrics |
151 | | - paging: |
152 | | - # Aggregated system process count metrics |
153 | | - processes: |
154 | | - # System processes metrics, disabled by default |
155 | | - # process: |
156 | | - jaeger: |
157 | | - protocols: |
158 | | - grpc: |
159 | | - endpoint: 0.0.0.0:14250 |
160 | | - thrift_binary: |
161 | | - endpoint: 0.0.0.0:6832 |
162 | | - thrift_compact: |
163 | | - endpoint: 0.0.0.0:6831 |
164 | | - thrift_http: |
165 | | - endpoint: 0.0.0.0:14268 |
166 | | - otlp: |
167 | | - protocols: |
168 | | - grpc: |
169 | | - endpoint: 0.0.0.0:4317 |
170 | | - http: |
171 | | - endpoint: 0.0.0.0:4318 |
172 | | - # This section is used to collect the OpenTelemetry Collector metrics |
173 | | - # Even if just a Splunk APM customer, these metrics are included |
174 | | - prometheus/internal: |
175 | | - config: |
176 | | - scrape_configs: |
177 | | - - job_name: 'otel-collector' |
178 | | - scrape_interval: 10s |
179 | | - static_configs: |
180 | | - - targets: ['0.0.0.0:8888'] |
181 | | - metric_relabel_configs: |
182 | | - - source_labels: [ __name__ ] |
183 | | - regex: '.*grpc_io.*' |
184 | | - action: drop |
185 | | - smartagent/signalfx-forwarder: |
186 | | - type: signalfx-forwarder |
187 | | - listenAddress: 0.0.0.0:9080 |
188 | | - smartagent/processlist: |
189 | | - type: processlist |
190 | | - signalfx: |
191 | | - endpoint: 0.0.0.0:9943 |
192 | | - # Whether to preserve incoming access token and use instead of exporter token |
193 | | - # default = false |
194 | | - #access_token_passthrough: true |
195 | | - zipkin: |
196 | | - endpoint: 0.0.0.0:9411 |
197 | | - |
198 | | -processors: |
199 | | - batch: |
200 | | - # Enabling the memory_limiter is strongly recommended for every pipeline. |
201 | | - # Configuration is based on the amount of memory allocated to the collector. |
202 | | - # For more information about memory limiter, see |
203 | | - # https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiter/README.md |
204 | | - memory_limiter: |
205 | | - check_interval: 2s |
206 | | - limit_mib: ${SPLUNK_MEMORY_LIMIT_MIB} |
207 | | - |
208 | | - # Detect if the collector is running on a cloud system, which is important for creating unique cloud provider dimensions. |
209 | | - # Detector order is important: the `system` detector goes last so it can't preclude cloud detectors from setting host/os info. |
210 | | - # Resource detection processor is configured to override all host and cloud attributes because instrumentation |
211 | | - # libraries can send wrong values from container environments. |
212 | | - # https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor#ordering |
213 | | - resourcedetection: |
214 | | - detectors: [system, gcp, ecs, ec2, azure] |
215 | | - override: true |
216 | | - |
217 | | - # Optional: The following processor can be used to add a default "deployment.environment" attribute to the logs and |
218 | | - # traces when it's not populated by instrumentation libraries. |
219 | | - # If enabled, make sure to enable this processor in the pipeline below. |
220 | | - #resource/add_environment: |
221 | | - #attributes: |
222 | | - #- action: insert |
223 | | - #value: staging/production/... |
224 | | - #key: deployment.environment |
225 | | - |
226 | | -exporters: |
227 | | - # Traces |
228 | | - sapm: |
229 | | - access_token: "${SPLUNK_ACCESS_TOKEN}" |
230 | | - endpoint: "${SPLUNK_TRACE_URL}" |
231 | | - # Metrics + Events |
232 | | - signalfx: |
233 | | - access_token: "${SPLUNK_ACCESS_TOKEN}" |
234 | | - api_url: "${SPLUNK_API_URL}" |
235 | | - ingest_url: "${SPLUNK_INGEST_URL}" |
236 | | - # Use instead when sending to gateway |
237 | | - #api_url: http://${SPLUNK_GATEWAY_URL}:6060 |
238 | | - #ingest_url: http://${SPLUNK_GATEWAY_URL}:9943 |
239 | | - sync_host_metadata: true |
240 | | - correlation: |
241 | | - # Logs |
242 | | - splunk_hec: |
243 | | - token: "${SPLUNK_HEC_TOKEN}" |
244 | | - endpoint: "${SPLUNK_HEC_URL}" |
245 | | - source: "otel" |
246 | | - sourcetype: "otel" |
247 | | - # Send to gateway |
248 | | - otlp: |
249 | | - endpoint: "${SPLUNK_GATEWAY_URL}:4317" |
250 | | - tls: |
251 | | - insecure: true |
252 | | - # Debug |
253 | | - logging: |
254 | | - loglevel: debug |
255 | | - |
256 | | -service: |
257 | | - extensions: [health_check, http_forwarder, zpages, memory_ballast, smartagent] |
258 | | - pipelines: |
259 | | - traces: |
260 | | - receivers: [jaeger, otlp, smartagent/signalfx-forwarder, zipkin] |
261 | | - processors: |
262 | | - - memory_limiter |
263 | | - - batch |
264 | | - - resourcedetection |
265 | | - #- resource/add_environment |
266 | | - exporters: [sapm, signalfx] |
267 | | - # Use instead when sending to gateway |
268 | | - #exporters: [otlp, signalfx] |
269 | | - metrics: |
270 | | - receivers: [hostmetrics, otlp, signalfx, smartagent/signalfx-forwarder] |
271 | | - processors: [memory_limiter, batch, resourcedetection] |
272 | | - exporters: [signalfx] |
273 | | - # Use instead when sending to gateway |
274 | | - #exporters: [otlp] |
275 | | - metrics/internal: |
276 | | - receivers: [prometheus/internal] |
277 | | - processors: [memory_limiter, batch, resourcedetection] |
278 | | - # When sending to gateway, at least one metrics pipeline needs |
279 | | - # to use signalfx exporter so host metadata gets emitted |
280 | | - exporters: [signalfx] |
281 | | - logs/signalfx: |
282 | | - receivers: [signalfx, smartagent/processlist] |
283 | | - processors: [memory_limiter, batch, resourcedetection] |
284 | | - exporters: [signalfx] |
285 | | - # Use instead when sending to gateway |
286 | | - #exporters: [otlp] |
287 | | - logs: |
288 | | - receivers: [fluentforward, otlp] |
289 | | - processors: |
290 | | - - memory_limiter |
291 | | - - batch |
292 | | - - resourcedetection |
293 | | - #- resource/add_environment |
294 | | - exporters: [splunk_hec] |
295 | | - # Use instead when sending to gateway |
296 | | - #exporters: [otlp] |
297 | | -``` |
| 11 | +{{%children containerstyle="div" style="h3" description="true" %}} |
0 commit comments