<?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 insert the values if match is found? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368408#M108587</link>
    <description>&lt;P&gt;@chitreshakumar, refer to answer by @somesoni2. I think that is what you need.&lt;/P&gt;</description>
    <pubDate>Sat, 30 Dec 2017 15:23:31 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-12-30T15:23:31Z</dc:date>
    <item>
      <title>How to insert the values if match is found?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368404#M108583</link>
      <description>&lt;P&gt;I have duration     00:00:10.000000 i.e 00 hrs 00 mins 10 secs .But I want to add days also as my field has many values containing days also .SO is there any method to add " '00+' 00:00:10.000000" to the matched values "00:00:10.000000"??&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 09:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368404#M108583</guid>
      <dc:creator>chitreshakumar</dc:creator>
      <dc:date>2017-12-29T09:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert the values if match is found?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368405#M108584</link>
      <description>&lt;P&gt;@chitreshakumar are you looking for something like the following?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval durationInSec="12736,823321"
| fields - _time
| makemv durationInSec delim=","
| mvexpand durationInSec
| eval durationString=tostring(durationInSec,"duration")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are just looking for concatenating number of days to HH:MM:SS you can use eval with dot &lt;CODE&gt;(.)&lt;/CODE&gt; or plus &lt;CODE&gt;(+)&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval durationString="00:00:10.000000"
| eval days="01"
| eval durationString=days."+".durationString
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If it is not one of the above, please share your current query and data to add more details.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 09:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368405#M108584</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-29T09:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert the values if match is found?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368406#M108585</link>
      <description>&lt;P&gt;@niketnilay Thanks for the reply !!! I want something like second one .Since I have days values in some duration field 11+09:45:25.591549 .And in some values it is having "HH:MM:SS" so I want to add days .&lt;BR /&gt;
At first I need to match only those values having HH:MM:SS then add days to it.I think I am clear about the requirement .Let me know if you want me to elaborate more&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 10:04:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368406#M108585</guid>
      <dc:creator>chitreshakumar</dc:creator>
      <dc:date>2017-12-29T10:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert the values if match is found?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368407#M108586</link>
      <description>&lt;P&gt;Try like this (will add &lt;CODE&gt;00+&lt;/CODE&gt; to duration if it doesn't have day notation)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search with duration field say with name "duration"
| eval duration=if(match(duration,"^\d+\+",duration,"00+".duration)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Dec 2017 15:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368407#M108586</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-12-29T15:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert the values if match is found?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368408#M108587</link>
      <description>&lt;P&gt;@chitreshakumar, refer to answer by @somesoni2. I think that is what you need.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2017 15:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368408#M108587</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-30T15:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert the values if match is found?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368409#M108588</link>
      <description>&lt;P&gt;@chitreshakumar - This one will work, or you can use the altered regex I put onto the other question.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2017 20:50:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-the-values-if-match-is-found/m-p/368409#M108588</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-12-30T20:50:13Z</dc:date>
    </item>
  </channel>
</rss>

