<?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: Possible to create search macro using Arguments for a user list? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253684#M2237</link>
    <description>&lt;P&gt;Thx for the information!&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2016 14:22:50 GMT</pubDate>
    <dc:creator>jwalzerpitt</dc:creator>
    <dc:date>2016-10-13T14:22:50Z</dc:date>
    <item>
      <title>Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253676#M2229</link>
      <description>&lt;P&gt;I have a search that references 80 users in username field:&lt;/P&gt;

&lt;P&gt;index=abc EventID=4625 (username=abc OR username=def OR ...)&lt;/P&gt;

&lt;P&gt;Is it possible to create a macro with the usernames listed as arguments?&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 13:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253676#M2229</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-13T13:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253677#M2230</link>
      <description>&lt;P&gt;The documentation at &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.0/Knowledge/Definesearchmacros"&gt;Define search macros in Settings&lt;/A&gt;&lt;BR /&gt;
explains - &lt;/P&gt;

&lt;P&gt;-- 7.(Optional) Provide Arguments as appropriate for your search macro. This is a comma-delimited string of argument names without repeated elements. Argument names may only contain alphanumeric characters (a-Z, A-Z, 0-9), underscores, and dashes.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:00:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253677#M2230</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-10-13T14:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253678#M2231</link>
      <description>&lt;P&gt;Use a lookup:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc EventID=4625 [ |inputlookup users.csv | table username] | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could manually manage your lookup or update it using a scheduled search and outputlookup command.&lt;BR /&gt;
You have only to put attention to the name of the lookup column (username): must be the same of your search field (username), otherwise rename it in subsearch.&lt;BR /&gt;
if the search to generate the lookup isn't too slow, you could also use a subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc EventID=4625 [ search index=myindex | dedup username | table username]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:03:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253678#M2231</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-10-13T14:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253679#M2232</link>
      <description>&lt;P&gt;Would the search macro look like as follows?&lt;/P&gt;

&lt;P&gt;index=abc EventID=4625 username=$arg1$&lt;/P&gt;

&lt;P&gt;Also, are the arguments (username) treated as OR?&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:06:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253679#M2232</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-13T14:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253680#M2233</link>
      <description>&lt;P&gt;Thx for the suggestion - any performance hit of input lookup vs. macro search?&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:07:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253680#M2233</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-13T14:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253681#M2234</link>
      <description>&lt;P&gt;I don't know, but I usually use lookups.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:08:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253681#M2234</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-10-13T14:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253682#M2235</link>
      <description>&lt;P&gt;Thx for the info&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253682#M2235</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-13T14:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253683#M2236</link>
      <description>&lt;P&gt;Macros are faster than lookup but with such a small number of entries in the lookup it would be negligible. Using lookups are simpler.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:20:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253683#M2236</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-13T14:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253684#M2237</link>
      <description>&lt;P&gt;Thx for the information!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253684#M2237</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-13T14:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253685#M2238</link>
      <description>&lt;P&gt;Right - &lt;CODE&gt;index=abc EventID=4625 username=$arg1$&lt;/CODE&gt; looks fine or &lt;CODE&gt;index=abc EventID=4625 username="$arg1$"&lt;/CODE&gt;, with double quotes.&lt;/P&gt;

&lt;P&gt;The search itself behaves like a regular search which means that the default operator is AND. If you want OR you should place explicit OR in the search query, such as -&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=abc EventID=4625 OR username="$arg1$"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:23:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253685#M2238</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-10-13T14:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253686#M2239</link>
      <description>&lt;P&gt;Thx for the reply and breakdown - greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253686#M2239</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-13T14:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create search macro using Arguments for a user list?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253687#M2240</link>
      <description>&lt;P&gt;You are welcome - good luck.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Possible-to-create-search-macro-using-Arguments-for-a-user-list/m-p/253687#M2240</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-10-13T14:38:05Z</dc:date>
    </item>
  </channel>
</rss>

