<?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: Strcat and lookups in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107858#M28056</link>
    <description>&lt;P&gt;It looks to me like you have mismatched &lt;CODE&gt;"&lt;/CODE&gt; (quote) marks, but maybe that was just transcribed wrong. Use the &lt;CODE&gt;eval&lt;/CODE&gt; &lt;CODE&gt;+&lt;/CODE&gt; or &lt;CODE&gt;.&lt;/CODE&gt; operators instead of strcat:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval ALARM_DESCRIPTION = "String1" + user + host + " xyz" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Apr 2012 07:25:01 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2012-04-03T07:25:01Z</dc:date>
    <item>
      <title>Strcat and lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107857#M28055</link>
      <description>&lt;P&gt;I have a query regarding the use of the strcat functionality.  The following search is used to generate and alarm condition.   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ft" ftp | stats  count(eval(status="failed")) as fail_cnt   count(eval(status="success")) as success_cnt by user | strcat "[OPS:FTP:CRITICAL]{NODE:MON1}SFTP Connectivity " user host "  Please raise incident with userdescription" "userdetails ALARM_DESCRIPTION | eval CLEAR=case(success_cnt&amp;gt;0, "1")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It works fine except that the userdetails and userdescription  within the strcat argument will not populate.  Userdetails and userdescription are lookups from a file (using the user field) which are valid and will populate if defined in a table i.e &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table user success_cnt failed_cnt userdetails userdescription
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help on this would be appreciated. &lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 06:55:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107857#M28055</guid>
      <dc:creator>mcwomble</dc:creator>
      <dc:date>2012-04-03T06:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Strcat and lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107858#M28056</link>
      <description>&lt;P&gt;It looks to me like you have mismatched &lt;CODE&gt;"&lt;/CODE&gt; (quote) marks, but maybe that was just transcribed wrong. Use the &lt;CODE&gt;eval&lt;/CODE&gt; &lt;CODE&gt;+&lt;/CODE&gt; or &lt;CODE&gt;.&lt;/CODE&gt; operators instead of strcat:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval ALARM_DESCRIPTION = "String1" + user + host + " xyz" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Apr 2012 07:25:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107858#M28056</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-04-03T07:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Strcat and lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107859#M28057</link>
      <description>&lt;P&gt;The problem here seems to be that no fields are passed on after the stats command.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2012 03:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107859#M28057</guid>
      <dc:creator>mcwomble</dc:creator>
      <dc:date>2012-04-04T03:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Strcat and lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107860#M28058</link>
      <description>&lt;P&gt;That is as designed. &lt;CODE&gt;stats&lt;/CODE&gt; only outputs field specifically computed, and the split-by fields. You should either run the lookup again, or use &lt;CODE&gt;first(fieldname) as fieldname&lt;/CODE&gt; in stats.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2012 05:22:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Strcat-and-lookups/m-p/107860#M28058</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-04-04T05:22:53Z</dc:date>
    </item>
  </channel>
</rss>

