Adding new metrics to munin.

This commit is contained in:
Samuel Clay 2012-07-29 23:24:26 -07:00
parent 1f04239f29
commit 5f15b12876
2 changed files with 5 additions and 1 deletions

3
fabfile.py vendored
View file

@ -130,7 +130,8 @@ def deploy_code(copy_assets=False, full=False):
with settings(warn_only=True):
run('pkill -c gunicorn')
else:
run('kill -HUP `cat logs/gunicorn.pid`')
run('pkill -c gunicorn')
# run('kill -HUP `cat logs/gunicorn.pid`')
run('curl -s http://%s > /dev/null' % env.host)
run('curl -s http://%s/api/add_site_load_script/ABCDEF > /dev/null' % env.host)
sudo('supervisorctl restart celery')

View file

@ -12,9 +12,12 @@ graph_config = {
def calculate_metrics():
from apps.rss_feeds.models import Feed
from apps.reader.models import UserSubscription
from apps.social.models import MSocialProfile, MSocialSubscription
return {
'feeds': Feed.objects.count(),
'subscriptions': UserSubscription.objects.count(),
'profiles': MSocialProfile.objects.count(),
'social_subscriptions': MSocialSubscription.objects.count(),
}
if __name__ == '__main__':