node_exporter: Fix startup options for Fedora
This commit is contained in:
parent
b576f18c93
commit
1bc3805ded
1 changed files with 18 additions and 2 deletions
|
@ -69,7 +69,7 @@
|
|||
job: /usr/local/sbin/node-exporter-run-textfile-collector
|
||||
minute: "*/10"
|
||||
|
||||
- name: Modify config
|
||||
- name: Modify config (pre 1.5.0)
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/prometheus-node-exporter
|
||||
regexp: "^ARGS="
|
||||
|
@ -80,7 +80,23 @@
|
|||
--web.config=/etc/node_exporter/web-config.yml
|
||||
--collector.textfile.directory=/var/lib/prometheus/node-exporter"
|
||||
notify: Restart node_exporter
|
||||
when: ansible_os_family == "RedHat"
|
||||
when:
|
||||
- ansible_os_family == "RedHat"
|
||||
- ansible_distribution != "Fedora"
|
||||
|
||||
- name: Modify config
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/prometheus-node-exporter
|
||||
regexp: "^ARGS="
|
||||
line: >-
|
||||
ARGS="--collector.filesystem.ignored-mount-points='^/(dev|proc|sys|run/(user|credentials/systemd-.+))($|/)'
|
||||
--collector.netclass.ignored-devices='^(br-|docker|veth).+$'
|
||||
--collector.netdev.device-exclude='^(br-|docker|veth).+$'
|
||||
--web.config.file=/etc/node_exporter/web-config.yml
|
||||
--collector.textfile.directory=/var/lib/prometheus/node-exporter"
|
||||
notify: Restart node_exporter
|
||||
when:
|
||||
- ansible_distribution == "Fedora"
|
||||
|
||||
- name: Install disk and raid monitoring scripts
|
||||
ansible.builtin.copy:
|
||||
|
|
Loading…
Add table
Reference in a new issue