This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import socket | |
import logging | |
from rfc5424logging import Rfc5424SysLogHandler | |
logger = logging.getLogger("promtail") | |
rfc5424Handler = Rfc5424SysLogHandler(address=('syslog.example.com', 514), socktype=socket.SOCK_STREAM) | |
rfc5424Handler.setLevel(logging.DEBUG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import socket | |
import logging | |
from rfc5424logging import Rfc5424SysLogHandler | |
logger = logging.getLogger("promtail") | |
rfc5424Handler = Rfc5424SysLogHandler(address=('syslog.example.com', 514), socktype=socket.SOCK_DGRAM) | |
rfc5424Handler.setLevel(logging.DEBUG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# script was taken from https://gist.github.com/innovia/fbba8259042f71db98ea8d4ad19bd708 and adjusted with "apply_rbac" function and colorized output | |
set -e | |
set -o pipefail | |
# Colors | |
RED="\e[01;31m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# uses ~/.my.cnf file for credentials | |
TMPFILE="/tmp/xtrabackup-runner.$$.tmp" | |
#USEROPTIONS="--user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST}" | |
BACKDIR=/srv/mysql-bak | |
BASEBACKDIR=$BACKDIR/base | |
INCRBACKDIR=$BACKDIR/incr | |
FULLBACKUPCYCLE=604800 # Create a new full backup every X seconds |