forked from prometheus/demo-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars
168 lines (159 loc) · 4.31 KB
/
vars
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
---
influxdb_host: "influx.cloudalchemy.org"
influxdb_db: cloudalchemy
influxdb_user: prometheus
influxdb_password: "{{ vault_influxdb_password }}"
prometheus_web_external_url: "http://{{ ansible_host }}:9090"
prometheus_storage_retention: "14d"
# prometheus_remote_write:
# - url: "http://{{ influxdb_host }}:8086/api/v1/prom/write?db={{ influxdb_db }}"
# basic_auth:
# username: "{{ influxdb_user }}"
# password: "{{ influxdb_password }}"
# write_relabel_configs:
# - source_labels: ['__name__']
# regex: 'node_load1'
# action: keep
#
# prometheus_remote_read:
# - url: "http://{{ influxdb_host }}:8086/api/v1/prom/read?db={{ influxdb_db }}"
# basic_auth:
# username: "{{ influxdb_user }}"
# password: "{{ influxdb_password }}"
# read_recent: false
# required_matchers:
# job: "node"
prometheus_alertmanager_config:
- scheme: http
static_configs:
- targets:
- "{{ ansible_host }}:9093"
prometheus_targets:
node:
- targets:
"{{ groups['all'] | map('extract', hostvars, ['ansible_host']) | map('regex_replace', '$', ':9100') | list }}"
labels:
env: demo
alertmanager:
- targets:
- "{{ ansible_host }}:9093"
labels:
env: demo
grafana:
- targets:
- "{{ ansible_host }}:3000"
labels:
env: demo
# docker:
# - targets:
# "{{ groups['influxdb'] | map('extract', hostvars, ['ansible_host']) | map('regex_replace', '$', ':8080') | list }}"
# labels:
# env: demo
# netdata:
# - targets:
# - "london.my-netdata.io"
# - "atlanta.my-netdata.io"
# - "sanfrancisco.my-netdata.io"
# - "toronto.my-netdata.io"
# - "bangalore.my-netdata.io"
# - "singapore.my-netdata.io"
# - "newyork.my-netdata.io"
# - "frankfurt.my-netdata.io"
# - "octopuscs.my-netdata.io"
# - "ventureer.my-netdata.io"
# - "stackscale.my-netdata.io"
# labels:
# env: netdata-demo
prometheus_scrape_configs:
- job_name: "prometheus"
metrics_path: "/metrics"
static_configs:
- targets:
- "{{ ansible_host }}:9090"
- job_name: "caddy"
metrics_path: "/metrics"
static_configs:
- targets:
- "localhost:9180"
- job_name: "node"
file_sd_configs:
- files:
- "/etc/prometheus/file_sd/node.yml"
- job_name: "alertmanager"
file_sd_configs:
- files:
- "/etc/prometheus/file_sd/alertmanager.yml"
- job_name: "grafana"
file_sd_configs:
- files:
- "/etc/prometheus/file_sd/grafana.yml"
#- job_name: "docker"
# file_sd_configs:
# - files:
# - "/etc/prometheus/file_sd/docker.yml"
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- "http://{{ ansible_host }}:9100"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115 # Blackbox exporter.
#- job_name: 'influxdb'
# metrics_path: /metrics
# static_configs:
# - targets:
# - "{{ influxdb_host }}:8086"
#- job_name: "netdata"
# scrape_interval: 60s
# metrics_path: "/api/v1/allmetrics"
# params:
# format: ['prometheus']
# data: ['raw']
# honor_labels: true
# file_sd_configs:
# - files:
# - "/etc/prometheus/file_sd/netdata.yml"
alertmanager_external_url: "http://{{ ansible_host }}:9093"
alertmanager_slack_api_url: "http://example.org"
alertmanager_receivers:
- name: slack
slack_configs:
- send_resolved: true
api_url: $slack_api_url
channel: '#alerts'
alertmanager_route:
group_by: ['alertname', 'cluster', 'service']
group_wait: 30s
group_interval: 5m
repeat_interval: 4h
receiver: slack
grafana_security:
admin_user: admin
admin_password: "{{ vault_grafana_password }}"
grafana_auth:
anonymous:
org_name: "Main Org."
org_role: Viewer
grafana_datasources:
- name: "Prometheus"
type: "prometheus"
access: "proxy"
url: "http://{{ ansible_host }}:9090"
isDefault: true
grafana_dashboards:
- dashboard_id: '1860'
revision_id: '12'
datasource: '{{ grafana_datasources.0.name }}'
- dashboard_id: '3662'
revision_id: '2'
datasource: '{{ grafana_datasources.0.name }}'
- dashboard_id: '4271'
revision_id: '4'
datasource: '{{ grafana_datasources.0.name }}'