<?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: Use Rex extracted field to do duration calculations in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-Rex-extracted-field-to-do-duration-calculations/m-p/544097#M154123</link>
    <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;What I want to do is first to extract table name then calculate duration of one table operation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each table, we have 6 operation log , however different tables is been worked asynchronously. And all the event log &amp;nbsp;from different overlap .&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like the one table operation log below, I can search by the table name to list them all ,then calculate the duration. &amp;nbsp;However, how can I use the extracted table name in further calculation using transaction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:56.097-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"data retrieval for table tblpupatientimages is completed"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:56.096-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"tblpupatientimages json is pushed to file align/migration/pending/azhao5yu/tblpupatientimages/tblpupatientimages_0.json"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:55.735-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"data retrieval for table tblpupatientimages, index 0 is completed"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:55.715-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"data retrieval for table tblpupatientimages, index 0 is starting"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:55.714-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"data retrieval for table tblpupatientimages is starting"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:52.560-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"INFO","logger_name":"com.aligntech.ids.services.migration.job.AbstractTaskProcessor","message":"triggered task for tblpupatientimages, identifying column name vip_patient_id, total values to be retrieved 28"}&lt;/P&gt;</description>
    <pubDate>Wed, 17 Mar 2021 02:24:08 GMT</pubDate>
    <dc:creator>last_dance</dc:creator>
    <dc:date>2021-03-17T02:24:08Z</dc:date>
    <item>
      <title>Use Rex extracted field to do duration calculations</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-Rex-extracted-field-to-do-duration-calculations/m-p/543965#M154084</link>
      <description>&lt;P&gt;I have a bunch of logs contains different table operation, and I want to check how much time each table operation cost. I extract the table name from the message, however, How to use this extracted value to calculate the duration of table operation for each. Got stuck here.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=stg_heroku app_env=ppr app_name=datamigration |rex field=_raw "data retrieval for table (?&amp;lt;table_name&amp;gt;\w+) is starting" |transaction 'table_name' startswith="starting" endswith="json is pushed" |stats perc90(duration) as 90%_Consumed_Time&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I try to extract table_name using rex, and use table_name for transaction for grouping.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="last_dance_0-1615885226796.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13339i19F65E0EDD214F95/image-size/medium?v=v2&amp;amp;px=400" role="button" title="last_dance_0-1615885226796.png" alt="last_dance_0-1615885226796.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone can help on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 09:06:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-Rex-extracted-field-to-do-duration-calculations/m-p/543965#M154084</guid>
      <dc:creator>last_dance</dc:creator>
      <dc:date>2021-03-16T09:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Use Rex extracted field to do duration calculations</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-Rex-extracted-field-to-do-duration-calculations/m-p/544044#M154109</link>
      <description>&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;eval epoch = strptime(your_time_field, “%Y-%m-%d ... remaining time format ”)&lt;/P&gt;&lt;P&gt;| delta epoch&lt;/P&gt;&lt;P&gt;complete the time format with your time stamp&amp;nbsp;&lt;/P&gt;&lt;P&gt;the eval converts the time stamp into epoch with is in seconds and the delta calculates the diff between each epoch&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you want after that you can make more readable using&lt;/P&gt;&lt;P&gt;| eval duration = tostring(delta, “duration”)&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 18:05:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-Rex-extracted-field-to-do-duration-calculations/m-p/544044#M154109</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2021-03-16T18:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Use Rex extracted field to do duration calculations</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-Rex-extracted-field-to-do-duration-calculations/m-p/544097#M154123</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;What I want to do is first to extract table name then calculate duration of one table operation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each table, we have 6 operation log , however different tables is been worked asynchronously. And all the event log &amp;nbsp;from different overlap .&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like the one table operation log below, I can search by the table name to list them all ,then calculate the duration. &amp;nbsp;However, how can I use the extracted table name in further calculation using transaction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:56.097-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"data retrieval for table tblpupatientimages is completed"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:56.096-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"tblpupatientimages json is pushed to file align/migration/pending/azhao5yu/tblpupatientimages/tblpupatientimages_0.json"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:55.735-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"data retrieval for table tblpupatientimages, index 0 is completed"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:55.715-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"data retrieval for table tblpupatientimages, index 0 is starting"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:55.714-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"DEBUG","logger_name":"com.aligntech.ids.services.migration.job.TableMigrationTaskProcessor","message":"data retrieval for table tblpupatientimages is starting"}&lt;BR /&gt;{"heroku-guid":"4d22a1d1-4dca-41f0-87ad-ab8804017095","heroku-dyno":"web.2","@timestamp":"2021-03-10T01:22:52.560-08:00","app_env":"ppr","app_name":"datamigration","app_version":"no","env_label":"no","migrationId":"26232","clinid":"azhao5yu","thread_name":"Async-Data-Reading-Thread-6","level":"INFO","logger_name":"com.aligntech.ids.services.migration.job.AbstractTaskProcessor","message":"triggered task for tblpupatientimages, identifying column name vip_patient_id, total values to be retrieved 28"}&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 02:24:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-Rex-extracted-field-to-do-duration-calculations/m-p/544097#M154123</guid>
      <dc:creator>last_dance</dc:creator>
      <dc:date>2021-03-17T02:24:08Z</dc:date>
    </item>
  </channel>
</rss>

