zoukankan      html  css  js  c++  java
  • mongo集群的监控(一)

    由于工作中总是遇到一些私有化部署和不同环境的mongo server异常,为了统一方便的监控其运行情况,我筛选了多个工具,最终选择了motop。

    motop是一款用python编写的实时监控工具,可以同时对多个MongoDB服务器进行监控。显示当前操作。

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

    easy_install方式安装:

    easy_install motop

    查看帮助

    motop -h

     

    主要用法解析

    motop [host, host2, host3....]

    需要验证则用admin账号(数据库的root权限账号和密码)

    motop [host] -u [user_name] -p [password]

    # 监控预发布环境。

    motop xxx.xxx.xxx.xxx -u admin -p xxxxx

    # 监控测试服

    motop xxx.xx.xxx.xxx -u admin2 -p xxxxxx

    多个授权验证的mongo的监控可以写入配置文档,motop.conf如下:

    [TestMongoDBServer]

    address=xxx.xxx.xxx.xx

    username=admin

    password=xxxxx

    [PreStagingMongoDBServer]

    address=xx.xxx.xxx.xxx

    username=xxx

    password=xxxx

    motop -c /path/to/motop.conf

    运行效果如下图:

     

    这样可以方便地实时监控多集群mongo server的情况,感觉类似于linux的top效果。它的配置参数中也可以增加对复制集的配置,灵活性比较强,适合运维监控使用。

  • 相关阅读:
    SAR图像处理 MSTAR数据库利用问题
    python 获取系统环境变量 os.environ and os.putenv
    python 模块中的 __init__.py __main__.py
    pylint python2.7 安装记录
    Python--字典
    哈希表
    AC自动机模板
    平衡树(Splay)模板
    矩阵快速幂 模板
    非递归线段树
  • 原文地址:https://www.cnblogs.com/freephp/p/10367268.html
Copyright © 2011-2022 走看看