Skip to content

Commit

Permalink
[release 4.7] Bug 1960645: Adds virt_platform metric to the collected…
Browse files Browse the repository at this point in the history
… metrics (#428)

* Adds virt_platform metric to the collected metrics

* e2e test fix
  • Loading branch information
0sewa0 committed May 26, 2021
1 parent b0817c9 commit e7955cf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/gathered-data.md
Expand Up @@ -271,6 +271,7 @@ gathers cluster Federated Monitoring metrics.

The GET REST query to URL /federate
Gathered metrics:
virt_platform
etcd_object_counts
cluster_installer
vsphere_node_hw_version_total
Expand Down
13 changes: 13 additions & 0 deletions docs/insights-archive-sample/config/metrics
Expand Up @@ -4,6 +4,19 @@ ALERTS{alertname="ImagePruningDisabled",alertstate="firing",endpoint="60000",ins
ALERTS{alertname="Watchdog",alertstate="firing",severity="none",instance="",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-1"} 1 1592829360163
# TYPE vsphere_node_hw_version_total untyped
vsphere_node_hw_version_total{container="vsphere-problem-detector-operator",endpoint="vsphere-metrics",hw_version="vmx-13",instance="10.128.0.25:8444",job="vsphere-problem-detector-metrics",namespace="openshift-cluster-storage-operator",pod="vsphere-problem-detector-operator-7f746856d4-78lnn",service="vsphere-problem-detector-metrics",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 6 1619708403480
# TYPE virt_platform untyped
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-worker-d-qxxn8",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-kprf8",service="node-exporter",type="gcp",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977248110
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-worker-d-qxxn8",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-kprf8",service="node-exporter",type="kvm",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977248110
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-master-2",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-n472d",service="node-exporter",type="gcp",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977249637
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-master-2",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-n472d",service="node-exporter",type="kvm",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977249637
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-master-0",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-2dsf2",service="node-exporter",type="kvm",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977246807
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-worker-c-44ttf",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-56fn6",service="node-exporter",type="kvm",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977240435
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-master-1",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-wkqcq",service="node-exporter",type="gcp",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977244424
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-master-1",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-wkqcq",service="node-exporter",type="kvm",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977244424
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-worker-b-94cjz",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-dmnrm",service="node-exporter",type="gcp",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977245743
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-worker-b-94cjz",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-dmnrm",service="node-exporter",type="kvm",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977245743
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-master-0",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-2dsf2",service="node-exporter",type="gcp",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977246807
virt_platform{container="kube-rbac-proxy",endpoint="https",instance="ci-ln-k19wbxk-f76d1-6qdmf-worker-c-44ttf",job="node-exporter",namespace="openshift-monitoring",pod="node-exporter-56fn6",service="node-exporter",type="gcp",prometheus="openshift-monitoring/k8s",prometheus_replica="prometheus-k8s-0"} 1 1620977240435
# TYPE cluster_installer untyped
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
# TYPE etcd_object_counts untyped
Expand Down
2 changes: 2 additions & 0 deletions pkg/gather/clusterconfig/recent_metrics.go
Expand Up @@ -24,6 +24,7 @@ const (
//
// The GET REST query to URL /federate
// Gathered metrics:
// virt_platform
// etcd_object_counts
// cluster_installer
// vsphere_node_hw_version_total
Expand Down Expand Up @@ -57,6 +58,7 @@ func gatherMostRecentMetrics(ctx context.Context, metricsClient rest.Interface)
Param("match[]", "namespace:container_cpu_usage_seconds_total:sum_rate").
Param("match[]", "namespace:container_memory_usage_bytes:sum").
Param("match[]", "vsphere_node_hw_version_total").
Param("match[]", "virt_platform").
DoRaw(ctx)
if err != nil {
// write metrics errors to the file format as a comment
Expand Down
2 changes: 1 addition & 1 deletion test/integration/bugs_test.go
Expand Up @@ -17,7 +17,7 @@ const knownFileSuffixesInsideArchiveRegex string = `(` +
`\.(crt|json|log)` +
`|` +
// exceptions - file names without extension
`(\/|^)(config|id|invoker|metrics|version)` +
`(\/|^)(config|id|invoker|metrics|version|endTime|startTime)` +
`)$`

//https://bugzilla.redhat.com/show_bug.cgi?id=1841057
Expand Down

0 comments on commit e7955cf

Please sign in to comment.