alerts
keyword, agents can sent alert messages to Mythic’s operation event log. There are two ways you can do this:
alerts
to send the following structure:
source
field doesn’t get displayed to the user, but it is used to collapse like-messages within the UI. If the user has an alert that’s not resolved with a source of “bob”, then the next message with a source of “bob” will NOT be displayed, but will instead simply increase the count of the current message. If the user resolves the message with a source of “bob” and a new one comes in, then that message WILL be displayed. This is to help prevent users from getting flooded with messages.basic_webhook
container has code in it to throttle alert messages of the same source though that they must be a minute apart (again, to help prevent spam to users)alerts
structure, but at a higher level in the structure:
send_webhook
- normally, if the level
is not provided or is warning
then an alert
webhook is sent. However, if you set the level to something like info
or debug
, then you can optionally still force a webhook with this flaglevel
- this identifies how alert
is presented to the user. warning
is the default and will show a warning error as well as put a warning notification in the event log (increasing the warning count in the UI by 1). info
is similar - it displays an informative message in the UI to the user and adds a message to the event log, but it isn’t a warning message that needs to be addressed. debug
will allow you to send a message to the event log, but it will not display a toast notification to the user.alert
- your normal string message that’s displayed to the user and put in the event logwebhook_alert
- optional dictionary data that doesn’t get displayed to the user or put in the operation event log, but is instead sent along as custom data to the custom_webhook
webhook for additional processing. Specifically, the data sent to the custom_webhook
is as follows:webhook_alert
, source
, and alert
string are all also passed in.