Hi, I’m new using grafana/loki.
I have a doubt regarding how to obtain some data from the log and showing it in a Grafana dashboard. I’ll try to explain what I want to obtain.
I’ve made the integration between Loki and Grafana. I can see in Grafana the data from the log.
But now, I want to obtain the total number of entries exist according to different words (obtained from a regexp I have to create).
An extract of the log:
ERROR|2023-04-17 15:18:47,272|8C4BBEA0F666443CBD2DF7BFBF12DCD1|josem.lopez.moreno.ext|TechnicalIncidentRestController|TechnicalIncidentRestController: getActuationGroupCoordinatorUserListMassive Exception: Usted no tiene privilegio de coordinación para el grupo N3 SUR Intervención General.
ERROR|2023-04-17 17:08:12,379|8B852E846260444F8BFECEAC56A2B314|josem.lopez.moreno.ext|GestorResourceBundle|Error al leer archivo de propiedades trewa.conf.trewaconf Excepción: java.util.MissingResourceException: Can’t find bundle for base name trewa.conf.trewaconf, locale es_ES
ERROR|2023-04-17 17:09:59,029|8AB2CD94BD7146799860E32C1EFD193C||UserServiceImpl|UserServiceImpl: userLoginLDAP: usuario o contraseña incorrectos en LDAP.
Explaining it with the first line:
ERROR|2023-04-17 15:18:47,272|8C4BBEA0F666443CBD2DF7BFBF12DCD1|josem.lopez.moreno.ext|TechnicalIncidentRestController|TechnicalIncidentRestController: getActuationGroupCoordinatorUserListMassive Exception: Usted no tiene privilegio de coordinación para el grupo N3 SUR Intervención General.
user ID: osem.lopez.moreno.ext (field 4)
transaction web ID: 8C4BBEA0F666443CBD2DF7BFBF12DCD1 (field 3)
java class name: TechnicalIncidentRestController (field 5)
I want to obtain only errors log. This filter is done.
From all the java classes (field 5) that appear with error, get the user ID, transaction web ID.
But I want to obtain this dinamicaly not making the filter manually in the dashboard one per onne java class. (obtain this value with a regexp)
Is this possible to configure? Would you please indicate me how to do it?