Red Hat OpenShift is an open source container application platform based on the Kubernetes container orchestrator for enterprise application development and deployment.
To install the Agent, refer to the Agent installation instructions for kubernetes. The default configuration targets OpenShift 3.7.0 and later, as it relies on features and endpoints introduced in this version.
Starting with version 6.1, the Datadog Agent supports monitoring OpenShift Origin and Enterprise clusters. Depending on your needs and the security constraints of your cluster, three deployment scenarios are supported:
| Security Context Constraints | Restricted | Host network | Custom |
|---|---|---|---|
| Kubernetes layer monitoring | ✅ | ✅ | ✅ |
| Kubernetes-based Autodiscovery | ✅ | ✅ | ✅ |
| Dogstatsd intake | 🔶 | ✅ | ✅ |
| APM trace intake | 🔶 | ✅ | ✅ |
| Logs network intake | 🔶 | ✅ | ✅ |
| Host network metrics | ❌ | ❌ | ✅ |
| Docker layer monitoring | ❌ | ❌ | ✅ |
| Container logs collection | ❌ | ❌ | ✅ |
| Live Container monitoring | ❌ | ❌ | ✅ |
| Live Process monitoring | ❌ | ❌ | ✅ |
This mode does not require granting special permissions to the datadog-agent daemonset, other than the RBAC permissions needed to access the kubelet and the APIserver. You can get started with this kubelet-only template.
The recommended ingestion method for Dogstatsd, APM, and logs is to bind the Datadog Agent to a host port. This way, the target IP is constant and easily discoverable by your applications. As the default restricted OpenShift SCC does not allow to bind to host port, you can set the Agent to listen on it's own IP, but you will need to handle the discovery of that IP from your application.
The Agent suports working on a sidecar run mode, to enable running the Agent in your application's pod for easier discoverability.
Add the allowHostPorts permission to the pod (either via the standard hostnetwork or hostaccess SCC, or by creating your own). In this case, you can add the relevant port bindings in your pod specs:
ports:
- containerPort: 8125
name: dogstatsdport
protocol: UDP
- containerPort: 8126
name: traceport
protocol: TCPIf SELinux is in permissive mode or disabled, enable the hostaccess SCC to benefit from all features.
If SELinux is in enforcing mode, it is recommend to grant the spc_t type to the datadog-agent pod. In order to deploy our agent, Datadog created a datadog-agent SCC that you can apply after creating the datadog-agent service account. It grants the following permissions:
allowHostPorts: true: Binds Dogstatsd / APM / Logs intakes to the node's IP.allowHostPID: true: Enables Origin Detection for Dogstatsd metrics submitted by Unix Socket.volumes: hostPath: Accesses the Docker socket and the host'sprocandcgroupfolders, for metric collection.SELinux type: spc_t: Accesses the Docker socket and all processes'procandcgroupfolders, for metric collection. You can read more about this type in this Red Hat article.
Run the Agent’s status subcommand and look for openshift under the Checks section.
See metadata.csv for a list of metrics provided by this check.
The OpenShift check does not include any events.
The OpenShift check does not include any Service Checks.
Need help? Contact Datadog support.