<?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 pass list string as an arguments to Splunk macro in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505878#M141502</link>
    <description>&lt;P&gt;Maybe you would be better of just writing&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host=host source=source scope IN ("A","B","C")
| .....&lt;/LI-CODE&gt;&lt;P&gt;I am assuming the scope is a field in your data?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jun 2020 06:13:12 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-06-24T06:13:12Z</dc:date>
    <item>
      <title>How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505655#M141364</link>
      <description>&lt;P&gt;Hi Splunk experts,&lt;/P&gt;&lt;P&gt;I am a new face here. I have a task for multiple alerts creating. I am wondering is it possible to pass a list of strings as an argument to my custom macro. Let's me explain more about the idea:&lt;/P&gt;&lt;P&gt;My argument will be like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;"scope=A"&lt;/P&gt;&lt;P&gt;"scope=A OR scope=B"&lt;/P&gt;&lt;P&gt;"scope=A OR scope=B OR scope=C"&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;Basically scope can be equals to whatever value as much as we need and I want to write a macro just has only one argument, but I still could add number of values to my macro:&lt;/P&gt;&lt;P&gt;myMacro(1)&lt;/P&gt;&lt;P&gt;How can I solve it? Thank in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 06:11:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505655#M141364</guid>
      <dc:creator>thinhdinh</dc:creator>
      <dc:date>2020-06-23T06:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505843#M141477</link>
      <description>&lt;P&gt;You can create the macro with one argument and pass what you like, so all of your examples would be fine.&lt;/P&gt;&lt;P&gt;However what is it you are trying to achieve with that macro. I am guessing it's some kind of search filtering from your examples.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like you're wanting to have a flexible 'search for x=y' where x and y can be 1..n and x can be different fields also or is 'x' always scope?&lt;/P&gt;&lt;P&gt;Can you explain in more detail what you want the macro to do and where in the search pipeline it's intended for, part of the base search or following the first | (pipe)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 22:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505843#M141477</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-06-23T22:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505873#M141497</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Exactly! That is what you are guessing. The reason I want to like that because I have bunch of scopes and I don't want for each of scope I have to write a macro. I need to make the argument that I am passing to my macro is flexible., from that we only have one macro. Value of scopes will be added before the pipeline and they are searching strings. Example:&lt;/P&gt;&lt;P&gt;host=host source=source ("scope=A OR scope=B OR scope=C OR...") | .....&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 06:09:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505873#M141497</guid>
      <dc:creator>thinhdinh</dc:creator>
      <dc:date>2020-06-24T06:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505878#M141502</link>
      <description>&lt;P&gt;Maybe you would be better of just writing&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host=host source=source scope IN ("A","B","C")
| .....&lt;/LI-CODE&gt;&lt;P&gt;I am assuming the scope is a field in your data?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 06:13:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505878#M141502</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-06-24T06:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505942#M141526</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks super simple&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;. Yes, that is a field of my data.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 11:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/505942#M141526</guid>
      <dc:creator>thinhdinh</dc:creator>
      <dc:date>2020-06-24T11:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506108#M141605</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp; Hi, sorry to bother you again. So how can I pass those scopes to my macro?! When I tried to do something like this, it's not working for me:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;myCustomMacro(scope=("A", "B", "C"))&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 07:47:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506108#M141605</guid>
      <dc:creator>thinhdinh</dc:creator>
      <dc:date>2020-06-25T07:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506224#M141633</link>
      <description>&lt;P&gt;I am not sure what you want the macro to do - what is the need to have a macro in the first place.&lt;/P&gt;&lt;P&gt;What will the macro in addition to the search itself?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 21:59:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506224#M141633</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-06-25T21:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506231#M141637</link>
      <description>&lt;P&gt;I have bunch of different scope as I said before and for each of those scope I have to write an alert. With a help from macro, my task should more easier. That's why I need a macro with a flexible argument. Yes, I have moved the argument to the search itself, it's not required in the first place.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 22:58:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506231#M141637</guid>
      <dc:creator>thinhdinh</dc:creator>
      <dc:date>2020-06-25T22:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506232#M141638</link>
      <description>&lt;P&gt;The search will produce a set of results and the alert will come from those results. I don't see where the macro is required in this, but perhaps you can provide some more detail on the actual result you are looking to get out of this alert.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 23:31:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506232#M141638</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-06-25T23:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass list string as an arguments to Splunk macro</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506259#M141643</link>
      <description>&lt;P&gt;Sure we can write different search queries for each scope, but it is too long. That's why I want to use macro in this case. I don't have one alert, I have bunch of alerts and the result of them depends on their scopes. As I know macro is not required to use if we don't like.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 07:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pass-list-string-as-an-arguments-to-Splunk-macro/m-p/506259#M141643</guid>
      <dc:creator>thinhdinh</dc:creator>
      <dc:date>2020-06-26T07:03:17Z</dc:date>
    </item>
  </channel>
</rss>

