Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions modules/otel-receivers-filelog-receiver.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Module included in the following assemblies:
//
// * observability/otel/otel-collector/otel-collector-receivers.adoc

:_mod-docs-content-type: REFERENCE
[id="otel-receivers-filelog-receiver_{context}"]
= Filelog Receiver

[role="_abstract"]
The Filelog Receiver tails and parses logs from files.

:FeatureName: The Filelog Receiver
include::snippets/technology-preview.adoc[]

.OpenTelemetry Collector custom resource with the enabled Filelog Receiver that tails a text file
[source,yaml]
----
# ...
config:
receivers:
filelog:
include: [ /simple.log ] # <1>
operators: # <2>
- type: regex_parser
regex: '^(?P<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) (?P<sev>[A-Z]*) (?P<msg>.*)$'
timestamp:
parse_from: attributes.time
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: attributes.sev
# ...
----
<1> A list of file glob patterns that match the file paths to be read.
<2> An array of Operators. Each Operator performs a simple task such as parsing a timestamp or JSON. To process logs into a desired format, chain the Operators together.
90 changes: 90 additions & 0 deletions modules/otel-receivers-hostmetrics-receiver.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Module included in the following assemblies:
//
// * observability/otel/otel-collector/otel-collector-receivers.adoc

:_mod-docs-content-type: REFERENCE
[id="otel-receivers-hostmetrics-receiver_{context}"]
= Host Metrics Receiver

[role="_abstract"]
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: <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:<namespace>:otel-hostfs-daemonset
volumes:
- configMap
- emptyDir
- hostPath
- projected
# ...
---
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: otel
namespace: <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`.
40 changes: 40 additions & 0 deletions modules/otel-receivers-jaeger-receiver.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Module included in the following assemblies:
//
// * observability/otel/otel-collector/otel-collector-receivers.adoc

:_mod-docs-content-type: REFERENCE
[id="otel-receivers-jaeger-receiver_{context}"]
= Jaeger Receiver

[role="_abstract"]
The Jaeger Receiver ingests traces in the Jaeger formats.

.OpenTelemetry Collector custom resource with an enabled Jaeger Receiver
[source,yaml]
----
# ...
config:
receivers:
jaeger:
protocols:
grpc:
endpoint: 0.0.0.0:14250 # <1>
thrift_http:
endpoint: 0.0.0.0:14268 # <2>
thrift_compact:
endpoint: 0.0.0.0:6831 # <3>
thrift_binary:
endpoint: 0.0.0.0:6832 # <4>
tls: {} # <5>

service:
pipelines:
traces:
receivers: [jaeger]
# ...
----
<1> The Jaeger gRPC endpoint. If omitted, the default `+0.0.0.0:14250+` is used.
<2> The Jaeger Thrift HTTP endpoint. If omitted, the default `+0.0.0.0:14268+` is used.
<3> The Jaeger Thrift Compact endpoint. If omitted, the default `+0.0.0.0:6831+` is used.
<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.
120 changes: 120 additions & 0 deletions modules/otel-receivers-journald-receiver.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
// Module included in the following assemblies:
//
// * observability/otel/otel-collector/otel-collector-receivers.adoc

:_mod-docs-content-type: REFERENCE
[id="otel-receivers-journald-receiver_{context}"]
= Journald Receiver

[role="_abstract"]
The Journald Receiver parses *journald* events from the *systemd* journal and sends them as logs.

:FeatureName: The Journald Receiver
include::snippets/technology-preview.adoc[]

.OpenTelemetry Collector custom resource with the enabled Journald Receiver
[source,yaml]
----
apiVersion: v1
kind: Namespace
metadata:
name: otel-journald
labels:
security.openshift.io/scc.podSecurityLabelSync: "false"
pod-security.kubernetes.io/enforce: "privileged"
pod-security.kubernetes.io/audit: "privileged"
pod-security.kubernetes.io/warn: "privileged"
# ...
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: privileged-sa
namespace: otel-journald
# ...
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: otel-journald-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:privileged
subjects:
- kind: ServiceAccount
name: privileged-sa
namespace: otel-journald
# ...
---
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: otel-journald-logs
namespace: otel-journald
spec:
mode: daemonset
serviceAccount: privileged-sa
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- CHOWN
- DAC_OVERRIDE
- FOWNER
- FSETID
- KILL
- NET_BIND_SERVICE
- SETGID
- SETPCAP
- SETUID
readOnlyRootFilesystem: true
seLinuxOptions:
type: spc_t
seccompProfile:
type: RuntimeDefault
config:
receivers:
journald:
files: /var/log/journal/*/*
priority: info # <1>
units: # <2>
- kubelet
- crio
- init.scope
- dnsmasq
all: true # <3>
retry_on_failure:
enabled: true # <4>
initial_interval: 1s # <5>
max_interval: 30s # <6>
max_elapsed_time: 5m # <7>
processors:
exporters:
debug: {}
service:
pipelines:
logs:
receivers: [journald]
exporters: [debug]
volumeMounts:
- name: journal-logs
mountPath: /var/log/journal/
readOnly: true
volumes:
- name: journal-logs
hostPath:
path: /var/log/journal
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
# ...
----
<1> Filters output by message priorities or priority ranges. The default value is `info`.
<2> Lists the units to read entries from. If empty, entries are read from all units.
<3> Includes very long logs and logs with unprintable characters. The default value is `false`.
<4> If set to `true`, the receiver pauses reading a file and attempts to resend the current batch of logs when encountering an error from downstream components. The default value is `false`.
<5> The time interval to wait after the first failure before retrying. The default value is `1s`. The units are `ms`, `s`, `m`, `h`.
<6> The upper bound for the retry backoff interval. When this value is reached, the time interval between consecutive retry attempts remains constant at this value. The default value is `30s`. The supported units are `ms`, `s`, `m`, `h`.
<7> The maximum time interval, including retry attempts, for attempting to send a logs batch to a downstream consumer. When this value is reached, the data are discarded. If the set value is `0`, retrying never stops. The default value is `5m`. The supported units are `ms`, `s`, `m`, `h`.
Loading