-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
agent-config-example.yaml
81 lines (81 loc) · 2.69 KB
/
agent-config-example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
integrations:
agent:
enabled: true
relabel_configs:
- action: replace
source_labels:
- agent_hostname
target_label: instance
metric_relabel_configs:
- action: keep
regex: (prometheus_target_.*|prometheus_sd_discovered_targets|agent_build.*|agent_wal_samples_appended_total|process_start_time_seconds)
source_labels:
- __name__
windows_exporter:
enabled: true
prometheus_remote_write:
- basic_auth:
password: <Your Grafana.com API Key>
username: <Your Prometheus username>
url: https://prometheus-us-central1.grafana.net/api/prom/push
write_relabel_configs:
- source_labels: [__name__]
regex: windows_cpu_time_total|windows_cs_hostname|windows_cs_logical_processors|windows_cs_physical_memory_bytes|windows_logical_disk_free_bytes|windows_logical_disk_read_bytes_total|windows_logical_disk_size_bytes|windows_logical_disk_write_bytes_total|windows_net_bytes_total|windows_net_current_bandwidth|windows_os_info|windows_os_physical_memory_free_bytes|windows_system_system_up_time
action: keep
logs:
configs:
- clients:
- basic_auth:
password: <Your Grafana.com API Key>
username: <Your Loki username>
url: https://logs-prod-us-central1.grafana.net/loki/api/v1/push
name: integrations
positions:
filename: /tmp/positions.yaml
scrape_configs:
- job_name: integrations/windows-exporter-application
windows_events:
use_incoming_timestamp: true
bookmark_path: "./bookmark-application.xml"
eventlog_name: "Application"
xpath_query: '*'
labels:
job: integrations/windows_exporter
relabel_configs:
- source_labels: ['computer']
target_label: 'agent_hostname'
pipeline_stages:
- json:
expressions:
source: source
- labels:
source:
- job_name: integrations/windows-exporter-system
windows_events:
use_incoming_timestamp: true
bookmark_path: "./bookmark-system.xml"
eventlog_name: "System"
xpath_query: '*'
labels:
job: integrations/windows_exporter
relabel_configs:
- source_labels: ['computer']
target_label: 'agent_hostname'
pipeline_stages:
- json:
expressions:
source: source
- labels:
source:
metrics:
configs:
- name: integrations
remote_write:
- basic_auth:
password: <Your Grafana.com API Key>
username: <Your Prometheus username>
url: https://prometheus-us-central1.grafana.net/api/prom/push
scrape_configs:
global:
scrape_interval: 15s
wal_directory: /tmp/grafana-agent-wal