Skip to content

Commit ceffb5c

Browse files
committed
Add microshift_version specific metric
1 parent 4c531d1 commit ceffb5c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ whitelisted_metrics: $(GOJSONTOYAML) $(GOJQ) configuration/telemeter/metrics.jso
112112
configuration/telemeter/metrics.json:
113113
@echo ">>>>> Running whitelisted_metrics"
114114
# Download the latest metrics file to extract the new added metrics.
115-
# NOTE: Because old clusters could still send metrics the whitelisting is append only
115+
# NOTE: Because old clusters could still send metrics the whitelisting is append only.
116+
# This is also applicable to clusters using direct write requests instead of the telemeter client.
116117
# (configuration/telemeter/metrics.json).
117118
curl -q https://raw.githubusercontent.com/openshift/cluster-monitoring-operator/master/manifests/0000_50_cluster-monitoring-operator_04-config.yaml | \
118119
$(GOJSONTOYAML) -yamltojson | \

configuration/telemeter/metrics.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -192,5 +192,6 @@
192192
"{__name__=\"vendor_model:node_accelerator_cards:sum\",vendor=~\"NVIDIA|AMD|GAUDI|INTEL|QUALCOMM\"}",
193193
"{__name__=\"workload:cpu_usage_cores:sum\"}",
194194
"{__name__=\"workload:memory_usage_bytes:sum\"}",
195-
"{__name__=~\"cluster:usage:.*\"}"
195+
"{__name__=~\"cluster:usage:.*\"}",
196+
"{__name__=\"microshift_version\"}"
196197
]

resources/services/telemeter-template.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ objects:
287287
- --whitelist={__name__="workload:cpu_usage_cores:sum"}
288288
- --whitelist={__name__="workload:memory_usage_bytes:sum"}
289289
- --whitelist={__name__=~"cluster:usage:.*"}
290+
- --whitelist={__name__="microshift_version"}
290291
- --elide-label=prometheus_replica
291292
- --log-level=${TELEMETER_LOG_LEVEL}
292293
- --token-expire-seconds=${TELEMETER_SERVER_TOKEN_EXPIRE_SECONDS}
@@ -578,6 +579,7 @@ objects:
578579
- --whitelist={__name__="workload:cpu_usage_cores:sum"}
579580
- --whitelist={__name__="workload:memory_usage_bytes:sum"}
580581
- --whitelist={__name__=~"cluster:usage:.*"}
582+
- --whitelist={__name__="microshift_version"}
581583
- --elide-label=prometheus_replica
582584
- --log-level=${TELEMETER_LOG_LEVEL}
583585
- --token-expire-seconds=${TELEMETER_SERVER_TOKEN_EXPIRE_SECONDS}

0 commit comments

Comments
 (0)