Grafana Loki Configuration w/remote Windows Server

Hello Ladies & Gents,

I have successfully installed Grafana Loki on an Ubuntu Server 20.04.6, The Version of Grafana is Version 9.5.2 (commit: cfcea75916, branch: HEAD) and loki is loki, version 2.8.2 (branch: HEAD, revision: 9f809eda7) and Grafana Agent is v0.33.2 I believe.

My thing is I have the grafana agent working on a Windows Server 2016 VM and I am able to see the metrics. I do not know how to get them in to Grafana Loki. I have looked, read, researched and searched for what seems like 2 weeks and I cannot find any step by step tutorials on how to do this. The documentation for this is horrid both here at the grafana site and on google and various places. This is just my opinion but it should not be this tough to get this working.

Does someone have some decent detailed step by step on how to configure both sides (server and remote) to get the windows logs in to Grafana Loki? I can configure Linux remote servers and it works great just an fyi.

Thank you,
Michael

You would configure Grafana Agent to collect logs from somewhere on your Windows server and then forward to Loki endpoint. See Collect logs with Grafana Agent | Grafana Cloud documentation.

Thank you for your response, However I have read those docs and it does not have any detail on how to make the connection/forward logs from Windows Server’s grafana agent to my grafana loki server. I need something that has both sides (remote & server) config detailed step by step instructions. Unless I am missing something.

Here is a snippet of my Grafana Agent config:

Blockquote server:
http_listen_port: 12345
prometheus:
wal_directory: C:\ProgramData\grafana-agent-wal
global:
scrape_interval: 15s
configs:
- name: integrations
integrations:
windows_exporter:
enabled: true
loki:
positions_directory: C:\temp\log
configs:
- name: windows
clients:
- url: https://loki-server-here:6443/api/prom/push
scrape_configs:
- job_name: windows
windows_events:

      bookmark_path: C:\temp\log\bookmarkbookmark.xml
      use_incoming_timestamp: false
      eventlog_name: "Application"

Blockquote

FYI, I am not using the cloud I have an on prem server. So I am at a loss as to why it’s not pushing/ingesting to my loki server. Sorry about the formatting.

Thank you,
Michael

Please check this URL:

There are documentation about to config loki in Grafana Agent.

Regards,
Fadjar

I did thank you… I appreciate it.

Well I found out why the logs weren’t getting pushed. There is a vector server the vector service was down. I started it back up and logs flowed freely. YAY!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.