The Heavy Forwarder is restarting without triggering a manual restart of the server.
1.Found the script present under the path $SPLUNK_HOME/etc/apps/app-name/default/inputs.conf
[script://$SPLUNK_HOME/etc/apps/app-name/bin/splunk_service_restart.sh]
disabled = false
interval = 0 */6 * * *
2.And the script is as follows -
#!/bin/bash
dt=`date '+%d_%m_%Y'`
logfile="/opt/splunk/etc/apps/app-name/logs/Splk_Svc_Rst_${dt}_${HOSTNAME}.txt"
dt1=`date '+%d/%m/%Y %H:%M:%S'`
output=`sudo systemctl status Splunkd.service | grep -i 'active\|inactive\|running\|stopped\|dead' | awk '{print $3}'`
echo "$dt1 Splunk Service is $output in forwarder $HOSTNAME" >> $logfile
sudo systemctl restart Splunkd.service
dt2=`date '+%d/%m/%Y %H:%M:%S'` 1.Disable the script under $SPLUNK_HOME/etc/apps/app-name/default/inputs.conf
[script://$SPLUNK_HOME/etc/apps/app-name/bin/splunk_service_restart.sh]
disabled = true
interval = 0 */6 * * *
2.Restart the splunkd service with below command -
./splunk restart| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
29-Sep-2026
|
Initial Release |