I am using the following telegraf input conf to transfer data from log file to influxdb but it is not working:
[[inputs.tail]]
files = ["/var/log/testlog.log"]
from_beginning = true
grok_patterns = ["%{ERROR_LOG}", "%{CUSTOM_LOG}"]
grok_custom_patterns = '''
ERROR_LOG level=%{LOGLEVEL:severity:tag} msg="%{GREEDYDATA:value:tag}"
CUSTOM_LOG %{GREEDYDATA:value:tag}
‘’’
data_format = “grok”
but if i remove the tag modifiers, it works and i can see the data in my influxdb, something like this:
[[inputs.tail]]
files = ["/var/log/testlog.log"]
from_beginning = true
grok_patterns = ["%{ERROR_LOG}", "%{CUSTOM_LOG}"]
grok_custom_patterns = '''
ERROR_LOG level=%{LOGLEVEL:severity} msg="%{GREEDYDATA:value}"
CUSTOM_LOG %{GREEDYDATA:value}
‘’’
data_format = “grok”
I have no idea as to why this is happening?
I need those tags in my influxdb