【问题标题】:Munin Mongodb Plugin Not Showing. . .?Munin Mongodb 插件未显示。 . .?
【发布时间】:2011-04-26 05:39:17
【问题描述】:
我已经在我的监控服务器上安装了 munin 和 munin-node 并在我的 mongodb 服务器上安装了 munin-node,我已经将它们都设置好了,一切都很好。但是,mongodb 插件没有显示在我的监控服务器上。我看到列出的节点和“磁盘、网络、进程、系统”,但没有看到 mongo 的东西。如果我直接在 mongo 服务器“python /usr/share/munin/plugins/mongo_btree”上执行其中一个插件,它会返回输出,但监控服务器上什么也没有显示。
【问题讨论】:
标签:
mongodb
monitoring
munin
【解决方案1】:
经过进一步检查,“munin”用户在尝试访问 simplejson 模块时收到错误消息。这是由于 munin 用户使用了较旧的 2.6 之前的 python 实例。
通过将正确的版本添加到 munin 的 bash_profile 来修复。
【解决方案2】:
不适合我... mongo_ops 调用没有错误。但根本没有图表...
更新:
我找到了方法!
将 mongo_* 插件复制到 /usr/share/munin/plugins
建立到 /etc/munin/plugins 的链接
通过 munin-node-configure 检查节点配置:
mongo_btree | yes |
mongo_conn | yes |
mongo_lock | yes |
mongo_mem | yes |
mongo_ops | yes |
重启munin节点:
sudo /etc/init.d/munin-node restart
【解决方案3】:
MongoDB munin 脚本使用默认的 python 环境,但它们实际上是 python2 脚本。如果
python --version
说像Python 3.x.x,那么你需要把脚本的第一行改成
#!/usr/bin/python2
或者你的 python2 在哪里。