I expected to have several labels : action, ip, service, date, time. Maybe there is another approach to do this but at this moment every search I do point to this method or regex but I don’t really understand how to extract the desired labels and use them as axis in a barchart for example. How can I achieve this result ?
Thank you, I have been able to do it. It’s easier to setup some labels with promtails to extract the IPs before sending them to Loki with a regex. I also had some issues with the timestamps which were fixed the same way. For additional information, here is my promtail configuration for fail2ban :