<?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: detecting splunkd shutdown for forwarders? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61726#M12333</link>
    <description>&lt;P&gt;i'm also trying to capture a stop command BEFORE splunk actually stops. the workaround I'm currently doing is editing the splunk script in init.d. i write something to file that the forwarder monitors before before the line that stops splunk. it somehow works but i'm still looking for a better way of implementing this without having to modify the default splunk files.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2016 03:51:48 GMT</pubDate>
    <dc:creator>Eminemvin</dc:creator>
    <dc:date>2016-09-08T03:51:48Z</dc:date>
    <item>
      <title>How to detect splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61717#M12324</link>
      <description>&lt;P&gt;I may have missed out somewhere but I'm wondering if anyone has a way to detect if splunkd is being shutdown by an admin on forwarders.&lt;/P&gt;
&lt;P&gt;The concern is that if I have a forwarders installed on a Windows/Linux server,an admin with access to the servers may still be able to stop splunk services,tamper with things and then restart the services(deployment monitor only checks if there are events missing within certain time..)&lt;/P&gt;
&lt;P&gt;So is there anyway we can detect this?Thanks in advanced&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 01:01:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61717#M12324</guid>
      <dc:creator>remy06</dc:creator>
      <dc:date>2023-04-25T01:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61718#M12325</link>
      <description>&lt;P&gt;Hi remy06&lt;/P&gt;

&lt;P&gt;just tested that and if you forward your forwarders _internal (&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.3/Admin/Outputsconf"&gt;outputs.conf&lt;/A&gt; - forwardedindex) to the indexer, you can see a message like this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;07:25:46.174 AM 08-22-2011 05:25:46.174 +0200 INFO ShutdownHandler - shutting down level ...&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;if you search &lt;CODE&gt;index=_internal ShutDownHandler&lt;/CODE&gt; on your indexer. this way you would at least know someone stopped the forwarder.&lt;/P&gt;

&lt;P&gt;regards,&lt;BR /&gt;
MuS&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2011 05:54:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61718#M12325</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2011-08-22T05:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61719#M12326</link>
      <description>&lt;P&gt;Thanks.Also found out that it logs to windows system event log as well.Will be able to pull from there either way.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 08:57:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61719#M12326</guid>
      <dc:creator>remy06</dc:creator>
      <dc:date>2011-08-23T08:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61720#M12327</link>
      <description>&lt;P&gt;I've been using your suggestions and it works fine,so far if splunk was shut down using .../splunk start/stop on linux. However on linux the privileged user can also execute the "kill" command to stop the service.Wondering what other workarounds you guys have?&lt;/P&gt;

&lt;P&gt;I've been trying to add a rule in auditd to do the work but it doesn't seem to work yet&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2011 09:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61720#M12327</guid>
      <dc:creator>remy06</dc:creator>
      <dc:date>2011-12-08T09:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61721#M12328</link>
      <description>&lt;P&gt;Hi remy06 in this case build a watchdog script on your linux box, which checks if the process 'splunkd' is running and if not restart 'splunkd' and your set &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;find an example here: &lt;A href="http://blog.eracc.com/2010/05/08/linux-monitor-a-service-with-a-watchdog-script/"&gt;http://blog.eracc.com/2010/05/08/linux-monitor-a-service-with-a-watchdog-script/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2011 09:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61721#M12328</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2011-12-08T09:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61722#M12329</link>
      <description>&lt;P&gt;Some updates,linux aside,I just did an upgrade for one of our old splunk forwarder(to universal forwarder 4.2.4) on windows server.I've noticed the following:&lt;/P&gt;

&lt;P&gt;1) By searching the _internal index method,if the forwarder is shutdown,the indexer will not receive the shutdown event until the forwarder has restarted.(This way we probably will not be alerted when its down?)&lt;/P&gt;

&lt;P&gt;2)By monitoring the windows system event log for forwarder shutdown events,when the service is shut down an event will be logged to windows event but the forwarder will not send this event to indexer.Even if the forwarder service has been restarted,the duration when the forwarder is down will not be captured at indexer.(I'm not sure why but seems that the older version of splunk able to do so)&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2011 07:33:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61722#M12329</guid>
      <dc:creator>remy06</dc:creator>
      <dc:date>2011-12-30T07:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61723#M12330</link>
      <description>&lt;P&gt;Hi remy06&lt;/P&gt;

&lt;P&gt;maybe look at this problem more from the sysadmin scope rather than splunk admin scope. read this post at the very end &lt;A href="http://www.indigorose.com/forums/archive/index.php/t-30167.html"&gt;http://www.indigorose.com/forums/archive/index.php/t-30167.html&lt;/A&gt; on how to make a service unstoppable.&lt;/P&gt;

&lt;P&gt;don't blame me if you break something &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2012 14:11:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61723#M12330</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-01-03T14:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61724#M12331</link>
      <description>&lt;P&gt;We can write a powershell script to monitor Windows- splunkd service.&lt;BR /&gt;
This powershell script will monitor the service , and using SMTP server , we can trigger alert to mail ids , who support Splunk.&lt;/P&gt;

&lt;P&gt;then immediate actions can be taken to start Splunk services back&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2013 12:03:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61724#M12331</guid>
      <dc:creator>chimbudp</dc:creator>
      <dc:date>2013-06-18T12:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61725#M12332</link>
      <description>&lt;P&gt;I have implemented this. If you need the script , i can help you,&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2013 12:04:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61725#M12332</guid>
      <dc:creator>chimbudp</dc:creator>
      <dc:date>2013-06-18T12:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61726#M12333</link>
      <description>&lt;P&gt;i'm also trying to capture a stop command BEFORE splunk actually stops. the workaround I'm currently doing is editing the splunk script in init.d. i write something to file that the forwarder monitors before before the line that stops splunk. it somehow works but i'm still looking for a better way of implementing this without having to modify the default splunk files.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 03:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61726#M12333</guid>
      <dc:creator>Eminemvin</dc:creator>
      <dc:date>2016-09-08T03:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61727#M12334</link>
      <description>&lt;P&gt;Here is the query I use&lt;BR /&gt;
 &lt;CODE&gt;index=_internal component=ShutdownHandler sourcetype=splunkd message="Shutting down splunkd"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 10:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61727#M12334</guid>
      <dc:creator>tred23</dc:creator>
      <dc:date>2017-01-19T10:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61728#M12335</link>
      <description>&lt;P&gt;Can you paste the script ? &lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2017 11:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/61728#M12335</guid>
      <dc:creator>sandyIscream</dc:creator>
      <dc:date>2017-06-03T11:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: detecting splunkd shutdown for forwarders?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/641203#M109373</link>
      <description>&lt;LI-CODE lang="markup"&gt;index = _internal  component=Shutdown 
| stats earliest(_time) as etime latest(_time) as ltime by host 
| convert timeformat="%Y/%m/%d %T" ctime(etime) ctime(ltime)&lt;/LI-CODE&gt;&lt;P&gt;The SPL above work on version 9.x&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 00:54:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-detect-splunkd-shutdown-for-forwarders/m-p/641203#M109373</guid>
      <dc:creator>youngsuh</dc:creator>
      <dc:date>2023-04-25T00:54:01Z</dc:date>
    </item>
  </channel>
</rss>

