From 8cc3b5560b50125d2c58f0b50106617f102b70e4 Mon Sep 17 00:00:00 2001 From: kaliraja <34502260+Kaali09@users.noreply.github.com> Date: Thu, 17 Dec 2020 17:19:20 +0530 Subject: [PATCH] Exporter fix (#2099) * Issue: #0000: updated the alertrules manifests * Issue: #0000: updated the vars * Issue: #0000: added the spark cluster var --- .../ansible/roles/sunbird-monitoring/defaults/main.yml | 4 ++++ .../templates/azure-ambari-prometheus-exporter.yaml | 4 ++-- .../templates/alerRules.yaml | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 0b96e7c681..2dbf48b503 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -211,3 +211,7 @@ druid_raw_ingestion_lag_threshold: 200000 druid_rollup_ingestion_lag_threshold: 200000 rollup_druid_datasource: "" redis_process_names: "" + +vault_azure_spark_cluster_http_password: "" +azure_spark_cluster_http_password: {{ vault_azure_spark_cluster_http_password }} + diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/azure-ambari-prometheus-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/azure-ambari-prometheus-exporter.yaml index a6ee4ed5b5..5923bb5a0e 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/azure-ambari-prometheus-exporter.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/azure-ambari-prometheus-exporter.yaml @@ -5,9 +5,9 @@ env: # metrics_url - get metrics for all metrics for hdinsight cluster for each component metrics_url: "http://{{env}}-spark-cluster.azurehdinsight.net/api/v1/clusters/{{env}}-spark-cluster/host_components?fields=metrics/*" # alert_url - get alert count for the cluster (critical,ok etc) - alert_url: "http://{{env}}-spark-cluster.azurehdinsight.net/api/v1/clusters/{{env}}-spark-cluster/alerts?format=summary + alert_url: "http://{{env}}-spark-cluster.azurehdinsight.net/api/v1/clusters/{{env}}-spark-cluster/alerts?format=summary" # cluster_app_history_url - get the history of applications that run so far in cluster - app_history_url: "http://{{env}}-spark-cluster.azurehdinsight.net/api/v1/applications + app_history_url: "http://{{env}}-spark-cluster.azurehdinsight.net/api/v1/applications" # user name for azure hdcluster user: admin # password for azure hdcluster diff --git a/kubernetes/helm_charts/monitoring/azure-ambari-prometheus-exporter/templates/alerRules.yaml b/kubernetes/helm_charts/monitoring/azure-ambari-prometheus-exporter/templates/alerRules.yaml index afd846b99c..8a6be2921e 100644 --- a/kubernetes/helm_charts/monitoring/azure-ambari-prometheus-exporter/templates/alerRules.yaml +++ b/kubernetes/helm_charts/monitoring/azure-ambari-prometheus-exporter/templates/alerRules.yaml @@ -3,8 +3,9 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: labels: - {{- include "azure-ambari-prometheus-exporter.labels" . | nindent 4 }} - {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} + role: alert-rules + app: {{ .Values.serviceMonitorLabels.release }} + release: {{ .Values.serviceMonitorLabels.release }} name: {{ include "azure-ambari-prometheus-exporter.fullname" . }}-alertrule namespace: {{ default .Values.namespace .Release.Namespace }} spec: