Reporting

Splunk DataModel Unknown Fields

burakatabay
Path Finder

Hi Splunkers,

Is there a way to extract all unknown fields in a Data Model with a single query ?

Have a good day :

0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

| from datamodel YourDataModelNameHere
| fieldsummary
| regex values = "\"value\":\"unknown\""
| table field

View solution in original post

VSIRIS
Path Finder

Try This...

| datamodel 
data_model_name root_object_name search | table _time, sourcetype, root_object_name.*

Example: | datamodel Network_Traffic All_Traffic search| search All_Traffic.*="unknown" | dedup sourcetype | table _time, sourcetype, All_Traffic.*

woodcock
Esteemed Legend

Like this:

| from datamodel YourDataModelNameHere
| fieldsummary
| regex values = "\"value\":\"unknown\""
| table field

burakatabay
Path Finder

it's works
Thank you :

0 Karma

dmarling
Builder

Can you define what you mean by "unknown fields"? You set the fields in the data model when you create it. Here's a Splunk query that can pull everything from the json that it saves the data model under. It will show all of the fields that are present in the data model under the objects array:

| rest splunk_server="local" "/servicesNS/-/-/data/models"
| search  title="datamodel_title"
| table eai:data
| spath input="eai:data"

Is that what you are looking for?

If this comment/answer was helpful, please up vote it. Thank you.
0 Karma

dmarling
Builder

Can you define what you mean by "unknown fields"? You set the fields in the data model when you create it. Here's a Splunk query that can pull everything from the json that it saves the data model under. It will show all of the fields that are present in the data model under the objects array:

| rest splunk_server="local" "/servicesNS/-/-/data/models"
| search  title="datamodel_title"
| table eai:data
| spath input="eai:data"

Is that what you are looking for?

If this comment/answer was helpful, please up vote it. Thank you.
0 Karma

burakatabay
Path Finder

Sorry Not exactly.

I want to see Splunk CIM Data Model -> model -> unknown fields

For example :

Endpoint.Processes Datamodel
process_id = OK
process_name = OK
process_exec = unknown
process_path = unknown

how ı see all this unknown fields in one search ?

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 ...