Hi,

You can try this for the file path on windows and it works for me. The wildcard 
does now work on Windows, may be someone has to fix that but if you can combine 
all the *.log into single.log file then you can provide path as below

files = ["D:/temp/single.log"]

Hope this works for you. Enjoy.

On Tuesday, October 25, 2016 at 11:09:17 PM UTC+1, zdw...@gmail.com wrote:
> 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

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@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/0963e0a1-dc67-441d-bf69-b564c0a4a6a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to