製品&サポートサービス
pt-mongodb-summary
コマンド
pt-mongodb-summary [ オプション ] [HOST[:PORT]]
【必須項目】
- ・ -a : ユーザー認証されたデータベースを指定する(デフォルトはadminデータベースが選択されます)
- ・ -p : ユーザー認証が有効になっているサーバに接続する際に使用するパスワードを指定する
- ・ -u : ユーザー認証が有効になっているサーバに接続する際に使用するユーザーを指定する
目的
MongoDBから収集した情報をサマリして出力します
シナリオ
以下のようなコマンドを実行し、MongoDBから収集した情報を出力します
# pt-mongodb-summary -u admin -p localhost:27017
結果
以下のような結果が標準出力されます
[root@localhost mongodb]# pt-mongodb-summary -u admin -p localhost:27017 Password: # Instances ############################################################################################## PID Host Type ReplSet Engine 2319 localhost:27017 - wiredTiger # This host # Mongo Executable ####################################################################################### Path to executable | /usr/bin/mongod # Report On localhost.localdomain ######################################## User | mongod PID Owner | mongod Hostname | localhost.localdomain Version | 3.4.3 Built On | Linux x86_64 Started | 2017-04-18 10:10:23 +0900 JST Datadir | /var/lib/mongo Processes | 1 Process Type | mongod # Running Ops ############################################################################################ Type Min Max Avg Insert 0 0 0/5s Query 0 0 0/5s Update 0 0 0/5s Delete 0 0 0/5s GetMore 0 0 0/5s Command 1 1 5/5s # Security ############################################################################################### Users : 3 Roles : 0 Auth : disabled SSL : disabled Port : 27017 Bind IP: 127.0.0.1
良い点
pt-mysql-summaryと同等のツールであり、MongoDBクラスタに関する情報も収集できます