Elukey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383557 )

Change subject: profile::kafka::broker::monitoring: refactor prometheus metric 
names
......................................................................

profile::kafka::broker::monitoring: refactor prometheus metric names

Bug: T177078
Change-Id: I02cb3bbc761ff20ebd3b0d0bfde1433abf137c1c
---
M modules/profile/files/kafka/broker_prometheus_jmx_exporter.yaml
M modules/profile/manifests/kafka/broker/monitoring.pp
2 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/57/383557/1

diff --git a/modules/profile/files/kafka/broker_prometheus_jmx_exporter.yaml 
b/modules/profile/files/kafka/broker_prometheus_jmx_exporter.yaml
index afd7f00..9ef14bb 100644
--- a/modules/profile/files/kafka/broker_prometheus_jmx_exporter.yaml
+++ b/modules/profile/files/kafka/broker_prometheus_jmx_exporter.yaml
@@ -1,6 +1,11 @@
 ---
 lowercaseOutputLabelNames: true
-lowercaseOutputName: true
+# The following setting allows the creation of metrics like:
+# kafka_server_ReplicaManager_UnderReplicatedPartitions
+# that are a mix of lower-case and camel-case. This is a convention used only
+# for kafka related metrics to allow a better readability, more context about
+# the discussion to establish a convention in T177078.
+lowercaseOutputName: false
 rules:
 - pattern : kafka.cluster<type=(.+), name=(.+), topic=(.+), 
partition=(.+)><>Value
   name: kafka_cluster_$1_$2
diff --git a/modules/profile/manifests/kafka/broker/monitoring.pp 
b/modules/profile/manifests/kafka/broker/monitoring.pp
index 961da8b..41f71b4 100644
--- a/modules/profile/manifests/kafka/broker/monitoring.pp
+++ b/modules/profile/manifests/kafka/broker/monitoring.pp
@@ -65,7 +65,7 @@
     # 
https://grafana.wikimedia.org/dashboard/db/prometheus-kafka?panelId=29&fullscreen
     monitoring::check_prometheus { 'kafka_broker_under_replicated_partitions':
         description    => 'Kafka Broker Under Replicated Partitions',
-        query          => 
"scalar(avg_over_time(kafka_server_replicamanager_underreplicatedpartitions{${prometheus_labels}}[30m]))",
+        query          => 
"scalar(avg_over_time(kafka_server_ReplicaManager_UnderReplicatedPartitions{${prometheus_labels}}[30m]))",
         warning        => 5,
         critical       => 10,
         prometheus_url => "http://prometheus.svc.${::site}.wmnet/ops";,
@@ -75,7 +75,7 @@
     # 
https://grafana.wikimedia.org/dashboard/db/prometheus-kafka?panelId=16&fullscreen
     monitoring::check_prometheus { 'kafka_broker_replica_max_lag':
         description    => 'Kafka Broker Replica Max Lag',
-        query          => 
"scalar(avg_over_time(kafka_server_replicafetchermanager_maxlag{${prometheus_labels}}[30m]))",
+        query          => 
"scalar(avg_over_time(kafka_server_ReplicaFetcherManager_MaxLag{${prometheus_labels}}[30m]))",
         warning        => $replica_maxlag_warning,
         critical       => $replica_maxlag_critical,
         prometheus_url => "http://prometheus.svc.${::site}.wmnet/ops";,

-- 
To view, visit https://gerrit.wikimedia.org/r/383557
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02cb3bbc761ff20ebd3b0d0bfde1433abf137c1c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Elukey <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to