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"
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"
ansible.builtin.systemd:
name: "netdata"
@ -36,5 +42,6 @@
when:
(system_extra_netdata_install.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

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

@ -17,3 +17,15 @@
# Netdata is not designed to be exposed to potentially hostile
# networks. See https://github.com/netdata/netdata/issues/164
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" }}