<?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: Extract JSON fields with transforms.conf from UI in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/620004#M106866</link>
    <description>&lt;P&gt;In Fields-&amp;gt;Calculated fields make a calculated field called action and associate it with the sourcetype. The definition would be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(category="SignInLogs", if('properties.authenticationDetails{}.succeeded'="true", "success", "failure"), action)&lt;/LI-CODE&gt;&lt;P&gt;A double if, so if category is not SignInLogs, it will just use any existing action value&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2022 23:49:04 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-11-07T23:49:04Z</dc:date>
    <item>
      <title>How to extract JSON fields with transforms.conf from UI?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/619987#M106862</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to extract several fields from my JSON logs. For example I have a login event like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marco_massari11_0-1667853609238.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22386i69A21D84F37CCE4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marco_massari11_0-1667853609238.png" alt="marco_massari11_0-1667853609238.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I need to create e field "action" when category=SignInLogs and succeeded (last field) is equal to true or false generating the field action=success or action=failure to be CIM compliant. This value is already extracted under the field "properties.authenticationDetails{}.succeeded. Is it possible to do that by fields transformation in Splunk UI?&lt;/P&gt;
&lt;P&gt;Thanks in advance!!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 16:00:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/619987#M106862</guid>
      <dc:creator>marco_massari11</dc:creator>
      <dc:date>2022-11-08T16:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extract JSON fields with transforms.conf from UI</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/620004#M106866</link>
      <description>&lt;P&gt;In Fields-&amp;gt;Calculated fields make a calculated field called action and associate it with the sourcetype. The definition would be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(category="SignInLogs", if('properties.authenticationDetails{}.succeeded'="true", "success", "failure"), action)&lt;/LI-CODE&gt;&lt;P&gt;A double if, so if category is not SignInLogs, it will just use any existing action value&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 23:49:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/620004#M106866</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-11-07T23:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract JSON fields with transforms.conf from UI</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/620008#M106868</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;it seems working fine, but this field&amp;nbsp;&lt;SPAN&gt;properties.authenticationDetails{}.succeeded is not always present within the logs, so in this case I will have action=failure even if the field is not present. Is there a solution to populate the field action only when the field&amp;nbsp;&amp;nbsp;properties.authenticationDetails{}.succeeded is present?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 00:06:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/620008#M106868</guid>
      <dc:creator>marco_massari11</dc:creator>
      <dc:date>2022-11-08T00:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract JSON fields with transforms.conf from UI</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/620012#M106870</link>
      <description>&lt;P&gt;Just add in another "if" clause&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(category="SignInLogs", if('properties.authenticationDetails{}.succeeded'="true", "success", if(isnotnull('properties.authenticationDetails{}.succeeded'), "failure", action)), action)&lt;/LI-CODE&gt;&lt;P&gt;Gets a bit messy with 3 levels of if, you could do it with a 'case' statement, but it would probably be longer anyway&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 00:47:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-JSON-fields-with-transforms-conf-from-UI/m-p/620012#M106870</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-11-08T00:47:12Z</dc:date>
    </item>
  </channel>
</rss>

