Windows environment : Promtail,Loki and Grafana setup
i have setup promtail , loki and grafana dash for extracting the MSSQLserver logs . The logs were displaying on grafana dashboard as below
L o g i n f a i l e d f o r u s e r
Apparently SQL Server Error logs are encoded in UTF-16LE (From Google Searching) Or OCS2-LE BOM (from Notepad++). Grafana Support mentioned changing it to UTF-8, but I don’t think we have the option to change the encoding for SQL Server Error Logs.
Or use a scripting language such as python to copy add recreate that file with desired encoding in another location in same location but different extension, I just did that and Loki dashboard looks fine. I just dont see why MS is saving it with such encoding
This is a running sql server that emits logs on a regular frequency. Not sure writing a bunch of wrappers to copy the file (or the current parts of the file) in realtime is practical. We run over 300 SQL Servers and I was looking to Grafana for log capture. I just want the grafana agent to support the encoding.
This is still an issue. Sucks to have to use regex to find “[fF].a.i.l.e.d”, but that is doable. The big issue is the display in either Log Explorer or the log panel. Just impossible to read with the character spaceing.