Skip to content

Commit

Permalink
[PLINT-578] [PLINT-589] Add platform integrations origins for q4 (#31492
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sarah-witt authored Dec 10, 2024
1 parent 8b4888d commit 6dea12d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkg/aggregator/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 18 additions & 3 deletions pkg/metrics/metricsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
MetricSourceContainerd
MetricSourceCri
MetricSourceDocker
MetricSourceNtp
MetricSourceNTP
MetricSourceSystemd
MetricSourceHelm
MetricSourceKubernetesAPIServer
Expand All @@ -60,6 +60,8 @@ const (
MetricSourceDisk
MetricSourceNetwork
MetricSourceSnmp
MetricSourceCloudFoundry
MetricSourceJenkins

// Python Checks
MetricSourceZenohRouter
Expand Down Expand Up @@ -135,6 +137,9 @@ const (
MetricSourceAwsPricing
MetricSourceAqua
MetricSourceKubernetesClusterAutoscaler
MetricSourceKubeVirtAPI
MetricSourceKubeVirtController
MetricSourceKubeVirtHandler
MetricSourceTraefikMesh
MetricSourceWeaviate
MetricSourceTorchserve
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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":
Expand Down
20 changes: 18 additions & 2 deletions pkg/serializer/internal/metrics/origin_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 6dea12d

Please sign in to comment.