<?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 field and check if the value is greater than 300 for the last job? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440287#M125185</link>
    <description>&lt;P&gt;You can do a search time extraction like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your search]|rex "Value\sis\:\s(?P&amp;lt;calibration_duration&amp;gt;\d+)\shours"|table _time calibration_hours
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should give you a listing of all the times, and the calibration durations&lt;/P&gt;

&lt;P&gt;If I understand the second part, you want to trigger an alert if two consecutive events are &amp;gt;300 ?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2019 14:23:58 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2019-03-14T14:23:58Z</dc:date>
    <item>
      <title>How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440286#M125184</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have log that contains this value :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;0&amp;gt; 10/03/19 16:55:00 : Maintenance counter "UV Calibration" Value is: 31 hours.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to check if this value is greater than 300 for the last job&lt;BR /&gt;
so for example if at 10.3.19 16:55:00 it was 300 and than at 10.3.19 16:56:00 it was 1 than it is not interesting me&lt;BR /&gt;
but if at 10.3.19 16:55:00 it was 300 and than at 10.3.19 16:56:00 it was 301 i want to raise an alert and show it in table&lt;/P&gt;

&lt;P&gt;How can i extract this field and calculate this ?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 12:27:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440286#M125184</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-03-14T12:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440287#M125185</link>
      <description>&lt;P&gt;You can do a search time extraction like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your search]|rex "Value\sis\:\s(?P&amp;lt;calibration_duration&amp;gt;\d+)\shours"|table _time calibration_hours
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should give you a listing of all the times, and the calibration durations&lt;/P&gt;

&lt;P&gt;If I understand the second part, you want to trigger an alert if two consecutive events are &amp;gt;300 ?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 14:23:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440287#M125185</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-14T14:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440288#M125186</link>
      <description>&lt;P&gt;Will there be logs for only one job? Are you always comparing 2 most recent job execution logs or it can be any two consecutive job execution?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 14:46:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440288#M125186</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-14T14:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440289#M125187</link>
      <description>&lt;P&gt;well.. the log file can contain many jobs log, from many times&lt;BR /&gt;
but i will always compare 2 recent jobs, yes&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 19:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440289#M125187</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-03-14T19:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440290#M125188</link>
      <description>&lt;P&gt;sorry but i probably did not understand it correctly because this rex returns no results&lt;BR /&gt;
what should be "calibration_duration" and "calibration_hours"?&lt;/P&gt;

&lt;P&gt;about the second part, yes&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:42:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440290#M125188</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-09-29T23:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440291#M125189</link>
      <description>&lt;P&gt;Where are the job names appear in the log? In your sample data, is 31 (which is followed by hours) is the value you want to capture/compare?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 19:48:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440291#M125189</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-14T19:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440292#M125190</link>
      <description>&lt;P&gt;well.. i need to check with our analysts where the job name so i will get back to you but for your second Q, yes, 31 is the value i want to capture&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 10:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440292#M125190</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-03-15T10:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440293#M125191</link>
      <description>&lt;P&gt;hi, i checked and the job name is iirelevant but i have sirial number that i can use&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2019 08:19:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440293#M125191</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-03-17T08:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440294#M125192</link>
      <description>&lt;P&gt;i tried again your solution&lt;BR /&gt;
since i have few rows that contains the string "value" im getting result of the first one which is not the correct one&lt;BR /&gt;
for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;0&amp;gt; 25/02/19 18:41:22 : Maintenance counter "Model 2 Left Pump" Value is: 9 hours.
... 48 lines omitted ...
&amp;lt;0&amp;gt; 25/02/19 18:41:22 : Maintenance counter "PM is Due" Value is: 117 hours.
&amp;lt;0&amp;gt; 25/02/19 18:41:22 : Maintenance counter "UV Calibration" Value is: 12 hours.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;your solution will return the value '9'&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2019 13:34:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440294#M125192</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-03-17T13:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field and check if the value is greater than 300 for the last job?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440295#M125193</link>
      <description>&lt;P&gt;UV Calibration" Value is: 17 hours. will return this value: calibration_duration=4375 &lt;BR /&gt;
can you please explain to me what is this number?&lt;BR /&gt;
maybe you can explain to me the meaning of the regex ?&lt;BR /&gt;
many thanks !&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 07:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-field-and-check-if-the-value-is-greater-than-300/m-p/440295#M125193</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-03-18T07:39:51Z</dc:date>
    </item>
  </channel>
</rss>

