Hello,
i am new to grafana and cloud logging .
i trying to setup a windows integration- following the guide Grafana
I have installed the grafana agent which is running but i noticed when adding the log, on the step : Below logs.configs.scrape_configs
, insert the following lines according to your environment.
And i try to restart the Agent service , it will not start .
Find below the current agent-config:
server:
log_level: warn
metrics:
wal_directory: C:\ProgramData\grafana-agent-wal
global:
scrape_interval: 1m
configs:
- name: integrations
integrations:
windows_exporter:
enabled: true
instance: ‘DESKTOP-RC5946N’ # must match instance used in logs
# enable default collectors and time collector:
enabled_collectors: cpu,cs,logical_disk,net,os,service,system,textfile,time,diskdrive
metric_relabel_configs:
# drop disk volumes named HarddiskVolume.*
- action: drop
regex: HarddiskVolume.*
source_labels: [volume]
relabel_configs:
- target_label: job
replacement: ‘integrations/windows_exporter’ # must match job used in logs
logs:
scrape_configs:
- job_name: integrations/windows-exporter-application
windows_events:
use_incoming_timestamp: true
bookmark_path: “./bookmarks-app.xml”
eventlog_name: “Application”
xpath_query: ‘’
locale: 1033
# - 1033 to force English language
# - 0 to use default Windows locale
labels:
job: integrations/windows_exporter
instance: ‘DESKTOP-RC5946N’ # must match instance used in windows_exporter
relabel_configs:
- source_labels: [‘computer’]
target_label: ‘agent_hostname’
pipeline_stages:
- json:
expressions:
source: source
level: levelText
- labels:
source:
level:
- job_name: integrations/windows-exporter-system
windows_events:
use_incoming_timestamp: true
bookmark_path: “./bookmarks-sys.xml”
eventlog_name: “System”
xpath_query: '’
locale: 1033
# - 1033 to force English language
# - 0 to use default Windows locale
labels:
job: integrations/windows_exporter
instance: ‘DESKTOP-RC5946N’ # must match instance used in windows_exporter
relabel_configs:
- source_labels: [‘computer’]
target_label: ‘agent_hostname’
pipeline_stages:
- json:
expressions:
source: source
level: levelText
- labels:
source:
level: