This integration is in public beta and should be enabled on production workloads with caution.
Overview
This check monitors KubeVirt API through the Datadog Agent.
Setup
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.
Installation
The KubeVirt API check is included in the Datadog Agent package.
No additional installation is needed on your server.
Configuration
The main use case to run the kubevirt_api
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 the datadog-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: <DD_NAMESPACE>
Replace <DD_NAMESPACE>
with the namespace where you installed the datadog-agent
service account.
- Annotate the pods template of your
virt-api
deployment by patching the KubeVirt
resource as follows:
apiVersion: kubevirt.io/v1
kind: KubeVirt
metadata:
name: kubevirt
namespace: kubevirt
spec:
certificateRotateStrategy: {}
configuration: {}
customizeComponents:
patches:
- resourceType: Deployment
resourceName: virt-api
patch: '{"spec":{"template":{"metadata":{"annotations":{"ad.datadoghq.com/virt-api.check_names":"[\"kubevirt_api\"]","ad.datadoghq.com/virt-api.init_configs":"[{}]","ad.datadoghq.com/virt-api.instances":"[{\"kubevirt_api_metrics_endpoint\":\"https://%%host%%:%%port%%/metrics\",\"kubevirt_api_healthz_endpoint\":\"https://%%host%%:%%port%%/healthz\",\"kube_namespace\":\"%%kube_namespace%%\",\"kube_pod_name\":\"%%kube_pod_name%%\",\"tls_verify\":\"false\"}]"}}}}}'
type: strategic
Validation
Run the Cluster Agent’s clusterchecks
subcommand inside your Cluster Agent container and look for the kubevirt_api
check under the Checks section.
Data Collected
Metrics
kubevirt_api.can_connect (gauge) | Value of 1 if the agent can connect to the KubeVirt Handler, and 0 otherwise. |
kubevirt_api.process.cpu_seconds.count (count) | Total user and system CPU time spent in seconds. Shown as second |
kubevirt_api.process.max_fds (gauge) | Maximum number of open file descriptors. Shown as file |
kubevirt_api.process.open_fds (gauge) | Number of open file descriptors. Shown as file |
kubevirt_api.process.resident_memory_bytes (gauge) | Resident memory size in bytes. Shown as byte |
kubevirt_api.process.start_time_seconds (gauge) | Start time of the process since unix epoch in seconds. Shown as byte |
kubevirt_api.process.virtual_memory_bytes (gauge) | Virtual memory size in bytes. Shown as byte |
kubevirt_api.process.virtual_memory_max_bytes (gauge) | Maximum amount of virtual memory available in bytes. Shown as byte |
kubevirt_api.promhttp.metric_handler_requests.count (count) | Total number of scrapes by HTTP status code. Shown as request |
kubevirt_api.promhttp.metric_handler_requests_in_flight (gauge) | Current number of scrapes being served. Shown as request |
kubevirt_api.rest.client_rate_limiter_duration_seconds.bucket (count) | Histogram of client side rate limiter latency in seconds. Broken down by verb and URL. Shown as second |
kubevirt_api.rest.client_rate_limiter_duration_seconds.count (count) | Histogram of client side rate limiter latency in seconds. Broken down by verb and URL. Shown as second |
kubevirt_api.rest.client_rate_limiter_duration_seconds.sum (count) | Histogram of client side rate limiter latency in seconds. Broken down by verb and URL. Shown as second |
kubevirt_api.rest.client_request_latency_seconds.bucket (count) | Histogram of request latency in seconds. Broken down by verb and URL. Shown as second |
kubevirt_api.rest.client_request_latency_seconds.count (count) | Histogram of request latency in seconds. Broken down by verb and URL. Shown as second |
kubevirt_api.rest.client_request_latency_seconds.sum (count) | Histogram of request latency in seconds. Broken down by verb and URL. Shown as second |
kubevirt_api.rest.client_requests.count (count) | Number of HTTP requests, partitioned by status code, method, and host. Shown as request |
kubevirt_api.vm.count (gauge) | Number of VirtualMachines in the KubeVirt API. |
kubevirt_api.vmi.count (gauge) | Number of VirtualMachineInstances in the KubeVirt API. |
Events
The KubeVirt API integration does not include any events.
Service Checks
The KubeVirt API integration does not include any service checks.
Troubleshooting
Need help? Contact Datadog support.