summaryrefslogtreecommitdiff
path: root/inventory
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-07-25 11:24:47 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-07-25 11:24:47 +0200
commit83a9137a8450f5e8ec1ae828b3e3e3554b76b013 (patch)
tree701077b59e758fd9145f068e9f66dcf088ee62fd /inventory
parentele-router: preapare setup for e21 (diff)
parentpromethues exporter: add TODO list (diff)
Merge branch 'topic/prometheus'
Diffstat (limited to 'inventory')
-rw-r--r--inventory/group_vars/chaos-at-home/network.yml3
-rw-r--r--inventory/group_vars/promzone-chaos-at-home/vars.yml13
-rw-r--r--inventory/host_vars/ch-mon.yml87
-rw-r--r--inventory/host_vars/ch-testvm-prometheus.yml3
-rw-r--r--inventory/hosts.ini12
5 files changed, 118 insertions, 0 deletions
diff --git a/inventory/group_vars/chaos-at-home/network.yml b/inventory/group_vars/chaos-at-home/network.yml
index e9b65bfd..3e796dbc 100644
--- a/inventory/group_vars/chaos-at-home/network.yml
+++ b/inventory/group_vars/chaos-at-home/network.yml
@@ -43,6 +43,7 @@ network_zones:
key: "{{ vault_wifi_keys.iot }}"
offsets:
ch-wled-test: 1
+ ch-mon: 230
ch-iot: 254
svc:
@@ -65,6 +66,7 @@ network_zones:
ch-nic: 53
__svc_http__: 80
__svc_imap__: 143
+ ch-mon: 230
ch-router-obsd: 253
ch-router: 254
#############
@@ -85,6 +87,7 @@ network_zones:
ch-sw1: 201
ch-ap0: 220
ch-ap1: 221
+ ch-mon: 230
ch-gnocchi: 240
ch-router: 241
diff --git a/inventory/group_vars/promzone-chaos-at-home/vars.yml b/inventory/group_vars/promzone-chaos-at-home/vars.yml
new file mode 100644
index 00000000..078576f1
--- /dev/null
+++ b/inventory/group_vars/promzone-chaos-at-home/vars.yml
@@ -0,0 +1,13 @@
+---
+prometheus_scrape_endpoint: "{{ network.primary.address | ipaddr('address') }}:9999"
+
+prometheus_exporters_extra: []
+prometheus_exporters_default:
+ - node
+
+prometheus_server: ch-mon
+prometheus_server_jobs:
+ - node
+
+prometheus_zone_name: chaos@home
+prometheus_zone_targets: "{{ groups['promzone-chaos-at-home'] }}"
diff --git a/inventory/host_vars/ch-mon.yml b/inventory/host_vars/ch-mon.yml
new file mode 100644
index 00000000..4df29b23
--- /dev/null
+++ b/inventory/host_vars/ch-mon.yml
@@ -0,0 +1,87 @@
+---
+install_jumphost: ch-jump
+
+install:
+ vm:
+ memory: 8G
+ numcpus: 8
+ autostart: yes
+ disks:
+ primary: /dev/sda
+ scsi:
+ sda:
+ type: zfs
+ name: root
+ size: 10g
+ sdb:
+ type: zfs
+ name: data
+ size: 50g
+ interfaces:
+ - bridge: br-svc
+ name: svc0
+ - bridge: br-iot
+ name: iot0
+ - bridge: br-mgmt
+ name: mgmt0
+
+network:
+ nameservers: "{{ network_zones.svc.dns }}"
+ domain: "{{ host_domain }}"
+ systemd_link:
+ interfaces: "{{ install.interfaces }}"
+ primary: &_network_primary_
+ name: svc0
+ address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"
+ gateway: "{{ network_zones.svc.gateway }}"
+ static_routes:
+ - destination: "{{ network_zones.lan.prefix }}"
+ gateway: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ipaddr('address') }}"
+ interfaces:
+ - *_network_primary_
+ - name: iot0
+ address: "{{ network_zones.iot.prefix | ipaddr(network_zones.iot.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"
+ - name: mgmt0
+ address: "{{ network_zones.mgmt.prefix | ipaddr(network_zones.mgmt.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"
+
+
+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
+
+prometheus_exporter_blackbox_modules_extra:
+ icmp:
+ prober: icmp
+
+
+promethues_alertmanager_smtp:
+ smarthost: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets['ch-prometheus-legacy']) | ipaddr('address') }}:25"
+ from: "noreply@chaos-at-home.org"
+ require_tls: no
+
+prometheus_alertmanager_web_route_prefix: /alertmanager/
+
+
+grafana_secret_key: "{{ vault_grafana_secret_key }}"
diff --git a/inventory/host_vars/ch-testvm-prometheus.yml b/inventory/host_vars/ch-testvm-prometheus.yml
index d11d565c..e539735f 100644
--- a/inventory/host_vars/ch-testvm-prometheus.yml
+++ b/inventory/host_vars/ch-testvm-prometheus.yml
@@ -33,6 +33,9 @@ network:
- *_network_primary_
+spreadspace_apt_repo_components:
+ - prometheus
+
containerd_storage:
type: lvm
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index 769bdfbf..ef99f81b 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -30,6 +30,7 @@ ch-prometheus-legacy host_name=prometheus
ch-testvm-prometheus host_name=testvm-prometheus
ch-iot host_name=iot
ch-vpn host_name=vpn
+ch-mon host_name=mon
ch-epimetheus host_name=epimetheus
ch-mc host_name=mc
ch-atlas host_name=atlas
@@ -328,6 +329,7 @@ ch-prometheus-legacy
ch-testvm-prometheus
ch-iot
ch-vpn
+ch-mon
ch-k8s-master
[vmhost-ch-prometheus]
ch-prometheus
@@ -381,6 +383,16 @@ vmhost-sk-2019vm-guests
vmhost-sk-tomnext-guests
+## prometheus monitoring
+[promzone-chaos-at-home-server]
+ch-mon
+[promzone-chaos-at-home]
+ch-mon
+ch-testvm-prometheus
+[promzone-chaos-at-home:children]
+promzone-chaos-at-home-server
+
+
## hoster
[hroot]
sk-2019