mongodb 实时监控工具motop

默北 mongodbmongodb 实时监控工具motop已关闭评论20,8221字数 1005阅读3分21秒阅读模式

motop

mongodb实时监控工具,可以同时对多个MongoDB服务器进行监控。显示当前操作。

项目地址:https://github.com/tart/motop文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

使用

1. 使用easy_install安装文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

# wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
# easy_install motop

2. 源码安装文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

# wget https://github.com/tart/motop/archive/master.zip
# unzip master.zip
# ./setup.py install

3. 帮助文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

# motop -h

4. 监控多台文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

# motop 192.168.124.50 192.158.124.51

动作

q Quit文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

p Pause文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

e Explain the query文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

k Kill operation using "mongo" executable文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

K Kill operations older than given seconds using "mongo" executable文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

r Try to reconnect to disconnected servers文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

R Try to reconnect to all servers文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

依赖包

  • python 2.6 或以上
  • pymongo 2.0 或以上

配置(选项)

配置文件可以创建在/etc/motop.conf。可以有多个配置短,每一节都可以包含以下参数:文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

address: 服务器的地址(必需)文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

username: 登陆用户名文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

password:登陆用户密码文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

status:显示状态(默认开启)文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

replicationInfo :显示复制状态(默认值:开启)文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

replicaSet :显示副本集的状态(默认值:开启)文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

operations:显示操作(默认值:开启)文章源自运维生存时间-https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/

replicationOperations :不断展现主和从的复制操作(默认值:开启)

“DEFAULT”是特殊的部分。本节参数可以设置为默认。

配置实例如下:

[MongoDB01]
address=10.42.2.121
replicationOperations=off

[MongoDB02]
address=10.42.2.122

[MongoDB03]
address=10.42.2.123

[MongoDB04]
address=10.42.2.124
username=foo
password=bar

实际使用

mongodb

weinxin
我的微信
微信公众号
扫一扫关注运维生存时间公众号,获取最新技术文章~
默北
  • 本文由 发表于 07/07/2014 01:00:15
  • 转载请务必保留本文链接:https://www.ttlsa.com/mongodb/mongodb-real-time-monitoring-tool-motop/