<?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: How to extract a specific data from log in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605744#M11544</link>
    <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; Sorry for that. No its not the exact 5th field(above is just sample) and expected output is something like this(possible)&lt;/P&gt;&lt;TABLE width="199"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="69"&gt;Date&lt;/TD&gt;&lt;TD width="66"&gt;Passenger&lt;/TD&gt;&lt;TD width="64"&gt;Cash&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15/7/2022&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;85000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for very quick response.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2022 07:42:55 GMT</pubDate>
    <dc:creator>thangarun</dc:creator>
    <dc:date>2022-07-15T07:42:55Z</dc:date>
    <item>
      <title>How to extract a specific data from log?</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605738#M11542</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;I am a rookie in Splunk and need your help to extract a fields from the log,&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;2022-07-15&lt;/SPAN&gt; &lt;SPAN class=""&gt;14:30:43 , &lt;SPAN&gt;Oracle WebLogic Server is fully supported on Kubernetes&lt;/SPAN&gt;&amp;nbsp;, xsjhjediodjde,&lt;/SPAN&gt;"approvalCode":"YES",&lt;FONT face="arial black,avant garde"&gt;"totalCash":"85000"&lt;/FONT&gt;,"passenger":"A",dgegrgrg4t3g4t3g4t3g4t,rgrfwefiuascjcusc,&lt;/P&gt;
&lt;P&gt;In this log i would like to have a extract as Cash and display the value in a tabular form as Date|Passenger|Amount&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please suggest.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 16:52:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605738#M11542</guid>
      <dc:creator>thangarun</dc:creator>
      <dc:date>2022-07-15T16:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a specific data from log</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605742#M11543</link>
      <description>&lt;P&gt;You will need to be more specific&lt;/P&gt;&lt;P&gt;Assuming comma delimited, is the field you are interested in always the 5th field?&lt;/P&gt;&lt;P&gt;Does it always start with "totalCash"?&lt;/P&gt;&lt;P&gt;What would your expected output look like, e.g. does the Cash column always contain "totalCash"?&lt;/P&gt;&lt;P&gt;Do you already have some fields extracted when the events were ingested/indexed?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 07:27:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605742#M11543</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-15T07:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a specific data from log</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605744#M11544</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; Sorry for that. No its not the exact 5th field(above is just sample) and expected output is something like this(possible)&lt;/P&gt;&lt;TABLE width="199"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="69"&gt;Date&lt;/TD&gt;&lt;TD width="66"&gt;Passenger&lt;/TD&gt;&lt;TD width="64"&gt;Cash&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15/7/2022&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;85000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for very quick response.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 07:42:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605744#M11544</guid>
      <dc:creator>thangarun</dc:creator>
      <dc:date>2022-07-15T07:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a specific data from log</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605745#M11545</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247714"&gt;@thangarun&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;said, it isn't so clear what's the diferene (in your logs) between cash and amount.&lt;/P&gt;&lt;P&gt;Anyway, the regex to extract the totalCash is the following&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\"totalCash\":\"(?&amp;lt;totalCash&amp;gt;\d+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/KmAhE5/1" target="_blank"&gt;https://regex101.com/r/KmAhE5/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 07:45:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605745#M11545</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-15T07:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a specific data from log</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605747#M11546</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/247714"&gt;@thangarun&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;update after your message:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\"totalCash\":\"(?&amp;lt;totalCash&amp;gt;\d+)\",\"passenger\":\"(?&amp;lt;passenger&amp;gt;[^\"]+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/KmAhE5/2" target="_blank"&gt;https://regex101.com/r/KmAhE5/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Supponing that that date and time you have is also the event timestamp, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| rex "\"totalCash\":\"(?&amp;lt;totalCash&amp;gt;\d+)\",\"passenger\":\"(?&amp;lt;passenger&amp;gt;[^\"]+)"
| table _time passenger totalCash &lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 07:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605747#M11546</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-15T07:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a specific data from log</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605749#M11547</link>
      <description>&lt;P&gt;Depending on your actual data (a single example doesn't really cut it unless it is 100% representative), you may need to deal with decimals&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\"totalCash\":\"(?&amp;lt;totalCash&amp;gt;[\d\.]+)\",\"passenger\":\"(?&amp;lt;passenger&amp;gt;[^\"]+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 15 Jul 2022 07:54:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605749#M11547</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-15T07:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a specific data from log</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605751#M11548</link>
      <description>&lt;P&gt;Awesome....&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 07:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605751#M11548</guid>
      <dc:creator>thangarun</dc:creator>
      <dc:date>2022-07-15T07:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a specific data from log</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605752#M11549</link>
      <description>&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 07:57:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-extract-a-specific-data-from-log/m-p/605752#M11549</guid>
      <dc:creator>thangarun</dc:creator>
      <dc:date>2022-07-15T07:57:59Z</dc:date>
    </item>
  </channel>
</rss>

