Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added gatekeeper status interval to config #500

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Conversation

macterra
Copy link
Collaborator

@macterra macterra commented Dec 20, 2024

Added KC_GATEKEEPER_STATUS_INTERVAL to gatekeeper configuration, defaults to 5 minutes between status reports.

Also refactored checkDIDs to group the DID type counts under a new byType header, adding agents and assets:

./admin get-status
{
    "uptimeSeconds": 17,
    "dids": {
        "total": 10609,
        "byType": {
            "agents": 3605,
            "assets": 7004,
            "confirmed": 10029,
            "unconfirmed": 580,
            "ephemeral": 1,
            "invalid": 0
        },
        "byRegistry": {
            "TESS": 2579,
            "hyperswarm": 1730,
            "TBTC": 3117,
            "TFTC": 3159,
            "local": 24
        },
        "byVersion": {
            "1": 9457,
            "2": 678,
            "3": 293,
            "4": 52,
            "5": 32,
            "6": 17,
            "7": 15,
            "8": 10,
            "9": 8,
            "10": 4,
            "11": 4,
            "12": 8,
            "13": 3,
            "14": 1,
            "15": 2,
            "16": 5,
            "18": 4,
            "22": 3,
            "23": 1,
            "25": 2,
            "31": 1,
            "33": 1,
            "37": 1,
            "42": 1,
            "44": 1,
            "50": 1,
            "56": 1,
            "61": 1,
            "62": 1,
            "64": 1
        }
    },
    "memoryUsage": {
        "rss": 148160512,
        "heapTotal": 78000128,
        "heapUsed": 55464728,
        "external": 25333966,
        "arrayBuffers": 22856048
    }
}
gatekeeper-1  | Status -----------------------------
gatekeeper-1  | DID Database (redis):
gatekeeper-1  |   Total: 10609
gatekeeper-1  |   By type:
gatekeeper-1  |     Agents: 3605
gatekeeper-1  |     Assets: 7004
gatekeeper-1  |     Confirmed: 10029
gatekeeper-1  |     Unconfirmed: 580
gatekeeper-1  |     Ephemeral: 1
gatekeeper-1  |     Invalid: 0
gatekeeper-1  |   By registry:
gatekeeper-1  |     TBTC: 3117
gatekeeper-1  |     TESS: 2579
gatekeeper-1  |     TFTC: 3159
gatekeeper-1  |     hyperswarm: 1730
gatekeeper-1  |     local: 24
gatekeeper-1  |   By version:
gatekeeper-1  |     1: 9457
gatekeeper-1  |     2: 678
gatekeeper-1  |     3: 293
gatekeeper-1  |     4: 52
gatekeeper-1  |     5: 32
gatekeeper-1  |     6+: 97
gatekeeper-1  | Memory Usage Report:
gatekeeper-1  |   RSS: 136.90 MB (Resident Set Size - total memory allocated for the process)
gatekeeper-1  |   Heap Total: 69.52 MB (Total heap allocated)
gatekeeper-1  |   Heap Used: 38.80 MB (Heap actually used)
gatekeeper-1  |   External: 22.40 MB (Memory used by C++ objects bound to JavaScript)
gatekeeper-1  |   Array Buffers: 20.03 MB (Memory used by ArrayBuffer and SharedArrayBuffer)
gatekeeper-1  | Uptime: 368s (6 minutes, 8 seconds)
gatekeeper-1  | ------------------------------------

@macterra macterra linked an issue Dec 20, 2024 that may be closed by this pull request
@macterra macterra merged commit 4dc6fb5 into main Dec 20, 2024
9 checks passed
@macterra macterra deleted the 498-report-interval branch December 20, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gatekeeper status report interval should be configurable
1 participant