From 315063435d8044c576c91c325793521f2cde7076 Mon Sep 17 00:00:00 2001 From: NouemanKHAL Date: Fri, 4 Oct 2024 13:21:48 +0200 Subject: [PATCH] Finalize KubeVirt integrations (#18744) * rename namespace label to vmi_namespace for kubevirt_handler metrics * images folders * update the description of the can_connect metrics * add process_signatures entries * rename namespace label to vm_namespace for both vm and vmi metrics since they share the same name value * add missing units to kubevirt_controller --- kubevirt_api/manifest.json | 3 +- kubevirt_api/metadata.csv | 2 +- .../kubevirt_controller/check.py | 4 ++ kubevirt_controller/manifest.json | 3 +- kubevirt_controller/metadata.csv | 50 +++++++++---------- .../datadog_checks/kubevirt_handler/check.py | 3 ++ kubevirt_handler/images/IMAGES_README.md | 41 --------------- kubevirt_handler/manifest.json | 5 +- kubevirt_handler/metadata.csv | 2 +- 9 files changed, 41 insertions(+), 72 deletions(-) delete mode 100644 kubevirt_handler/images/IMAGES_README.md diff --git a/kubevirt_api/manifest.json b/kubevirt_api/manifest.json index 5db35a9102ba1..68274dbad8c03 100644 --- a/kubevirt_api/manifest.json +++ b/kubevirt_api/manifest.json @@ -42,7 +42,8 @@ }, "service_checks": { "metadata_path": "assets/service_checks.json" - } + }, + "process_signatures": ["virt-api"] }, "dashboards": { "KubeVirt Overview": "assets/dashboards/kubevirt_overview.json" diff --git a/kubevirt_api/metadata.csv b/kubevirt_api/metadata.csv index c2c50890e7599..523b73c43bc18 100644 --- a/kubevirt_api/metadata.csv +++ b/kubevirt_api/metadata.csv @@ -1,5 +1,5 @@ metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags -kubevirt_api.can_connect,gauge,,,,Whether the check can connect to the KubeVirt API or not.,0,kubevirt_api,api connect,, +kubevirt_api.can_connect,gauge,,,,"Value of 1 if the agent can connect to the KubeVirt Handler, and 0 otherwise.",0,kubevirt_api,api connect,, kubevirt_api.process.cpu_seconds.count,count,,second,,Total user and system CPU time spent in seconds.,0,kubevirt_api,cpu time total,, kubevirt_api.process.max_fds,gauge,,file,,Maximum number of open file descriptors.,0,kubevirt_api,max fds,, kubevirt_api.process.open_fds,gauge,,file,,Number of open file descriptors.,0,kubevirt_api,open fds,, diff --git a/kubevirt_controller/datadog_checks/kubevirt_controller/check.py b/kubevirt_controller/datadog_checks/kubevirt_controller/check.py index 4a4063870f68c..591857bc6964a 100644 --- a/kubevirt_controller/datadog_checks/kubevirt_controller/check.py +++ b/kubevirt_controller/datadog_checks/kubevirt_controller/check.py @@ -63,6 +63,10 @@ def _parse_config(self): "namespace": self.__NAMESPACE__, "enable_health_service_check": False, "tls_verify": self.tls_verify, + "rename_labels": { + "namespace": "vm_namespace", + # both kubevirt_vm_* and kubevirt_vmi_* metrics share the same name and namespace labels + }, } self.scraper_configs.append(instance) diff --git a/kubevirt_controller/manifest.json b/kubevirt_controller/manifest.json index 8600a63ef8a5e..552896c23a325 100644 --- a/kubevirt_controller/manifest.json +++ b/kubevirt_controller/manifest.json @@ -42,7 +42,8 @@ }, "service_checks": { "metadata_path": "assets/service_checks.json" - } + }, + "process_signatures": ["virt-controller"] } }, "author": { diff --git a/kubevirt_controller/metadata.csv b/kubevirt_controller/metadata.csv index bc3261e7b18af..0f1b194405586 100644 --- a/kubevirt_controller/metadata.csv +++ b/kubevirt_controller/metadata.csv @@ -1,35 +1,35 @@ metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags -kubevirt_controller.can_connect,gauge,,,,Whether the check can connect to the KubeVirt Controller or not.,0,kubevirt_controller,api connect,, +kubevirt_controller.can_connect,gauge,,,,"Value of 1 if the agent can connect to the KubeVirt Controller, and 0 otherwise.",0,kubevirt_controller,api connect,, kubevirt_controller.virt_controller.leading_status,gauge,,,,Indication for an operating virt-controller.,0,kubevirt_controller,leading_status,, kubevirt_controller.virt_controller.ready_status,gauge,,,,Indication for a virt-controller that is ready to take the lead.,0,kubevirt_controller,ready_status,, -kubevirt_controller.vm.error_status_last_transition_timestamp_seconds.count,count,,,,Virtual Machine last transition timestamp to error status.,0,kubevirt_controller,,, -kubevirt_controller.vm.migrating_status_last_transition_timestamp_seconds.count,count,,,,Virtual Machine last transition timestamp to migrating status.,0,kubevirt_controller,,, -kubevirt_controller.vm.non_running_status_last_transition_timestamp_seconds.count,count,,,,Virtual Machine last transition timestamp to paused/stopped status.,0,kubevirt_controller,,, -kubevirt_controller.vm.running_status_last_transition_timestamp_seconds.count,count,,,,Virtual Machine last transition timestamp to running status.,0,kubevirt_controller,,, -kubevirt_controller.vm.starting_status_last_transition_timestamp_seconds.count,count,,,,Virtual Machine last transition timestamp to starting status.,0,kubevirt_controller,,, +kubevirt_controller.vm.error_status_last_transition_timestamp_seconds.count,count,,second,,Virtual Machine last transition timestamp to error status.,0,kubevirt_controller,,, +kubevirt_controller.vm.migrating_status_last_transition_timestamp_seconds.count,count,,second,,Virtual Machine last transition timestamp to migrating status.,0,kubevirt_controller,,, +kubevirt_controller.vm.non_running_status_last_transition_timestamp_seconds.count,count,,second,,Virtual Machine last transition timestamp to paused/stopped status.,0,kubevirt_controller,,, +kubevirt_controller.vm.running_status_last_transition_timestamp_seconds.count,count,,second,,Virtual Machine last transition timestamp to running status.,0,kubevirt_controller,,, +kubevirt_controller.vm.starting_status_last_transition_timestamp_seconds.count,count,,second,,Virtual Machine last transition timestamp to starting status.,0,kubevirt_controller,,, kubevirt_controller.vmi.migrations_in_pending_phase,gauge,,,,Number of current pending migrations.,0,kubevirt_controller,,, kubevirt_controller.vmi.migrations_in_running_phase,gauge,,,,Number of current running migrations.,0,kubevirt_controller,,, kubevirt_controller.vmi.migrations_in_scheduling_phase,gauge,,,,Number of current scheduling migrations.,0,kubevirt_controller,,, kubevirt_controller.vmi.non_evictable,gauge,,,,Indication for a VirtualMachine that its eviction strategy is set to Live Migration but is not migratable.,0,kubevirt_controller,,, kubevirt_controller.vmi.number_of_outdated,gauge,,,,Indication for the total number of VirtualMachineInstance workloads that are not running within the most up-to-date version of the virt-launcher environment.,0,kubevirt_controller,,, kubevirt_controller.vmi.phase_count,gauge,,,,"Sum of VMIs per phase and node. phase can be one of the following: [Pending, Scheduling, Scheduled, Running, Succeeded, Failed, Unknown].",0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_from_creation_seconds.bucket,count,,,,Histogram of VM phase transitions duration from creation time in seconds.,0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_from_creation_seconds.count,count,,,,Histogram of VM phase transitions duration from creation time in seconds.,0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_from_creation_seconds.sum,count,,,,Histogram of VM phase transitions duration from creation time in seconds.,0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_from_deletion_seconds.bucket,count,,,,Histogram of VM phase transitions duration from deletion time in seconds.,0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_from_deletion_seconds.count,count,,,,Histogram of VM phase transitions duration from deletion time in seconds.,0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_from_deletion_seconds.sum,count,,,,Histogram of VM phase transitions duration from deletion time in seconds.,0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_seconds.bucket,count,,,,Histogram of VM phase transitions duration between different phases in seconds.,0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_seconds.count,count,,,,Histogram of VM phase transitions duration between different phases in seconds.,0,kubevirt_controller,,, -kubevirt_controller.vmi.phase_transition_time_seconds.sum,count,,,,Histogram of VM phase transitions duration between different phases in seconds.,0,kubevirt_controller,,, -kubevirt_controller.workqueue.adds.count,count,,,,Total number of adds handled by workqueue,0,kubevirt_controller,,, -kubevirt_controller.workqueue.depth,gauge,,,,Current depth of workqueue,0,kubevirt_controller,,, -kubevirt_controller.workqueue.longest_running_processor_seconds,gauge,,,,How many seconds has the longest running processor for workqueue been running.,0,kubevirt_controller,,, -kubevirt_controller.workqueue.queue_duration_seconds.bucket,count,,,,How long an item stays in workqueue before being requested.,0,kubevirt_controller,,, -kubevirt_controller.workqueue.queue_duration_seconds.count,count,,,,How long an item stays in workqueue before being requested.,0,kubevirt_controller,,, -kubevirt_controller.workqueue.queue_duration_seconds.sum,count,,,,How long an item stays in workqueue before being requested.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_from_creation_seconds.bucket,count,,second,,Histogram of VM phase transitions duration from creation time in seconds.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_from_creation_seconds.count,count,,second,,Histogram of VM phase transitions duration from creation time in seconds.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_from_creation_seconds.sum,count,,second,,Histogram of VM phase transitions duration from creation time in seconds.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_from_deletion_seconds.bucket,count,,second,,Histogram of VM phase transitions duration from deletion time in seconds.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_from_deletion_seconds.count,count,,second,,Histogram of VM phase transitions duration from deletion time in seconds.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_from_deletion_seconds.sum,count,,second,,Histogram of VM phase transitions duration from deletion time in seconds.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_seconds.bucket,count,,second,,Histogram of VM phase transitions duration between different phases in seconds.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_seconds.count,count,,second,,Histogram of VM phase transitions duration between different phases in seconds.,0,kubevirt_controller,,, +kubevirt_controller.vmi.phase_transition_time_seconds.sum,count,,second,,Histogram of VM phase transitions duration between different phases in seconds.,0,kubevirt_controller,,, +kubevirt_controller.workqueue.adds.count,count,,item,,Total number of adds handled by workqueue,0,kubevirt_controller,,, +kubevirt_controller.workqueue.depth,gauge,,item,,Current depth of workqueue,0,kubevirt_controller,,, +kubevirt_controller.workqueue.longest_running_processor_seconds,gauge,,second,,How many seconds has the longest running processor for workqueue been running.,0,kubevirt_controller,,, +kubevirt_controller.workqueue.queue_duration_seconds.bucket,count,,second,,How long an item stays in workqueue before being requested.,0,kubevirt_controller,,, +kubevirt_controller.workqueue.queue_duration_seconds.count,count,,second,,How long an item stays in workqueue before being requested.,0,kubevirt_controller,,, +kubevirt_controller.workqueue.queue_duration_seconds.sum,count,,second,,How long an item stays in workqueue before being requested.,0,kubevirt_controller,,, kubevirt_controller.workqueue.retries.count,count,,,,Total number of retries handled by workqueue.,0,kubevirt_controller,,, -kubevirt_controller.workqueue.unfinished_work_seconds,gauge,,,,How many seconds of work has done that is in progress and hasn't been observed by work_duration. Large values indicate stuck threads. One can deduce the number of stuck threads by observing the rate at which this increases.,0,kubevirt_controller,,, -kubevirt_controller.workqueue.work_duration_seconds.bucket,count,,,,How long in seconds processing an item from workqueue takes.,0,kubevirt_controller,,, -kubevirt_controller.workqueue.work_duration_seconds.count,count,,,,How long in seconds processing an item from workqueue takes.,0,kubevirt_controller,,, -kubevirt_controller.workqueue.work_duration_seconds.sum,count,,,,How long in seconds processing an item from workqueue takes.,0,kubevirt_controller,,, +kubevirt_controller.workqueue.unfinished_work_seconds,gauge,,second,,How many seconds of work has done that is in progress and hasn't been observed by work_duration. Large values indicate stuck threads. One can deduce the number of stuck threads by observing the rate at which this increases.,0,kubevirt_controller,,, +kubevirt_controller.workqueue.work_duration_seconds.bucket,count,,second,,How long in seconds processing an item from workqueue takes.,0,kubevirt_controller,,, +kubevirt_controller.workqueue.work_duration_seconds.count,count,,second,,How long in seconds processing an item from workqueue takes.,0,kubevirt_controller,,, +kubevirt_controller.workqueue.work_duration_seconds.sum,count,,second,,How long in seconds processing an item from workqueue takes.,0,kubevirt_controller,,, diff --git a/kubevirt_handler/datadog_checks/kubevirt_handler/check.py b/kubevirt_handler/datadog_checks/kubevirt_handler/check.py index f009596b2cc1a..26d77e4e2566f 100644 --- a/kubevirt_handler/datadog_checks/kubevirt_handler/check.py +++ b/kubevirt_handler/datadog_checks/kubevirt_handler/check.py @@ -61,6 +61,9 @@ def _parse_config(self): "namespace": self.__NAMESPACE__, "enable_health_service_check": False, "tls_verify": self.tls_verify, + "rename_labels": { + "namespace": "vm_namespace", + }, } self.scraper_configs.append(instance) diff --git a/kubevirt_handler/images/IMAGES_README.md b/kubevirt_handler/images/IMAGES_README.md deleted file mode 100644 index 70612c2830ffb..0000000000000 --- a/kubevirt_handler/images/IMAGES_README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Marketplace Media Carousel Guidelines - -## Using the media gallery - -To use the media gallery, you must upload a minimum of one image. The gallery -can hold a maximum of 8 pieces of media total, and one of these pieces of media -can be a video (guidelines and submission steps below). Images should be -added to your /images directory and referenced in the manifest.json file. - - -## Image and video requirements - -### Images - -``` -File type : .jpg or .png -File size : ~500 KB per image, with a max of 1 MB per image -File dimensions : The image must be between 1440px and 2880px width, with a 16:9 aspect ratio (for example: 1440x810) -File name : Use only letters, numbers, underscores, and hyphens -Color mode : RGB -Color profile : sRGB -Description : 300 characters maximum -``` - -### Video - -To display a video in your media gallery, please send our team the zipped file -or a link to download the video at `marketplace@datadog.com`. In addition, -please upload a thumbnail image for your video as a part of the pull request. -Once approved, we will upload the file to Vimeo and provide you with the -vimeo_id to add to your manifest.json file. Please note that the gallery can -only hold one video. - -``` -File type : MP4 H.264 -File size : Max 1 video; 1 GB maximum size -File dimensions : The aspect ratio must be exactly 16:9, and the resolution must be 1920x1080 or higher -File name : partnerName-appName.mp4 -Run time : Recommendation of 60 seconds or less -Description : 300 characters maximum -``` diff --git a/kubevirt_handler/manifest.json b/kubevirt_handler/manifest.json index ea197c1090e70..a9a0d6db1620c 100644 --- a/kubevirt_handler/manifest.json +++ b/kubevirt_handler/manifest.json @@ -35,14 +35,15 @@ "metrics": { "prefix": "kubevirt_handler.", "check": [ - "kubevirt_handler.can_connect", + "kubevirt_handler.can_connect", "kubevirt_handler.vmi.cpu_system_usage_seconds.count" ], "metadata_path": "metadata.csv" }, "service_checks": { "metadata_path": "assets/service_checks.json" - } + }, + "process_signatures": ["virt-handler"] } }, "author": { diff --git a/kubevirt_handler/metadata.csv b/kubevirt_handler/metadata.csv index 1b9faba853995..7f697de4cae94 100644 --- a/kubevirt_handler/metadata.csv +++ b/kubevirt_handler/metadata.csv @@ -1,5 +1,5 @@ metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags -kubevirt_handler.can_connect,gauge,,,,Whether the check can connect to the KubeVirt Handler or not.,0,kubevirt_handler,handler connect,, +kubevirt_handler.can_connect,gauge,,,,"Value of 1 if the agent can connect to the KubeVirt Handler, and 0 otherwise.",0,kubevirt_handler,handler connect,, kubevirt_handler.vmi.cpu_system_usage_seconds.count,count,,second,,"Total CPU time spent in system mode.",0,kubevirt_handler,short_name,, kubevirt_handler.vmi.cpu_usage_seconds.count,count,,second,,"Total CPU time spent in all modes (sum of both vcpu and hypervisor usage).",0,kubevirt_handler,short_name,, kubevirt_handler.vmi.cpu_user_usage_seconds.count,count,,second,,"Total CPU time spent in user mode.",0,kubevirt_handler,short_name,,