<?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: Splunk_server field is not available when we search with CIM syntax in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415268#M7220</link>
    <description>&lt;P&gt;Hello Frank,&lt;/P&gt;

&lt;P&gt;yes , a datamodel search.&lt;/P&gt;

&lt;P&gt;The combination of splunk version 6.6.7 and CIM 4.6 permit this kind of search.  Nevertheless I think that this change is for the splunk version not for the CIM addon version.&lt;/P&gt;

&lt;P&gt;thanks for your response!&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jan 2019 15:39:30 GMT</pubDate>
    <dc:creator>lightech1</dc:creator>
    <dc:date>2019-01-21T15:39:30Z</dc:date>
    <item>
      <title>Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415259#M7211</link>
      <description>&lt;P&gt;Hello Community!&lt;/P&gt;

&lt;P&gt;When we do some search in CIM syntax with Splunk 6.6.x , we saw the CIM fields like por example : Al_traffic.xxx and also the basic fields like src_ip , src_port and the Splunk_server .&lt;/P&gt;

&lt;P&gt;So when we update the version of splunk to 7.x, the splunk_server field is present in the basic search:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/263699-captura.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;But  we saw that when we do the CIM search syntax only shows the "CIM fields" and no the other fields:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/263700-captura2.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;This behavior becomes a problem because we have some reports and alerts that used CIM Syntax and Splunk_server field to filter events from a indexer in particular, so with this change, all returns 0 values because the splunk_server field not show when we used the CIM syntax.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:50:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415259#M7211</guid>
      <dc:creator>lightech1</dc:creator>
      <dc:date>2020-09-29T22:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415260#M7212</link>
      <description>&lt;P&gt;HI;&lt;/P&gt;

&lt;P&gt;you did see that you have 2 search errors? might be linked to your problem, what do they say?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 07:31:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415260#M7212</guid>
      <dc:creator>dkeck</dc:creator>
      <dc:date>2019-01-21T07:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415261#M7213</link>
      <description>&lt;P&gt;Hello Dkeck, thanks for your response!&lt;/P&gt;

&lt;P&gt;No, that messages are related to other things, error on lookups, something like that.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 12:27:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415261#M7213</guid>
      <dc:creator>lightech1</dc:creator>
      <dc:date>2019-01-21T12:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415262#M7214</link>
      <description>&lt;P&gt;Did you check in all fields?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 12:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415262#M7214</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2019-01-21T12:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415263#M7215</link>
      <description>&lt;P&gt;Hello p_grav&lt;/P&gt;

&lt;P&gt;yes, I have checked all fields but when we make the search on CIM syntax, only shows the CIM table fields and source, host, sourcetype (nothing more).&lt;/P&gt;

&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 12:47:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415263#M7215</guid>
      <dc:creator>lightech1</dc:creator>
      <dc:date>2019-01-21T12:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415264#M7216</link>
      <description>&lt;P&gt;Hi lightech1,&lt;/P&gt;

&lt;P&gt;According to below document only _time, host, source, and sourcetype get inherited from Root object in data models of CIM.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/CIM/4.12.0/User/Howtousethesereferencetables#How_to_find_a_field"&gt;https://docs.splunk.com/Documentation/CIM/4.12.0/User/Howtousethesereferencetables#How_to_find_a_field&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Could you please try to add &lt;CODE&gt;splunk_server&lt;/CODE&gt; field in inherited field using auto-extracted method?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 12:59:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415264#M7216</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2019-01-21T12:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415265#M7217</link>
      <description>&lt;P&gt;Thanks p_gurav&lt;/P&gt;

&lt;P&gt;I see the documentation but this procedure i need to do for all the CIM tables right?,&lt;/P&gt;

&lt;P&gt;In spite of I have thought this option,  is not apply in particular to my case because I need to resolve this issue without re-configuring all the alerts/reports, because taking in consideration that I need to add the splunk_server to all the CIM tables, we need to change splunk_server in the syntax of all reports/alerts with for example "all_traffic.splunk_server"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:51:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415265#M7217</guid>
      <dc:creator>lightech1</dc:creator>
      <dc:date>2020-09-29T22:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415266#M7218</link>
      <description>&lt;P&gt;So with "CIM Syntax" you mean a datamodel search?&lt;/P&gt;

&lt;P&gt;What version of CIM did you have where this worked? Because I checked an instance that is still on CIM 4.8 and that also does not have splunk_server in the CIM datamodels.&lt;/P&gt;

&lt;P&gt;I don't think it is typically recommended to change the default CIM models. But then again, filtering out data that is on a specific indexer anyway sounds like quite a special use case, so perhaps in this case it would be the right thing to do...&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 15:35:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415266#M7218</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-01-21T15:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415267#M7219</link>
      <description>&lt;P&gt;Hello mate @lightech1&lt;/P&gt;

&lt;P&gt;Check this out &lt;A href="https://answers.splunk.com/answers/709895/how-come-our-data-models-are-only-displaying-cim-f.html"&gt;https://answers.splunk.com/answers/709895/how-come-our-data-models-are-only-displaying-cim-f.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 15:38:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415267#M7219</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2019-01-21T15:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415268#M7220</link>
      <description>&lt;P&gt;Hello Frank,&lt;/P&gt;

&lt;P&gt;yes , a datamodel search.&lt;/P&gt;

&lt;P&gt;The combination of splunk version 6.6.7 and CIM 4.6 permit this kind of search.  Nevertheless I think that this change is for the splunk version not for the CIM addon version.&lt;/P&gt;

&lt;P&gt;thanks for your response!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 15:39:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415268#M7220</guid>
      <dc:creator>lightech1</dc:creator>
      <dc:date>2019-01-21T15:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415269#M7221</link>
      <description>&lt;P&gt;hello alemarzu,&lt;/P&gt;

&lt;P&gt;That is the key. Thank you very much !! and thanks all the people that helps!!&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Leonardo&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 16:02:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415269#M7221</guid>
      <dc:creator>lightech1</dc:creator>
      <dc:date>2019-01-21T16:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415270#M7222</link>
      <description>&lt;P&gt;Are you using &lt;CODE&gt;| tstats&lt;/CODE&gt; or &lt;CODE&gt;| datamodel&lt;/CODE&gt; or &lt;CODE&gt;| from datamodel&lt;/CODE&gt;?  There is a solution for the latter 2, but not for the first.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 16:05:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415270#M7222</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-21T16:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415271#M7223</link>
      <description>&lt;P&gt;That could be, since I guess that field was inherited from the Root object like source, sourcetype, _time and host. So not really part of the actual DM definition itself (I also can't find it in the CIM DM definitions v4.6).&lt;/P&gt;

&lt;P&gt;But I checked it on 6.5.3.1, which (if I'm not mistaken) predates your 6.6.7? So wondering if this is a difference between splunk versions or whether this was some kind of customization done on your 6.6.7 install that was lost in the upgrade?&lt;/P&gt;

&lt;P&gt;v6.6.7 docs for field inheritance in data models doesn't mention splunk_server as a field: &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.6.7/Knowledge/Aboutdatamodels#Field_inheritance" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/6.6.7/Knowledge/Aboutdatamodels#Field_inheritance&lt;/A&gt;&lt;BR /&gt;
Then again, it does say "such as". And also mentioned these inherited fields cannot be edited...&lt;/P&gt;

&lt;P&gt;Edit: see alemarzu's comment, seems this is indeed new in 7.1.3 and by design: &lt;A href="https://answers.splunk.com/comments/717028/view.html" target="_blank"&gt;https://answers.splunk.com/comments/717028/view.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:51:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415271#M7223</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2020-09-29T22:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415272#M7224</link>
      <description>&lt;P&gt;hello woodcock,&lt;/P&gt;

&lt;P&gt;we are using this two syntax:&lt;/P&gt;

&lt;P&gt;example:&lt;/P&gt;

&lt;P&gt;| datamodel Malware Malware search | search&lt;/P&gt;

&lt;P&gt;| from datamodel: "Malware.Malware"&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 16:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415272#M7224</guid>
      <dc:creator>lightech1</dc:creator>
      <dc:date>2019-01-21T16:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415273#M7225</link>
      <description>&lt;P&gt;I'm glad it helped!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 17:42:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415273#M7225</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2019-01-21T17:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415274#M7226</link>
      <description>&lt;P&gt;Sometime in the 7.* release stream splunk modified the &lt;CODE&gt;datamodel&lt;/CODE&gt; command and broke it so that it no longer allows access to all fields from the raw event context.  I reported it as a bug (as have other people) but they are closing these cases saying that it is not a bug and not a problem.  I &lt;EM&gt;HIGHLY&lt;/EM&gt; encourage you to open a case also.&lt;/P&gt;

&lt;P&gt;I am actually working on a full SIEM app for CIM users and part of it has these 2 macros, which will solve your problem (put into &lt;CODE&gt;macros.conf&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[SIEMMacro_GetDatamodelSPL(3)]
args = datamodelName_INPUT, nodeName_INPUT, SPLfieldName_OUTPUT
definition = datamodel $datamodelName_INPUT$ $nodeName_INPUT$\
| table * \
| spath path=constraints{}.search output=search \
| mvexpand search \
| format "(" "(" "" ")" "AND" ")" \
| rex field=search mode=sed "s/\\\\\"/::::/g s/\"//g s/::::/\"/g"\
\
| rename COMMENT1of2 AS "The rest of the code expands the macro because otherwise we get this error:"\
| rename COMMENT2of2 AS "Error in 'SearchParser': The search specifies a macro 'cim_DataModelNameHere_indexes' that cannot be found"\
\
| rex field=search "[^`]+`(?&amp;lt;macro_name&amp;gt;[^`]+)"\
| map search="|makeresults | eval macro_definition=[ |rest /servicesNS/-/Splunk_SA_CIM/admin/macros splunk_server=local | search title=$macro_name$ \
| rex field=definition mode=sed \"s/\\\"/\\\\\\\"/g s/^/\\\"/ s/$/\\\"/\"\
| eval definition=if(len(definition)&amp;gt;=5, definition, \"(index=*)\")\
| return $definition ]\
| eval search = replace(\"$search$\", \"`$macro_name$`\", \" \" . macro_definition . \" \")\
| table search" \
| rename search AS $SPLfieldName_OUTPUT$
errormsg = Description: Author = Gregg Woodcock woodcock@Splunxter.com
iseval = 0

[SIEMMacro_datamodelCIM(2)]
args = datamodelName_INPUT, nodeName_INPUT
definition = [|`SIEMMacro_GetDatamodelSPL($datamodelName_INPUT$, $nodeName_INPUT$, search)`]
errormsg = Description: Author = Gregg Woodcock woodcock@Splunxter.com
iseval = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you use it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`SIEMMacro_datamodelCIM(Malware, Malware)` splunk_server="Delta"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`SIEMMacro_datamodelCIM(Change_Analysis, Registry_Changes)`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that you DO NOT need a &lt;CODE&gt;| search&lt;/CODE&gt; between the macro call and the other &lt;CODE&gt;field="value"&lt;/CODE&gt; search clauses, so these searches are much faster than before, too.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 18:06:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415274#M7226</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-21T18:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415275#M7227</link>
      <description>&lt;P&gt;Thank you woodcock, I will try that Macro in a lab!&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 18:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415275#M7227</guid>
      <dc:creator>lightech1</dc:creator>
      <dc:date>2019-01-31T18:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk_server field is not available when we search with CIM syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415276#M7228</link>
      <description>&lt;P&gt;If the raw event ( &lt;CODE&gt;_raw&lt;/CODE&gt; ) contains any field/value-encoding, then you can add &lt;CODE&gt;| kv&lt;/CODE&gt; to the end of your search to cause those fields to be extracted.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2019 21:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-server-field-is-not-available-when-we-search-with-CIM/m-p/415276#M7228</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-09-08T21:37:31Z</dc:date>
    </item>
  </channel>
</rss>

