<?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: connect/concatenate two searches into one and visualize it as a single value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24253#M4416</link>
    <description>&lt;P&gt;Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="udp:514" ((BGP_NEIGHBOR_STATE_CHANGED ("Established to Idle" OR "Established to Active" OR "Established to OpenConfirm") OR (BGP-5-ADJCHANGE Down)) | rex  field=_raw "neighbor (?&amp;lt;neighbor&amp;gt;.*)" | table neighbor | dedup neighbor | stats count as BGP_DOWN  | rangemap field=BGP_DOWN low=0-0 elevated=1-1 default=severe
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 11 Apr 2012 10:08:14 GMT</pubDate>
    <dc:creator>dart</dc:creator>
    <dc:date>2012-04-11T10:08:14Z</dc:date>
    <item>
      <title>connect/concatenate two searches into one and visualize it as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24249#M4412</link>
      <description>&lt;P&gt;Hello &lt;/P&gt;

&lt;P&gt;I have two searches:&lt;BR /&gt;
Search A: &lt;CODE&gt;BGP_NEIGHBOR_STATE_CHANGED source="udp:514" AND ("Established to Idle" OR "Established to Active" OR "Established to OpenConfirm" | stats count as BGP_DOWN  | rangemap field=BGP_DOWN low=0-0 elevated=1-1 default=severe&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Search B: &lt;CODE&gt;BGP-5-ADJCHANGE source="udp:514" Down | rex  field=_raw "neighbor (?&amp;lt;neighbor&amp;gt;.*)" | table neighbor | dedup neighbor | stats count as BGP_DOWN  | rangemap field=BGP_DOWN low=0-0 elevated=1-1 default=severe&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I want to connect these two searches into one and represent it as a single value.&lt;/P&gt;

&lt;P&gt;I've tried sth like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((BGP_NEIGHBOR_STATE_CHANGED ("Established to Idle" OR "Established to Active" OR "Established to OpenConfirm") OR (BGP-5-ADJCHANGE Down | rex  field=_raw "neighbor (?&amp;lt;neighbor&amp;gt;.*)" | table neighbor | dedup neighbor)) AND source="udp:514" | stats count as BGP_DOWN  | rangemap field=BGP_DOWN low=0-0 elevated=1-1 default=severe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I get error: &lt;CODE&gt;Error in 'search' command: Unable to parse the search: unbalanced parentheses.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Is there a way to connect/concatenate two searches into one and visualize this as a single value?&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
C4r7m4n&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2012 08:59:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24249#M4412</guid>
      <dc:creator>C4r7m4n</dc:creator>
      <dc:date>2012-04-11T08:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: connect/concatenate two searches into one and visualize it as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24250#M4413</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;append&lt;/CODE&gt; for this.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Append"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Append&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2012 09:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24250#M4413</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-04-11T09:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: connect/concatenate two searches into one and visualize it as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24251#M4414</link>
      <description>&lt;P&gt;Hello @Ayn&lt;/P&gt;

&lt;P&gt;I tried a couple of seconds ago what you have sent me and I've got error:&lt;/P&gt;

&lt;P&gt;Search operation 'bgp' is unknown. You might not have permission to run this operation.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2012 09:28:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24251#M4414</guid>
      <dc:creator>C4r7m4n</dc:creator>
      <dc:date>2012-04-11T09:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: connect/concatenate two searches into one and visualize it as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24252#M4415</link>
      <description>&lt;P&gt;At the start of a search within [ ] to need to use the word search. I suspect you have copied and pasted your original search into the brackets.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2012 09:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24252#M4415</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2012-04-11T09:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: connect/concatenate two searches into one and visualize it as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24253#M4416</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="udp:514" ((BGP_NEIGHBOR_STATE_CHANGED ("Established to Idle" OR "Established to Active" OR "Established to OpenConfirm") OR (BGP-5-ADJCHANGE Down)) | rex  field=_raw "neighbor (?&amp;lt;neighbor&amp;gt;.*)" | table neighbor | dedup neighbor | stats count as BGP_DOWN  | rangemap field=BGP_DOWN low=0-0 elevated=1-1 default=severe
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Apr 2012 10:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24253#M4416</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2012-04-11T10:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: connect/concatenate two searches into one and visualize it as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24254#M4417</link>
      <description>&lt;P&gt;Hello @Ayn&lt;/P&gt;

&lt;P&gt;Yes, You were right I didn't notice the search word.&lt;/P&gt;

&lt;P&gt;I've changed this and it's worinking but I don't know why it's counting 2 time more &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;This is my changed search:&lt;BR /&gt;
&lt;CODE&gt;BGP_NEIGHBOR_STATE_CHANGED source="udp:514" AND ("Established to Idle" OR "Established to Active" OR "Established to OpenConfirm") | append [search BGP-5-ADJCHANGE source="udp:514" Down | rex  field=_raw "neighbor (?&amp;lt;neighbor&amp;gt;.*)" | table neighbor | dedup neighbor]  | stats count as BGP_DOWN | rangemap field=BGP_DOWN low=0-0 elevated=1-1 default=severe&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;With code: &lt;CODE&gt;stats count as BGP_DOWN | rangemap field=BGP_DOWN low=0-0 elevated=1-1 default=severe&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;it's counting to 6 instead 3. Do you have any idea why?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 07:59:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24254#M4417</guid>
      <dc:creator>C4r7m4n</dc:creator>
      <dc:date>2012-04-12T07:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: connect/concatenate two searches into one and visualize it as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24255#M4418</link>
      <description>&lt;P&gt;Hello @dart&lt;/P&gt;

&lt;P&gt;Your code doesn't work for me. I have the same error as befor: Error in 'search' command: Unable to parse the search: unbalanced parentheses.&lt;/P&gt;

&lt;P&gt;Secondly, i think it cannot work because in Search A there is not word neighbor so if you concatenate two first searches and the try to search regexp by neigbour, then when search A occure the regexp will not filtr this. &lt;/P&gt;

&lt;P&gt;I don't know if I wrote this clearly...&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 08:42:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/connect-concatenate-two-searches-into-one-and-visualize-it-as-a/m-p/24255#M4418</guid>
      <dc:creator>C4r7m4n</dc:creator>
      <dc:date>2012-04-12T08:42:47Z</dc:date>
    </item>
  </channel>
</rss>

