Hello,
I am a newbie and I have a few questions:
1- Is the Grafana Alloy configuration file on Windows config.alloy
?
2- Loki server is running on IP address 192.168.1.2. I want to write a configuration file for Grafana Alloy that sends Windows Event Log with ID 4066
to Loki server. I copied the following contents into the config.alloy
file, but the Alloy service is not running:
# Define the windows_events receiver to collect Event Logs
windows_events:
- name: event_log_4066
event_log: "Application" # Specify the event log to monitor (e.g., Application, Security, System)
xpath_query: '*[System[EventID=4066]]' # Filter for Event ID 4066
labels:
job: "windows_event_logs" # Add a label to identify the logs
# Define the loki exporter to send logs to the Loki server
loki:
- name: loki_exporter
endpoint: http://192.168.1.2:3100/loki/api/v1/push # Loki server endpoint
labels:
job: "windows_event_logs" # Match the label from the windows_events receiver
# Pipeline to route logs from the windows_events receiver to the loki exporter
pipeline:
- name: event_log_pipeline
receivers:
- windows_events/event_log_4066 # Use the windows_events receiver
exporters:
- loki/loki_exporter # Send logs to the loki exporter
Where is the problem?
Thank you.