Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schedule every behavior #125

Open
ajrpayne opened this issue Apr 20, 2021 · 1 comment
Open

schedule every behavior #125

ajrpayne opened this issue Apr 20, 2021 · 1 comment
Labels

Comments

@ajrpayne
Copy link

ajrpayne commented Apr 20, 2021

Logstash information:

bin/logstash --version
Using bundled JDK
logstash 7.12.0

Logstash expanded from tar
Ran via command line

5.11.14-1-MANJARO SMP PREEMPT x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:

schedule => {
    every => "60"
}

My understanding is that every will execute on start and then every 60 seconds after. Currently, in logstash 7.12 it only starts executing after the 60 seconds is up. It does not perform the first poll on start.

input {
http_poller {
urls => {
statc => {
method => get
url => "https://www.statc.json?lang=E"
headers => {
Accept => "application/json"
}
}
}
request_timeout => 60
schedule => {
every => "60"
}
codec => "plain"
}
}

@ajrpayne ajrpayne added the bug label Apr 20, 2021
@TheVastyDeep
Copy link

TheVastyDeep commented Dec 31, 2023

"My understanding is that every will execute on start and then every 60 seconds after." The code seems to be using :first_in to do this. That will end up calling this. My understanding of Ruby argument/parameter assignment (acquired this afternoon from here) is that that call should result in the opts argument being set to "{:first_in=>0.01}". Not sure what is not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants