<?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: config file precedence vs savedsearches in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697833#M20097</link>
    <description>&lt;P&gt;I found out that the message about duplicated configuration is from ES (Enterprise Security). This check has a period of 10 minutes.&lt;/P&gt;&lt;P&gt;apps/SplunkEnterpriseSecuritySuite/bin/configuration_checks/confcheck_es_correlationmigration.py:MSG_DUPLICATED_STANZA = 'Configuration file settings can be duplicated in multiple applications: stanza="%s" conf_type="%s" apps="%s"'&lt;/P&gt;&lt;P&gt;I tested the above scenario on a clean Splunk Enterprise without ES and the behavior matches the documentation, but btool not.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[splunk@siemsearch01 apps]$ cat ATest_app/default/savedsearches.conf 
[ss]
search = `super_macro` atest

[splunk@siemsearch01 apps]$ cat Test_app/default/savedsearches.conf 
[ss]
search = `super_macro` test
request.ui_dispatch_app = search
disabled = 0
alert.track = 0
cron_schedule = */2 * * * *
dispatch.earliest_time = -4m
dispatch.latest_time = -2m
enableSched = 1

[splunk@siemsearch01 apps]$ cat ZTest_app/default/savedsearches.conf 
[ss]
search = `super_macro` ztest


[splunk@siemsearch01 apps]$ 
[splunk@siemsearch01 apps]$ /opt/splunk/bin/splunk btool savedsearches list --debug ss | grep "search ="
/opt/splunk/etc/apps/ATest_app/default/savedsearches.conf                 search = `super_macro` atest&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;btool returns:&amp;nbsp; search =&amp;nbsp;&lt;STRONG&gt;`super_macro` atest&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="emzed_0-1725026263440.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32477iA6BBCBD617888094/image-size/large?v=v2&amp;amp;px=999" role="button" title="emzed_0-1725026263440.png" alt="emzed_0-1725026263440.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Gui returns:&amp;nbsp;&lt;STRONG&gt; index=ztest ztest, i.e.&amp;nbsp;`super_macro` ztest&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2024 14:00:50 GMT</pubDate>
    <dc:creator>emzed</dc:creator>
    <dc:date>2024-08-30T14:00:50Z</dc:date>
    <item>
      <title>config file precedence vs savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697762#M20090</link>
      <description>&lt;P&gt;The main question is - Is the config file precedence applicable to the savedsearches.conf file?&lt;/P&gt;&lt;P&gt;The documentation for savedsearches.conf states that I should read the configuration file precedence.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.3.0/admin/Savedsearchesconf" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.3.0/admin/Savedsearchesconf&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.3.0/Admin/Wheretofindtheconfigurationfiles" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.3.0/Admin/Wheretofindtheconfigurationfiles&lt;/A&gt;&lt;/P&gt;&lt;P&gt;According to the config file precedence page, the priority of savedsearches is determined by the application/user context, it is a reverse lexicographic order. That is, the configuration from add-on B overrides the configuration from add-on A.&lt;/P&gt;&lt;P&gt;I have savesearch defined in addon A (an addon from Splunkbase). There is a missing index call in the SPL. I created app B with savedsearches.conf. I created an identically named "stanza" there and provided a single parameter "search=". In the parameter I put a new SPL query that contains the paricula index call.&lt;/P&gt;&lt;P&gt;I was hoping that my new add-in named "B" would override the search query in add-in A, but it didn't. Splunk reports that I have a duplicate configuration.&lt;/P&gt;&lt;P&gt;I hope I described this in understandable way.&lt;/P&gt;&lt;P&gt;I must be missing something.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 20:21:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697762#M20090</guid>
      <dc:creator>emzed</dc:creator>
      <dc:date>2024-08-29T20:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: config file precedence vs savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697771#M20091</link>
      <description>&lt;P&gt;Despite the documentation, I've never seen reverse-lexicographic order applied to .conf files.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to override the settings in an app, the best way is to specify the new setting in the same app's /local directory.&amp;nbsp; If that's not possible, use an app that sorts before the app you want to override.&lt;/P&gt;&lt;P&gt;As always, btool is your friend.&amp;nbsp; It will tell you what settings will apply before you restart Splunk.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk btool --debug savedsearches list &amp;lt;&amp;lt;search name&amp;gt;&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 Aug 2024 21:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697771#M20091</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-08-29T21:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: config file precedence vs savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697809#M20094</link>
      <description>&lt;P&gt;I have my reasons. I don't want to impose changes on the local.&lt;/P&gt;
&lt;P&gt;I need to use the original addon and add my correctly named addon to it, which would override the search= parameter in original one.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Orig add-on is
Splunk_TA_openldap

default/savedsearches.conf
[Update openldap_user_lookup KV Store collection]
request.ui_dispatch_app = search
disabled = 0
alert.track = 0
cron_schedule = */2 * * * *
dispatch.earliest_time = -4m
dispatch.latest_time = -2m
enableSched = 1
search = sourcetype="openldap:access" operation="BIND" | dedup conn cn | table conn op cn | rename cn as user | lookup openldap_user_lookup conn, op OUTPUTNEW _key AS _key | outputlookup append=t openldap_user_lookup

My append is
A10_aaa_ta_openldap

default/savedsearches.conf
[Update openldap_user_lookup KV Store collection]
search = `openldap_index` sourcetype="openldap:access" operation="BIND" | dedup conn cn | table conn op cn | rename cn as user | lookup openldap_user_lookup conn, op OUTPUTNEW _key AS _key | outputlookup append=t openldap_user_lookup&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I know btool and I am using it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;There are more problems.&lt;BR /&gt;&lt;BR /&gt;One is that according to btool, the savedsearch.conf precedence does not behave as documented, i.e. app/user context with reverse reverse-lexicographic order.&lt;/P&gt;
&lt;P&gt;The second is that Splunk reports a problem with duplicate configuration.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="emzed_0-1725008225329.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32472i5A64AE0BFF6645A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="emzed_0-1725008225329.png" alt="emzed_0-1725008225329.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So far I haven't found any information in the documentation that savedsearches.conf should behave differently than for example macros, props etc.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 10:15:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697809#M20094</guid>
      <dc:creator>emzed</dc:creator>
      <dc:date>2024-08-30T10:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: config file precedence vs savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697829#M20095</link>
      <description>&lt;P&gt;Your settings look good to me.&lt;/P&gt;&lt;P&gt;The first problem may be with the documentation.&amp;nbsp; Submit feedback on the docs page telling them that btool doesn't match the documentation and they should update the docs.&lt;/P&gt;&lt;P&gt;I'm not sure what can be done about the second problem other than ignoring it.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:23:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697829#M20095</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-08-30T13:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: config file precedence vs savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697833#M20097</link>
      <description>&lt;P&gt;I found out that the message about duplicated configuration is from ES (Enterprise Security). This check has a period of 10 minutes.&lt;/P&gt;&lt;P&gt;apps/SplunkEnterpriseSecuritySuite/bin/configuration_checks/confcheck_es_correlationmigration.py:MSG_DUPLICATED_STANZA = 'Configuration file settings can be duplicated in multiple applications: stanza="%s" conf_type="%s" apps="%s"'&lt;/P&gt;&lt;P&gt;I tested the above scenario on a clean Splunk Enterprise without ES and the behavior matches the documentation, but btool not.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[splunk@siemsearch01 apps]$ cat ATest_app/default/savedsearches.conf 
[ss]
search = `super_macro` atest

[splunk@siemsearch01 apps]$ cat Test_app/default/savedsearches.conf 
[ss]
search = `super_macro` test
request.ui_dispatch_app = search
disabled = 0
alert.track = 0
cron_schedule = */2 * * * *
dispatch.earliest_time = -4m
dispatch.latest_time = -2m
enableSched = 1

[splunk@siemsearch01 apps]$ cat ZTest_app/default/savedsearches.conf 
[ss]
search = `super_macro` ztest


[splunk@siemsearch01 apps]$ 
[splunk@siemsearch01 apps]$ /opt/splunk/bin/splunk btool savedsearches list --debug ss | grep "search ="
/opt/splunk/etc/apps/ATest_app/default/savedsearches.conf                 search = `super_macro` atest&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;btool returns:&amp;nbsp; search =&amp;nbsp;&lt;STRONG&gt;`super_macro` atest&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="emzed_0-1725026263440.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32477iA6BBCBD617888094/image-size/large?v=v2&amp;amp;px=999" role="button" title="emzed_0-1725026263440.png" alt="emzed_0-1725026263440.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Gui returns:&amp;nbsp;&lt;STRONG&gt; index=ztest ztest, i.e.&amp;nbsp;`super_macro` ztest&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 14:00:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697833#M20097</guid>
      <dc:creator>emzed</dc:creator>
      <dc:date>2024-08-30T14:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: config file precedence vs savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697834#M20098</link>
      <description>&lt;P&gt;Have you eliminated app permissions/shares at the user level?&amp;nbsp; The saved search may run as user or as a default account(noone).&lt;/P&gt;&lt;P&gt;The btool has a switch for "-- user" which I'm not 100% familiar with but the docs do warn about having to use the switch "--app" as well, but then says the switch user does not consider knowledge object permissions when evaluating the user.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 14:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/config-file-precedence-vs-savedsearches/m-p/697834#M20098</guid>
      <dc:creator>dural_yyz24</dc:creator>
      <dc:date>2024-08-30T14:13:42Z</dc:date>
    </item>
  </channel>
</rss>

