Getting Data In

Why is the interval of 1 second not working in input.conf?

kaushal28
New Member

I want to run my script at every second, so I set the interval to 1 second in input.conf file. But the script is not executed every second. So is there any minimum interval amount? Following is my input.conf file:

[amqp]
index = default
start_by_shell = false
sourcetype = amqp
interval = 1
reconnect = True
ssl_enabled = False

[amqp://input01]
interval = 1
reconnect = 1
source_url = 10.0.1.11:33037/examples
ssl_enabled = 0
0 Karma

_karlo
Explorer

From the documentation:

interval = [<number>|<cron schedule>]
* How often to run the specified command (in seconds), or a valid cron schedule.
* NOTE: when you specify a cron schedule, the input does not run the script on start-up.
* If you specify the interval as a number, it may have a fractional component; e.g., 3.14
* The cron implementation for data inputs does not currently support names of months or days.
* Defaults to 60.0 seconds.
* The special value 0 forces this scripted input to be run continuously; that is, as soon as the script exits, the input restarts it.
* The special value -1 causes the scripted input to run once on start-up.

There is no minimum it seems. Maybe your script is not quick enough? Or maybe look at setting it to 0; then it starts again after the command exits.

0 Karma

kaushal28
New Member

How can I ensure that the script is slow?

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco &#43; Splunk! We’ve ...