summaryrefslogtreecommitdiff
path: root/inventory/host_vars/ele-mon.yml
blob: 54d02218ee2947b2cff0376850cc684a0c00922d (plain) (blame)
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
---
install:
  vm:
    memory: 6G
    numcpus: 4
    autostart: yes
  disks:
    primary: /dev/sda
    scsi:
      sda:
        type: zfs
        name: root
        size: 10g
      sdb:
        type: zfs
        backend: storage
        name: data
        size: 50g
  interfaces:
  - bridge: br-lan
    name: lan0
  - bridge: br-mgmt
    name: mgmt0
  - bridge: br-funkfeuer
    name: funkfeuer0
  - bridge: br-forum_a1
    name: funkfeuer1

network:
  nameservers: "{{ network_zones.lan.dns }}"
  domain: "{{ host_domain }}"
  systemd_link:
    interfaces: "{{ install.interfaces }}"
  primary: &_network_primary_
    name: lan0
    address: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"
    gateway: "{{ network_zones.lan.gateway }}"
  interfaces:
  - *_network_primary_
  - name: mgmt0
    address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"
  - name: funkfeuer0
    address: "{{ network_zones.murat_transfer.prefix | ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"
  - name: funkfeuer1
    address: "{{ network_zones.funkfeuer.prefix | ipaddr(network_zones.funkfeuer.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"


ssh_users_root:
  - equinox
  - datacop


lvm_groups:
  mondata:
    pvs:
    - /dev/sdb


spreadspace_apt_repo_components:
  - prometheus

prometheus_server_storage:
  type: lvm
  vg: mondata
  lv: prometheus
  size: 30G
  fs: ext4

prometheus_server_alertmanager:
  url: "127.0.0.1:9093"
  path_prefix: "/alertmanager/"

prometheus_server_web_external_url: /prometheus/


prometheus_exporters_extra:
  - blackbox
  - nut
  - mikrotik

prometheus_exporter_blackbox_modules_extra:
  icmp:
    prober: icmp


prometheus_exporter_mikrotik_devices:
  - name: ele-br-nextlib0
    address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets['ele-br-nextlib0']) | ipaddr('address') }}"
    user: prometheus
    password: "{{ vault_prometheus_exporter_mikrotik_api_password }}"
  - name: ele-br-tub0
    address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets['ele-br-tub0']) | ipaddr('address') }}"
    user: prometheus
    password: "{{ vault_prometheus_exporter_mikrotik_api_password }}"
  - name: ele-br-nextlib1
    address: "{{ network_zones.funkfeuer.prefix | ipaddr(network_zones.funkfeuer.offsets['ele-br-nextlib1']) | ipaddr('address') }}"
    user: prometheus
    password: "{{ vault_prometheus_exporter_mikrotik_api_password }}"
  - name: ele-br-tub1
    address: "{{ network_zones.funkfeuer.prefix | ipaddr(network_zones.funkfeuer.offsets['ele-br-tub1']) | ipaddr('address') }}"
    user: prometheus
    password: "{{ vault_prometheus_exporter_mikrotik_api_password }}"

prometheus_alertmanager_web_route_prefix: /alertmanager/
promethues_alertmanager_smtp:
  smarthost: "mailrelay.chaos-at-home.org:587"
  from: "noreply@elev8.at"
  require_tls: yes
  auth:
    username: ele-mon
    password: "{{ vault_promethues_alertmanager_smtp_auth_password }}"

prometheus_alertmanager_route:
  receiver: equinox
  # routes:
  # - match_re:
  #     instance: ^$
  #   receiver: empty

prometheus_alertmanager_receivers:
  - name: empty
  - name: equinox
    email_configs:
    - to: equinox@spreadspace.org


grafana_secret_key: "{{ vault_grafana_secret_key }}"


prometheus_server_jobs_extra: |
  - job_name: 'node-openwrt'
    scheme: http
    static_configs:
    - targets:
      - 192.168.42.170:9100   ## ele-ap-nextlib0
      - 192.168.42.171:9100   ## ele-ap-nextlib1
      - 192.168.42.172:9100   ## ele-ap-nextlib2
      #- 192.168.42.173:9100   ## ele-ap-nextlib3
      #- 192.168.42.174:9100   ## ele-ap-nextlib4
      - 192.168.42.175:9100   ## ele-ap-nextlib5
      - 192.168.42.176:9100   ## ele-ap-nextlib6
      - 192.168.42.210:9100   ## ele-ups-nextlib0
      - 192.168.42.211:9100   ## ele-ups-nextlib1
      - 192.168.42.212:9100   ## ele-ups-nextlib2
      - 192.168.42.213:9100   ## ele-ups-nextlib3
      - 192.168.42.240:9100   ## ele-tub
      - 192.168.42.254:9100   ## ele-router

  - job_name: 'nut'
    metrics_path: /proxy
    params:
      module:
      - nut
    scheme: https
    tls_config:
      ca_file: /etc/ssl/prometheus/ca-crt.pem
      cert_file: /etc/ssl/prometheus/server/scrape-crt.pem
      key_file: /etc/ssl/prometheus/server/scrape-key.pem
    static_configs:
    - targets:
      - nextlib0@192.168.42.210
      - nextlib1@192.168.42.211
      - nextlib2@192.168.42.212
      - nextlib3@192.168.42.213
    relabel_configs:
    - source_labels: [__address__]
      regex: .*@(.*)
      target_label: __param_server
    - source_labels: [__address__]
      regex: (.*)@.*
      target_label: __param_ups
    - source_labels: [__param_ups]
      target_label: instance
    - target_label: __address__
      replacement: 192.168.18.220:9999

  - job_name: 'mikrotik'
    metrics_path: /proxy
    params:
      module:
      - mikrotik
    scheme: https
    tls_config:
      ca_file: /etc/ssl/prometheus/ca-crt.pem
      cert_file: /etc/ssl/prometheus/server/scrape-crt.pem
      key_file: /etc/ssl/prometheus/server/scrape-key.pem
    static_configs:
    - targets:
      - dummy
    relabel_configs:
    - target_label: __address__
      replacement: 192.168.18.220:9999