Munin Mongodb Plugin Not Showing. . .?

2019-06-26 20:49发布

I have installed munin and munin-node on my monitoring server and installed munin-node on my mongodb server, I have set them both up and all is working great. But, the mongodb plugins aren't showing on my monitoring server. I see the node listed and "Disk, Network, Processes, System", but not the mongo stuff. If I execute one of the plugins directly on the mongo server "python /usr/share/munin/plugins/mongo_btree" it returns output, but nothing shows on the monitoring server.

3条回答
淡お忘
2楼-- · 2019-06-26 21:09

The MongoDB munin scripts are using the default python env but they are in fact python2 scripts. If

python --version

Says something like Python 3.x.x, then you need to change the first line of the scripts to

#!/usr/bin/python2

Or wherever your python2 is.

查看更多
戒情不戒烟
3楼-- · 2019-06-26 21:21

alt text

Upon further inspection, the "munin" user was receiveing errors when trying to access the simplejson module. This was cause due to the munin user using an older pre 2.6 instance of python.

Fixed by adding the correct version to munin's bash_profile.

查看更多
老娘就宠你
4楼-- · 2019-06-26 21:26

not worked for me... no errors on mongo_ops call. but no charts at all...

UPDATE:

i found how-to!

copy mongo_* plugins to /usr/share/munin/plugins

make link to /etc/munin/plugins

check node config by munin-node-configure:

mongo_btree                | yes  |
mongo_conn                 | yes  |
mongo_lock                 | yes  |
mongo_mem                  | yes  |
mongo_ops                  | yes  |

restart munin-node:

sudo /etc/init.d/munin-node restart
查看更多
登录 后发表回答