-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Labels
bugunexpected problem or unintended behaviorunexpected problem or unintended behavior
Description
Relevant telegraf.conf
/etc/telegraf# cat telegraf.conf
[[inputs.exec]]
interval = "30s"
commands = ["python3 /etc/telegraf/test.py"]
timeout = "3s"
collection_offset = "-15s"
data_format = "influx"
[[outputs.file]]
files = ["stdout", "/etc/telegraf/test_output.txt"]
/etc/telegraf# cat test.py
print("metric,tag1=1,tag2=2 value=1")Logs from Telegraf
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
2025-12-31T13:07:48Z D! [inputs.exec] Previous collection has not completed; scheduled collection skipped
System info
Ubuntu 24.04.3 , Telegraf 1.37.0
Docker
When running with a negative offset Telegraf is executing the python script multiple times, when running with a positive offset there are no issues.
Steps to reproduce
- Copy telegraf.conf config above to /etc/telegraf folder.
- Copy python script to /etc/telegraf folder and make executable.
- Run /usr/bin/telegraf --config telegraf.conf with the config of collection_offset = "-15s" to see the problem, run the same command again with collection_offset = "5s" and the issue no longer happens.
...
Expected behavior
I would expect telegraf to run the command / script once at 15s before the set interval rate.
Actual behavior
I appears to be running it multiple times and printing the results multiple times.
Additional info
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugunexpected problem or unintended behaviorunexpected problem or unintended behavior