Improve netdata configuration

This commit is contained in:
Wojciech Kozlowski 2023-10-08 18:48:41 +02:00
parent f92b5eac6e
commit 977e1dca9a
3 changed files with 31 additions and 7 deletions

View File

@ -23,6 +23,12 @@
dest: "/etc/netdata/stream.conf" dest: "/etc/netdata/stream.conf"
register: system_extra_netdata_stream_conf register: system_extra_netdata_stream_conf
- name: "configure netdata health notifications"
ansible.builtin.template:
src: "./health_alarm_notify.conf"
dest: "/etc/netdata/health_alarm_notify.conf"
register: system_extra_netdata_health_conf
- name: "start netdata" - name: "start netdata"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "netdata" name: "netdata"
@ -36,5 +42,6 @@
when: when:
(system_extra_netdata_install.changed or (system_extra_netdata_install.changed or
system_extra_netdata_netdata_conf.changed or system_extra_netdata_netdata_conf.changed or
system_extra_netdata_stream_conf.changed) and system_extra_netdata_stream_conf.changed or
system_extra_netdata_health_conf.changed) and
not system_extra_netdata_start.changed not system_extra_netdata_start.changed

View File

@ -0,0 +1,5 @@
# enable/disable sending emails
SEND_EMAIL="YES"
# if a role recipient is not configured, an email will be send to:
DEFAULT_RECIPIENT_EMAIL="root"

View File

@ -11,9 +11,21 @@
# #
[global] [global]
run as user = netdata run as user = netdata
web files owner = root web files owner = root
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 }}
[health]
enabled = {{ "yes" if system_extra_netdata_stream_parent else "no" }}
[db]
mode = {{ "dbengine" if system_extra_netdata_stream_parent else "none" }}
[web]
mode = {{ "static-threaded" if system_extra_netdata_stream_parent else "none" }}
[ml]
enabled = {{ "yes" if system_extra_netdata_stream_parent else "no" }}