Bootstrap FreeKB - Kong Enterprise Edition (KongEE) - Output status using REST API
Kong Enterprise Edition (KongEE) - Output status using REST API


This assumes Kong has been secured with Role Based Access Control (RBAC) and you have created your Kong-Admin-Token. The following curl command can be used to list the endpoints that can be used with the API.

curl --header "Kong-Admin-Token: abc123" --request GET "https://kong.example.com/endpoints"

 

Something like this should be returned. Notice that the /status endpoint can be used.

{       
    "data": [
        "/",
        "/acls",
        "/acls/{acls}",
        "/acls/{acls}/consumer",
        "/status"
    ]
}

 

The following curl command can be used to get the status of KongEE.

curl --header "Kong-Admin-Token: abc123" --request GET "https://kong.example.com/status"

 

Something like this should be returned.

{
    "database": {
        "reachable": true
    },
    "memory": {
        "lua_shared_dicts": {
            "kong": {
                "allocated_slabs": "0.04 MiB",
                "capacity": "5.00 MiB"
            },
            "kong_cluster_events": {
                "allocated_slabs": "0.06 MiB",
                "capacity": "5.00 MiB"
            },
            "kong_counters": {
                "allocated_slabs": "0.02 MiB",
                "capacity": "1.00 MiB"
            },
            "kong_db_cache": {
                "allocated_slabs": "2.08 MiB",
                "capacity": "128.00 MiB"
            },
            "kong_db_cache_miss": {
                "allocated_slabs": "0.15 MiB",
                "capacity": "12.00 MiB"
            },
            "kong_healthchecks": {
                "allocated_slabs": "0.04 MiB",
                "capacity": "5.00 MiB"
            },
            "kong_keyring": {
                "allocated_slabs": "0.04 MiB",
                "capacity": "5.00 MiB"
            },
            "kong_locks": {
                "allocated_slabs": "0.06 MiB",
                "capacity": "8.00 MiB"
            },
            "kong_process_events": {
                "allocated_slabs": "5.00 MiB",
                "capacity": "5.00 MiB"
            },
            "kong_rate_limiting_counters": {
                "allocated_slabs": "1.64 MiB",
                "capacity": "12.00 MiB"
            },
            "kong_reports_consumers": {
                "allocated_slabs": "0.07 MiB",
                "capacity": "10.00 MiB"
            },
            "kong_reports_routes": {
                "allocated_slabs": "0.02 MiB",
                "capacity": "1.00 MiB"
            },
            "kong_reports_services": {
                "allocated_slabs": "0.02 MiB",
                "capacity": "1.00 MiB"
            },
            "kong_reports_workspaces": {
                "allocated_slabs": "0.02 MiB",
                "capacity": "1.00 MiB"
            },
            "kong_vitals_counters": {
                "allocated_slabs": "0.30 MiB",
                "capacity": "50.00 MiB"
            },
            "kong_vitals_lists": {
                "allocated_slabs": "0.02 MiB",
                "capacity": "1.00 MiB"
            },
            "prometheus_metrics": {
                "allocated_slabs": "0.05 MiB",
                "capacity": "5.00 MiB"
            }
        },
        "workers_lua_vms": [
            {
                "http_allocated_gc": "0.03 MiB",
                "pid": 26
            },
            {
                "http_allocated_gc": "0.02 MiB",
                "pid": 27
            },
            {
                "http_allocated_gc": "0.02 MiB",
                "pid": 28
            },
            {
                "http_allocated_gc": "0.02 MiB",
                "pid": 29
            }
        ]
    },
    "server": {
        "connections_accepted": 33417,
        "connections_active": 4,
        "connections_handled": 33417,
        "connections_reading": 0,
        "connections_waiting": 3,
        "connections_writing": 1,
        "total_requests": 333363
    }
}

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 27f432 in the box below so that we can be sure you are a human.