diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2024-09-29 23:33:59 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2024-09-29 23:33:59 +0200 |
commit | f4e65d26183b1133d919c415fec349f52fb4385f (patch) | |
tree | feef3f368bf27d080108c998f1085cedae6bfdf2 | |
parent | 0d13a5b4a2392200e78c8e15aa59044ec18eea16 (diff) | |
download | infra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.gz infra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.bz2 infra-f4e65d26183b1133d919c415fec349f52fb4385f.tar.xz infra-f4e65d26183b1133d919c415fec349f52fb4385f.zip |
lhn2pi
-rw-r--r-- | ansible/plays/host-lhn2pi.yml | 6 | ||||
-rw-r--r-- | ansible/plays/lhn2pi.yml | 4 | ||||
-rw-r--r-- | ansible/plays/templates/lhn2pi/systemd/network/10-eth0.network | 4 | ||||
-rw-r--r-- | ansible/roles/prometheus-bird-exporter/handlers/main.yml | 5 | ||||
-rw-r--r-- | ansible/roles/prometheus-bird-exporter/tasks/main.yml | 18 | ||||
-rw-r--r-- | ansible/roles/prometheus-node-exporter/handlers/main.yml | 5 | ||||
-rw-r--r-- | ansible/roles/prometheus-node-exporter/tasks/main.yml | 18 | ||||
-rw-r--r-- | terraform/hash-prometheus/prometheus.yml | 6 |
8 files changed, 60 insertions, 6 deletions
diff --git a/ansible/plays/host-lhn2pi.yml b/ansible/plays/host-lhn2pi.yml new file mode 100644 index 0000000..551c3dd --- /dev/null +++ b/ansible/plays/host-lhn2pi.yml @@ -0,0 +1,6 @@ +- hosts: + - lhn2pi + roles: + - systemd-networkd + - prometheus-bird-exporter + - prometheus-node-exporter diff --git a/ansible/plays/lhn2pi.yml b/ansible/plays/lhn2pi.yml deleted file mode 100644 index 614b926..0000000 --- a/ansible/plays/lhn2pi.yml +++ /dev/null @@ -1,4 +0,0 @@ -- hosts: - - lhn2pi - roles: - - systemd-networkd diff --git a/ansible/plays/templates/lhn2pi/systemd/network/10-eth0.network b/ansible/plays/templates/lhn2pi/systemd/network/10-eth0.network index f17b3f9..853556d 100644 --- a/ansible/plays/templates/lhn2pi/systemd/network/10-eth0.network +++ b/ansible/plays/templates/lhn2pi/systemd/network/10-eth0.network @@ -5,3 +5,7 @@ Name=eth0 DHCP=ipv4 Address={{ ipam6.networks.lhn2_dn42.hosts.lhn2pi }} # IPv6Forwarding=yes # needs newer systemd + +# Disables the automatic activation of DHCPv6 from RA packets +[IPv6AcceptRA] +DHCPv6Client=no diff --git a/ansible/roles/prometheus-bird-exporter/handlers/main.yml b/ansible/roles/prometheus-bird-exporter/handlers/main.yml new file mode 100644 index 0000000..f4f9381 --- /dev/null +++ b/ansible/roles/prometheus-bird-exporter/handlers/main.yml @@ -0,0 +1,5 @@ +- name: restart + become: yes + systemd: + name: prometheus-bird-exporter + state: restarted diff --git a/ansible/roles/prometheus-bird-exporter/tasks/main.yml b/ansible/roles/prometheus-bird-exporter/tasks/main.yml new file mode 100644 index 0000000..6d8b999 --- /dev/null +++ b/ansible/roles/prometheus-bird-exporter/tasks/main.yml @@ -0,0 +1,18 @@ +- become: yes + package: + name: "{{ items }}" + state: present + vars: + items: + - prometheus-bird-exporter +- name: /etc/default/prometheus-bird-exporter + become: yes + copy: + dest: /etc/default/prometheus-bird-exporter + content: | + # Set the command-line arguments to pass to the server. + # Due to shell escaping, to pass backslashes for regexes, you need to double + # them (\\d for \d). If running under systemd, you need to double them again + # (\\\\d to mean \d), and escape newlines too. + ARGS="-bird.v2 -format.new" + notify: restart diff --git a/ansible/roles/prometheus-node-exporter/handlers/main.yml b/ansible/roles/prometheus-node-exporter/handlers/main.yml new file mode 100644 index 0000000..f4f9381 --- /dev/null +++ b/ansible/roles/prometheus-node-exporter/handlers/main.yml @@ -0,0 +1,5 @@ +- name: restart + become: yes + systemd: + name: prometheus-bird-exporter + state: restarted diff --git a/ansible/roles/prometheus-node-exporter/tasks/main.yml b/ansible/roles/prometheus-node-exporter/tasks/main.yml new file mode 100644 index 0000000..e7c6d18 --- /dev/null +++ b/ansible/roles/prometheus-node-exporter/tasks/main.yml @@ -0,0 +1,18 @@ +- become: yes + package: + name: "{{ items }}" + state: present + vars: + items: + - prometheus-node-exporter +- name: /etc/default/prometheus-node-exporter + become: yes + copy: + dest: /etc/default/prometheus-node-exporter + content: | + # Set the command-line arguments to pass to the server. + # Due to shell escaping, to pass backslashes for regexes, you need to double + # them (\\d for \d). If running under systemd, you need to double them again + # (\\\\d to mean \d), and escape newlines too. + ARGS="" + notify: restart diff --git a/terraform/hash-prometheus/prometheus.yml b/terraform/hash-prometheus/prometheus.yml index afc1112..0033330 100644 --- a/terraform/hash-prometheus/prometheus.yml +++ b/terraform/hash-prometheus/prometheus.yml @@ -3,15 +3,17 @@ global: scrape_configs: - job_name: node - scrape_interval: 1m + scrape_interval: 30s static_configs: - targets: - "knot.dn42.trygvis.io:9100" - "hash.dn42.trygvis.io:9100" + - "lhn2pi.dn42.trygvis.io:9100" - job_name: bird - scrape_interval: 1m + scrape_interval: 30s static_configs: - targets: - "knot.dn42.trygvis.io:9324" - "hash.dn42.trygvis.io:9324" + - "lhn2pi.dn42.trygvis.io:9324" |