Getting Data In

Why is the script failing with parse interval error when pushed as App from Deployment server?

mallempatisreed
Explorer

hi Team,

We are using a script to read files at regular intervals of time 900 seconds. It is working fine in our production environment where we have copied the script as an app manually. In our test environment when we pushed the App from Deployment server it is failing with Parse error.

02-20-2018 07:15:30.434 +0100 ERROR ExecProcessor - Can't parse interval "900 #frequency to run the script, in seconds", ignoring script: "/app/splunkforwarder/etc/apps/TA_goep_esbsrv_foldermonitoring_CI/bin/filewatchError.sh"

Am using the below App.

TA_goep_esbsrv_foldermonitoring_CI App with bin and local folders.

local has inputs.conf

inputs.conf
[script://$SPLUNK_HOME/etc/apps/TA_goep_esbsrv_foldermonitoring_CI/bin/filewatchError.sh]
host = SERVERNAME
index = esbsrvtest
interval = 900   #frequency to run the script, in seconds
sourcetype = foldermonitoringError

bin folder has files to monitor and sh script.

 cat filewatchError.sh
#!/bin/bash
file="/app/splunkforwarder/etc/apps/TA_goep_esbsrv_foldermonitoring_CI/bin/error-folders-CI.txt"
#Check the white space and stop before new line
while IFS= read -r var || [[ -n $var ]]
do
        #Check directory if exists
        if [ -d "$var" ]
        then
                #find the count of files on directory posted before 3 min
                number=$(find "$var" -type f | wc -l)

                if [ "$number" -gt 0 ]
                then
                        #echo "$(find "$var" -type f -printf '%TD %Tc filePath=%p timeModified=%TY-%Tm-%Td %TH:%TM\n')"
                        #echo "$(date) $(find "$var" -type f -printf 'filePath=%p timeModified=%TY-%Tm-%Td %TH:%TM\n')"
                        /usr/bin/find "$var" -type f -printf 'filePath=%p timeModified=%TY-%Tm-%Td %TH:%TM\n' | /usr/bin/xargs -I {} echo "$(date) {}"
                fi
        fi
done <"$file"

What can be wrong as it is working when it has been copied manually and it's not working when pushed from the Deployment server.

Thanks,
Sreedhar

0 Karma
1 Solution

yannK
Splunk Employee
Splunk Employee

End of line comments are not allowed in .conf files.
see http://docs.splunk.com/Documentation/Splunk/latest/Admin/Howtoeditaconfigurationfile#Insert_a_commen...

instead of

 interval = 900   #frequency to run the script, in seconds

put your comment on the next line

 interval = 900   
#frequency to run the script, in seconds

View solution in original post

0 Karma

yannK
Splunk Employee
Splunk Employee

End of line comments are not allowed in .conf files.
see http://docs.splunk.com/Documentation/Splunk/latest/Admin/Howtoeditaconfigurationfile#Insert_a_commen...

instead of

 interval = 900   #frequency to run the script, in seconds

put your comment on the next line

 interval = 900   
#frequency to run the script, in seconds
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Monitoring AI Agents with Splunk Observability Cloud

Let’s say I’m running a travel planning AI app in production. A user asks for three concise hotel options in ...

[Puzzles] Solve, Learn, Repeat: Tiling

This puzzle (first published here) is based on finding groups of tessellated tiles (inspired by floor tiles I ...

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...