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
579 B
YAML
19 lines
579 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_BKP=$(envdir "/run/etc/wal-e.d/env" wal-g backup-list --detail --json | jq -r .[-1].finish_time)
|
|
|
|
LAST_BKP_DATE_IN_UNIXSEC=$(date -d ${LAST_BKP} +"%s")
|
|
|
|
STAGE={{ .Release.Name }}
|
|
echo "pg_basebackup_successful_timestamp_${STAGE} ${LAST_BKP_DATE_IN_UNIXSEC}" | curl --data-binary @- "{{ .Values.postgres.monitoring.prometheusPushgatewayURL }}"
|