zoukankan      html  css  js  c++  java
  • 副本集的replSetGetStatus监控

    glc-test:PRIMARY> rs.status()
    
    glc-test:PRIMARY> db.adminCommand({replSetGetStatus:1})
    glc-test:PRIMARY> db.adminCommand( { replSetGetStatus: 1 } )
    {
            "set" : "glc-test",
            "date" : ISODate("2020-11-16T06:10:43.118Z"),
            "myState" : 1,
            "term" : NumberLong(115),
            "syncingTo" : "",
            "syncSourceHost" : "",
            "syncSourceId" : -1,
            "heartbeatIntervalMillis" : NumberLong(2000),
            "optimes" : {
                    "lastCommittedOpTime" : {
                            "ts" : Timestamp(1605507039, 1),
                            "t" : NumberLong(115)
                    },
                    "readConcernMajorityOpTime" : {
                            "ts" : Timestamp(1605507039, 1),
                            "t" : NumberLong(115)
                    },
                    "appliedOpTime" : {
                            "ts" : Timestamp(1605507039, 1),
                            "t" : NumberLong(115)
                    },
                    "durableOpTime" : {
                            "ts" : Timestamp(1605507039, 1),
                            "t" : NumberLong(115)
                    }
            },
            "lastStableCheckpointTimestamp" : Timestamp(1605506999, 1),
            "electionCandidateMetrics" : {
                    "lastElectionReason" : "stepUpRequestSkipDryRun",
                    "lastElectionDate" : ISODate("2020-11-10T10:05:52.181Z"),
                    "electionTerm" : NumberLong(115),
                    "lastCommittedOpTimeAtElection" : {
                            "ts" : Timestamp(1605002746, 1),
                            "t" : NumberLong(114)
                    },
                    "lastSeenOpTimeAtElection" : {
                            "ts" : Timestamp(1605002746, 1),
                            "t" : NumberLong(114)
                    },
                    "numVotesNeeded" : 2,
                    "priorityAtElection" : 1,
                    "electionTimeoutMillis" : NumberLong(10000),
                    "priorPrimaryMemberId" : 0,
                    "numCatchUpOps" : NumberLong(0),
                    "newTermStartDate" : ISODate("2020-11-10T10:05:52.192Z"),
                    "wMajorityWriteAvailabilityDate" : ISODate("2020-11-10T10:05:52.196Z")
            },
            "electionParticipantMetrics" : {
                    "votedForCandidate" : true,
                    "electionTerm" : NumberLong(114),
                    "lastVoteDate" : ISODate("2020-11-10T09:10:06.265Z"),
                    "electionCandidateMemberId" : 0,
                    "voteReason" : "",
                    "lastAppliedOpTimeAtElection" : {
                            "ts" : Timestamp(1604999404, 1),
                            "t" : NumberLong(113)
                    },
                    "maxAppliedOpTimeInSet" : {
                            "ts" : Timestamp(1604999404, 1),
                            "t" : NumberLong(113)
                    },
                    "priorityAtElection" : 1
            },
            "members" : [
                    {
                            "_id" : 0,
                            "name" : "xxx:28042",
                            "health" : 1,
                            "state" : 2,
                            "stateStr" : "SECONDARY",
                            "uptime" : 273490,
                            "optime" : {
                                    "ts" : Timestamp(1605507039, 1),
                                    "t" : NumberLong(115)
                            },
                            "optimeDurable" : {
                                    "ts" : Timestamp(1605507039, 1),
                                    "t" : NumberLong(115)
                            },
                            "optimeDate" : ISODate("2020-11-16T06:10:39Z"),
                            "optimeDurableDate" : ISODate("2020-11-16T06:10:39Z"),
                            "lastHeartbeat" : ISODate("2020-11-16T06:10:41.878Z"),
                            "lastHeartbeatRecv" : ISODate("2020-11-16T06:10:42.506Z"),
                            "pingMs" : NumberLong(1),
                            "lastHeartbeatMessage" : "",
                            "syncingTo" : "zzz:28042",
                            "syncSourceHost" : "zzz:28042",
                            "syncSourceId" : 2,
                            "infoMessage" : "",
                            "configVersion" : 3
                    },
                    {
                            "_id" : 1,
                            "name" : "yyy:28042",
                            "health" : 1,
                            "state" : 1,
                            "stateStr" : "PRIMARY",
                            "uptime" : 6910118,
                            "optime" : {
                                    "ts" : Timestamp(1605507039, 1),
                                    "t" : NumberLong(115)
                            },
                            "optimeDate" : ISODate("2020-11-16T06:10:39Z"),
                            "syncingTo" : "",
                            "syncSourceHost" : "",
                            "syncSourceId" : -1,
                            "infoMessage" : "",
                            "electionTime" : Timestamp(1605002752, 1),
                            "electionDate" : ISODate("2020-11-10T10:05:52Z"),
                            "configVersion" : 3,
                            "self" : true,
                            "lastHeartbeatMessage" : ""
                    },
                    {
                            "_id" : 2,
                            "name" : "zzz:28042",
                            "health" : 1,
                            "state" : 2,
                            "stateStr" : "SECONDARY",
                            "uptime" : 4736053,
                            "optime" : {
                                    "ts" : Timestamp(1605507039, 1),
                                    "t" : NumberLong(115)
                            },
                            "optimeDurable" : {
                                    "ts" : Timestamp(1605507039, 1),
                                    "t" : NumberLong(115)
                            },
                            "optimeDate" : ISODate("2020-11-16T06:10:39Z"),
                            "optimeDurableDate" : ISODate("2020-11-16T06:10:39Z"),
                            "lastHeartbeat" : ISODate("2020-11-16T06:10:43.086Z"),
                            "lastHeartbeatRecv" : ISODate("2020-11-16T06:10:41.584Z"),
                            "pingMs" : NumberLong(0),
                            "lastHeartbeatMessage" : "",
                            "syncingTo" : "yyy:28042",
                            "syncSourceHost" : "yyy:28042",
                            "syncSourceId" : 1,
                            "infoMessage" : "",
                            "configVersion" : 3
                    }
            ],
            "ok" : 1,
            "operationTime" : Timestamp(1605507039, 1),
            "$clusterTime" : {
                    "clusterTime" : Timestamp(1605507039, 1),
                    "signature" : {
                            "hash" : BinData(0,"tXhOiordhjP3y0HkfnuhSoQ8o7Q="),
                            "keyId" : NumberLong("6856584343653974019")
                    }
            }
    }
    glc-test:PRIMARY> 

    ###############################################################

  • 相关阅读:
    【转】Visual Studio 选择相同变量高亮
    匿名委托(方法) 以 ThreadStart 为例
    执行多个Sql脚本,Sqlplus
    【转】Win8 下 管理无线网络
    ORA-22992:没法使用从远程表选择的LOB定位器
    【转】NET中管理数字证书(Digital Certificate)的一些类
    修改数据库内存
    C# 计算一串字符串算法
    奇数平方的九宫格
    lua 的一些常用概念
  • 原文地址:https://www.cnblogs.com/igoodful/p/13985775.html
Copyright © 2011-2022 走看看