Skip to content

Commit

Permalink
Merge pull request #1307 from arooshap/helm-check-metric
Browse files Browse the repository at this point in the history
Helm check metric for services in dbs, dmwm, crab, wma, tzero, http namespaces.
  • Loading branch information
muhammadimranfarooqi authored Feb 14, 2023
2 parents 87c4708 + e0be9fa commit 03ca9b2
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 20 deletions.
2 changes: 1 addition & 1 deletion helm/check-metric/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
37 changes: 34 additions & 3 deletions helm/check-metric/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,40 @@ spec:
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
name: {{ .Chart.Name }}
args:
{{- if eq .Release.Namespace "wma"}}
{{- toYaml .Values.args.wmarchive | nindent 10 }}
{{- end }}
- -metric
{{- if eq .Release.Namespace "dbs"}}
{{ toYaml .Values.dbs.metrics | nindent 10}}
- -value
{{- toYaml .Values.dbs.values | nindent 10}}
{{- else if eq .Release.Namespace "dmwm"}}
{{- toYaml .Values.dmwm.metrics | nindent 10}}
- -value
{{- toYaml .Values.dmwm.values | nindent 10}}
{{- else if eq .Release.Namespace "wma"}}
{{- toYaml .Values.wma.metrics | nindent 10}}
- -value
{{- toYaml .Values.wma.values | nindent 10}}
{{- else if eq .Release.Namespace "http"}}
{{- toYaml .Values.http.metrics | nindent 10}}
- -value
{{- toYaml .Values.http.values | nindent 10}}
{{- else if eq .Release.Namespace "tzero"}}
{{- toYaml .Values.tzero.metrics | nindent 10}}
- -value
{{- toYaml .Values.tzero.values | nindent 10}}

{{- else }}
- "NULL"
{{- end }}
- -url
- "http://prometheus-service.monitoring.svc.cluster.local:8080"
- -kubectl
- "/data/kubectl"
- -interval
- "60"
- verbose
- "2"

imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
48 changes: 32 additions & 16 deletions helm/check-metric/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@

replicaCount: 1

dbs:
metrics:
- "dbsmigration_total_connections,dbs_migrate_total_connections,dbs_global_total_connections,dbs_globalW_total_connections,dbs_phys03R_total_connections,dbs_phys03W_total_connections,dbs2go_total_connections,dbs2go_global_migrate_total_connections,dbs2go_global_migration_total_connections,dbs2go_phys03_migrate_total_connections,dbs2go_phys03_migration_total_connections,dbs2go_phys03_reader_total_connections,dbs2go_phys03_writer_total_connections"
values:
- "1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000"
dmwm:
metrics:
- "t0reqmon_exporter_total_connections,reqmgr2_total_connections,ms_ruleCleaner_total_connections,ms_transferor_total_connections,ms_monitor_total_connections,ms_output_total_connections,ms_unmerged_total_connections,wmstats_total_connections"
values:
- "1000,1000,1000,1000,1000,1000,1000,1000"
tzero:
metrics:
- "t0wmadatasvc_exporter_total_connections"
values:
- "1000"
wma:
metrics:
- "wma_exporter_total_connections"
values:
- "1000"
crab:
metrics:
- "crabserver_total_connections"
values:
- "1000"
http:
metrics:
- "http_requests_total"
values:
- "1000"


image:
repository: registry.cern.ch/cmsweb/check-metric
pullPolicy: Always
Expand All @@ -14,22 +46,6 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

args:
wmarchive:
- /data/check-metric
- -url
- "http://prometheus-service.monitoring.svc.cluster.local:8080"
- -metric
- "wma_exporter_total_connections"
- -value
- "1000"
- -kubectl
- "/data/kubectl"
- -interval
- "60"
- verbose
- "2"

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit 03ca9b2

Please sign in to comment.