mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: Update resource attribute keys for Kubernetes metrics
This commit is contained in:
@@ -83,7 +83,7 @@ const KubernetesClusterContainerDetail: FunctionComponent<
|
||||
const attributes: Record<string, unknown> =
|
||||
(data["attributes"] as Record<string, unknown>) || {};
|
||||
const name: string =
|
||||
(attributes["k8s.container.name"] as string) || "Unknown Container";
|
||||
(attributes["resource.k8s.container.name"] as string) || "Unknown Container";
|
||||
return { title: name };
|
||||
};
|
||||
|
||||
@@ -99,8 +99,8 @@ const KubernetesClusterContainerDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "container.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.container.name": containerName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.container.name": containerName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
@@ -124,8 +124,8 @@ const KubernetesClusterContainerDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "container.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.container.name": containerName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.container.name": containerName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
|
||||
@@ -99,7 +99,7 @@ const KubernetesClusterCronJobDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cronjob.name": cronJobName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
@@ -124,7 +124,7 @@ const KubernetesClusterCronJobDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cronjob.name": cronJobName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
|
||||
@@ -99,7 +99,7 @@ const KubernetesClusterDaemonSetDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.daemonset.name": daemonSetName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
@@ -124,7 +124,7 @@ const KubernetesClusterDaemonSetDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.daemonset.name": daemonSetName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
|
||||
@@ -99,7 +99,7 @@ const KubernetesClusterDeploymentDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.deployment.name": deploymentName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
@@ -124,7 +124,7 @@ const KubernetesClusterDeploymentDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.deployment.name": deploymentName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
|
||||
@@ -99,7 +99,7 @@ const KubernetesClusterJobDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.job.name": jobName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
@@ -124,7 +124,7 @@ const KubernetesClusterJobDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.job.name": jobName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
|
||||
@@ -99,7 +99,7 @@ const KubernetesClusterNamespaceDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.namespace.name": namespaceName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
@@ -124,7 +124,7 @@ const KubernetesClusterNamespaceDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.namespace.name": namespaceName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
|
||||
@@ -86,8 +86,8 @@ const KubernetesClusterNodeDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.node.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.node.name": nodeName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.node.name": nodeName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
@@ -110,8 +110,8 @@ const KubernetesClusterNodeDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.node.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.node.name": nodeName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.node.name": nodeName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
@@ -134,8 +134,8 @@ const KubernetesClusterNodeDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.node.filesystem.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.node.name": nodeName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.node.name": nodeName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
@@ -158,8 +158,8 @@ const KubernetesClusterNodeDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.node.network.io.receive",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.node.name": nodeName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.node.name": nodeName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
@@ -182,8 +182,8 @@ const KubernetesClusterNodeDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.node.network.io.transmit",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.node.name": nodeName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.node.name": nodeName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
|
||||
@@ -83,7 +83,7 @@ const KubernetesClusterPodDetail: FunctionComponent<
|
||||
const attributes: Record<string, unknown> =
|
||||
(data["attributes"] as Record<string, unknown>) || {};
|
||||
const containerName: string =
|
||||
(attributes["k8s.container.name"] as string) || "Unknown Container";
|
||||
(attributes["resource.k8s.container.name"] as string) || "Unknown Container";
|
||||
return { title: containerName };
|
||||
};
|
||||
|
||||
@@ -99,8 +99,8 @@ const KubernetesClusterPodDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "container.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.pod.name": podName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.pod.name": podName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
@@ -124,8 +124,8 @@ const KubernetesClusterPodDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "container.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.pod.name": podName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.pod.name": podName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
@@ -149,8 +149,8 @@ const KubernetesClusterPodDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.pod.name": podName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.pod.name": podName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
@@ -173,8 +173,8 @@ const KubernetesClusterPodDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"k8s.pod.name": podName,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.pod.name": podName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
aggregateBy: {},
|
||||
|
||||
@@ -99,7 +99,7 @@ const KubernetesClusterStatefulSetDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.cpu.utilization",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.statefulset.name": statefulSetName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
@@ -124,7 +124,7 @@ const KubernetesClusterStatefulSetDetail: FunctionComponent<
|
||||
filterData: {
|
||||
metricName: "k8s.pod.memory.usage",
|
||||
attributes: {
|
||||
"k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.cluster.name": clusterIdentifier,
|
||||
"resource.k8s.statefulset.name": statefulSetName,
|
||||
},
|
||||
aggegationType: AggregationType.Avg,
|
||||
|
||||
Reference in New Issue
Block a user