Tune netdata config

This commit is contained in:
Wojciech Kozlowski 2023-10-22 12:12:14 +02:00
parent ffe65032db
commit 34a250bd42
3 changed files with 20 additions and 3 deletions

View File

@ -2,15 +2,21 @@
argument_specs: argument_specs:
main: main:
options: options:
system_extra_netdata_install_sensors:
type: "bool"
required: true
system_extra_netdata_bind_to: system_extra_netdata_bind_to:
type: "str" type: "str"
required: true required: false
system_extra_netdata_update_every:
type: "str"
required: false
system_extra_netdata_stream_parent: system_extra_netdata_stream_parent:
type: "bool" type: "bool"
required: true required: true
system_extra_netdata_stream_dest_inet6: system_extra_netdata_stream_dest_inet6:
type: "str" type: "str"
required: true required: "{{ not system_extra_netdata_stream_parent }}"
system_extra_netdata_stream_api_key: system_extra_netdata_stream_api_key:
type: "str" type: "str"
required: true required: true

View File

@ -6,6 +6,14 @@
- "uuid-runtime" - "uuid-runtime"
register: system_extra_netdata_install register: system_extra_netdata_install
- name: "install lm-sensors"
ansible.builtin.apt:
name:
- "lm-sensors"
register: system_extra_netdata_lm_sensors_install
when:
system_extra_netdata_install_sensors
- name: "enable netdata" - name: "enable netdata"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "netdata" name: "netdata"
@ -41,6 +49,8 @@
state: "restarted" state: "restarted"
when: when:
(system_extra_netdata_install.changed or (system_extra_netdata_install.changed or
(system_extra_netdata_lm_sensors_install is defined and
system_extra_netdata_lm_sensors_install.changed) or
system_extra_netdata_netdata_conf.changed or system_extra_netdata_netdata_conf.changed or
system_extra_netdata_stream_conf.changed or system_extra_netdata_stream_conf.changed or
system_extra_netdata_health_conf.changed) and system_extra_netdata_health_conf.changed) and

View File

@ -16,7 +16,8 @@
web files group = root web files group = root
# Netdata is not designed to be exposed to potentially hostile # Netdata is not designed to be exposed to potentially hostile
# networks. See https://github.com/netdata/netdata/issues/164 # networks. See https://github.com/netdata/netdata/issues/164
bind socket to IP = {{ system_extra_netdata_bind_to }} bind socket to IP = {{ system_extra_netdata_bind_to | default("localhost") }}
update every = {{ system_extra_netdata_update_every | default("1") }}
[plugins] [plugins]
netdata monitoring = no netdata monitoring = no