From 10065b8aa877092b6a1a0f89b4cfa7fbeb37e193 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Wed, 6 Sep 2017 13:19:17 +0200 Subject: Add prometheus-node-exporter This change introduces a requirement on minimal Ubuntu version: 16.04 (Xenial). Change-Id: I8c0edf7f83127106c6baff015e7816b0e51267b8 --- config/hosts/master/roles/system/tasks/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/config/hosts/master/roles/system/tasks/main.yml b/config/hosts/master/roles/system/tasks/main.yml index 5cacba1..e4dead7 100644 --- a/config/hosts/master/roles/system/tasks/main.yml +++ b/config/hosts/master/roles/system/tasks/main.yml @@ -20,6 +20,7 @@ - git - sqlite3 - imagemagick + - prometheus-node-exporter - name: Install testlab-major dependencies apt: "name={{ item }} state=present force=yes" @@ -136,3 +137,19 @@ git: repo: git://github.com/tizen-artik/sdboot dest: /opt/sdboot + +- name: Configure prometheus-node-exporter service + lineinfile: + dest: /etc/default/prometheus-node-exporter + state: present + regexp: '^ARGS' + line: 'ARGS="-collectors.enabled diskstats,filesystem,hwmon,loadavg,meminfo,netdev,netstat,stat,textfile,zfs --collector.textfile.directory /home/{{ username }}/ws/prom/"' + register: serviceargs + +- name: Restart prometheus-node-exporter service + systemd: + name: prometheus-node-exporter + daemon_reload: yes + state: restarted + enabled: True + when: serviceargs.changed -- cgit v1.2.3