MongoDB replstatus 度量集

编辑

MongoDB replstatus 度量集编辑

这是模块 mongodb 的 replstatus 度量集。

它需要以下权限,由 clusterMonitor 角色 涵盖

字段

有关度量集中每个字段的说明,请参见 导出字段 部分。

这是一个由该度量集生成的示例文档

{
    "@timestamp": "2017-10-12T08:05:34.853Z",
    "event": {
        "dataset": "mongodb.replstatus",
        "duration": 115000,
        "module": "mongodb"
    },
    "metricset": {
        "name": "replstatus",
        "period": 10000
    },
    "mongodb": {
        "replstatus": {
            "headroom": {
                "max": null,
                "min": null
            },
            "lag": {
                "max": null,
                "min": null
            },
            "members": {
                "arbiter": {
                    "count": 0,
                    "hosts": null
                },
                "down": {
                    "count": 0,
                    "hosts": null
                },
                "primary": {
                    "host": "7ba9ef86c3b0:27017",
                    "optime": 1651925294
                },
                "recovering": {
                    "count": 0,
                    "hosts": null
                },
                "rollback": {
                    "count": 0,
                    "hosts": null
                },
                "secondary": {
                    "count": 0,
                    "hosts": null,
                    "optimes": null
                },
                "startup2": {
                    "count": 0,
                    "hosts": null
                },
                "unhealthy": {
                    "count": 0,
                    "hosts": null
                },
                "unknown": {
                    "count": 0,
                    "hosts": null
                }
            },
            "oplog": {
                "first": {
                    "timestamp": 1651925294
                },
                "last": {
                    "timestamp": 1651925294
                },
                "size": {
                    "allocated": 2379247206,
                    "used": 1323
                },
                "window": 0
            },
            "optimes": {
                "applied": 1651925294,
                "durable": 1651925294,
                "last_committed": 1651925294
            },
            "server_date": "2022-05-07T12:08:19.506Z",
            "set_name": "beats"
        }
    },
    "service": {
        "address": "172.28.0.3:27017",
        "type": "mongodb"
    }
}