|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// microshift_running_apps/microshift-observability-service.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="microshift-otel-config-large_{context}"] |
| 7 | += Selecting a large configuration |
| 8 | + |
| 9 | +You can configure {microshift-short} Observability to collect the maximum amount of performance and resource information, from the maximum number of sources, by updating the YAML file. |
| 10 | + |
| 11 | +. Select a large configuration by adding the following information to the `/etc/microshift/observability/opentelemetry-collector.yaml` file. `Large` is the default configuration. |
| 12 | ++ |
| 13 | +[source,yaml] |
| 14 | +---- |
| 15 | +receivers: |
| 16 | + kubeletstats: |
| 17 | + auth_type: tls |
| 18 | + ca_file: /var/lib/microshift/certs/ca-bundle/client-ca.crt |
| 19 | + key_file: /var/lib/microshift/certs/admin-kubeconfig-signer/openshift-observability-client/client.key |
| 20 | + cert_file: /var/lib/microshift/certs/admin-kubeconfig-signer/openshift-observability-client/client.crt |
| 21 | + insecure_skip_verify: true |
| 22 | + collection_interval: 10s |
| 23 | + endpoint: "${env:K8S_NODE_NAME}:10250" |
| 24 | + node: ${env:K8S_NODE_NAME} |
| 25 | + k8s_api_config: |
| 26 | + auth_type: kubeConfig |
| 27 | + k8s_events: |
| 28 | + auth_type: kubeConfig |
| 29 | + hostmetrics: |
| 30 | + root_path: / |
| 31 | + collection_interval: 10s |
| 32 | + scrapers: |
| 33 | + cpu: |
| 34 | + memory: |
| 35 | + network: |
| 36 | + disk: |
| 37 | + filesystem: |
| 38 | + journald: |
| 39 | + units: |
| 40 | + - microshift |
| 41 | + - microshift-observability |
| 42 | + - microshift-etcd |
| 43 | + - crio |
| 44 | + - openvswitch.service |
| 45 | + - ovsdb-server.service |
| 46 | + - ovs-vswitchd.service |
| 47 | + priority: info |
| 48 | + prometheus: |
| 49 | + config: |
| 50 | + scrape_configs: |
| 51 | + - job_name: k8s |
| 52 | + scrape_interval: 10s |
| 53 | + kubernetes_sd_configs: |
| 54 | + - kubeconfig_file: /var/lib/microshift/resources/observability-client/kubeconfig |
| 55 | + role: pod |
| 56 | + relabel_configs: |
| 57 | + # Only scrape Pods with annotation "prometheus.io/scrape": "true" |
| 58 | + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] |
| 59 | + action: keep |
| 60 | + regex: true |
| 61 | + # Use value of "prometheus.io/path" annotation for scraping |
| 62 | + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] |
| 63 | + action: replace |
| 64 | + target_label: __metrics_path__ |
| 65 | + regex: (.+) |
| 66 | + # Use value of "prometheus.io/port" annotation for scraping |
| 67 | + - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] |
| 68 | + action: replace |
| 69 | + regex: ([^:]+)(?::\d+)?;(\d+) |
| 70 | + replacement: $1:$2 |
| 71 | + target_label: __address__ |
| 72 | +processors: |
| 73 | + batch: |
| 74 | + resourcedetection/system: |
| 75 | + detectors: [ "system" ] |
| 76 | + system: |
| 77 | + hostname_sources: [ "os" ] |
| 78 | +exporters: |
| 79 | + otlp: |
| 80 | + sending_queue: |
| 81 | + storage: file_storage |
| 82 | + endpoint: ${env:OTEL_BACKEND}:4317 <1> |
| 83 | + tls: |
| 84 | + insecure: true |
| 85 | +extensions: |
| 86 | + file_storage: |
| 87 | + directory: /var/lib/microshift-observability |
| 88 | +service: |
| 89 | + extensions: [ file_storage ] |
| 90 | + pipelines: |
| 91 | + metrics/kubeletstats: |
| 92 | + receivers: [ kubeletstats ] |
| 93 | + processors: [ batch ] |
| 94 | + exporters: [ otlp ] |
| 95 | + metrics/hostmetrics: |
| 96 | + receivers: [ hostmetrics ] |
| 97 | + processors: [ resourcedetection/system, batch ] |
| 98 | + exporters: [ otlp ] |
| 99 | + logs/kube_events: |
| 100 | + receivers: [ k8s_events ] |
| 101 | + processors: [ resourcedetection/system, batch ] |
| 102 | + exporters: [ otlp ] |
| 103 | + logs/host: |
| 104 | + receivers: [ hostmetrics ] |
| 105 | + processors: [ resourcedetection/system ] |
| 106 | + exporters: [ otlp ] |
| 107 | + logs/journald: |
| 108 | + receivers: [ journald ] |
| 109 | + processors: [ resourcedetection/system ] |
| 110 | + exporters: [ otlp ] |
| 111 | + metrics/pods: |
| 112 | + receivers: [ prometheus ] |
| 113 | + processors: [ batch ] |
| 114 | + exporters: [ otlp ] |
| 115 | + telemetry: |
| 116 | + metrics: |
| 117 | + readers: |
| 118 | + - periodic: |
| 119 | + exporter: |
| 120 | + otlp: |
| 121 | + protocol: http/protobuf |
| 122 | + endpoint: http://${env:OTEL_BACKEND}:4318 <1> |
| 123 | +---- |
| 124 | +<1> Replace the variable `${env:OTEL_BACKEND}` with the IP address or host name of the remote back end. This IP address resolves to the local node's host name. Any unreachable endpoint is reported in the `microshift-observability` service logs. |
| 125 | + |
| 126 | +. Restart {microshift-short} Observability to complete the configuration selection. |
0 commit comments