node_exporter: Enable text collector for OpenBSD
This commit is contained in:
parent
e43dd2a26e
commit
98d52e577a
1 changed files with 13 additions and 1 deletions
|
@ -31,6 +31,15 @@
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
notify: Restart node_exporter
|
notify: Restart node_exporter
|
||||||
|
|
||||||
|
- name: Create textfile collector directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /var/db/node-exporter
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
owner: _nodeexporter
|
||||||
|
group: _nodeexporter
|
||||||
|
when: ansible_os_family == "OpenBSD"
|
||||||
|
|
||||||
- name: Modify config
|
- name: Modify config
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/default/prometheus-node-exporter
|
path: /etc/default/prometheus-node-exporter
|
||||||
|
@ -50,7 +59,10 @@
|
||||||
name: "{{ node_exporter_service }}"
|
name: "{{ node_exporter_service }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
arguments: --web.config.file=/etc/node_exporter/web-config.yml
|
arguments: >-
|
||||||
|
--web.config.file=/etc/node_exporter/web-config.yml
|
||||||
|
--collector.textfile.directory /var/db/node-exporter
|
||||||
|
notify: Restart node_exporter
|
||||||
when: ansible_os_family == "OpenBSD"
|
when: ansible_os_family == "OpenBSD"
|
||||||
|
|
||||||
- name: Enable service
|
- name: Enable service
|
||||||
|
|
Loading…
Add table
Reference in a new issue