getPlaybooksHealthStatus

Get the count of big workplan, big tasks playbooks and the playbooks which automatically turned in to quiet mode.

python · System Diagnostics and Health Check

Details

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

README

Get the count of big workplan, big tasks playbooks and the playbooks which automatically turned in to quiet mode

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(
    {
        "Big Workplans > 3 MB": res["checkRuns"]["diagnostic.workplan.big.workplans"]["result"]["metrics"]["total"],
        "Big tasks": res["checkRuns"]["diagnostic.workplan.big.tasks"]["result"]["metrics"],
        "Tasks turned to quiet mode": res["checkRuns"]["diagnostic.workplan.auto.quiet.task"]["result"]["metrics"],
    }
)

return_results({"total": len(wList), "data": wList})