All Apps and Add-ons

How to write Data Model mapping expressions in add-on builder?

kathychurch
Explorer

I am building an add-on with the Splunk Add-On builder and want to map some of my data to CIM types.
The "FIELDALIAS" mapping type is very straightforward and works fine. But I can't find any examples or documentation for how to do an "EVAL" type of mapping for the more complicated cases. Anyone know the proper way to format these expressions?

Thank you for any help!

alt text

0 Karma
1 Solution

chli_splunk
Splunk Employee
Splunk Employee

Basically this is an interactive tool to let you call Splunk Eval functions. Please refer Splunk documents for details.
https://docs.splunk.com/Documentation/SplunkCloud/7.1.3/SearchReference/CommonEvalFunctions

View solution in original post

chli_splunk
Splunk Employee
Splunk Employee

Basically this is an interactive tool to let you call Splunk Eval functions. Please refer Splunk documents for details.
https://docs.splunk.com/Documentation/SplunkCloud/7.1.3/SearchReference/CommonEvalFunctions

kathychurch
Explorer

OK, thank you.

I have 2 scenarios

  1. I want to populate a static string. Is the best way to do this with an expression like this: printf("%s","Foo")

  2. I want to break up one field (a URL) into several fields in the Web CIM (uri_path and uri_query). I wrote a regular expression for this purpose, is there any way to use it here?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...