-
Notifications
You must be signed in to change notification settings - Fork 336
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
I would like a way to pull more details from the sentinel incident alerts so that I can process the query results.
currently when retrieving incidents you can specify alerts=True however the data returned here is currently heavily limited.
| def get_incident_alerts(self, incident: str) -> list: |
We have a use case that is currently not using msticpy that retrieves the associated events for a given alert by extracting the query and timeframe from the extended properties. This is currently how it's functioning.
def _get_alert_events(self, alert, limit=None):
# type: (dict) -> list
"""
Get event list for alert
@param alert: Alert
@param limit {int}: Limit for results
@return: List of Events
"""
extended_properties = json.loads(alert.get('ExtendedProperties'))
start_time = convert_string_to_datetime(extended_properties.get('Query Start Time UTC'), "UTC")\
.strftime(TIME_FORMAT)
end_time = convert_string_to_datetime(extended_properties.get('Query End Time UTC'), "UTC")\
.strftime(TIME_FORMAT)
query = extended_properties.get('Query')
timespan = '{}/{}'.format(start_time, end_time)
Describe the solution you'd like
Either a new method for retrieval of alert details for a given alert id or expand the param alerts=True on get_incident to return the entire alert object.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request