Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
fa961f48f0
|
|||
|
44159904b2
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
run.sh
|
||||||
@@ -12,7 +12,7 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- |
|
- |
|
||||||
helm upgrade --install -n system pg-backup ./pg_backup \
|
helm upgrade --install -n system pg-backup ./pg_backup \
|
||||||
--set "image.tag=0.0.8" \
|
--set "image.tag=0.0.9" \
|
||||||
--set "postgres_host=db.mak-sim.ru" \
|
--set "postgres_host=db.mak-sim.ru" \
|
||||||
--set postgres_password=$POSTGRES_PASSWORD \
|
--set postgres_password=$POSTGRES_PASSWORD \
|
||||||
--set "aws_access_key_id=$AWS_ACCESS_KEY_ID" \
|
--set "aws_access_key_id=$AWS_ACCESS_KEY_ID" \
|
||||||
|
|||||||
@@ -15,12 +15,22 @@ POSTGRES_PORT="${POSTGRES_PORT:-5432}"
|
|||||||
POSTGRES_SSL_MODE=${POSTGRES_SSL_MODE:-"require"}
|
POSTGRES_SSL_MODE=${POSTGRES_SSL_MODE:-"require"}
|
||||||
RESTIC_TAG=${RESTIC_TAG:-"pg_basebackup"}
|
RESTIC_TAG=${RESTIC_TAG:-"pg_basebackup"}
|
||||||
|
|
||||||
LOKI_URL="http://loki.montoring:3100/loki/api/v1/push"
|
LOKI_URL="http://loki.monitoring:3100/loki/api/v1/push"
|
||||||
SERVICE_NAME="pg_backup"
|
SERVICE_NAME="pg_backup"
|
||||||
|
|
||||||
send_loki_status() {
|
send_loki_status() {
|
||||||
local status="$1"
|
local status="$1"
|
||||||
local timestamp_ns=$(date +%s%N)
|
local timestamp_ns=$(date +%s%N)
|
||||||
|
echo "{
|
||||||
|
\"streams\": [
|
||||||
|
{
|
||||||
|
\"stream\": { \"service_name\": \"$SERVICE_NAME\" },
|
||||||
|
\"values\": [
|
||||||
|
[ \"$timestamp_ns\", \"$status\" ]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}"
|
||||||
curl -H "Content-Type: application/json" \
|
curl -H "Content-Type: application/json" \
|
||||||
-s -X POST "$LOKI_URL" \
|
-s -X POST "$LOKI_URL" \
|
||||||
--data-raw "{
|
--data-raw "{
|
||||||
|
|||||||
Reference in New Issue
Block a user