Skip to content

Commit cd1b858

Browse files
helm upgrade and uninstall metric gathering (#657)
Signed-off-by: Kartikey Mamgain <[email protected]> Signed-off-by: Kartikey Mamgain <[email protected]>
1 parent e8107ac commit cd1b858

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

docs/gathered-data.md

+4
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,8 @@ Gathered metrics:
568568
vsphere_node_hw_version_total
569569
namespace CPU and memory usage
570570
console_helm_installs_total
571+
console_helm_upgrades_total
572+
console_helm_uninstalls_total
571573
followed by at most 1000 lines of ALERTS metric
572574

573575
* Location in archive: config/metrics
@@ -582,6 +584,8 @@ Gathered metrics:
582584
- "virt_platform metric": 4.6.34+, 4.7.16+, 4.8+
583585
- "vsphere_node_hw_version_total": 4.7.11+, 4.8+
584586
- "console_helm_installs_total": 4.11+
587+
- "console_helm_upgrades_total": 4.12+
588+
- "console_helm_uninstalls_total": 4.12+
585589

586590

587591
## MutatingWebhookConfigurations

docs/insights-archive-sample/config/metrics

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# TYPE cluster_installer untyped
22
cluster_installer{endpoint="metrics",instance="10.0.0.4:9099",invoker="openshift-internal-ci/release-openshift-origin-installer-launch-gcp/1275022284997791744",job="cluster-version-operator",namespace="openshift-cluster-version",pod="cluster-version-operator-5f7b8d89b5-t9cdr",service="cluster-version-operator",type="openshift-install",version="v4.4.0",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-1"} 1 1592829361218
3+
# TYPE console_helm_installs_total untyped
4+
console_helm_installs_total{chart_name="elasticsearch-sed",chart_version="1.0.0",container="console",endpoint="https",instance="10.129.0.63:8443",job="console",namespace="openshift-console",pod="console-8d5d6d756-6nscn",service="console",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1660729192308
5+
console_helm_installs_total{chart_name="redis-sed",chart_version="1.0.1",container="console",endpoint="https",instance="10.129.0.63:8443",job="console",namespace="openshift-console",pod="console-8d5d6d756-6nscn",service="console",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1660729192308
6+
# TYPE console_helm_uninstalls_total untyped
7+
console_helm_uninstalls_total{chart_name="redis-sed",chart_version="1.0.1",container="console",endpoint="https",instance="10.129.0.63:8443",job="console",namespace="openshift-console",pod="console-8d5d6d756-6nscn",service="console",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1660729192308
8+
# TYPE console_helm_upgrades_total untyped
9+
console_helm_upgrades_total{chart_name="elasticsearch-sed",chart_version="1.0.0",container="console",endpoint="https",instance="10.129.0.63:8443",job="console",namespace="openshift-console",pod="console-8d5d6d756-6nscn",service="console",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1660729192308
10+
console_helm_upgrades_total{chart_name="redis-sed",chart_version="1.0.1",container="console",endpoint="https",instance="10.129.0.63:8443",job="console",namespace="openshift-console",pod="console-8d5d6d756-6nscn",service="console",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1660729192308
311
# TYPE etcd_object_counts untyped
412
etcd_object_counts{apiserver="kube-apiserver",endpoint="https",instance="10.0.0.3:6443",job="apiserver",namespace="default",resource="dnses.operator.openshift.io",service="kubernetes",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-1"} 1 1592829364899
513
etcd_object_counts{apiserver="kube-apiserver",endpoint="https",instance="10.0.0.3:6443",job="apiserver",namespace="default",resource="apiservers.config.openshift.io",service="kubernetes",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-1"} 1 1592829364899

pkg/gatherers/clusterconfig/recent_metrics.go

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const (
3232
// vsphere_node_hw_version_total
3333
// namespace CPU and memory usage
3434
// console_helm_installs_total
35+
// console_helm_upgrades_total
36+
// console_helm_uninstalls_total
3537
// followed by at most 1000 lines of ALERTS metric
3638
//
3739
// * Location in archive: config/metrics
@@ -46,6 +48,8 @@ const (
4648
// - "virt_platform metric": 4.6.34+, 4.7.16+, 4.8+
4749
// - "vsphere_node_hw_version_total": 4.7.11+, 4.8+
4850
// - "console_helm_installs_total": 4.11+
51+
// - "console_helm_upgrades_total": 4.12+
52+
// - "console_helm_uninstalls_total": 4.12+
4953
func (g *Gatherer) GatherMostRecentMetrics(ctx context.Context) ([]record.Record, []error) {
5054
metricsRESTClient, err := rest.RESTClientFor(g.metricsGatherKubeConfig)
5155
if err != nil {
@@ -65,6 +69,8 @@ func gatherMostRecentMetrics(ctx context.Context, metricsClient rest.Interface)
6569
Param("match[]", "vsphere_node_hw_version_total").
6670
Param("match[]", "virt_platform").
6771
Param("match[]", "console_helm_installs_total").
72+
Param("match[]", "console_helm_upgrades_total").
73+
Param("match[]", "console_helm_uninstalls_total").
6874
DoRaw(ctx)
6975
if err != nil {
7076
klog.Errorf("Unable to retrieve most recent metrics: %v", err)

0 commit comments

Comments
 (0)