Updating munin for new version.

This commit is contained in:
Samuel Clay 2012-12-24 14:57:43 -08:00
parent eb1bd23614
commit aa8157b669
5 changed files with 21 additions and 5 deletions

View file

@ -7,7 +7,7 @@
199.15.249.101 db01 db01.newsblur.com
199.15.252.50 db02 db02.newsblur.com
# 199.15.253.226 db03 db03.newsblur.com
199.15.253.90 db03 db03.newsblur.com
199.15.249.98 db04 db04.newsblur.com
199.15.249.99 db05 db05.newsblur.com
199.15.249.101 db07 db07.newsblur.com

View file

@ -1,3 +1,9 @@
# Configfile for Munin master
dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin
includedir /etc/munin/munin-conf.d
[newsblur.com]

View file

@ -31,7 +31,9 @@ def getServerStatus():
name = "locked"
def doData():
print name + ".value " + str( 100 * getServerStatus()["globalLock"]["ratio"] )
ratio = (float(getServerStatus()["globalLock"]["lockTime"]) /
getServerStatus()["globalLock"]["totalTime"])
print name + ".value " + str( 100 * ratio )
def doConfig():

View file

@ -81,6 +81,13 @@ server {
location /munin/ {
alias /var/cache/munin/www/;
}
location ^~ /cgi-bin/munin-cgi-graph/ {
fastcgi_split_path_info ^(/cgi-bin/munin-cgi-graph)(.*);
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/munin/fcgi-graph.sock;
include fastcgi_params;
}
location ^~ /rss_feeds/icon/ {
proxy_set_header X-Real-IP $remote_addr;

7
fabfile.py vendored
View file

@ -42,7 +42,7 @@ env.roledefs ={
],
'db': ['db01.newsblur.com',
'db02.newsblur.com',
# 'db03.newsblur.com',
'db03.newsblur.com',
'db04.newsblur.com',
'db05.newsblur.com',
],
@ -422,7 +422,7 @@ def setup_psycopg():
def setup_python():
# sudo('easy_install -U pip')
sudo('easy_install -U fabric django==1.3.1 readline chardet mysql-python pyflakes iconv celery django-celery django-celery-with-redis django-compress South django-extensions pymongo==2.2.0 stripe BeautifulSoup pyyaml nltk lxml oauth2 pytz boto seacucumber django_ses mongoengine redis requests django-subdomains psutil python-gflags cssutils raven pyes')
sudo('easy_install -U fabric django==1.3.1 readline chardet pyflakes iconv celery django-celery django-celery-with-redis django-compress South django-extensions pymongo==2.2.0 stripe BeautifulSoup pyyaml nltk lxml oauth2 pytz boto seacucumber django_ses mongoengine redis requests django-subdomains psutil python-gflags cssutils raven pyes')
put('config/pystartup.py', '.pystartup')
# with cd(os.path.join(env.NEWSBLUR_PATH, 'vendor/cjson')):
@ -495,7 +495,7 @@ def setup_pymongo_repo():
sudo('rm -fr /usr/local/lib/python2.7/dist-packages/pymongo*')
sudo('rm -fr /usr/local/lib/python2.7/dist-packages/bson*')
sudo('rm -fr /usr/local/lib/python2.7/dist-packages/gridgs*')
sudo('ln -s %s /usr/local/lib/python2.7/dist-packages/' %
sudo('ln -fs %s /usr/local/lib/python2.7/dist-packages/' %
os.path.join(env.VENDOR_PATH, 'pymongo/{pymongo,bson,gridfs}'))
def setup_forked_mongoengine():
@ -728,6 +728,7 @@ def setup_db_munin():
run('git clone git://github.com/samuel/python-munin.git')
with cd(os.path.join(env.VENDOR_PATH, 'python-munin')):
run('sudo python setup.py install')
sudo('/etc/init.d/munin-node restart')
def enable_celerybeat():
with cd(env.NEWSBLUR_PATH):