<?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: Need help with Splunk Query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510941#M143099</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;This works with one batch, if there are more, then you need to update that query.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;| makeresults
| eval _raw="INFO | jvm 1 | main | 2020/07/16 03:30:08.407 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Found 13 set of files to process
INFO | jvm 1 | main | 2020/07/16 04:21:57.914 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Satus . RESULT :true
INFO | jvm 1 | main | 2020/07/16 04:21:57.914 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ended . RESULT :true"
| multikv noheader=t
| eval jvm=Column_3, step=Column_6
| rex "Ended\s+\.\s+RESULT\s+:(?&amp;lt;result&amp;gt;\w+)"
| rex "Found\s+(?&amp;lt;noFiles&amp;gt;\d+) set of files to process"
| stats earliest(_time) as Starttime latest(_time) as FinishTime count as noStatus values(result) as result values(noFiles) as noFiles by jvm step
| eval CurrentStatus = case(isnotnull(result), "Finished", noStatus &amp;gt; 1, "Running", isnotnull(noFiles), "Started", true(), "Unkown status")
| eval Starttime = strftime(Starttime, "%c"), FinishTime = strftime(FinishTime, "%c")
| table Starttime FinishTime CurrentStatus&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 25 Jul 2020 12:33:32 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2020-07-25T12:33:32Z</dc:date>
    <item>
      <title>Need help with Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510936#M143096</link>
      <description>&lt;P&gt;Hi All.&lt;BR /&gt;&lt;BR /&gt;I need help with Splunk Query for below scenario:&lt;BR /&gt;&lt;BR /&gt;I need to show the status of my cronjob in below format.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Starttime&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;FinishTIme&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;CurrentStatus&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Time when Job Starts&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Time when Job Finishes&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Started/Running/Finished&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Start:-&lt;BR /&gt;INFO | jvm 1 | main | 2020/07/16 03:30:08.407 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;BR /&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Found 13 set of files to process&lt;BR /&gt;&lt;BR /&gt;End:-&lt;BR /&gt;INFO | jvm 1 | main | 2020/07/16 04:21:57.914 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;BR /&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ended . RESULT :true&lt;BR /&gt;&lt;BR /&gt;In between there are many lines for which status should be running..&lt;BR /&gt;&lt;BR /&gt;Thanks in dvance&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jul 2020 09:12:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510936#M143096</guid>
      <dc:creator>nilbak1</dc:creator>
      <dc:date>2020-07-25T09:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510937#M143097</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;is the “jvm 1” and “main” same for all steps in one job? How you can separate the another jobs on log files/events?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jul 2020 10:35:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510937#M143097</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-07-25T10:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510939#M143098</link>
      <description>&lt;P&gt;Yes , its same for all the the events.&lt;BR /&gt;I am using the common string in the search query for the job for which I want to print the below message.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jul 2020 11:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510939#M143098</guid>
      <dc:creator>nilbak1</dc:creator>
      <dc:date>2020-07-25T11:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510941#M143099</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;This works with one batch, if there are more, then you need to update that query.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;| makeresults
| eval _raw="INFO | jvm 1 | main | 2020/07/16 03:30:08.407 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Found 13 set of files to process
INFO | jvm 1 | main | 2020/07/16 04:21:57.914 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Satus . RESULT :true
INFO | jvm 1 | main | 2020/07/16 04:21:57.914 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ended . RESULT :true"
| multikv noheader=t
| eval jvm=Column_3, step=Column_6
| rex "Ended\s+\.\s+RESULT\s+:(?&amp;lt;result&amp;gt;\w+)"
| rex "Found\s+(?&amp;lt;noFiles&amp;gt;\d+) set of files to process"
| stats earliest(_time) as Starttime latest(_time) as FinishTime count as noStatus values(result) as result values(noFiles) as noFiles by jvm step
| eval CurrentStatus = case(isnotnull(result), "Finished", noStatus &amp;gt; 1, "Running", isnotnull(noFiles), "Started", true(), "Unkown status")
| eval Starttime = strftime(Starttime, "%c"), FinishTime = strftime(FinishTime, "%c")
| table Starttime FinishTime CurrentStatus&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 25 Jul 2020 12:33:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/510941#M143099</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-07-25T12:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/511098#M143149</link>
      <description>&lt;P&gt;Thanks a ton.&lt;BR /&gt;It worked like a gem.&lt;BR /&gt;&lt;BR /&gt;I am able to create Splunk query based on you suggestion.&lt;BR /&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 12:30:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-with-Splunk-Query/m-p/511098#M143149</guid>
      <dc:creator>nilbak1</dc:creator>
      <dc:date>2020-07-27T12:30:28Z</dc:date>
    </item>
  </channel>
</rss>

