class msiempy.ESM(NitroObject): (source)
Enterprise Security Manager interface.
Object do not contain data, it's a simple interface to data structures / values returned by the SIEM or helper methods.
Print a few esm infos. ESM object has not state for it self, it's a simple interface to data structures / values returned by the SIEM.
>>> from msiempy import ESM >>> esm=ESM() >>> esm.version() '11.2.1' >>> esm.recs() [('ERC-1', 144116287587483648)] >>> esm.buildstamp() '11.2.1 20190725050014'
Method | __init__ | Undocumented |
Method | text | Returns "ESM object" |
Method | json | Not implemented |
Method | refresh | Not implemented |
Method | time | Returns: str: ESM time (GMT) |
Method | buildstamp | Returns: Buildstamp string |
Method | version | Returns: simple version string |
Method | status | Get various ESM statuses. |
Method | disks | Returns: self.status()['hdd'] |
Method | ram | Returns: self.status()['ram'] |
Method | backup_status | Returns: dict : Backup status and timestamps. |
Method | callhome | Check callhome connection. |
Method | rules_status | Returns: Rules autocheck status and timestamps. |
Method | get_alerts | Tells the ESM to retrieve alerts from the provided device ID. |
Method | recs | Get list of receivers name and id |
Method | tz_offsets | Builds table of ESM timezones including offsets. |
Method | timezones | Builds table of ESM timezones and names only. No offsets. |
Method | tz_name_to_id | Get the timezone ID from it's name. |
Method | tz_id_to_name | Get the timezone name from it's ID. |
Method | type_id_to_venmod | Get the datasource vendor info from it's type_id . |
Method | venmod_to_type_id | Get the datasource type_id info from it's vendor and model . |
Method | rules_history | Returns: Policy Editor rule history. |
Method | _map_status_int_fields | Undocumented |
Instance Variable | _fields | Undocumented |
Method | _get_timezones | Gets list of timezones from the ESM. |
Method | _get_ds_types | Retrieves device table from ESM |
Method | _format_ds_types | Callback to create type_id/vendor/model table |
Inherited from NitroObject:
Class | NitroJSONEncoder | Custom JSON encoder that will use the approprtiate propertie depending of the type of NitroObject. TODO support json json dumping of QueryFilers, may be by making them inherits from NitroDict. |
Instance Variable | nitro | msiempy.core.session.NitroSession object. Interface to the SIEM. |
Get various ESM statuses.
dict
Avail: 7977MB, Used: 7857MB, Free: 119MB
sda3 Size: 491GB, Used: 55GB(12%), Available: 413GB, Mount: /
Other functions exist to return subsets of this data also.
SYS_GETSYSINFO
Returns: Rules autocheck status and timestamps.
status
.Example:
{ 'rulesAndSoftwareCheckEnabled': True 'rulesAndSoftLastCheck': '07/06/2017 10:28:43', 'rulesAndSoftNextCheck': '07/06/2017 22:28:43',}
Get list of receivers name and id
list[tuple(name, id)]
Builds table of ESM timezones including offsets.
list[tuple()]
: list of timezone tuples(name, id, offset)
Example:
[(1, 'Midway Island, Samoa', '-11:00'), (2, 'Hawaii', '-10:00'), ... ]
Builds table of ESM timezones and names only. No offsets.
dict
: {timezone_id:timezone_name, ...}
Retrieves device table from ESM
list
of tuples output from callback: _format_ds_types()Callback to create type_id/vendor/model table
venmods
(obj
): request object from _get_ds_typeslist of tuples
:
[(542, 'McAfee', 'SaaS Email Protection') (326, 'McAfee', 'Web Gateway') (406, 'Microsoft', 'ACS - SQL Pull') (491, 'Microsoft', 'Endpoint Protection - SQL Pull') (348, 'Microsoft', 'Exchange')]