z***@gmail.com
2016-10-25 22:09:17 UTC
Hi All,
I'm having some issues using the Telegraf logparser plugin to parse all log files in a directory on Windows. I'm using the latest 1.01 Windows binary.
If I use an * in the file path, it doesn't find any files to read. But it works if I give the complete path to the file. Am I doing anything wrong in the conf file?
telegraf.conf input:
[[inputs.logparser]]
## files to tail.
files = ["D:\\temp\\*.log"]
## Read file from beginning.
from_beginning = true
## Override the default measurement name, which would be "logparser_grok"
name_override = "log"
## For parsing logstash-style "grok" patterns:
[inputs.logparser.grok]
patterns = ["%{CUSTOM_LOG}"]
custom_patterns = '''
CUSTOM_LOG %{TIMESTAMP_ISO8601:ts:ts-"2006-01-02 15:04:05"} %{IPORHOST:serverhost} %{WORD:method:tag} %{URIPATH:page:tag} %{NOTSPACE:querystring} %{NUMBER:port:drop} %{NOTSPACE:username:drop} %{IPORHOST:clienthost} %{NOTSPACE:useragent:drop} %{NOTSPACE:cookie:drop} %{NOTSPACE:referer:drop} %{IPORHOST:hostname} %{NUMBER:response:tag} %{NUMBER:subresponse} %{NUMBER:scstatus:drop} %{NUMBER:scbytes:drop} %{NUMBER:csbytes:drop} %{NUMBER:timetaken:int}
'''
--test output:
* Plugin: logparser, Collection 1
Thank you
I'm having some issues using the Telegraf logparser plugin to parse all log files in a directory on Windows. I'm using the latest 1.01 Windows binary.
If I use an * in the file path, it doesn't find any files to read. But it works if I give the complete path to the file. Am I doing anything wrong in the conf file?
telegraf.conf input:
[[inputs.logparser]]
## files to tail.
files = ["D:\\temp\\*.log"]
## Read file from beginning.
from_beginning = true
## Override the default measurement name, which would be "logparser_grok"
name_override = "log"
## For parsing logstash-style "grok" patterns:
[inputs.logparser.grok]
patterns = ["%{CUSTOM_LOG}"]
custom_patterns = '''
CUSTOM_LOG %{TIMESTAMP_ISO8601:ts:ts-"2006-01-02 15:04:05"} %{IPORHOST:serverhost} %{WORD:method:tag} %{URIPATH:page:tag} %{NOTSPACE:querystring} %{NUMBER:port:drop} %{NOTSPACE:username:drop} %{IPORHOST:clienthost} %{NOTSPACE:useragent:drop} %{NOTSPACE:cookie:drop} %{NOTSPACE:referer:drop} %{IPORHOST:hostname} %{NUMBER:response:tag} %{NUMBER:subresponse} %{NUMBER:scstatus:drop} %{NUMBER:scbytes:drop} %{NUMBER:csbytes:drop} %{NUMBER:timetaken:int}
'''
--test output:
* Plugin: logparser, Collection 1
Thank you
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/ace9f0e8-1136-4a88-bee6-6dd87ce70139%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/ace9f0e8-1136-4a88-bee6-6dd87ce70139%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.