<?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 How to apply the condition in multivalue event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303752#M91366</link>
    <description>&lt;P&gt;Splunk Experts,&lt;/P&gt;

&lt;P&gt;How to write the eval command to compare the Multivalue, Below is data,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    **Servicename**    **Status**                                          ServerName
                                                                              NGS121
     Ad_service          Running
     CIM_service         Running
      Jabber             NotRunning
      Citrix             NotRunning.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;IF any of the Status is "NotRunning" I should get the ServiceStatus as "Not-Running" O/P as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Servername                 ServiceStatus

NGS121                     Not-Running
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Feb 2018 21:01:03 GMT</pubDate>
    <dc:creator>VsplunkV</dc:creator>
    <dc:date>2018-02-21T21:01:03Z</dc:date>
    <item>
      <title>How to apply the condition in multivalue event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303752#M91366</link>
      <description>&lt;P&gt;Splunk Experts,&lt;/P&gt;

&lt;P&gt;How to write the eval command to compare the Multivalue, Below is data,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    **Servicename**    **Status**                                          ServerName
                                                                              NGS121
     Ad_service          Running
     CIM_service         Running
      Jabber             NotRunning
      Citrix             NotRunning.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;IF any of the Status is "NotRunning" I should get the ServiceStatus as "Not-Running" O/P as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Servername                 ServiceStatus

NGS121                     Not-Running
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303752#M91366</guid>
      <dc:creator>VsplunkV</dc:creator>
      <dc:date>2018-02-21T21:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply the condition in multivalue event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303753#M91367</link>
      <description>&lt;P&gt;This will create a field called &lt;CODE&gt;ServiceStatus&lt;/CODE&gt; and assign it the value &lt;CODE&gt;Not-Running&lt;/CODE&gt; if any value for &lt;CODE&gt;Status&lt;/CODE&gt; is set to &lt;CODE&gt;NotRunning&lt;/CODE&gt;, and then it will retain only the events where &lt;CODE&gt;ServiceStatus="Not-Running"&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ your existing search ]
| eval ServiceStatus=if(like(Status, "NotRunning"), "Not-Running", "Running")
| where ServiceStatus="Not-Running"
| fields ServerName ServiceStatus
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303753#M91367</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-21T22:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply the condition in multivalue event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303754#M91368</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving multivalued field Status and other fields
| eval Status=if(isnotnull(mvfilter(Status,"NotRunning")),"NonRunning","Running")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303754#M91368</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-02-21T22:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply the condition in multivalue event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303755#M91369</link>
      <description>&lt;P&gt;Thank you. It worked.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:52:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303755#M91369</guid>
      <dc:creator>VsplunkV</dc:creator>
      <dc:date>2018-02-21T22:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply the condition in multivalue event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303756#M91370</link>
      <description>&lt;P&gt;Thank you. It worked&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 22:53:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-apply-the-condition-in-multivalue-event/m-p/303756#M91370</guid>
      <dc:creator>VsplunkV</dc:creator>
      <dc:date>2018-02-21T22:53:06Z</dc:date>
    </item>
  </channel>
</rss>

