<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ITSI Entity Object API results eval help in Splunk ITSI</title>
    <link>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/489820#M1900</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;...
| eval entity_title=spath(value, "title"),
entity_name=spath(value, "identifying_name"),
entity_aliases=mvzip(spath(value, "identifier.fields{}"),spath(value, "identifier.values{}"),"="),
entity_info=mvzip(spath(value, "informational.fields{}"),spath(value, "informational.values{}"),"="),
cpu_cores=spath(value, "informational.values{0}")
| rename entity_name as _raw
| kv
| renmae entity_aliases as _raw
| kv
| rename info as _raw
| kv
| fields - _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;A little trick.&lt;/P&gt;

&lt;P&gt;your &lt;CODE&gt;spath&lt;/CODE&gt; usage is nice.&lt;/P&gt;</description>
    <pubDate>Sat, 02 May 2020 23:16:59 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-05-02T23:16:59Z</dc:date>
    <item>
      <title>ITSI Entity Object API results eval help</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/489819#M1899</link>
      <description>&lt;P&gt;I finally figured out how to use the entity rest API object to pull my informational values.&amp;nbsp; Only problem is I can't figure out how to dynamically assign key value pairs to table from multivalue&amp;nbsp;json arrays.&amp;nbsp; This is as far as I have gotten and would greatly appreciate your eyes and time:&lt;/P&gt;

&lt;P&gt;| rest splunk_server=local /servicesNS/nobody/SA-ITOA/itoa_interface/entity&lt;BR /&gt;
fields="_key,title,identifier,informational,identifying_name" report_as=text&lt;BR /&gt;
| eval value=spath(value,"{}")&lt;BR /&gt;
| mvexpand value&lt;BR /&gt;
| eval entity_title=spath(value, "title"),&lt;BR /&gt;
entity_name=spath(value, "identifying_name"),&lt;BR /&gt;
entity_aliases=mvzip(spath(value, "identifier.fields{}"),spath(value, "identifier.values{}"),"="),&lt;BR /&gt;
entity_info=mvzip(spath(value, "informational.fields{}"),spath(value, "informational.values{}"),"="),&lt;BR /&gt;
cpu_cores=spath(value, "informational.values{0}")&lt;/P&gt;

&lt;P&gt;The second to last eval brings the informational values I want together, but as a multi-value field.&amp;nbsp; The last eval is a straight set my value to this array value eval. I would like to attempt to do that without having to hard set it for every value.&amp;nbsp; Not every entity is configured the same (I am not above clearing out my 16,000 entities and forcing standard entry by users). Dynamically creating the key value pairs as single value fields would be much more palatable instead.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I appreciate any help at all.  &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/489819#M1899</guid>
      <dc:creator>cdemir</dc:creator>
      <dc:date>2020-09-30T05:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: ITSI Entity Object API results eval help</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/489820#M1900</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;...
| eval entity_title=spath(value, "title"),
entity_name=spath(value, "identifying_name"),
entity_aliases=mvzip(spath(value, "identifier.fields{}"),spath(value, "identifier.values{}"),"="),
entity_info=mvzip(spath(value, "informational.fields{}"),spath(value, "informational.values{}"),"="),
cpu_cores=spath(value, "informational.values{0}")
| rename entity_name as _raw
| kv
| renmae entity_aliases as _raw
| kv
| rename info as _raw
| kv
| fields - _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;A little trick.&lt;/P&gt;

&lt;P&gt;your &lt;CODE&gt;spath&lt;/CODE&gt; usage is nice.&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 23:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/489820#M1900</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-02T23:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: ITSI Entity Object API results eval help</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/489821#M1901</link>
      <description>&lt;P&gt;Oh man! That is a nifty trick.  I had no idea I could do that and does exactly what I needed it to. You're awesome and thank you for the assistance. &lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 18:06:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/489821#M1901</guid>
      <dc:creator>cdemir</dc:creator>
      <dc:date>2020-05-03T18:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: ITSI Entity Object API results eval help</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/521039#M2184</link>
      <description>&lt;P&gt;Another trick that worked for me.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;| rest splunk_server=local /servicesNS/nobody/SA-ITOA/itoa_interface/entity report_as=text
| eval value=spath(value,"{}")
| mvexpand value
| eval info_fields=spath(value,"informational.fields{}"),
alias_fields=spath(value,"identifier.fields{}"),
entity_id=spath(value, "_key"),
entity_title=spath(value, "title"),
entity_name=spath(value, "identifying_name")
| appendpipe [ 
| mvexpand alias_fields 
| eval field_value = spath(value,alias_fields."{}"), field_type="alias" 
| rename alias_fields as field_name 
]
| appendpipe [
| where isnull(field_type)
| mvexpand info_fields 
| eval field_value = spath(value,info_fields."{}"), field_type="info"
| rename info_fields as field_name 
]
| where isnotnull(field_type)
| table entity_id entity_name entity_title field_name field_value field_type&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Sep 2020 12:08:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/ITSI-Entity-Object-API-results-eval-help/m-p/521039#M2184</guid>
      <dc:creator>sandrosov_splun</dc:creator>
      <dc:date>2020-09-23T12:08:15Z</dc:date>
    </item>
  </channel>
</rss>

