From e712610430e69956502b477d77ac0dd9f08132ed Mon Sep 17 00:00:00 2001 From: Benedikt Bongartz Date: Mon, 29 Apr 2024 15:58:12 -0400 Subject: [PATCH] OBSDOCS-865: Documentation for hostmetrics receiver --- modules/otel-collector-components.adoc | 85 ++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/modules/otel-collector-components.adoc b/modules/otel-collector-components.adoc index 662d1ad983fa..9b0a27728c6f 100644 --- a/modules/otel-collector-components.adoc +++ b/modules/otel-collector-components.adoc @@ -82,6 +82,91 @@ The Jaeger receiver ingests traces in the Jaeger formats. <4> The Jaeger Thrift Binary endpoint. If omitted, the default `+0.0.0.0:6832+` is used. <5> The server-side TLS configuration. See the OTLP receiver configuration section for more details. +[id="hostmetrics-receiver_{context}"] +=== Host Metrics Receiver + +:FeatureName: The Host Metrics Receiver +include::snippets/technology-preview.adoc[] + +The Host Metrics Receiver ingests metrics in the OTLP format. + +.OpenTelemetry Collector custom resource with an enabled Host Metrics Receiver +[source,yaml] +---- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: otel-hostfs-daemonset + namespace: +--- +apiVersion: security.openshift.io/v1 +kind: SecurityContextConstraints +allowHostDirVolumePlugin: true +allowHostIPC: false +allowHostNetwork: false +allowHostPID: true +allowHostPorts: false +allowPrivilegeEscalation: true +allowPrivilegedContainer: true +allowedCapabilities: null +defaultAddCapabilities: +- SYS_ADMIN +fsGroup: + type: RunAsAny +groups: [] +metadata: + name: otel-hostmetrics +readOnlyRootFilesystem: true +runAsUser: + type: RunAsAny +seLinuxContext: + type: RunAsAny +supplementalGroups: + type: RunAsAny +users: +- system:serviceaccount::otel-hostfs-daemonset +volumes: +- configMap +- emptyDir +- hostPath +- projected +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: otel + namespace: +spec: + serviceAccount: otel-hostfs-daemonset + mode: daemonset + volumeMounts: + - mountPath: /hostfs + name: host + readOnly: true + volumes: + - hostPath: + path: / + name: host + config: | + receivers: + hostmetrics: + collection_interval: 10s # <1> + initial_delay: 1s # <2> + root_path: / # <3> + scrapers: # <4> + cpu: + memory: + disk: + service: + pipelines: + metrics: + receivers: [hostmetrics] +---- +<1> Sets the time interval for host metrics collection. If omitted, the default value is `+1m+`. +<2> Sets the initial time delay for host metrics collection. If omitted, the default value is `+1s+`. +<3> Configures the `root_path` so that the Host Metrics Receiver knows where the root filesystem is. If running multiple instances of the Host Metrics Receiver, set the same `root_path` value for each instance. +<4> Lists the enabled host metrics scrapers. Available scrapers are `cpu`, `disk`, `load`, `filesystem`, `memory`, `network`, `paging`, `processes`, and `process`. + [id="k8sobjectsreceiver-receiver_{context}"] === Kubernetes Objects Receiver