Skip to content

Commit 8a39dd6

Browse files
committed
add console helm install metrics to gatherer function
Signed-off-by: Kartikey Mamgain <[email protected]>
1 parent 9ff994b commit 8a39dd6

File tree

4 files changed

+5
-74
lines changed

4 files changed

+5
-74
lines changed

docs/gathered-data.md

+2
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ Gathered metrics:
511511
cluster_installer
512512
vsphere_node_hw_version_total
513513
namespace CPU and memory usage
514+
console_helm_installs_total
514515
followed by at most 1000 lines of ALERTS metric
515516

516517
* Location in archive: config/metrics
@@ -524,6 +525,7 @@ Gathered metrics:
524525
- "namespace:container_memory_usage_bytes:sum": 4.5+
525526
- "virt_platform metric": 4.6.34+, 4.7.16+, 4.8+
526527
- "vsphere_node_hw_version_total": 4.7.11+, 4.8+
528+
- "console_helm_installs_total": 4.8+
527529

528530

529531
## MutatingWebhookConfigurations

pkg/gatherers/clusterconfig/clusterconfig_gatherer.go

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ var gatheringFunctions = map[string]gathererFuncPtr{
7979
"image": (*Gatherer).GatherClusterImage,
8080
"kube_controller_manager_logs": (*Gatherer).GatherKubeControllerManagerLogs,
8181
"overlapping_namespace_uids": (*Gatherer).GatherNamespacesWithOverlappingUIDs,
82-
"console_helm_installs_total": (*Gatherer).GatherMetricsForHelmInstalls,
8382
}
8483

8584
func New(

pkg/gatherers/clusterconfig/helm_metrics.go

-73
This file was deleted.

pkg/gatherers/clusterconfig/recent_metrics.go

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const (
3030
// cluster_installer
3131
// vsphere_node_hw_version_total
3232
// namespace CPU and memory usage
33+
// console_helm_installs_total
3334
// followed by at most 1000 lines of ALERTS metric
3435
//
3536
// * Location in archive: config/metrics
@@ -43,6 +44,7 @@ const (
4344
// - "namespace:container_memory_usage_bytes:sum": 4.5+
4445
// - "virt_platform metric": 4.6.34+, 4.7.16+, 4.8+
4546
// - "vsphere_node_hw_version_total": 4.7.11+, 4.8+
47+
// - "console_helm_installs_total": 4.8+
4648
func (g *Gatherer) GatherMostRecentMetrics(ctx context.Context) ([]record.Record, []error) {
4749
metricsRESTClient, err := rest.RESTClientFor(g.metricsGatherKubeConfig)
4850
if err != nil {
@@ -61,6 +63,7 @@ func gatherMostRecentMetrics(ctx context.Context, metricsClient rest.Interface)
6163
Param("match[]", "namespace:container_memory_usage_bytes:sum").
6264
Param("match[]", "vsphere_node_hw_version_total").
6365
Param("match[]", "virt_platform").
66+
Param("match[]", "console_helm_installs_total").
6467
DoRaw(ctx)
6568
if err != nil {
6669
klog.Errorf("Unable to retrieve most recent metrics: %v", err)

0 commit comments

Comments
 (0)