|
| 1 | +# Alerts |
| 2 | + |
| 3 | +## Shared arguments |
| 4 | + |
| 5 | +Search args are shared between `print`, `write-to`, and `send-to` commands. |
| 6 | + |
| 7 | +* `advanced-query`: A raw JSON alerts query. Useful for when the provided query parameters do not satisfy your |
| 8 | + requirements. WARNING: Using advanced queries is incompatible with other query-building args. |
| 9 | +* `-b`, `--begin`: The beginning of the date range in which to look for alerts, can be a date/time in yyyy-MM-dd (UTC) |
| 10 | + or yyyy-MM-dd HH:MM:SS (UTC+24-hr time) format where the 'time' portion of the string can be partial |
| 11 | + (e.g. '2020-01-01 12' or '2020-01-01 01:15') or a short value representing days (30d), hours (24h) or minutes (15m) |
| 12 | + from current time. |
| 13 | +* `-e`, `--end`: The end of the date range in which to look for alerts, argument format options are the same as --begin. |
| 14 | +* `--severity`: Filter alerts by severity. Defaults to returning all severities. |
| 15 | + Available choices=['HIGH', 'MEDIUM', 'LOW'] |
| 16 | +* `--state`: Filter alerts by state. Defaults to returning all states. Available choices=['OPEN', 'RESOLVED']. |
| 17 | +* `--actor`: Filter alerts by including the given actor(s) who triggered the alert. Args must match actor username |
| 18 | + exactly. |
| 19 | +* `--actor-contains`: Filter alerts by including actor(s) whose username contains the given string. |
| 20 | +* `--exclude-actor`: Filter alerts by excluding the given actor(s) who triggered the alert. Args must match actor |
| 21 | + username exactly. |
| 22 | +* `--exclude-actor-contains`: Filter alerts by excluding actor(s) whose username contains the given string. |
| 23 | +* `--rule-name`: Filter alerts by including the given rule name(s). |
| 24 | +* `--exclude-rule-name`: Filter alerts by excluding the given rule name(s). |
| 25 | +* `--rule-id`: Filter alerts by including the given rule id(s). |
| 26 | +* `--exclude-rule-id`: Filter alerts by excluding the given rule id(s). |
| 27 | +* `--rule-type`: Filter alerts by including the given rule type(s). |
| 28 | + Available choices=['FedEndpointExfiltration', 'FedCloudSharePermissions', 'FedFileTypeMismatch']. |
| 29 | +* `--exclude-rule-type`: Filter alerts by excluding the given rule type(s). |
| 30 | + Available choices=['FedEndpointExfiltration', 'FedCloudSharePermissions', 'FedFileTypeMismatch']. |
| 31 | +* `--description`: Filter alerts by description. Does fuzzy search by default. |
| 32 | +* `-f`, `--format` (optional): The format used for outputting file events. Available choices= [CEF,JSON,RAW-JSON]. |
| 33 | +* `-i`, `--incremental` (optional): Only get file events that were not previously retrieved. |
| 34 | + |
| 35 | +## print |
| 36 | + |
| 37 | +Print file events to stdout. |
| 38 | + |
| 39 | +Arguments: |
| 40 | +* search args (note that begin date is often required). |
| 41 | + |
| 42 | +Usage: |
| 43 | +```bash |
| 44 | +code42 alerts print -b <begin-date> <args> |
| 45 | +``` |
| 46 | + |
| 47 | +## write-to |
| 48 | + |
| 49 | +Write file events to the file with the given name. |
| 50 | + |
| 51 | +Arguments: |
| 52 | +* `output_file`: The name of the local file to send output to. |
| 53 | +* search args (note that begin date is often required). |
| 54 | + |
| 55 | +Usage: |
| 56 | +```bash |
| 57 | +code42 alerts write-to -b 2020-03-01 <rgs> |
| 58 | +``` |
| 59 | + |
| 60 | +## send-to |
| 61 | + |
| 62 | +Send file events to the given server address. |
| 63 | + |
| 64 | +Arguments: |
| 65 | +* `server`: The server address to send output to. |
| 66 | +* `protocol` (optional): Protocol used to send logs to server. Available choices= [TCP, UDP]. |
| 67 | +* search args (note that begin date is often required). |
| 68 | + |
| 69 | +Usage: |
| 70 | +```bash |
| 71 | +code42 alerts send-to <server> <optional-args> <args> |
| 72 | +``` |
| 73 | + |
| 74 | +## clear-checkpoint |
| 75 | + |
| 76 | +Remove the saved file event checkpoint from 'incremental' (-i) mode. |
| 77 | + |
| 78 | +Usage: |
| 79 | +```bash |
| 80 | +code42 alerts clear-checkpoint |
| 81 | +``` |
0 commit comments