<?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: Bash Script to trigger splunk restart if the hostname gets automatically changed. in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Bash-Script-to-trigger-splunk-restart-if-the-hostname-gets/m-p/672920#M18216</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244434"&gt;@surajsplunkd&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If the host is restarted or the forwarder service is restarted when the hostname changes, you can configure Splunk to manage this case automatically by setting host = $decideOnStartup. See&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf#GLOBAL_SETTINGS" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf#GLOBAL_SETTINGS&lt;/A&gt;&amp;nbsp;for more information.&lt;/P&gt;&lt;P&gt;Restarting Splunk when an online hostname change occurs is distribution dependent.&lt;/P&gt;</description>
    <pubDate>Sun, 31 Dec 2023 17:38:33 GMT</pubDate>
    <dc:creator>tscroggins</dc:creator>
    <dc:date>2023-12-31T17:38:33Z</dc:date>
    <item>
      <title>Bash Script to trigger splunk restart if the hostname gets automatically changed.</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Bash-Script-to-trigger-splunk-restart-if-the-hostname-gets/m-p/672183#M18155</link>
      <description>&lt;P&gt;Host value in below file gets changed automatically every now and then. Can you help me write a bash script which can check the host value every 5min and if the value is different than the actual hostname as in "uname -n". It will automatically correct the host value, save the file and then restart splunk service automatically?&lt;/P&gt;&lt;P&gt;cat /opt/splunk/etc/system/local/inputs.conf&lt;/P&gt;&lt;P&gt;[default]&lt;BR /&gt;host=iorper-spf52&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 12:16:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Bash-Script-to-trigger-splunk-restart-if-the-hostname-gets/m-p/672183#M18155</guid>
      <dc:creator>surajsplunkd</dc:creator>
      <dc:date>2023-12-18T12:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Bash Script to trigger splunk restart if the hostname gets automatically changed.</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Bash-Script-to-trigger-splunk-restart-if-the-hostname-gets/m-p/672920#M18216</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244434"&gt;@surajsplunkd&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If the host is restarted or the forwarder service is restarted when the hostname changes, you can configure Splunk to manage this case automatically by setting host = $decideOnStartup. See&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf#GLOBAL_SETTINGS" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf#GLOBAL_SETTINGS&lt;/A&gt;&amp;nbsp;for more information.&lt;/P&gt;&lt;P&gt;Restarting Splunk when an online hostname change occurs is distribution dependent.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Dec 2023 17:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Bash-Script-to-trigger-splunk-restart-if-the-hostname-gets/m-p/672920#M18216</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2023-12-31T17:38:33Z</dc:date>
    </item>
  </channel>
</rss>

