<?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: Can I add a priority field value as P3  for all the output? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341198#M163215</link>
    <description>&lt;P&gt;It works... Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2018 07:01:57 GMT</pubDate>
    <dc:creator>Mayanakhan</dc:creator>
    <dc:date>2018-02-01T07:01:57Z</dc:date>
    <item>
      <title>Can I add a priority field value as P3  for all the output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341194#M163211</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I want to add a priority as P3 for the below output.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Query
    index=nonprod sourcetype=port_availability  | dedup HostName |search Status!="Connection successful"| table _time HostName port Status priority|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample output&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                 HostName  port    Status                         priority
1/31/2018 16:38 Hosthj        22    Connection failed   
1/31/2018 16:38 Hostxyz      22 Connection timeout  
1/31/2018 16:38 Hostghjyu      22   Connection failed   
1/31/2018 16:38 Hostyuio         22 Connection failed   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Expected output&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                 HostName  port    Status                         priority
1/31/2018 16:38 Hosthj       22 Connection failed                    P3
1/31/2018 16:38 Hostxyz     22  Connection timeout                 P3
1/31/2018 16:38 Hostghjyu     22    Connection failed                    P3
1/31/2018 16:38 Hostyuio       22   Connection failed                    P3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Mayana Khan&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 15:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341194#M163211</guid>
      <dc:creator>Mayanakhan</dc:creator>
      <dc:date>2018-01-31T15:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add a priority field value as P3  for all the output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341195#M163212</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=nonprod sourcetype=port_availability  | dedup HostName|eval priority = if(Status=="Connection failed" OR Status=="Connection timeout","P3","")| table _time HostName port Status priority
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jan 2018 16:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341195#M163212</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-01-31T16:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add a priority field value as P3  for all the output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341196#M163213</link>
      <description>&lt;P&gt;Try like this (if the priority column has a value use that OR default it to P3)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=nonprod sourcetype=port_availability  | dedup HostName |search Status!="Connection successful"| table _time HostName port Status priority | eval priority=coalesce(priority,"P3")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jan 2018 16:08:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341196#M163213</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-01-31T16:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add a priority field value as P3  for all the output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341197#M163214</link>
      <description>&lt;P&gt;@Mayanakhan, if you have &lt;CODE&gt;priority&lt;/CODE&gt; field in your indexed data and the same should display the value as &lt;CODE&gt;P3&lt;/CODE&gt;, then make sure you are using the correct case for priority field name i.e. field name &lt;CODE&gt;Priority&lt;/CODE&gt; is not same as &lt;CODE&gt;priority&lt;/CODE&gt; .&lt;/P&gt;

&lt;P&gt;If you need to add static value of &lt;CODE&gt;priority&lt;/CODE&gt; as &lt;CODE&gt;P3&lt;/CODE&gt; for all the rows returned you can add &lt;CODE&gt;| eval priority="P3"&lt;/CODE&gt; as your final pipe.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourCurrentSearch&amp;gt;
| eval Priority="P3"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Jan 2018 16:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341197#M163214</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-01-31T16:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add a priority field value as P3  for all the output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341198#M163215</link>
      <description>&lt;P&gt;It works... Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 07:01:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341198#M163215</guid>
      <dc:creator>Mayanakhan</dc:creator>
      <dc:date>2018-02-01T07:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can I add a priority field value as P3  for all the output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341199#M163216</link>
      <description>&lt;P&gt;Thanks its working!!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 07:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-add-a-priority-field-value-as-P3-for-all-the-output/m-p/341199#M163216</guid>
      <dc:creator>Mayanakhan</dc:creator>
      <dc:date>2018-02-01T07:02:52Z</dc:date>
    </item>
  </channel>
</rss>

