Skip to content

Instantly share code, notes, and snippets.

View AeroBytesNL's full-sized avatar
👨‍💻
My RC planes are in the sky and my code is in the clouds.

AeroBytes AeroBytesNL

👨‍💻
My RC planes are in the sky and my code is in the clouds.
View GitHub Profile
@johnhout
johnhout / Readme.md
Last active June 20, 2024 19:02
Laravel dutch validation translation file.
@ssimpson89
ssimpson89 / MySQL Replication Check
Last active July 21, 2024 15:05
Just a simple Mysql Replication Health Check script I wrote. You can put this in a cron.
#!/bin/bash
### VARIABLES ### \
EMAIL=""
SERVER=$(hostname)
MYSQL_CHECK=$(mysql -e "SHOW VARIABLES LIKE '%version%';" || echo 1)
LAST_ERRNO=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Last_Errno" | awk '{ print $2 }')
SECONDS_BEHIND_MASTER=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G"| grep "Seconds_Behind_Master" | awk '{ print $2 }')
IO_IS_RUNNING=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Slave_IO_Running" | awk '{ print $2 }')
SQL_IS_RUNNING=$(/usr/bin/mysql -e "SHOW SLAVE STATUS\G" | grep "Slave_SQL_Running" | awk '{ print $2 }')