Created
February 18, 2013 08:09
-
-
Save pdt256/4975813 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
sudo apt-get update | |
sudo apt-get install build-essential libapr1-dev libconfuse-dev libexpat1-dev python-dev libpcre3-dev pkg-config | |
GANGLIA_VER=ganglia-3.3.7 | |
cd /usr/local/src && \ | |
sudo chown ubuntu . && \ | |
wget --user ahl --password auto4fun http://ganglia.auto.com/$GANGLIA_VER.tar.gz && \ | |
tar zxf $GANGLIA_VER.tar.gz && \ | |
cd $GANGLIA_VER && \ | |
./configure && make && sudo make install | |
cd && wget --user ahl --password auto4fun http://ganglia.auto.com/gmond.conf | |
sudo mkdir /etc/ganglia | |
sudo mv /home/ubuntu/gmond.conf /etc/ganglia/ && \ | |
sudo ln -sf /etc/ganglia/gmond.conf /usr/local/etc/gmond.conf | |
# don't forget to edit /etc/rc.local | |
# /usr/local/sbin/gmond | |
# prod bastion: 10.0.0.203 | |
sudo mkdir /etc/ganglia/conf.d | |
sudo mkdir /usr/local/lib64/ganglia/python_modules | |
cd /usr/local/lib64/ganglia/python_modules | |
[ ! -f diskstat.py ] && sudo wget --user ahl --password auto4fun http://ganglia.auto.com/diskstat.py | |
cd /etc/ganglia/conf.d/ | |
[ ! -f diskstat.conf ] && sudo wget --user ahl --password auto4fun http://ganglia.auto.com/diskstat.conf | |
# Mysql | |
cd /usr/local/lib64/ganglia/python_modules | |
[ ! -f DBUtil.py ] && sudo wget --user ahl --password auto4fun http://ganglia.auto.com/DBUtil.py | |
[ ! -f mysql.py ] && sudo wget --user ahl --password auto4fun http://ganglia.auto.com/mysql.py | |
cd /etc/ganglia/conf.d/ | |
[ ! -f mysql.conf ] && sudo wget --user ahl --password auto4fun http://ganglia.auto.com/mysql.conf | |
sudo apt-get install python-pip && sudo pip install MySQL-python | |
# Apache | |
cd /usr/local/lib64/ganglia/python_modules | |
#TODO: MOVE THIS TO NAGIOS.AUTO.COM. It as been edited! | |
#[ ! -f httpd.py ] && sudo wget https://raw.github.com/ganglia/gmond_python_modules/master/httpd/python_modules/httpd.py | |
cd /usr/local/src | |
sudo wget https://bitbucket.org/maplebed/ganglia-logtailer/downloads/ganglia-logtailer_1.2-1_amd64.deb | |
sudo dpkg --force-depends -i ganglia-logtailer_1.2-1_amd64.deb | |
sudo apt-get download logtail | |
sudo dpkg --force-depends -i logtail_1.3.14_all.deb | |
cd /usr/share/ganglia-logtailer/ | |
sudo mv ApacheLogtailer.py ApacheLogtailer.py.bak | |
sudo wget --user ahl --password auto4fun http://ganglia.auto.com/ApacheLogtailer.py | |
sudo ln -s /usr/local/bin/gmetric /usr/bin/gmetric | |
# /etc/apache2/sites_enabled/autocom_shared | |
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %D" combined_time | |
CustomLog ${APACHE_LOG_DIR}/auto.log combined_time | |
# crontab | |
*/2 * * * * root ganglia-logtailer --classname ApacheLogtailer --log_file /var/log/apache2/auto.log --mode cron | |
# Memcached | |
cd /usr/local/lib64/ganglia/python_modules/ | |
sudo wget https://raw.github.com/ganglia/gmond_python_modules/master/memcached/python_modules/memcached.py | |
cd /etc/ganglia/conf.d/ | |
sudo wget https://raw.github.com/ganglia/gmond_python_modules/master/memcached/conf.d/memcached.conf | |
# Uncomment prepend settings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment