ForescoutEyeInspectButtonHostChangeLog

Get change log of Forescout EyeInspect hosts.

python · Forescout EyeInspect

Source

from typing import Any

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

HOURS_AGO = 24


def get_hosts_changelog() -> dict[str, Any]:
    incident_datetime = datetime.fromisoformat(demisto.incident()["occurred"])
    start_timestamp = (incident_datetime - timedelta(hours=HOURS_AGO)).isoformat()

    return demisto.executeCommand("forescout-ei-hosts-changelog-list", {"start_timestamp": start_timestamp})


def main():
    try:
        return_results(get_hosts_changelog())
    except Exception as e:
        demisto.error(fix_traceback_line_numbers(traceback.format_exc()))
        return_error(f"Failed to get pcap from Forescout EyeInspect incident.\nError:\n{e}")


if __name__ in ("__main__", "__builtin__", "builtins"):
    main()

README

Get change log of Forescout EyeInspect hosts.

Script Data


Name Description
Script Type python3
Tags incident-action-button
Cortex XSOAR Version 6.1.0

Inputs


There are no inputs for this script.

Outputs


There are no outputs for this script.