I’ve got Grafana Agent installed and running on the Windows Server 2019 VM that I want to monitor.
I have a Loki data source set up in Settings->Data Sources. The URL in the data source is https://logs-prod3.grafana.net. Is this correct or am I using the wrong URL here?
When I go to to Explore and select my Loki Data Source, I cannot get any data from the Event Log on my Windows VM to show up.
When I check Event Viewer on the Windows VM, I do not see error messages from Grafana Agent. Instead it is logging messages like these - it seems to be talking to Prometheus instead of Loki btw
level=info agent=prometheus instance=abbf2fd9cc1f67ee2b6e8de71dee63b3 msg=“series GC completed” duration=2.6292ms
level=info agent=prometheus instance=abbf2fd9cc1f67ee2b6e8de71dee63b3 msg=“Creating checkpoint” from_segment=232 to_segment=233 mint=1646164886000
level=info agent=prometheus instance=abbf2fd9cc1f67ee2b6e8de71dee63b3 msg=“WAL checkpoint complete” first=232 last=233 duration=56.2321ms
This is my agent-config.yaml
loki:
positions_directory: "C:\\Users\\Public\\Loki"
configs:
- name: windows
# Loki endpoint to push logs to
clients:
- url: https://160346:<Your Grafana.com API Key>@logs-prod3.grafana.net/loki/api/v1/push
scrape_configs:
- job_name: app_logs
windows_events:
use_incoming_timestamp: false
bookmark_path: "C:\\Users\\Public\\Loki\\bookmark.xml"
eventlog_name: "Application"
# Filter for logs
xpath_query: '*'
labels:
job: windows