LogoLogo
WebsiteBlogLogin
  • Onum Docs
  • Use Cases
  • Videos
  • Release Notes
  • Welcome
  • Getting Started
    • About Onum
    • Architecture
    • Deployment
    • Getting Started with Onum
    • Understanding The Essentials
      • Cards and Table Views
      • Data Types
      • Graph Calculations
      • The Time Range Selector
    • Key Terminology
  • THE WORKSPACE
    • Home
    • Listeners
      • Cloud Listeners
      • Listener Integrations
        • Amazon SQS
        • Amazon S3
        • Apache Kafka
        • Azure Event Hubs
        • Cisco NetFlow
        • Google Cloud Storage
        • Google Pub/Sub
        • HTTP
        • HTTP Pull
        • Microsoft 365
        • OpenTelemetry
        • Syslog
        • TCP
      • Labels
    • Pipelines
      • Building a Pipeline
        • AI Assistant
          • AI Pipeline Assistant
          • AI Action Assistant
      • Listeners
      • Actions
        • Advanced
          • Anonymizer
          • Bring Your Own Code
          • Field Generator
          • For Each
          • Google DLP
          • HTTP Request
          • Redis
        • Aggregation
          • Accumulator
          • Group By
        • AI
          • Amazon GenAI
          • BLIP-2
          • Cog
          • Google GenAI
          • Llama
          • Replicate
        • Detection
          • Sigma Rules
        • Enrichment
          • Lookup
        • Filtering
          • Conditional
          • Sampling
        • Formatting
          • Message Builder
        • Transformation
          • Field Transformation
            • Field Transformation Operations
              • Arithmetic / Logic
                • Divide Operation
                • Median
                • Multiply Operation
                • Subtract Operation
                • Sum Operation
              • Code tidy
                • JSON Minify
              • Control characters
                • Escape String
                • Unescape String
              • Conversion
                • Convert Area
                • Convert Data Units
                • Convert Distance
                • Convert Mass
                • Convert Speed
                • List to String
                • String to List
              • Data format
                • From Base
                • From Base64
                • From Hex
                • To Base
                • To Base64
                • To Hex
              • Date / Time
                • From Unix Timestamp
                • To Timestamp
                • To Unix Timestamp
                • Translate Datetime Format
              • Encoding / Decoding
                • From Binary
                • To Binary
                • To Decimal
              • Encryption / Encoding
                • JWT Decode
              • File system permissions
                • Parse Unix file permissions
              • Format conversion
                • CSV to JSON
                • JSON to CSV
              • Hashing
                • Keccak
                • MD2
                • MD4
                • MD5
                • SHA0
                • SHA1
                • SHA2
                • SHA3
                • Shake
                • SM3
              • List manipulation
                • Index list boolean
                • Index list float
                • Index list integer
                • Index list string
                • Index list timestamp
              • Networking
                • Defang IP Address
                • Defang URL
                • Extract IP Address
                • Fang IP Address
                • Fang URLs
                • IP to Hexadecimal
                • Parse URI
                • URL Decode
                • URL Encode
              • Other
                • Parse Int
              • String
                • Length
              • Text sample adding
                • Pad Lines
              • Utils
                • Byte to Human Readable
                • Count Occurrences
                • CRC8 Checksum
                • CRC16 Checksum
                • CRC24 Checksum
                • CRC32 Checksum
                • Credit Card Obfuscator
                • Filter
                • Find and Replace
                • Regex
                • Remove Whitespace
                • Reverse String
                • Shuffle
                • Sort
                • Substring
                • Swap Case
                • To Lower Case
                • To Upper Case
          • Flat JSON
          • JSON Transformation
          • JSON Unroll
          • Math Expression
          • Parser
            • PCL (Parser Configuration Language)
        • Utils
          • Unique
      • Data sinks
      • Bulk Changes
      • Publishing & Versioning
      • Test your Pipeline
    • Data sinks
      • Data sink Integrations
        • Amazon S3
        • Amazon SQS
        • Azure Blob Storage
        • Azure Event Hubs
        • Devo
        • Google BigQuery
        • Google Cloud Storage
        • Google Pub/Sub
        • HTTP
        • Jira
        • Mail
        • Null
        • OpenTelemetry
        • PagerDuty
        • Pushover
        • Qradar
        • Relational Databases
        • ServiceNow
        • Slack
        • Splunk HEC
        • Syslog
        • TCP
        • Telegram
        • Twilio
    • Alerts
  • YOUR VAULT
    • Enrichment
    • Data History
    • Actions
  • ADMINISTRATION
    • Tenant Menu
    • Global Settings
      • Your Account
      • Organization Settings
        • Secrets Management
      • Tenant
        • Authentication
        • Users
        • Activity Log
        • API Keys
  • MARKETPLACE
    • Onum Marketplace
      • Pulling Pipelines
        • Netskope Events Alert
        • OKTA System Log API
        • Sophos Connector SIEM
Powered by GitBook
On this page
  • Overview
  • Ports
  • Configuration
  • Example

Was this helpful?

Export as PDF
  1. THE WORKSPACE
  2. Pipelines
  3. Actions
  4. Filtering

Conditional

Most recent version: v1.1.0

PreviousFilteringNextSampling

Last updated 1 day ago

Was this helpful?

See the changelog of this Action type .

Overview

The Conditional Action evaluates a list of conditions for an event. If an event meets a given condition, it will be sent through an output port specific to that condition. The event will be sent through the default output if it does not meet any conditions.

Set any number of conditions on your data for filtering and alerting.

AI Action Assistant

Ports

These are the input and output ports of this Action:

Input ports
  • Default port - All the events to be processed by this Action enter through this port.

Output ports
  • Default port - Events are sent through this port if no error occurs while processing them.

  • Error port - Events are sent through this port if an error occurs while processing them.

  • Condition port - Each condition you add will have its own port. There is currently a limit of 8 conditions per Action, however, if you link another Conditional to the Default port, you can use the events to continue creating more conditions.

Configuration

1
2

To open the configuration, click the Action in the canvas and select Configuration.

3

Choose how to start adding conditions using the View mode buttons. Select your conditions using the buttons available in the Visual view (default mode), or write them in Code mode.

4

Now, start adding your conditions. Each of the conditions you define will create a new output port in the Action. Give a name to the Port.

5

Choose the Field with the input data you want to use in the condition. This allows you to choose not only the field to filter by, but also the specific Action to take it from, if there are multiple options.

6

Choose a Condition for the filter. The options you see here will differ depending on the data type of the field you have selected:

Condition
Data types
Description

Contains

This condition checks if your input data strings contain certain keywords (either matching the data with another field or entering a specific literal).

In code mode, this condition is represented like this:

  • ${field1} contains ${field2}

  • ${field1} contains "test"

Doesn't contain

This condition checks if your input data strings do not contain certain keywords (either matching the data with another field or entering a specific literal).

In code mode, this condition is represented like this:

  • ${field1} does not contain ${field2}

  • ${field1} does not contain "test"

Equal / Equal to

This condition checks if your input data values are the same as other values (either matching the data with another field or entering a specific literal).

In code mode, this condition is represented like this:

  • ${field1} == ${field2}

  • ${field1} == "test"

  • ${field1} == 5

Not equal / Not equal to

This condition checks if your input data values are not the same as other values (either matching the data with another field or entering a specific literal).

In code mode, this condition is represented like this:

  • ${field1} != ${field2}

  • ${field1} != "test"

  • ${field1} != 5

Is null

This condition checks if your input data values are null.

In code mode, this condition is represented like this:

  • ${field1} is null

Is not null

This condition checks if your input data values are not null.

In code mode, this condition is represented like this:

  • ${field1} is not null

Matches

This condition checks if your input data strings match a given RegEx.

Enter your RegEx in the Regular expression field that appears, or type it directly in the code mode. Click the flag icon in the editor to add additional conditions (you can combine as many as required):

  • multiline - This flag affects the behavior of ^ and $. In multiline mode, matches occur not only at the beginning and the end of the string, but also at the start/end of each line. In code mode, add m at the end of your RegEx to include this condition.

  • insensitive - Add this flag if you want to make the matches case insensitive. In code mode, add i at the end of your RegEx to include this condition.

  • single - In code mode, add s at the end of your RegEx to include this condition.

  • ungreedy - Add this flag if you want to apply an ungreedy (lazy) matching, that is to say, you want to get as few characters as needed to complete the pattern in a single match. In code mode, add U at the end of your RegEx to include this condition.

In code mode, this condition is represented like this:

  • ${field1} matches `\d{3}`

  • ${field1} matches `\d{3}`i

  • ${field1} matches `\d{3}`misU

Does not match

This condition checks if your input data strings do not match a given RegEx.

Enter your RegEx in the Regular expression field that appears, or type it directly in the code mode. Click the flag icon in the editor to add additional conditions (check their description in the Matches condition above).

In code mode, this condition is represented like this:

  • ${field1} does not match `\d{3}`

  • ${field1} does not match `\d{3}`m

  • ${field1} does not match `\d{3}`misU

Less than

This condition checks if your input data numbers are less than other values (either matching the data with another field or entering a specific literal).

In code mode, this condition is represented like this:

  • ${field1} < ${field2}

  • ${field1} < 5

  • ${field1} < 1.4

Less than or equal to

This condition checks if your input data numbers are less than or equal to other values (either matching the data with another field or entering a specific literal).

In code mode, this condition is represented like this:

  • ${field1} <= ${field2}

  • ${field1} <= 5

  • ${field1} <= 1.4

Greater than

This condition checks if your input data numbers are greater than other values (either matching the data with another field or entering a specific literal).

In code mode, this condition is represented like this:

  • ${field1} > ${field2}

  • ${field1} > 5

  • ${field1} > 1.4

Greater than or equal to

This condition checks if your input data numbers are greater than or equal to other values (either matching the data with another field or entering a specific literal).

In code mode, this condition is represented like this:

  • ${field1} >= ${field2}

  • ${field1} >= 5

  • ${field1} >= 1.4

7

Now you can add AND/OR clauses to your condition, or add a new condition entirely using the Add Condition option.

In code mode, AND/OR clauses are represented like this:

  • ${field1} contains "test" and ${field2} == 10

  • ${field1} contains "test" or ${field2} contains "test"

Note that you can add a maximum of 8 conditions/ports.

8

Click Save to complete.

Example

Let's say you have data on error and threat detection methods in storage devices and you wish to detect threats and errors using the Cyclic Redundancy Check methods crc8, crc16 and crc24.

1

Conditional

Add a Conditional to the canvas and link it to the Listener or Action, providing your data.

2

Condition 1

  • Field: crc

  • Condition: equals

  • Field: crc8

Any events meeting this condition will exit via this port. Each condition has its own port.

3

Condition 2

  • Field: crc

  • Condition: equals

  • Field: crc16

4

Condition 3

  • Field: crc

  • Condition: equals

  • Field: crc24

5

Output

Now you have a Conditional action with three output ports, crc8, crc16 and crc24, as well as the default and error ports.

6

Conditional 2

Add another conditional to the canvas and enter the following:

  • Field: msg

  • Condition: contains

  • Field: threat

Now when the message contains "threat", an event will be generated and sent via the threat port.

In order to configure this Action, you must first link it to a Listener or other Action. Go to to learn how to link.

This Action has an AI-powered chat feature that can help you configure its parameters. Read more about it in .

Find Conditional in the Actions tab (under the Filtering group) and drag it onto the canvas. Link it to the required and .

Building a Pipeline
this article
Listener
Data sink
here