You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
665 B
YAML
19 lines
665 B
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: backup-monitoring-script
|
|
data:
|
|
backup-monitoring.sh: |
|
|
#!/bin/bash
|
|
#
|
|
#
|
|
|
|
echo "`date` INFO script was executed" >> /tmp/monitoring_cron_status.log
|
|
|
|
LAST_BASE_BACKUP_MODIFIED_DATE=$(envdir "/run/etc/wal-e.d/env" wal-g backup-list | grep base_ | tail -n 1 | awk '{print $2}')
|
|
|
|
LAST_BASE_BACKUP_DATE_IN_UNIXSEC=$(date -d ${LAST_BASE_BACKUP_MODIFIED_DATE} +"%s")
|
|
|
|
STAGE={{ .Release.Name | lower | replace "-" "_" }}
|
|
echo "pg_basebackup_successful_timestamp_${STAGE} $LAST_BASE_BACKUP_DATE_IN_UNIXSEC" | curl --data-binary @- "{{ .Values.postgres.monitoring.prometheusPushgatewayURL }}"
|