I'm trying to add a MongoDB's plugin to munin. I followed this to install the plugin:
sudo apt-get install git munin-node
git clone git://github.com/erh/mongo-munin.git /home/ubuntu/mongo-munin
sudo ln -sf /home/ubuntu/mongo-munin/mongo_btree /etc/munin/plugins/mongo_btree
sudo ln -sf /home/ubuntu/mongo-munin/mongo_conn /etc/munin/plugins/mongo_conn
sudo ln -sf /home/ubuntu/mongo-munin/mongo_lock /etc/munin/plugins/mongo_lock
sudo ln -sf /home/ubuntu/mongo-munin/mongo_mem /etc/munin/plugins/mongo_mem
sudo ln -sf /home/ubuntu/mongo-munin/mongo_ops /etc/munin/plugins/mongo_ops
sudo service munin-node restart
(from https://ivan-site.com/2013/06/monitoring-mongodb-in-munin-on-ubuntu-1304)
But nothing was sent to munin's server (for Mongo only, all other date from the server are ok on Munin).
Then I found there is an error when runing the plugin:
# sudo -u munin python /usr/share/munin/plugins/mongo_ops
Traceback (most recent call last):
File "/usr/share/munin/plugins/mongo_ops", line 56, in <module>
doData()
File "/usr/share/munin/plugins/mongo_ops", line 33, in doData
ss = getServerStatus()
File "/usr/share/munin/plugins/mongo_ops", line 28, in getServerStatus
raw = urllib2.urlopen(req).read()
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
I've checked this question: Munin Mongodb Plugin Not Showing. . .? but the problem is not the same, I'm running pyhton 2, as seen in the output above:
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
And so, plugins are active:
# munin-node-configure | grep "mongo"
mongo_btree | yes |
mongo_conn | yes |
mongo_lock | yes |
mongo_mem | yes |
mongo_ops | yes |
Is it a permission from Mongo? Maybe I need to setup a user for Munin? Do you have any idea how to fix that?
`[mongo_*]`
env.MONGO_DB_URI mongodb://cMunin:YOURPASS@localhost:27017/admin` – Steve Baroti Aug 04 '20 at 17:49