Splunk Search

How to list _key value pairs for all entities in ITSI ?

Suara
Explorer

Hello all ! 

Can anyone help me in editing the below SPL so it can only list the _key - value paris for the entities ? 

| rest splunk_server=local /servicesNS/nobody/SA-ITOA/itoa_interface/entity report_as=text
fields="_key,title,identifier,informational,identifying_name"
| eval value=spath(value,"{}")
| mvexpand value
| eval entity_title=spath(value, "title"),
entity_name=spath(value, "identifying_name"),
entity_aliases=mvzip(spath(value, "identifier.fields{asd}"),spath(value, "identifier.values{}"),"="),
entity_info=mvzip(spath(value, "informational.fields{}"),spath(value, "informational.values{}"),"=")


This is a solution i found online but its rather complicated for my SPL skills at the moment.... 

Thank you in advance ! 

Labels (3)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

Maybe you can share sample search results (full text, anonymize as needed) and let us know which XML nodes represent "entities"?  Is there anything wrong with the search you posted?  If the search produces what you need, what kind of change do you want?

Based on that posted search, I speculate that there is no inherent structure in search results that tells user what are key-value pairs of an "entity".  In other words, the so-called "entity" is a construct invented by whoever posted this search.  Without knowing actual data structure, it is fruitless for volunteers to try simplification.

0 Karma

Suara
Explorer

Hey thanks for the comment ! I will formulate my question better and share more information as needed 

0 Karma
Get Updates on the Splunk Community!

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...

Get ready to show some Splunk Certification swagger at .conf24!

Dive into the deep end of data by earning a Splunk Certification at .conf24. We're enticing you again this ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Now On-Demand Join us to learn more about how you can leverage Service Level Objectives (SLOs) and the new ...