influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
29.07k stars 3.56k forks source link

Chronograf is not applying filter correctly for path tag when using inputs.tail on Windows #19035

Open clever-trevor opened 4 years ago

clever-trevor commented 4 years ago

I'm using the Telegraf plugin on Windows to send some messages to InfluxDB. The messages are getting there but when I use Chronograf to drill through to the value, the filters are not working properly.

Here's a snippet from telegraf.conf :

[[inputs.tail]]
  files = ["Z:\\telegraf\\test.log"]
  from_beginning = false
  grok_patterns = ["^.*Error%{GREEDYDATA:msg:string}"]
  name_override = "logs"
  grok_custom_pattern_files = []
  grok_custom_patterns = ''''''
  data_format = "grok"

So any log message in test.log that has the word "Error" will generate a single field called "msg" with the contents after that.

In Chronograf, I can see the series is created, and if I select only the msg value (last column in Chronograf explorer), I can see the values in a table. However, if I also select the "path" tag (which above has double back-slashes but in Chronograf is represented correctly with single back-slash) then no results are returned.

If I then amend the query directly and change the path name to have double back-slashes, it works.

So looks like when using the explorer view and drilling through metrics, Chronograf should convert a single backslash to double backslash before adding to the query.

desa commented 4 years ago

@schmorgs is this for influxdb 1.x or 2.x?