mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Ignoring replica set for munin mongo to get per-server stats, not master stats.
This commit is contained in:
parent
2ffa4ee5f9
commit
03ff9cf77a
2 changed files with 2 additions and 4 deletions
4
fabfile.py
vendored
4
fabfile.py
vendored
|
@ -1003,12 +1003,10 @@ def setup_mongo():
|
|||
sudo('mkdir -p /var/log/mongod')
|
||||
sudo('chown mongodb /var/log/mongod')
|
||||
put('config/logrotate.mongo.conf', '/etc/logrotate.d/mongod', use_sudo=True)
|
||||
|
||||
sudo('pip install pymongo==3.0.3') # For munin
|
||||
|
||||
# Reclaim 5% disk space used for root logs. Set to 1%.
|
||||
with settings(warn_only=True):
|
||||
sudo('tune2fs -m 1 /dev/vda')
|
||||
sudo('tune2fs -m 1 /dev/vda1')
|
||||
|
||||
def setup_mongo_configsvr():
|
||||
sudo('mkdir -p /var/lib/mongodb_configsvr')
|
||||
|
|
2
vendor/munin/mongodb.py
vendored
2
vendor/munin/mongodb.py
vendored
|
@ -29,7 +29,7 @@ class MuninMongoDBPlugin(MuninPlugin):
|
|||
def connection(self):
|
||||
if not hasattr(self, '_connection'):
|
||||
import pymongo
|
||||
self._connection = pymongo.MongoReplicaSetClient(self.server[0], self.server[1], replicaSet='nbset')
|
||||
self._connection = pymongo.MongoClient(self.server[0], self.server[1])
|
||||
return self._connection
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Reference in a new issue