mongodb是什么数据库_mongodb数据库实时监控工具motop分享

更新时间:2019-10-09    来源:MongoDB    手机版     字体:

【www.bbyears.com--MongoDB】

motop

项目下载地址:https://github.com/tart/motop

使用

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

2. 源码安装
# wget https://github.com/tart/motop/archive/master.zip
# unzip master.zip
# ./setup.py install

3. 帮助
# motop -h

4. 监控多台
# motop 192.168.124.50 192.158.124.51

动作

q Quit

p Pause

e Explain the query

k Kill operation using “mongo” executable

K Kill operations older than given seconds using “mongo” executable

r Try to reconnect to disconnected servers

R Try to reconnect to all servers

依赖包

    python 2.6 或以上
    pymongo 2.0 或以上

配置(选项)

配置文件可以创建在/etc/motop.conf。可以有多个配置短,每一节都可以包含以下参数:

address: 服务器的地址(必需)

username: 登陆用户名

password:登陆用户密码

status:显示状态(默认开启)

replicationInfo :显示复制状态(默认值:开启)

replicaSet :显示副本集的状态(默认值:开启)

operations:显示操作(默认值:开启)

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

实际使用

http://filesimg.111cn.net/2015/03/20/20150320002414505.jpg

本文来源:http://www.bbyears.com/shujuku/72147.html

热门标签

更多>>

本类排行