Skip to content

Commit

Permalink
[backup] push metrics to vmagent
Browse files Browse the repository at this point in the history
  • Loading branch information
msmouse committed Oct 25, 2022
1 parent 0162362 commit 0fbc01a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions terraform/helm/fullnode/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ Create the name of the service account to use
{{ include "aptos-fullnode.fullname" . }}-e{{ .Values.chain.era }}
{{- end -}}

{{- define "backup.pushGateway" -}}
{{- if .Values.backup.pushGateway -}}
{{ .Values.backup.pushGateway }}
{{- define "backup.pushMetricsEndpoint" -}}
{{- if .Values.backup.pushMetricsEndpoint -}}
{{ .Values.backup.pushMetricsEndpoint }}
{{- end -}}
{{- end -}}

Expand Down
2 changes: 1 addition & 1 deletion terraform/helm/fullnode/templates/backup-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
- name: STRUCT_LOG_TCP_ADDR
value: {{ include "backup.loggingAddress" $ | quote }}
- name: PUSH_METRICS_ENDPOINT
value: "{{- include "backup.pushGateway" $ }}/metrics/job/{{- .Values.backup_verify.jobName | default "db_backup_verify" }}"
value: "{{- include "backup.pushMetricsEndpoint" $ }}/api/v1/import/prometheus?extra_label=role={{- .jobName | default "db_backup_verify" }}&extra_label=kubernetes_pod_name={{ include "backup.fullname" . }}-db-backup-verify"
{{- include "backup.backupEnvironment" (dict "config" $.Values.backup.config "era" $.Values.chain.era) | nindent 12 }}
{{- with .Values.backup_verify }}
resources:
Expand Down
4 changes: 2 additions & 2 deletions terraform/helm/fullnode/templates/backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ spec:
value: "1"
- name: STRUCT_LOG_TCP_ADDR
value: {{ include "backup.loggingAddress" $ | quote }}
{{- if (include "backup.pushGateway" $) }}
{{- if (include "backup.pushMetricsEndpoint" $) }}
- name: PUSH_METRICS_ENDPOINT
value: "{{- include "backup.pushGateway" $ }}/metrics/job/{{- .jobName | default "db_backup" }}"
value: "{{- include "backup.pushMetricsEndpoint" $ }}/api/v1/import/prometheus?extra_label=role={{- .jobName | default "db_backup" }}&extra_label=kubernetes_pod_name={{ include "backup.fullname" . }}-db-backup"
{{- end }}
{{- include "backup.backupEnvironment" (dict "config" .config "era" $.Values.chain.era) | nindent 8 }}
volumeMounts:
Expand Down
4 changes: 2 additions & 2 deletions terraform/helm/fullnode/templates/restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ spec:
value: "1"
- name: STRUCT_LOG_TCP_ADDR
value: {{ include "backup.loggingAddress" $ | quote }}
{{- if (include "backup.pushGateway" $) }}
{{- if (include "backup.pushMetricsEndpoint" $) }}
- name: PUSH_METRICS_ENDPOINT
value: "{{- include "backup.pushGateway" $ }}/metrics/job/{{- .jobName | default "db_restore" }}"
value: "{{- include "backup.pushMetricsEndpoint" $ }}/api/v1/import/prometheus?extra_label=role={{- .jobName | default "db_restore" }}&extra_label=kubernetes_pod_name={{ include "backup.fullname" . }}-db-restore"
{{- end }}
- name: CONTROLLER_UID
valueFrom:
Expand Down

0 comments on commit 0fbc01a

Please sign in to comment.