<?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 do you use macros in event types on distributed/cluster environments? in Installation</title>
    <link>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377140#M8839</link>
    <description>&lt;P&gt;@kaumiladani : by default macros are not distributed to indexers in a clustered environment, did you try adding this stanza in your apps/TA's: default/distsearch.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[replicationSettings:refineConf]
replicate.macros = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR you can get rid of macros from event types, and create a local copy.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/661233/error-searchparser-the-search-specifies-a-macro-cs.html"&gt;https://answers.splunk.com/answers/661233/error-searchparser-the-search-specifies-a-macro-cs.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Dec 2018 17:41:19 GMT</pubDate>
    <dc:creator>prakash007</dc:creator>
    <dc:date>2018-12-18T17:41:19Z</dc:date>
    <item>
      <title>How do you use macros in event types on distributed/cluster environments?</title>
      <link>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377139#M8838</link>
      <description>&lt;P&gt;I've got a macro that contains 'sourcetype' and 'index' in search(both of which could be changed from client side).&lt;/P&gt;

&lt;P&gt;The macro is being used in different eventtypes for dashboard queries.&lt;/P&gt;

&lt;P&gt;On installing the app and TA on a distributed/cluster environment (Splunk v7.2.*), the search using eventtype gives the following error:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Streamed search execute failed because Error in 'SearchParser': The search specifies a macro '[NAME OF THE MACRO]' that cannot be found. Reasons include: the macro name is misspelled, you do not have "read" permission for the macro, or the macro has not been shared with this application. Click Settings, Advanced search, Search Macros to view macro information.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;All the permission for macro, app and TA are defined as per Splunk standards.&lt;BR /&gt;
I tried using distsearch.conf file but with no help.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 15:40:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377139#M8838</guid>
      <dc:creator>kaumiladani</dc:creator>
      <dc:date>2018-12-18T15:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use macros in event types on distributed/cluster environments?</title>
      <link>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377140#M8839</link>
      <description>&lt;P&gt;@kaumiladani : by default macros are not distributed to indexers in a clustered environment, did you try adding this stanza in your apps/TA's: default/distsearch.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[replicationSettings:refineConf]
replicate.macros = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR you can get rid of macros from event types, and create a local copy.&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/661233/error-searchparser-the-search-specifies-a-macro-cs.html"&gt;https://answers.splunk.com/answers/661233/error-searchparser-the-search-specifies-a-macro-cs.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 17:41:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377140#M8839</guid>
      <dc:creator>prakash007</dc:creator>
      <dc:date>2018-12-18T17:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use macros in event types on distributed/cluster environments?</title>
      <link>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377141#M8840</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149129"&gt;@prakash007&lt;/a&gt; Thanks for the quick response.&lt;BR /&gt;
Yes, the distsearch.conf with replication settings as well as whitelist settings has been already tried but the issue persists.&lt;/P&gt;

&lt;P&gt;Also, removing macro from eventtype is not possible as there are lots of eventtype and my macro is of the format:&lt;/P&gt;

&lt;P&gt;definition = index="xyz_events" AND sourcetype="name_of_the_sourcetype"&lt;/P&gt;

&lt;P&gt;both of which configurable from client side. Change in either of them would result in change at multiple instances. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:30:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377141#M8840</guid>
      <dc:creator>kaumiladani</dc:creator>
      <dc:date>2020-09-29T22:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use macros in event types on distributed/cluster environments?</title>
      <link>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377142#M8841</link>
      <description>&lt;P&gt;@kaumiladani&lt;/P&gt;

&lt;P&gt;With your all configurations, you have to add macros permission on default.meta also. Can you please try and let me know.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[replicationSettings:refineConf]

replicate.&amp;lt;conf_file_name&amp;gt; = &amp;lt;bool&amp;gt;
* Controls whether Splunk replicates a particular type of *.conf file, along
  with any associated permissions in *.meta files.
* These settings on their own do not cause files to be replicated. A file must
  still be whitelisted (via replicationWhitelist) to be eligible for inclusion
  via these settings.

* In a sense, these settings constitute another level of filtering that applies
  specifically to *.conf files and stanzas with *.meta files.
* Defaults to: false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.1/Admin/Distsearchconf#"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.1/Admin/Distsearchconf#&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 12:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377142#M8841</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-12-19T12:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use macros in event types on distributed/cluster environments?</title>
      <link>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377143#M8842</link>
      <description>&lt;P&gt;Thanks, it works now.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 12:29:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/How-do-you-use-macros-in-event-types-on-distributed-cluster/m-p/377143#M8842</guid>
      <dc:creator>kaumiladani</dc:creator>
      <dc:date>2018-12-19T12:29:49Z</dc:date>
    </item>
  </channel>
</rss>

