Hello,
Just looking for some advice if that’s OK, I haven’t used this plugin before and I’m unsure on grok patterns.
Goal
Parse the below logfile to plot data usage by user on Open VPN.
March 05 14:58:51, user1, 10.10.10.10, 192.192.192.192, 22000, 20682, 182694
March 05 14:59:51, user2, 10.10.10.11, 193.193.193.193, 45000, 40682, 882694
Plugin
[[inputs.tail]]
files = ["/var/log/ovpnlog.log"]
from_beginning=false
grok_patterns = ["%{CUSTOM_LOG}"]
grok_custom_patterns = '''
CUSTOM_LOG %{SYSLOGTIMESTAMP:timestamp:ts-syslog},%{IPORHOST:vpnip:tag},% {IPORHOST:source:tag},%{NUMBER:duration:tag},%{NUMBER:received:tag},%{NUMBER:sent:tag}
'''
data_format = "grok"
I am also unsure of how it runs. If I have say two users generate into the log at once so two new lines, how does it react? Does it only read the final line of the log per collection?
Thank you.