diff --git a/pkg/aggregator/sender_test.go b/pkg/aggregator/sender_test.go index ef7173f8a1bcc..4479842cc18da 100644 --- a/pkg/aggregator/sender_test.go +++ b/pkg/aggregator/sender_test.go @@ -359,9 +359,9 @@ func TestSenderPopulatingMetricSampleSource(t *testing.T) { expectedMetricSource: metrics.MetricSourceCPU, }, { - name: "checkid ntp:1 should have MetricSourceNtp", + name: "checkid ntp:1 should have MetricSourceNTP", checkID: "ntp:1", - expectedMetricSource: metrics.MetricSourceNtp, + expectedMetricSource: metrics.MetricSourceNTP, }, { name: "checkid memory:1 should have MetricSourceMemory", diff --git a/pkg/metrics/metricsource.go b/pkg/metrics/metricsource.go index 4132329578862..57a802188d380 100644 --- a/pkg/metrics/metricsource.go +++ b/pkg/metrics/metricsource.go @@ -37,7 +37,7 @@ const ( MetricSourceContainerd MetricSourceCri MetricSourceDocker - MetricSourceNtp + MetricSourceNTP MetricSourceSystemd MetricSourceHelm MetricSourceKubernetesAPIServer @@ -60,6 +60,8 @@ const ( MetricSourceDisk MetricSourceNetwork MetricSourceSnmp + MetricSourceCloudFoundry + MetricSourceJenkins // Python Checks MetricSourceZenohRouter @@ -135,6 +137,9 @@ const ( MetricSourceAwsPricing MetricSourceAqua MetricSourceKubernetesClusterAutoscaler + MetricSourceKubeVirtAPI + MetricSourceKubeVirtController + MetricSourceKubeVirtHandler MetricSourceTraefikMesh MetricSourceWeaviate MetricSourceTorchserve @@ -349,7 +354,7 @@ func (ms MetricSource) String() string { return "cri" case MetricSourceDocker: return "docker" - case MetricSourceNtp: + case MetricSourceNTP: return "ntp" case MetricSourceSystemd: return "systemd" @@ -441,6 +446,8 @@ func (ms MetricSource) String() string { return "citrix_hypervisor" case MetricSourceClickhouse: return "clickhouse" + case MetricSourceCloudFoundry: + return "cloudfoundry" case MetricSourceCloudFoundryAPI: return "cloud_foundry_api" case MetricSourceCockroachdb: @@ -523,6 +530,8 @@ func (ms MetricSource) String() string { return "impala" case MetricSourceIstio: return "istio" + case MetricSourceJenkins: + return "jenkins" case MetricSourceKafkaConsumer: return "kafka_consumer" case MetricSourceKepler: @@ -884,7 +893,7 @@ func CheckNameToMetricSource(name string) MetricSource { case "docker": return MetricSourceDocker case "ntp": - return MetricSourceNtp + return MetricSourceNTP case "systemd": return MetricSourceSystemd case "helm": @@ -1071,6 +1080,12 @@ func CheckNameToMetricSource(name string) MetricSource { return MetricSourceKubeProxy case "kube_scheduler": return MetricSourceKubeScheduler + case "kubevirt_api": + return MetricSourceKubeVirtAPI + case "kubevirt_controller": + return MetricSourceKubeVirtController + case "kubevirt_handler": + return MetricSourceKubeVirtHandler case "kubelet": return MetricSourceKubelet case "kubernetes_state": diff --git a/pkg/serializer/internal/metrics/origin_mapping.go b/pkg/serializer/internal/metrics/origin_mapping.go index 95fd26b258e8c..6b64e3e602078 100644 --- a/pkg/serializer/internal/metrics/origin_mapping.go +++ b/pkg/serializer/internal/metrics/origin_mapping.go @@ -40,7 +40,7 @@ func metricSourceToOriginCategory(ms metrics.MetricSource) int32 { metrics.MetricSourceContainerd, metrics.MetricSourceCri, metrics.MetricSourceDocker, - metrics.MetricSourceNtp, + metrics.MetricSourceNTP, metrics.MetricSourceSystemd, metrics.MetricSourceHelm, metrics.MetricSourceKubeflow, @@ -64,6 +64,9 @@ func metricSourceToOriginCategory(ms metrics.MetricSource) int32 { metrics.MetricSourceDisk, metrics.MetricSourceNetwork, metrics.MetricSourceSnmp, + // Plugins and non-checks + metrics.MetricSourceCloudFoundry, + metrics.MetricSourceJenkins, // Python Checks metrics.MetricSourceZenohRouter, metrics.MetricSourceZabbix, @@ -148,6 +151,9 @@ func metricSourceToOriginCategory(ms metrics.MetricSource) int32 { metrics.MetricSourceRay, metrics.MetricSourceNvidiaTriton, metrics.MetricSourceKarpenter, + metrics.MetricSourceKubeVirtAPI, + metrics.MetricSourceKubeVirtController, + metrics.MetricSourceKubeVirtHandler, metrics.MetricSourceFluxcd, metrics.MetricSourceEsxi, metrics.MetricSourceDcgm, @@ -365,6 +371,8 @@ func metricSourceToOriginService(ms metrics.MetricSource) int32 { return 36 case metrics.MetricSourceClickhouse: return 37 + case metrics.MetricSourceCloudFoundry: + return 440 case metrics.MetricSourceCloudFoundryAPI: return 38 case metrics.MetricSourceCockroachdb: @@ -463,6 +471,8 @@ func metricSourceToOriginService(ms metrics.MetricSource) int32 { return 86 case metrics.MetricSourceJbossWildfly: return 87 + case metrics.MetricSourceJenkins: + return 436 case metrics.MetricSourceKafkaConsumer: return 89 case metrics.MetricSourceKafka: @@ -487,6 +497,12 @@ func metricSourceToOriginService(ms metrics.MetricSource) int32 { return 98 case metrics.MetricSourceKubernetesState: return 99 + case metrics.MetricSourceKubeVirtAPI: + return 437 + case metrics.MetricSourceKubeVirtController: + return 438 + case metrics.MetricSourceKubeVirtHandler: + return 439 case metrics.MetricSourceKyototycoon: return 100 case metrics.MetricSourceLighttpd: @@ -651,7 +667,7 @@ func metricSourceToOriginService(ms metrics.MetricSource) int32 { return 182 case metrics.MetricSourceDocker: return 183 - case metrics.MetricSourceNtp: + case metrics.MetricSourceNTP: return 184 case metrics.MetricSourceSystemd: return 185 diff --git a/releasenotes/notes/add-platform-integrations-metrics-origins-q4-3278d0ead5015daf.yaml b/releasenotes/notes/add-platform-integrations-metrics-origins-q4-3278d0ead5015daf.yaml new file mode 100644 index 0000000000000..5ea9260a42a85 --- /dev/null +++ b/releasenotes/notes/add-platform-integrations-metrics-origins-q4-3278d0ead5015daf.yaml @@ -0,0 +1,11 @@ +# Each section from every release note are combined when the +# CHANGELOG.rst is rendered. So the text needs to be worded so that +# it does not depend on any information only available in another +# section. This may mean repeating some details, but each section +# must be readable independently of the other. +# +# Each section note must be formatted as reStructuredText. +--- +other: + - | + Add metric origins for Platform Integrations: Cloud Foundry, Jenkins, KubeVirt API, KubeVirt Controller, and KubeVirt Handler. \ No newline at end of file