getSystemHealthStatus

Get the count of slow searches, web socket disconnects(in last 12hrs).

python · System Diagnostics and Health Check

Details

IDgetSystemHealthStatus
Languagepython
From Version6.10.0
Docker Imagedemisto/python3:3.12.13.11879924
Tagsstatusreview widget

README

Get the count of slow searches, web socket disconnects(in last 12hrs)

Script Data


Name Description
Script Type python3
Tags statusreview, widget

Inputs


There are no inputs for this script.

Outputs


There are no outputs for this script.

import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401

res = demisto.executeCommand("core-api-get", {"uri": "diagnostics/checks"})[0]["Contents"]["response"]

wList = []
wList.append(
    {
        "Web Socket Disconnects(last 12hrs)": res["checkRuns"]["diagnostic.websocket.disconnects"]["result"]["metrics"][
            "totalDisconnects"
        ],
        "Slow Searches": res["checkRuns"]["diagnostic.slow.searches"]["result"]["metrics"],
    }
)

return_results(
    tableToMarkdown(
        "To get more context and guidance around the below table listings, \
    you can go to System Diagnostics page under the Settings and take actions accordingly",
        wList,
    )
)