-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Telegraf agent not polling the input as per the configured interval #3492
Comments
The logparser input is a so called service input, which are event driven. Instead of using the interval these inputs generate metrics when events occur, in the case of logparser this is when the logfile is appended too. If you have |
@danielnelson I understand the functionality of the logparser, however the issue is agent/plugin not reading the logfile whenever its appended with new entries. It reads only with "from_beginning = true" and agent is restarted. Our requirement is to have "from_beginning = false" and read/process the appended entries into the log file input. |
If logparser is not picking up new lines, but they are parsed when starting up with |
@danielnelson #2847 seems to be a different issue with new file not detected after refresh/rotate. |
Are you able to reliably reproduce this issue? If so can you try to create a list of the smallest number of steps to reproduce? BTW, when 1.5 is released or with the nightlies you can also use |
which is the correct config file to use: |
|
Closing as I don't think there is any action to take. |
Directions
GitHub Issues are reserved for actionable bug reports and feature requests.
General questions should be asked at the InfluxData Community site.
Before opening an issue, search for similar bug reports or feature requests on GitHub Issues.
If no similar issue can be found, fill out either the "Bug Report" or the "Feature Request" section below.
Erase the other section and everything on and above this line.
Please note, the quickest way to fix a bug is to open a Pull Request.
Bug report
Relevant telegraf.conf:
[agent]
interval = "60s"
round_interval = true
metric_batch_size = 10000
metric_buffer_limit = 100000
collection_jitter = "0s"
flush_jitter = "0s"
precision = ""
[[outputs.file]]
files = ["stdout", "/tmp/metrics.out"]
data_format = "influx"
[[outputs.kafka]]
brokers = ["measure-kafka-tgt-ttc.target.com:9092"]
required_acks = 0
topic = "metric-influx-tgt-ttc-prod-platform-engineering-mft"
# Stream and parse log file(s).
[[inputs.logparser]]
files = ["/apps/mft/shared/logs/MFT_CheckNode.log"]
from_beginning = true
[inputs.logparser.grok]
patterns = ["%{LastHeartBeat}"]
measurement = "mft_lastbeat_prod"
custom_patterns = '''
LastHeartBeat %{TIMESTAMP_ISO8601:timestamp}|%{WORD:node:tag}.+|%{BASE10NUM:cstatus1:int}.* %{BASE10NUM:cstatus2:int}.* %{BASE10NUM:cstatus3:int}
'''
System info:
telegraf]# telegraf -version
Telegraf v1.4.3 (git: release-1.4 b473b6a)
telegraf]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)
Steps to reproduce:
Expected behavior:
Poll every 60s of the input log provided
Actual behavior:
Its reading the input only when telegraf agent restarted, that too with "from_beginning = true"
Additional info:
"from_beginning = false" not at all working to get the delta from the input log file
[Include gist of relevant config, logs, etc.]
[<script src="https://gist.github.com/shansudhakar/c74bf66797d86cc83f4103033af9ada3.js"></script>]
[<script src="https://gist.github.com/shansudhakar/e3eacb043d5c50fe656effbe54b0ac36.js"></script>]
[<script src="https://gist.github.com/shansudhakar/9b93fc90ab0aba2952c97ac7251e4bdb.js"></script>]
Feature Request
Opening a feature request kicks off a discussion.
Proposal:
Current behavior:
Desired behavior:
Use case: [Why is this important (helps with prioritizing requests)]
Read multiple logs at a frequency and display status of infra on grafana dashboard
The text was updated successfully, but these errors were encountered: