Loading README.md +11 −1 Original line number Diff line number Diff line Loading @@ -19,3 +19,13 @@ PushGateWay. | PUSHGATEWAY_HOST | PushGateWay hostname | pushgateway:9091 | | PUSHGATEWAY_JOB | PushGateWay job name | POSTGRES_HOSTNAME | | GZIP | Compression ratio | -9 | # Metrics | Name | Description | |:--------------------------------------------------------: |:--------------------------------------------------------: | | backup_db{label="redmic"} | Outcome of the backup database job (0=failed, 1=success) | | backup_duration_seconds{label="redmic",stage="dump"} | Duration of create dump execution in seconds | | backup_duration_seconds{label="redmic",stage="compress"} | Duration of compress dump execution in seconds | | backup_duration_seconds{label="redmic",stage="upload"} | Duration of upload backup to S3 execution in seconds | | backup_size_bytes{label="redmic"} | Duration of the script execution in seconds | | backup_created_date_seconds{label="redmic"} | Created date in seconds | No newline at end of file scripts/docker-entrypoint.sh +3 −3 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ function compress() { echo "Compressing backup" local start_seconds=${SECONDS} tar czf ${ZIP_FILENAME} ${DUMP_FILENAME} tar czfj ${ZIP_FILENAME} ${DUMP_FILENAME} COMPRESS_DURATION_SECONDS=$(( SECONDS - start_seconds )) COMPRESS_SIZE=$( size_file "${ZIP_FILENAME}" ) Loading Loading @@ -126,9 +126,9 @@ backup_duration_seconds{label="${POSTGRES_HOSTNAME}",stage="upload"} ${UPLOAD_DU # HELP backup_duration_seconds_total duration of the script execution in seconds. # TYPE backup_duration_seconds_total gauge backup_duration_seconds_total{label="${POSTGRES_HOSTNAME}"} ${BACKUP_DURATION_SECONDS:-0} # HELP backup_size size of dump. # HELP backup_size size of backup in bytes. # TYPE backup_size gauge backup_size{label="${POSTGRES_HOSTNAME}"} ${COMPRESS_SIZE:-0} backup_size_bytes{label="${POSTGRES_HOSTNAME}"} ${COMPRESS_SIZE:-0} # HELP backup_created_date_seconds created date in seconds. # TYPE backup_created_date_seconds gauge backup_created_date_seconds{label="${POSTGRES_HOSTNAME}"} ${CREATED_DATE_SECONDS} Loading Loading
README.md +11 −1 Original line number Diff line number Diff line Loading @@ -19,3 +19,13 @@ PushGateWay. | PUSHGATEWAY_HOST | PushGateWay hostname | pushgateway:9091 | | PUSHGATEWAY_JOB | PushGateWay job name | POSTGRES_HOSTNAME | | GZIP | Compression ratio | -9 | # Metrics | Name | Description | |:--------------------------------------------------------: |:--------------------------------------------------------: | | backup_db{label="redmic"} | Outcome of the backup database job (0=failed, 1=success) | | backup_duration_seconds{label="redmic",stage="dump"} | Duration of create dump execution in seconds | | backup_duration_seconds{label="redmic",stage="compress"} | Duration of compress dump execution in seconds | | backup_duration_seconds{label="redmic",stage="upload"} | Duration of upload backup to S3 execution in seconds | | backup_size_bytes{label="redmic"} | Duration of the script execution in seconds | | backup_created_date_seconds{label="redmic"} | Created date in seconds | No newline at end of file
scripts/docker-entrypoint.sh +3 −3 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ function compress() { echo "Compressing backup" local start_seconds=${SECONDS} tar czf ${ZIP_FILENAME} ${DUMP_FILENAME} tar czfj ${ZIP_FILENAME} ${DUMP_FILENAME} COMPRESS_DURATION_SECONDS=$(( SECONDS - start_seconds )) COMPRESS_SIZE=$( size_file "${ZIP_FILENAME}" ) Loading Loading @@ -126,9 +126,9 @@ backup_duration_seconds{label="${POSTGRES_HOSTNAME}",stage="upload"} ${UPLOAD_DU # HELP backup_duration_seconds_total duration of the script execution in seconds. # TYPE backup_duration_seconds_total gauge backup_duration_seconds_total{label="${POSTGRES_HOSTNAME}"} ${BACKUP_DURATION_SECONDS:-0} # HELP backup_size size of dump. # HELP backup_size size of backup in bytes. # TYPE backup_size gauge backup_size{label="${POSTGRES_HOSTNAME}"} ${COMPRESS_SIZE:-0} backup_size_bytes{label="${POSTGRES_HOSTNAME}"} ${COMPRESS_SIZE:-0} # HELP backup_created_date_seconds created date in seconds. # TYPE backup_created_date_seconds gauge backup_created_date_seconds{label="${POSTGRES_HOSTNAME}"} ${CREATED_DATE_SECONDS} Loading