|
| 1 | +--- |
| 2 | +description: SUSE Observability |
| 3 | +--- |
| 4 | + |
| 5 | +# Open Telemetry Collector as a proxy |
| 6 | + |
| 7 | +The normal configuration of the Opentelemetry Collector for tail-sampling traces can be found [here](collector.md) |
| 8 | + |
| 9 | +The below configuration describes a deployment that only does batching, and no further processing of traces, metrics, |
| 10 | +or logs. It is meant as a security proxy that exists outside the SUSE Observability cluster, but within trusted network |
| 11 | +infrastructure. Security credentials for the proxy and SUSE Observability can be set up separately, adding a layer of |
| 12 | +authentication that does not reside with the caller, but with the host. |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +{% code title="otel-collector.yaml" lineNumbers="true" %} |
| 17 | +```yaml |
| 18 | +mode: deployment |
| 19 | +presets: |
| 20 | + kubernetesAttributes: |
| 21 | + enabled: true |
| 22 | + # You can also configure the preset to add all the associated pod's labels and annotations to you telemetry. |
| 23 | + # The label/annotation name will become the resource attribute's key. |
| 24 | + extractAllPodLabels: true |
| 25 | +extraEnvsFrom: |
| 26 | + - secretRef: |
| 27 | + name: open-telemetry-collector |
| 28 | +image: |
| 29 | + # Temporary override for image tag, the helm chart has not been released yet |
| 30 | + tag: 0.97.0 |
| 31 | + |
| 32 | +config: |
| 33 | + receivers: |
| 34 | + otlp: |
| 35 | + protocols: |
| 36 | + grpc: |
| 37 | + endpoint: 0.0.0.0:4317 |
| 38 | + http: |
| 39 | + endpoint: 0.0.0.0:4318 |
| 40 | + |
| 41 | + exporters: |
| 42 | + # Exporter for traces to traffic mirror (used by the common config) |
| 43 | + otlp: |
| 44 | + endpoint: <url for opentelemetry ingestion by suse observability> |
| 45 | + auth: |
| 46 | + authenticator: bearertokenauth |
| 47 | + |
| 48 | + extensions: |
| 49 | + bearertokenauth: |
| 50 | + scheme: SUSEObservability |
| 51 | + token: "${env:API_KEY}" |
| 52 | + |
| 53 | + service: |
| 54 | + extensions: [health_check, bearertokenauth] |
| 55 | + pipelines: |
| 56 | + traces: |
| 57 | + receivers: [otlp] |
| 58 | + processors: [batch] |
| 59 | + exporters: [otlp] |
| 60 | + metrics: |
| 61 | + receivers: [otlp] |
| 62 | + processors: [batch] |
| 63 | + exporters: [otlp] |
| 64 | + logs: |
| 65 | + receivers: [otlp] |
| 66 | + processors: [batch] |
| 67 | + exporters: [otlp] |
| 68 | + |
| 69 | +ingress: |
| 70 | + enabled: true |
| 71 | + annotations: |
| 72 | + kubernetes.io/ingress.class: ingress-nginx-external |
| 73 | + nginx.ingress.kubernetes.io/ingress.class: ingress-nginx-external |
| 74 | + nginx.ingress.kubernetes.io/backend-protocol: GRPC |
| 75 | + # "12.34.56.78/32" IP address of NatGateway in the VPC where the otel data is originating from |
| 76 | + # nginx.ingress.kubernetes.io/whitelist-source-range: "12.34.56.78/32" |
| 77 | + hosts: |
| 78 | + - host: "otlp-collector-proxy.${CLUSTER_NAME}" |
| 79 | + paths: |
| 80 | + - path: / |
| 81 | + pathType: ImplementationSpecific |
| 82 | + port: 4317 |
| 83 | + tls: |
| 84 | + - secretName: ${CLUSTER_NODOT}-ecc-tls |
| 85 | + hosts: |
| 86 | + - "otlp-collector-proxy.${CLUSTER_NAME}" |
| 87 | +``` |
| 88 | +{% endcode %} |
| 89 | +
|
| 90 | +
|
| 91 | +### Ingress Source Range Whitelisting |
| 92 | +
|
| 93 | +To emphasize the role of the proxy collector as a security measure, it is recommended to use a source-range whitelist |
| 94 | +to filter out data from untrusted and/or unknown sources. In contrast, the SUSE Observability ingestion collector may |
| 95 | +have to accept data from multiple sources, maintaining a whitelist on that level does not scale well. |
0 commit comments