This check monitors KubeVirt Controller through the Datadog Agent.
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the Autodiscovery Integration Templates for guidance on applying these instructions.
The KubeVirt Controller check is included in the Datadog Agent package. No additional installation is needed on your server.
The main use case to run the kubevirt_controller
check is as a cluster level check.
In order to do that, you will need to update some RBAC permissions to give the datadog-agent
service account read-only access to theKubeVirt
resources by following the steps below:
- Bind the
kubevirt.io:view
ClusterRole to thedatadog-agent
service account:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: datadog-agent-kubevirt
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kubevirt.io:view
subjects:
- kind: ServiceAccount
name: datadog-agent
namespace: default
- Annotate the pods template of your
virt-controller
deployment by patching theKubeVirt
resource as follows:
apiVersion: kubevirt.io/v1
kind: KubeVirt
metadata:
name: kubevirt
namespace: kubevirt
spec:
certificateRotateStrategy: {}
configuration: {}
customizeComponents:
patches:
- resourceType: Deployment
resourceName: virt-controller
patch: '{"spec": {"template":{"metadata":{"annotations":{ "ad.datadoghq.com/virt-controller.check_names": "[\"kubevirt_controller\"]", "ad.datadoghq.com/virt-controller.init_configs": "[{}]", "ad.datadoghq.com/virt-controller.instances": "[{ \"kubevirt_controller_metrics_endpoint\": \"https://%%host%%:%%port%%/metrics\",\"kubevirt_controller_healthz_endpoint\": \"https://%%host%%:%%port%%/healthz\", \"kube_namespace\":\"%%kube_namespace%%\", \"kube_pod_name\":\"%%kube_pod_name%%\", \"tls_verify\": \"false\"}]"}}}}}'
type: strategic
Replace <DD_CLUSTER_NAME>
with the name you want for your cluster.
Run the Cluster Agent's clusterchecks
subcommand inside your Cluster Agent container and look for the kubevirt_controller
check under the Checks section.
See metadata.csv for a list of metrics provided by this integration.
The KubeVirt Controller integration does not include any events.
The KubeVirt Controller integration does not include any service checks.
Need help? Contact Datadog support.