<?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: Where to put macros.conf so available everywhere (all users/apps/searches)? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19416#M147</link>
    <description>&lt;P&gt;You need to give your macro enough permissions to be available for use everywhere. You can use the UI to do this or you can use the local.meta and export it to system. Assuming you have your &lt;CODE&gt;macros.conf&lt;/CODE&gt; in &lt;CODE&gt;/opt/splunk/etc/apps/distsearch_base/local/&lt;/CODE&gt;, then in &lt;CODE&gt;/opt/splunk/etc/apps/distsearch_base/metadata/local.meta&lt;/CODE&gt; you need to enter the following:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[macros]&lt;BR /&gt;
export = system&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This stanza will export all macros defined in &lt;CODE&gt;macros.conf&lt;/CODE&gt; in that app/config bundle  to system so that they'll available to all users/apps etc.&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;gt; please upvote and accept answer if you find it useful - thanks!&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Nov 2011 04:32:11 GMT</pubDate>
    <dc:creator>_d_</dc:creator>
    <dc:date>2011-11-19T04:32:11Z</dc:date>
    <item>
      <title>Where to put macros.conf so available everywhere (all users/apps/searches)?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19414#M145</link>
      <description>&lt;P&gt;The subject has the entirety of my question but as a bonus to anyone who reads this, here is a macro that everyone should find useful (if you understand why this is useful, add that to your answer):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[unknownify(1)]
args = FieldName
definition = eval $FieldName$=if(isnull($FieldName$),"unknown",$FieldName$)
[unknownify(2)]
args = FieldName, UnknownText
definition = eval $FieldName$=if(isnull($FieldName$),"$UnknownText$",$FieldName$)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Nov 2011 19:54:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19414#M145</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2011-11-18T19:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Where to put macros.conf so available everywhere (all users/apps/searches)?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19415#M146</link>
      <description>&lt;P&gt;I should have mentioned what I tried, none of which worked:&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/system/local/&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/distsearch_base/local/&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/forwarder_base/local/&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/indexer_cluster_base/local/&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/searcher_base/local/&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/splunk_base/local/&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19415#M146</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-09-28T10:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Where to put macros.conf so available everywhere (all users/apps/searches)?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19416#M147</link>
      <description>&lt;P&gt;You need to give your macro enough permissions to be available for use everywhere. You can use the UI to do this or you can use the local.meta and export it to system. Assuming you have your &lt;CODE&gt;macros.conf&lt;/CODE&gt; in &lt;CODE&gt;/opt/splunk/etc/apps/distsearch_base/local/&lt;/CODE&gt;, then in &lt;CODE&gt;/opt/splunk/etc/apps/distsearch_base/metadata/local.meta&lt;/CODE&gt; you need to enter the following:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[macros]&lt;BR /&gt;
export = system&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This stanza will export all macros defined in &lt;CODE&gt;macros.conf&lt;/CODE&gt; in that app/config bundle  to system so that they'll available to all users/apps etc.&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;gt; please upvote and accept answer if you find it useful - thanks!&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2011 04:32:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19416#M147</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2011-11-19T04:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Where to put macros.conf so available everywhere (all users/apps/searches)?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19417#M148</link>
      <description>&lt;PRE&gt;
Adding the local.meta change and putting the file in this directory DID work:
/opt/splunk/etc/apps/searcher_base/local/

It did NOT work when put here:
/opt/splunk/etc/apps/distsearch_base/local/
&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Nov 2011 15:58:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19417#M148</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2011-11-21T15:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Where to put macros.conf so available everywhere (all users/apps/searches)?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19418#M149</link>
      <description>&lt;P&gt;I just assumed you had your macros in &lt;CODE&gt;distsearch_base&lt;/CODE&gt;. But, nonetheless, it's good to hear that your problem is resolved. Please consider upvoting marking the question as answered. Thanks. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2011 16:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Where-to-put-macros-conf-so-available-everywhere-all-users-apps/m-p/19418#M149</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2011-11-21T16:04:16Z</dc:date>
    </item>
  </channel>
</rss>

