argus-toolbelt Logo

Contents:

  • Getting Started
    • Installation
      • Install
      • Update
    • Basic Configuration
    • Usage
      • Examples
        • Using a custom-made command
        • Using an auto-generated api endpoint
        • Creating a simple command
  • Configuration
    • Setting up a local config file
    • Using a different configuration file
    • Config fields
      • Argus API
        • Alternative API URL
        • Authentication
          • API Key
          • Username and password
        • Timeout
      • Argus CLI
        • Logging
          • Changing logging level
    • Environments
    • Includes
    • Environment variables
  • Usage Examples
    • Examples
      • Running a custom created command
      • Calling the API
  • Common Concepts
    • Arguments, parameters, options and flags
      • Definitions
      • Explicitly separating parameters from options
    • Date arguments
  • argus-cli Caveats
    • Multiple-Value options
      • Multiple-Value options should be passed once with several values
      • Multiple-value options “swallow” arguments
    • Boolean/flag options
      • Argument values starting with -
  • argus-cli Guides
    • Importing customer networks data into Argus with argus-cli
      • Preparing data for the import
        • network addresses
        • subnet masks
        • zones
        • locations
      • Running the import
        • Specifying the input format
          • Using the --format option
          • Using CSV headers
        • Updating and deleting networks
        • running the import non-interactively
  • Commands
    • cases
      • autocreate-yaml
        • Usage
        • Autoreport flow
        • Configuration
          • structure
          • top-level options
          • search section
          • case section
          • notifications section
          • workflows section
          • updates section
      • autocreate
        • Usage
        • Template Primer
          • Creating a template
        • Using enrichments
          • Available enrichments
          • Usage in templates
      • notification-check
        • Usage
    • events
      • search
        • Usage
          • parameters
          • options
        • Using enrichments
          • Available enrichments
    • datastores
      • dump
        • Usage
    • Assets
    • customer-networks
      • list
        • Usage
          • parameters
      • update
        • Usage
          • parameters
          • options
      • list
        • Usage
          • parameters
  • Troubleshooting
    • SSL Problems
      • PIP
      • Toolbelt
  • Changelog
    • Version 6
      • Version 6.23.0
      • Version 6.22.0
      • Version 6.21.0
      • Version 6.20.0
      • Version 6.19.0
      • Version 6.18.0
        • 6.18.x patches
      • Version 6.17
        • 6.17.x patches
      • Version 6.17
      • Version 6.16
      • Version 6.15
      • Version 6.14
        • 6.14.x patches
      • Version 6.13
        • 6.13.x patches
        • 6.13.0
      • Version 6.12
        • 6.12.x patches
      • Version 6.11
      • Version 6.10
      • Version 6.9
        • 6.9.x patches
      • Version 6.8
        • 6.8.x patches
      • Version 6.7
      • Version 6.6
      • Version 6.5
      • Version 6.4
      • Version 6.3
      • Version 6.2
      • Version 6.1
      • 6.1.x patches
      • 6.0.x patches
    • Version 5
      • Version 5.1
        • 5.1.x patches
      • Version 5.0
        • 5.0.x patches
    • Version 4
      • Version 4.8
        • 4.8.x patches
      • Version 4.7
      • Version 4.6
        • 4.6.x patches
      • Version 4.5
        • 4.5.x patches
      • Version 4.4
        • 4.4x patches
      • Version 4.3
        • 4.3x patches
      • Version 4.2
      • Version 4.1
        • 4.1x patches
    • Version 3
      • Version 3.8
        • 3.8x patches
      • Version 3.7
        • 3.7x patches
  • Developer Documentation
    • Introduction to Argus Toolbelt Development
      • Creating a new plugin
        • Function metadata
      • Guides
        • Creating a simple plugin
          • Step 1: Create the script
          • Step 2: Add a function
          • Step 3: Register the command to the commandline
          • Step 4: Adding help text to the plugin command
        • Creating an API plugin
        • Logging from a plugin
      • Examples
        • Registering a command
        • Registering a command with extra functionality
    • Using Argus API in commands
      • Using Argus API in your scripts
        • Authentication
          • Option 0: Do nothing
          • Option 1: Provide an API key
          • Option 2: Using a decorator
          • Option 3: Turn a function into an authenticated function
    • Argument Parsing
      • Defining an argument
      • Using type-checking
        • Special cases
          • Date and time
          • Lists
          • Dicts
          • Booleans
          • Files
          • Choices
      • Adding documentation to commands
    • Advanced Usecases
      • Registering packages as argus-cli modules
        • Setup with Poetry
        • Setup with setuptools
    • API Reference
      • argus_cli
        • utils
          • formatting
        • helpers
          • retry
          • pagination
      • argus_plugins
        • cases
          • constants
        • events
          • constants
    • Getting started
    • Example command
argus-toolbelt
  • Commands
  • events
  • search
  • View page source

search

The events search command is used to search for aggregated events.

Usage

parameters

argus-cli events search START END TEMPLATE_FOLDER
START

Start date/time of the search window

Uses the flexible date format

END

End date/time of the search window

Uses the flexible date format

options

general options

--no-exact-match-property

flag. Turns of exact matching of properties, which is on by default.

--min-severity <severity>

Minimum severity of events.

valid values are defined in SEVERITIES

--min-count <count>

Minimum aggregated count of events.

--enrich <enrichment1> [<enrichment2>, <...>]

One or more enrichment(s) to perform on the event data.

see Using enrichments for more details.

--limit <limit>

Amount of items to fetch per request (“page size”).

Defaults to 500.

Note

a high value can negatively impact the service and cause timeouts.

Note

to stop after fetching the number of items specified, use the --no-paginate option.

--no-paginate

flag. If set, pagination will be disabled and only the amount of results specified by --limit will be fetched.

--progress

flag. If set, a progress bar will be displayed while fetching events.

filtering options

These options allow filtering the search results by including or excluding certain field values.

Caution

these are all multiple-value options, see : multiple-value option caveats

--[include|exclude]-customer <customer1> [<customer2>, ...]

Customer(s) to include/exclude.

--[include|exclude]-flag <flag1> [<flag2>, ...]

Flag(s) to include/exclude.

valid values are defined in FLAGS

--[include|exclude]-alarm <alarm_id1> [<alarm_id2>, ...]

Alarm ID(s) to include/exclude.

--[include|exclude]-ip <ip1> [<ip2>, <...>]

IP Address(es) to include/exclude.

--[include|exclude]-[source|destination]-ip <ip1> [<ip2>, ...]

Source/Destination IP Address(es) to include/exclude.

--[source|destination]-ip-min-bits <mask>

Subnet mask to filter source/destination IP addresses on.

--[include|exclude]-signature <signature1> [<signature2>, ...]

Signature(s) to include/exclude.

--[include|exclude]-properties <property1> [<property2>, ...]

Propertie(s) to include/exclude.

--[include|exclude]-attack-category-id <attack_category_id1> [<attack_category_id2>, ...]

Attack category ID(s) to include/exclude.

Using enrichments

The search command supports enriching event data from sources other than the events API through enrichments. Those enrichments are controlled by the argus-cli events search --enrich option.

Multiple enrichments can be specified :

argus-cli events search --enrich ENRICHMENT1 ENRICHMENT2 [...]

Caution

--enrich is a multiple-value option, make sure you understand the Multiple-Value options Caveats

Note

the autocreate command also provides the --enrich option. When running an autocreate script, enrichments need only be used once (either in the events search providing the events or cases autocreate), there is no need to use the option in both commands.

All enrichments add data to the selected events under the "_enrichments_" key. To know precisely where each enrichment add data, refer to the table below.

Available enrichments

Currently, these enrichments can be used with the autocreate script:

name

key

description

customer-networks-source

event["_enrichments_"][""customer-networks"]["source"]

Adds the results of a search of the customer networks API for the source address of the event.

The results are a list of dictionaries, as returned by the customer networks API and defined in API documentation : customer networks service (see models → CustomerNetwork).

Results are sorted by netmask descending, so that the first result will be the most specific and the last one will be the least specific (for example, a /24 network will be listed before a /8 network)

customer-networks-destination

event["_enrichments_"][""customer-networks"]["destination"]

Adds the results of a search of the customer networks API for the destination address of the event.

The results are a list of dictionaries, as returned by the customer networks API and defined in API documentation : customer networks service (see models → CustomerNetwork).

Results are sorted by netmask descending, so that the first result will be the most specific and the last one will be the least specific (for example, a /24 network will be listed before a /8 network)

Previous Next

© Copyright 2021, Mnemonic.

Built with Sphinx using a theme provided by Read the Docs.