monit_status - meetbill/monit_manager GitHub Wiki

状态端口解析

{
    "monit": {
        "server": {
            "id": "56b21c2da170978e0b37394c2a73d3e9",
            "incarnation": "1548346357",
            "version": "5.25.2",
            "uptime": "7096",
            "poll": "2",
            "startdelay": "0",
            "localhostname": "hostname",
            "controlfile": "/home/xxx/.monit/conf/monitrc",
            "httpd": {
                "address": "0.0.0.0",
                "port": "2812",
                "ssl": "0"
            }
        },
        "platform": {
            "name": "Linux",
            "release": "xxxxxxxxxx",
            "version": "xxxxxxxxxxxxxxxxx",
            "machine": "x86_64",
            "cpu": "12",
            "memory": "98954516",
            "swap": "0"
        },
        "service": [
            {
                # type 为 3 时为进程监控
                "@type": "3",
                "name": "nutcracker",
                "collected_sec": "1548353451",
                "collected_usec": "621454",
                "status": "0",
                "status_hint": "0",
                "monitor": "1",
                "monitormode": "0",
                "onreboot": "0",
                "pendingaction": "0",
                -----------------------当进程不在受监控状态时,不输出以下信息
                "pid": "18339",
                "ppid": "1",
                "uid": "502",
                "euid": "502",
                "gid": "504",
                "uptime": "1462",
                "threads": "4",
                "children": "0",
                "memory": {
                    "percent": "0.1",
                    "percenttotal": "0.1",
                    "kilobyte": "67960",
                    "kilobytetotal": "67960"
                },
                "cpu": {
                    "percent": "0.0",
                    "percenttotal": "0.0"
                },
                "read": null,
                "write": {
                    "bytes": {
                        "count": "0",
                        "total": "1826816"
                    }
                },
                "port": {
                    "hostname": "127.0.0.1",
                    "portnumber": "xxxx(num)",
                    "request": null,
                    "protocol": "DEFAULT",
                    "type": "TCP",
                    "responsetime": "0.000051"
                }
            },
            {
                # type 为 5 时为 System 监控 
                "@type": "5",
                "name": "hostname",
                "collected_sec": "1548351851",
                "collected_usec": "778199",
                "status": "0",
                "status_hint": "0",
                "monitor": "0",
                "monitormode": "0",
                "onreboot": "0",
                "pendingaction": "0"
            }
        ]
    }
}