diff --git a/inventories/chaosknoten/group_vars/all.yaml b/inventories/chaosknoten/group_vars/all.yaml index dc5bc27b..76147d88 100644 --- a/inventories/chaosknoten/group_vars/all.yaml +++ b/inventories/chaosknoten/group_vars/all.yaml @@ -50,10 +50,7 @@ alloy_config_default: | } prometheus.exporter.unix "local_system" { - enable_collectors = ["systemd", "textfile"] - textfile { - directory = "/var/lib/node_exporter_textfile/" - } + enable_collectors = ["systemd"] } prometheus.scrape "scrape_metrics" { diff --git a/inventories/z9/group_vars/all.yaml b/inventories/z9/group_vars/all.yaml index b59e724e..5cc32330 100644 --- a/inventories/z9/group_vars/all.yaml +++ b/inventories/z9/group_vars/all.yaml @@ -50,10 +50,7 @@ alloy_config_default: | } prometheus.exporter.unix "local_system" { - enable_collectors = ["systemd", "textfile"] - textfile { - directory = "/var/lib/node_exporter_textfile/" - } + enable_collectors = ["systemd"] } prometheus.scrape "scrape_metrics" { diff --git a/roles/alloy/tasks/main.yaml b/roles/alloy/tasks/main.yaml index 2559dc9c..b7cf8d6e 100644 --- a/roles/alloy/tasks/main.yaml +++ b/roles/alloy/tasks/main.yaml @@ -1,14 +1,6 @@ --- - name: Deploy Grafana Alloy with config block: - - name: Create directory for node_exporter textfile collector - ansible.builtin.file: - path: /var/lib/node_exporter_textfile - state: directory - mode: "0755" - owner: root - group: root - - name: Install Alloy ansible.builtin.include_tasks: install.yaml diff --git a/roles/ansible_pull/templates/ansible-pull.service.j2 b/roles/ansible_pull/templates/ansible-pull.service.j2 index 8b5c9e86..9607fc9d 100644 --- a/roles/ansible_pull/templates/ansible-pull.service.j2 +++ b/roles/ansible_pull/templates/ansible-pull.service.j2 @@ -19,6 +19,5 @@ ExecStart=/usr/local/lib/ansible_pull_venv/bin/ansible-pull \ --inventory "{{ ansible_pull__inventory }}" \ "{{ ansible_pull__playbook }}" User={{ ansible_pull__user }} -ExecStartPost=/usr/bin/bash -c 'echo "ansible_pull_last_successful_run_timestamp_seconds $(date +%s)" > /var/lib/node_exporter_textfile/ansible_pull.prom.$$; mv /var/lib/node_exporter_textfile/ansible_pull.prom.$$ /var/lib/node_exporter_textfile/ansible_pull.prom' # Reboot, if /var/run/reboot-required or /var/run/ansible-reboot-required exist. ExecStartPost=/usr/bin/bash -c 'if [ -e /var/run/reboot-required ] || [ -e /var/run/ansible-reboot-required ]; then sudo systemctl reboot; fi'