<?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 Comparing multiple values for a result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508778#M142143</link>
    <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;need your help in below query. I use below query to get below output.&lt;/P&gt;&lt;P&gt;Query :&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=nw_syslog&lt;BR /&gt;| rex field=_raw "neighbor\s(?&amp;lt;Alarm&amp;gt;[^\s]+)\s(?&amp;lt;Status&amp;gt;[^\s]+)"&lt;BR /&gt;| stats max(_time) as Time latest(Status) AS Status count by nodelabel Alarm&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Output:&amp;nbsp;&lt;/P&gt;&lt;P&gt;nodelabel Alarm Time Downtime Status count&lt;BR /&gt;CMDLA 10.207.31.222 2020-07-13 15:18:55 00:03:00 UP 2&lt;BR /&gt;NGQIT 10.201.68.17 2020-07-13 15:06:35 00:15:19 DOWN 6&lt;BR /&gt;EGCAI 158.29.241.86 2020-07-13 14:48:33 00:33:21 UP 2&lt;BR /&gt;MXMXC 10.253.208.70 2020-07-12 14:48:03 1+00:33:51 UP 1&lt;/P&gt;&lt;P&gt;Problem :&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want only output for below conditions.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;gt; All DOWN must show.&lt;BR /&gt;&amp;nbsp; &amp;gt; UP with only greater than 2 must be shows.&lt;BR /&gt;Please help me with the comparing search for this condition.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2020 10:25:57 GMT</pubDate>
    <dc:creator>jerinvarghese</dc:creator>
    <dc:date>2020-07-13T10:25:57Z</dc:date>
    <item>
      <title>Comparing multiple values for a result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508778#M142143</link>
      <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;need your help in below query. I use below query to get below output.&lt;/P&gt;&lt;P&gt;Query :&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=nw_syslog&lt;BR /&gt;| rex field=_raw "neighbor\s(?&amp;lt;Alarm&amp;gt;[^\s]+)\s(?&amp;lt;Status&amp;gt;[^\s]+)"&lt;BR /&gt;| stats max(_time) as Time latest(Status) AS Status count by nodelabel Alarm&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Output:&amp;nbsp;&lt;/P&gt;&lt;P&gt;nodelabel Alarm Time Downtime Status count&lt;BR /&gt;CMDLA 10.207.31.222 2020-07-13 15:18:55 00:03:00 UP 2&lt;BR /&gt;NGQIT 10.201.68.17 2020-07-13 15:06:35 00:15:19 DOWN 6&lt;BR /&gt;EGCAI 158.29.241.86 2020-07-13 14:48:33 00:33:21 UP 2&lt;BR /&gt;MXMXC 10.253.208.70 2020-07-12 14:48:03 1+00:33:51 UP 1&lt;/P&gt;&lt;P&gt;Problem :&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want only output for below conditions.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;gt; All DOWN must show.&lt;BR /&gt;&amp;nbsp; &amp;gt; UP with only greater than 2 must be shows.&lt;BR /&gt;Please help me with the comparing search for this condition.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 10:25:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508778#M142143</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2020-07-13T10:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing multiple values for a result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508810#M142151</link>
      <description>&lt;P&gt;Please explain your requirements further as "all DOWN" and "UP greater than 2" seem contradictory.&lt;/P&gt;&lt;P&gt;The latter is accomplished using &lt;FONT face="courier new,courier"&gt;where&lt;/FONT&gt; after &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=nw_syslog
| rex field=_raw "neighbor\s(?&amp;lt;Alarm&amp;gt;[^\s]+)\s(?&amp;lt;Status&amp;gt;[^\s]+)"
| stats max(_time) as Time latest(Status) AS Status count by nodelabel Alarm
| where (Status="UP" AND count &amp;gt; 2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 13:04:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508810#M142151</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-13T13:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing multiple values for a result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508812#M142152</link>
      <description>&lt;P&gt;| where ((Status="UP" AND count &amp;gt; 2) OR Status="DOWN")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the above command worked. Thanks, your one liner help me think of this way.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 13:21:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508812#M142152</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2020-07-13T13:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing multiple values for a result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508816#M142154</link>
      <description>&lt;P&gt;If your problem is resolved, then please click an "Accept as Solution" button to help future readers.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 13:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparing-multiple-values-for-a-result/m-p/508816#M142154</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-13T13:34:42Z</dc:date>
    </item>
  </channel>
</rss>

