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
[Galera] | |
title=Galera | |
description=Galera cluster. 'ufw allow from x.x.x.x to any app Galera' to add node x.x.xx to the cluster. | |
# | |
# 4567 - is the port other nodes will use to check if this node is synced | |
# and available to become a donor. | |
# 4568 - is used by snapshot state transfer (SST) i.e. copy of all data. | |
# 4444 - used by rsync. | |
# 3306 - the mysql port | |
# |
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
top -b -n 1 | awk '{if (NR <=7) print; else if ($8 == "D") {print; count++} } END {print "Total status D: "count}' |
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/bash | |
grep "Accepted .* for " /var/log/messages | awk '{print $9, $11}' | egrep -v "nagios|bb|172\.|10\.|192\.168\." | sort | uniq | while read u | |
do | |
AUSER=`echo $u | awk '{print $1}'` | |
AIP=`echo $u | awk '{print $2}'` | |
COUNTRY=`geoip-lookup $AIP` | |
#echo $AUSER $COUNTRY $AIP | |
echo $AUSER $COUNTRY | |
done | sort | uniq -c | sort -n |
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
On every node in gluster. Turn /scratch disk into brick. | |
b01b01:~ # df -h /scratch | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/sda5 243G 6.8G 224G 3% /scratch | |
umount /scratch | |
mkfs.xfs -f -i size=512 /dev/sda5 |
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/bash | |
for h in `ls -d1 /home/*` | |
do | |
TUSER=`basename $h` | |
if ! getent passwd $TUSER 2> /dev/null | awk -F: '{print $7}' | grep -v "/bin/bash" | |
then | |
if [ -d $h -a ! -e $h/.profile ] | |
then | |
( su - $TUSER -c "cp /etc/skel/.profile $h" ) && ls -1d $h/.profile | |
else |
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
static inline u_char *get_rdns_hostname(ngx_http_request_t *r); | |
//ctx->connection->remote_host = NULL; | |
ctx->connection->remote_host = (char *)get_rdns_hostname(r); | |
static inline u_char * | |
get_rdns_hostname(ngx_http_request_t *r){ |
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
#--------------------------------------------------------------------------- | |
# @(#)$Id$ | |
#title :/etc/haproxy/haproxy.cfg | |
#description :ftmon cluster haproxy config. NGINX and XtraDB Cluster backend | |
#author :Danny W Sheehan | |
#date :July 2014 | |
#website :ftmon.org | |
# | |
# This is a work in progress. A lot of trial and error and man hours have | |
# gone into this configuration. I have referenced sources that have been |
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
#--------------------------------------------------------------------------- | |
# @(#)$Id$ | |
#title :/etc/nginx/nginx.cfg | |
#description :ftmon cluster nginx config. HAPROXY frontend. | |
#author :Danny W Sheehan | |
#date :July 2014 | |
#website :ftmon.org | |
# | |
# This is a work in progress. A lot of trial and error and man hours have | |
# gone into this configuration. I have referenced sources that have been |
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
#--------------------------------------------------------------------------- | |
# @(#)$Id$ | |
#title :/etc/nginx/common/nginx.conf | |
#description :ftmon cluster nginx common config for all sites. | |
#author :Danny W Sheehan | |
#date :July 2014 | |
#website :ftmon.org | |
# | |
# This is a work in progress. A lot of trial and error and man hours have | |
# gone into this configuration. I have referenced sources that have been |
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
#--------------------------------------------------------------------------- | |
# @(#)$Id$ | |
#title :/etc/nginx/common/wpcommon.conf | |
#description :ftmon cluster nginx common configurations for Wordpress. | |
#author :Danny W Sheehan | |
#date :July 2014 | |
#website :ftmon.org | |
# | |
# This is a work in progress. A lot of trial and error and man hours have | |
# gone into this configuration. I have referenced sources that have been |
OlderNewer