<?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 display raw result if no specific result is available? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52335#M12712</link>
    <description>&lt;P&gt;my final search looks like:&lt;/P&gt;

&lt;P&gt;index=sonicwall app=* "Connection Closed" | stats sum(sent) sum(rcvd) by dst_ip app | lookup sonicwall_app_id app_id as app OUTPUT app_name | eval "Application" = coalesce(app_name, app) | fields dst_ip, "Application", sum(sent), sum(rcvd) | rename dst_ip as "Destination" | rename sum(sent) as "Sent Bytes" | rename sum(rcvd) as "Received Bytes"&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:41:34 GMT</pubDate>
    <dc:creator>jalfrey</dc:creator>
    <dc:date>2020-09-28T14:41:34Z</dc:date>
    <item>
      <title>how to display raw result if no specific result is available?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52332#M12709</link>
      <description>&lt;P&gt;I'm doing a pretty basic search which looks for a "connection closed" message and displays a variable called app. I have an automatic lookup which converts the app value to an application name. Not all of the values can be looked up in my lookup table. How do I run a search and display the application name (app_name) and if that's not available then display the app (numeric value)? &lt;/P&gt;

&lt;P&gt;Here is the search I have made that calculates bytes sent/received and displays bot the app name and the app numeric value. &lt;/P&gt;

&lt;P&gt;app=* "Connection Closed" | stats sum(sent) sum(rcvd) by dst_ip app | lookup sonicwall_app_id app_id as app OUTPUT app_name as Application | fields dst_ip, Application, app, sum(sent), sum(rcvd) | rename dst_ip as "Destination IP" | rename app to "App ID" | rename sum(sent) as "Bytes Sent" | rename sum(rcvd) as "Bytes Received"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52332#M12709</guid>
      <dc:creator>jalfrey</dc:creator>
      <dc:date>2020-09-28T14:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to display raw result if no specific result is available?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52333#M12710</link>
      <description>&lt;P&gt;Create a field that uses either the app_name if it's not null, otherwise use app_id:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval yournewfield = coalesce(app_name, app_id) | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:41:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52333#M12710</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2020-09-28T14:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to display raw result if no specific result is available?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52334#M12711</link>
      <description>&lt;P&gt;that worked great! Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2013 22:08:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52334#M12711</guid>
      <dc:creator>jalfrey</dc:creator>
      <dc:date>2013-08-30T22:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to display raw result if no specific result is available?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52335#M12712</link>
      <description>&lt;P&gt;my final search looks like:&lt;/P&gt;

&lt;P&gt;index=sonicwall app=* "Connection Closed" | stats sum(sent) sum(rcvd) by dst_ip app | lookup sonicwall_app_id app_id as app OUTPUT app_name | eval "Application" = coalesce(app_name, app) | fields dst_ip, "Application", sum(sent), sum(rcvd) | rename dst_ip as "Destination" | rename sum(sent) as "Sent Bytes" | rename sum(rcvd) as "Received Bytes"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52335#M12712</guid>
      <dc:creator>jalfrey</dc:creator>
      <dc:date>2020-09-28T14:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to display raw result if no specific result is available?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52336#M12713</link>
      <description>&lt;P&gt;+1 on a nice use of coalesce!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2013 22:22:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-display-raw-result-if-no-specific-result-is-available/m-p/52336#M12713</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2013-08-30T22:22:41Z</dc:date>
    </item>
  </channel>
</rss>

