CloudFabrix Documentation
Asset IntelligenceOps IntelligenceObservabilityRobotic Data
  • Getting Started
  • CloudFabrix Overview
  • AIOps Platform
  • AIOps Solutions
  • CloudFabrix RDA
    • RDA - Overview
      • RDA - Terminology and Artifacts
    • RDA - Installation
      • Linux OS
      • Windows OS
      • Mac OS
      • RDA Client
      • Worker Nodes
      • Event Gateway
      • Edge Collector
      • Log Shippers
        • Filebeat
        • Fluentd
        • Rsyslog
        • Syslog (udp)
        • Splunk forwarder (Windows and Linux)
        • Winlogbeat (Windows)
      • RDA Log Archives
    • RDA - Administration
      • RDA - Configuration
    • RDA - User Guide
      • RDA - AIOps Studio
        • AIOps Studio - Solution Packages
        • AIOps Studio - Pipelines
        • AIOps Studio - Explore
        • AIOps Studio - Administration
        • RDA CLI in UI
        • AIOps Studio - Examples
          • File Operations
          • Loop Operations
          • Data Management Operations - cfxdm
          • Data mapping - cfxdm - dm:eval
          • Filters - cfxdm - dm:filter
          • Data mapping - cfxdm - dm:map
          • Metadata - cfxdm-dm:metadata
          • Data mapping - cfxdm - dm:functions
            • Any_non_null
            • Concat
            • Datetime
            • Date and Timestamp
            • Evaluate
            • Fixed
            • Highest
            • Join
            • jsonDecode
            • Lower
            • Lowest
            • Match
            • Minutes_Between
            • Replace
            • Seconds_Between
            • Slice
            • Split
            • Strip
            • To_Numeric
            • Ts_To_Datetimestr
            • Upper
            • When_Null
          • Data Mapping cfxdm - dm:sort
          • Data Mapping cfxdm - dm:head
          • Data Mapping cfxdm - dm: tail
          • Data Mapping cfxdm - dm: dedup
          • Data Mapping cfxdm - dm:selectcolumns
          • Data Mapping cfxdm - dm:fixcolumns
          • Data Mapping cfxdm - dm:mergecolumns
          • Data Mapping cfxdm - dm:describe
          • Data Mapping cfxdm - dm:save
          • Data Mapping cfxdm - dm:savedlist
          • Data Mapping cfxdm - dm:recall
          • Data Mapping cfxdm - dm:concat
          • Data Mapping cfxdm - dm:groupby
          • Data Mapping cfxdm - dm:to_type
          • Data Mapping cfxdm - dm:enrich
          • Data Mapping cfxdm - dm:dns_ip_to_name
          • Data Mapping cfxdm - dm:dns_name_to_ip
        • AIOps Studio - Datasource Examples
          • Elasticsearch (v1)
      • RDA - Data Management (cfxdm)
        • cfxdm - dm:filter
        • cfxdm - dm:map
        • cfxdm - dm:functions
        • cfxdm - dm:sort
        • cfxdm - dm:head
        • cfxdm - dm:tail
        • cfxdm - dm:dedup
        • cfxdm - dm:selectcolumns
        • cfxdm - dm:mergecolumns
        • cfxdm - dm:describe
        • cfxdm - dm:hist
        • cfxdm - dm:bin
        • cfxdm - dm:fixcolumns
        • cfxdm - dm:save
        • cfxdm - dm:savedlist
        • cfxdx - dm:recall
        • cfxdm - dm:concat
        • cfxdm - dm:groupby
        • cfxdm - dm:enrich
        • cfxdm - dm:to_type
        • cfxdm - dm:dns_ip_to_name
        • cfxdm - dm:dns_name_to_ip
        • cfxdm - files:loadfile
      • RDA Terminal
        • Examples using Terminal / Commandline
    • RDA - Bot Documentation
    • RDA - Datasource Integrations
      • AppDynamics
      • Dynatrace
      • Dell EMC Unity
      • Elasticsearch
      • Infoblox NetMRI
      • Kubernetes Cluster
      • Linux OS
      • Microsoft Windows Server OS
      • Nagios XI
      • NetApp Clustered ONTAP
      • PRTG Network Monitor
      • VMware vCenter
      • VMware vRealize Operations
    • RDA - Python API
      • Class CaaSDataset
      • Class CaaSClient
      • Python API Example
    • RDA - FAQ
      • Download and Installation
      • Troubleshooting
  • CFXQL - CFX Query Language
    • CFXQL User Interface
  • Operations Intelligence Analytics (OIA)
    • Solution Overview
      • Navigating cfxOIA
      • Any title
    • Administration Guide
      • Active Directory Integration
      • Add Customer
      • First Steps
      • OIA Users
      • Add New Users and Assign Roles
      • Add Environment
      • Add Gateway
      • Add DataSource
      • Add Project
      • Project Configuration
      • Stacks
      • Teams
    • User Guide
      • Incidents
        • Incident
        • Stack
      • Alerts
      • Outcomes
  • INTEGRATIONS
    • Zabbix
    • AppDynamics
    • Dynatrace
    • NetApp C Mode
    • NetApp 7 Mode
    • Splunk Enterprise
    • VMware vCenter
  • OBSERVABILITY
  • Observability - IT Infrastructure Monitoring (cfxPulse)
    • Getting Started
    • Solution Overview
    • Installing cfxPulse Collector
    • Administrator Quick Start Guide
      • Prerequisites
      • Accessing cfxPulse
      • Configuration of cfxPulse
      • Setting Up Monitoring
      • Monitoring Using Prometheus Agents
      • How to add Prometheus Agent Details
      • Discovery of Devices
      • Monitoring Dashboard
    • End User Quick Start Guide
      • Portal Navigation
      • Monitoring Analysis
      • Monitoring
      • Alerts and Incidents
      • Reports
      • NOC/Ops
      • Configuration Backups
      • Interacting With Tabular Reports
      • Creating Custom Dashboards
  • Observability - Log Monitoring & Analytics (CFX LogAnalytics or CLA)
    • Getting Started
    • Solution Overview
    • Solution Key Components
    • Log Forwarding
      • Install and Configure Logstash
      • Sending Logs to Logstash Forwarder
    • Log Collection
      • Collecting Logs from Linux
    • Log Transformation & Enrichment
    • Logstash Installation
      • How to install Java / Logstash on client side
  • Asset Intelligence Analytics (AIA) Solution
    • Getting Started
    • Solution Overview
    • AIA Roles
      • Platform Admin
        • Managed Service Provider (MSP)
        • Authentication Server
        • Set Up Services
        • Organizations
        • Users
      • Organization Admin
        • My Organizations
      • Organization Executive
      • Organization User
    • AIA Tasks, Functions
      • Home Page Navigation
      • Filters
      • Settings Menu
      • Notifications
      • Authentical Server
      • How to Add, Edit, Delete MSP
      • Actions
        • Services
        • Files
        • Dictionaries
        • Discovery Jobs
        • Snapshots
        • Clambda Jobs
        • State Operations
        • Replacement Rate
      • Details
        • Overall
        • POR Insights
        • HW Assets
        • SW Assets
        • Contracts
        • App Dependency
        • Asset List
    • AIA API
    • Enterprise Discovery
      • cfxEdgeCollector
        • Deployment of cfxEdgeCollector
        • Configuration of cfxEdgeCollector
        • cfxEdgeCollector Command Line Options
        • cfxEdgeCollector Help Command
        • Working With cfxEdgeCollector
        • cfxEdgeCollector Auto Export
    • Asset Intelligence & Analytics (AIA) (Delete)
  • CloudFabrix SaaS
    • Signup
    • Navigation
    • User Roles
  • Support
    • Contact Support
Powered by GitBook
On this page
  • Example 1:
  • Example 2:
  • Example 3:
  1. CloudFabrix RDA
  2. RDA - User Guide
  3. RDA - AIOps Studio
  4. AIOps Studio - Examples
  5. Data mapping - cfxdm - dm:functions

Match

PreviousLowestNextMinutes_Between

Last updated 3 years ago

Match

Matches a regular expression and extracts a specific value (if matched). @param expression type string. Regular expression @param flags List of optional flags (A I M L S X) Input must be a string. I - IGNORE THE CASE A - ASCII L - LOCALE X - VERBOSE M - MULTILINE MATCH S - '.' matches all (otherwise regex has a limited set of chars where it matches with )

This function allows users to search for a match using regular expressions within a given dataset.

Example 1:

Step 1: Create an empty match_example_1 using AIOps studio as shown in the below screenshot. 

Step 2: Add the following pipeline code/commands into the above-created pipeline as shown in the below screenshot:

You can copy the below code into your pipeline and execute that in your environment. ##### This pipeline creates a list of rows with hostname and ipaddress ##### RDA dm function 'match' used to demo this example. In this pipeline, each row added ##### has a column with IPAddress and hostname. ##### Pipeline uses RDA dm function match to match to regular expression to pick only ##### ipaddresses. @dm:empty --> @dm:addrow id = 'a1' & APP_Client_FQDN = "host1.acme.com" --> @dm:addrow id = 'a2' & APP_Client_FQDN = "host2.acme.com" --> @dm:addrow id = 'a3' & APP_Client_FQDN = "host3.acme.com" --> @dm:addrow id = 'a4' & APP_Client_FQDN = "172.17.0.1" --> @dm:addrow id = 'a5' & APP_Client_FQDN = "192.168.60.120" --> @dm:addrow id = 'a6' & APP_Client_FQDN = "172.17.0.4" --> @dm:addrow id = 'a7' & APP_Client_FQDN = "172.17.0.3" --> @dm:map func = 'match' & from = 'APP_Client_FQDN' & to = 'IPaddress' & expr = "^(?:[0-9]{1,3}.){3}[0-9]{1,3}$"

Step 3: Click verify button to make sure syntax and pipeline code is correct (as shown below)

Step 4: Click execute button and execute the pipeline. RDA will execute the pipeline without any errors (as shown below)

Step 5: RDA uses the 'match' function to match a regular expression from a selected column, picks up that value, applies regular expression, stores it in the new column (IP Address), and prints it to the screen as shown below.

Example 2:

Step 1: Create an empty match_example_2 using AIOps studio as shown in the below screenshot. 

Step 2: Add the following pipeline code/commands into the above-created pipeline as shown in the below screenshot:

You can copy the below code into your pipeline and execute that in your environment. ##### This pipeline creates a list of rows with hostname and ipaddress ##### RDA dm function 'match' used to demo this example. In this pipeline, each row added ##### has a column with IPAddress and hostname. ##### Pipeline uses RDA dm function match to match to regular expression to pick only ##### hostname from FQDN from the dataset. @dm:empty --> @dm:addrow id = 'a1' & APP_Client_FQDN = "host1.acme.com" --> @dm:addrow id = 'a2' & APP_Client_FQDN = "host2.acme.com" --> @dm:addrow id = 'a3' & APP_Client_FQDN = "host3.acme.com" --> @dm:addrow id = 'a4' & APP_Client_FQDN = "172.17.0.1" --> @dm:addrow id = 'a5' & APP_Client_FQDN = "192.168.60.120" --> @dm:addrow id = 'a6' & APP_Client_FQDN = "172.17.0.4" --> @dm:addrow id = 'a7' & APP_Client_FQDN = "172.17.0.3" --> @dm:map func = 'match' & from = 'APP_Client_FQDN' & to = 'Hostname' & expr = "(.*).acme.com"

Step 3: Click verify button to make sure syntax and pipeline code is correct (as shown below)

Step 4: Click execute button and execute the pipeline. RDA will execute the pipeline without any errors (as shown below)

Step 5: RDA uses the 'match' function to match a regular expression from a selected column, picks up that value, applies regular expression, stores it in the new column (hostname), and prints it to the screen as shown below.

Example 3:

Step 1: Create an empty match_example_3 using AIOps studio as shown in the below screenshot. 

You can copy the below code into your pipeline and execute that in your environment. ##### This pipeline creates a list of rows with hostname and ipaddress ##### RDA dm function 'match' used to demo this example. In this pipeline, each row added ##### has a column with IPAddress and hostname. ##### Pipeline uses RDA dm function match to match to regular expression to pick FQDN ##### and excluding IP Addresses from the dataset. @dm:empty --> @dm:addrow id = 'a1' & APP_Client_FQDN = "host1.acme.com" --> @dm:addrow id = 'a2' & APP_Client_FQDN = "host2.acme.com" --> @dm:addrow id = 'a3' & APP_Client_FQDN = "host3.acme.com" --> @dm:addrow id = 'a4' & APP_Client_FQDN = "172.17.0.1" --> @dm:addrow id = 'a5' & APP_Client_FQDN = "192.168.60.120" --> @dm:addrow id = 'a6' & APP_Client_FQDN = "172.17.0.4" --> @dm:addrow id = 'a7' & APP_Client_FQDN = "172.17.0.3" --> @dm:map func = 'match' & from = 'APP_Client_FQDN' & to = 'Hostname' & expr = "^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$"

Step 3: Click verify button to make sure syntax and pipeline code is correct (as shown below)

Step 4: Click execute button and execute the pipeline. RDA will execute the pipeline without any errors (as shown below)

Step 5: RDA uses the 'match' function to match a regular expression from a selected column, picks up that value, applies regular expression, stores it in the new column (FQDN - hostname.domain), and prints it to the screen as shown below.

Note: Each of the above examples is using different expressions (regular expressions) to extract patterns to match criteria and output required data from the dataset. Also, you can remove the rows with 'None' values using the dm function "@dm:fixnull columns = 'Hostname'"

Empty pipeline
Pipeline code added to empty pipeline created
Pipeilne code is verified using 'Verify' button as shown above.
Successful execution of pipeline without any errors
Successful execution of pipeline using dm function 'match' with regex to print only IP addresses.
Empty pipeline
Pipeline code added to empty pipeline created
Pipeilne code is verified using 'Verify' button as shown above.
Successful execution of pipeline without any errors
Successful execution of pipeline using dm function 'match' with regex to print only hostname.
Empty pipeline
Pipeline code added to empty pipeline created
Pipeilne code is verified using 'Verify' button as shown above.
Successful execution of pipeline without any errors
Successful execution of pipeline using dm function 'match' with regex to print only FQDN.